Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
fix: revert to three import
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Jul 21, 2022
1 parent 5707f85 commit 7384f93
Show file tree
Hide file tree
Showing 245 changed files with 2,671 additions and 3,639 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { provideCommonGeometryRef } from '@angular-three/core';
import { NgtBufferGeometry } from '@angular-three/core/geometries';
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { tap } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'sandbox-height-field-geometry[elementSize][heights]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NgtTriple } from '@angular-three/core';
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
// @ts-ignore
import niceColors from 'nice-color-palettes';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'sandbox-height-field[elementSize][heights][position][rotation]',
Expand Down
2 changes: 1 addition & 1 deletion apps/sandbox/src/app/height-field/spheres.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { coerceNumberProperty, NgtComponentStore, NumberInput } from '@angular-t
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
// @ts-ignore
import niceColors from 'nice-color-palettes';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'sandbox-spheres[columns][rows][spread]',
Expand Down
2 changes: 1 addition & 1 deletion apps/sandbox/src/app/keen-bloom/keen-bloom.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { NgtGLTFLoader, NgtSobaLoaderModule } from '@angular-three/soba/loaders'
import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'sandbox-keen-bloom',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ChangeDetectionStrategy, Component, Input, NgModule, OnInit } from '@an
import { RouterModule } from '@angular/router';
// @ts-ignore
import niceColors from 'nice-color-palettes';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

const niceColor = niceColors[Math.floor(Math.random() * niceColors.length)];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ChangeDetectionStrategy, Component, Input, NgModule } from '@angular/co
import { RouterModule } from '@angular/router';
import { Observable } from 'rxjs';
import { GLTF } from 'three-stdlib';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

const positions = [...Array(800)].map(() => ({
position: [40 - Math.random() * 80, 40 - Math.random() * 80, 40 - Math.random() * 80],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
import { RouterModule } from '@angular/router';
import { Observable, takeUntil } from 'rxjs';
import { GLTF, GLTFLoader } from 'three-stdlib';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';
import { createRagdoll, ShapeConfig, ShapeName } from './monday-morning.config';

const { joints, shapes } = createRagdoll(4.8, Math.PI / 16, Math.PI / 16, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { BlendFunction, KernelSize, SSAOEffect } from 'postprocessing';
import { Observable } from 'rxjs';
// @ts-ignore
import { FlakesTexture, GLTF, RectAreaLightUniformsLib } from 'three-stdlib';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

RectAreaLightUniformsLib.init();
THREE.Vector2.prototype.equals = function (v, epsilon = 0.001) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, Directive, NgModule, NgZone, OnInit } from '@angular/core';
import { RouterModule } from '@angular/router';
import { KernelSize } from 'postprocessing';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'sandbox-object-clump',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { NgtMeshModule } from '@angular-three/core/meshes';
import { NgtStatsModule } from '@angular-three/core/stats';
import { ChangeDetectionStrategy, Component, Input, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'sandbox-physic-cubes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, HostListener, Input, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CylinderArgs } from '@pmndrs/cannon-worker-api';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';
import { Chassis, Vehicle, Wheel } from './vehicle.component';

@Component({
Expand Down
2 changes: 1 addition & 1 deletion apps/sandbox/src/app/raycast-vehicle/vehicle.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NgtGLTFLoader } from '@angular-three/soba/loaders';
import { ChangeDetectionStrategy, Component, HostListener, Input, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
import { GLTF } from 'three-stdlib';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

const beetleMaterials = [
'Black paint',
Expand Down
2 changes: 1 addition & 1 deletion apps/sandbox/src/app/reuse-gltf/reuse-gltf.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { ChangeDetectionStrategy, Component, Inject, NgModule, NgZone, Optional,
import { RouterModule } from '@angular/router';
import { Observable } from 'rxjs';
import { GLTF } from 'three-stdlib';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'sandbox-reuse-gltf',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
// @ts-ignore
import niceColors from 'nice-color-palettes';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

const niceColor = niceColors[Math.floor(Math.random() * niceColors.length)];

Expand Down
2 changes: 1 addition & 1 deletion libs/cannon/src/lib/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import type {
} from '@pmndrs/cannon-worker-api';
import { CannonWorkerAPI } from '@pmndrs/cannon-worker-api';
import { combineLatest, filter } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';
import { NgtCannonDebug } from './debug';
import type { CannonEvents } from './physics.store';
import { NgtPhysicsStore } from './physics.store';
Expand Down
2 changes: 1 addition & 1 deletion libs/cannon/src/lib/constraint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
PointToPointConstraintOpts,
} from '@pmndrs/cannon-worker-api';
import { combineLatest, filter } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';
import { NgtPhysicsStore } from './physics.store';

type ConstraintApi = {
Expand Down
2 changes: 1 addition & 1 deletion libs/cannon/src/lib/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ChangeDetectionStrategy, Component, Input, NgModule, NgZone } from '@an
import { BodyProps, BodyShapeType, propsToBody } from '@pmndrs/cannon-worker-api';
import { Body, Quaternion, Vec3, World } from 'cannon-es';
import CannonDebugger from 'cannon-es-debugger';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';
import { NgtPhysicsStore } from './physics.store';

const q = new THREE.Quaternion();
Expand Down
2 changes: 1 addition & 1 deletion libs/cannon/src/lib/physics.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from '@pmndrs/cannon-worker-api';
import type { EventEmitter } from 'events';
import { tap } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

type CannonEvent = CollideBeginEvent | CollideEndEvent | CollideEvent | RayhitEvent;
type CallbackByType<T extends { type: string }> = {
Expand Down
2 changes: 1 addition & 1 deletion libs/cannon/src/lib/raycast-vehicle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { is, NgtComponentStore, NgtStore, prepare, Ref, tapEffect } from '@angul
import { Injectable, NgZone, Optional } from '@angular/core';
import type { CannonWorkerAPI, WheelInfoOptions } from '@pmndrs/cannon-worker-api';
import { combineLatest, filter } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';
import { NgtPhysicsStore } from './physics.store';
import { NgtCannonUtils } from './utils';

Expand Down
2 changes: 1 addition & 1 deletion libs/cannon/src/lib/spring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { makeId, NgtComponentStore, NgtStore, Ref, tapEffect } from '@angular-th
import { Injectable, NgZone, Optional } from '@angular/core';
import type { CannonWorkerAPI, SpringOptns } from '@pmndrs/cannon-worker-api';
import { combineLatest, filter } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';
import { NgtPhysicsStore } from './physics.store';

export interface NgtPhysicSpringApi {
Expand Down
2 changes: 1 addition & 1 deletion libs/cannon/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
Subscriptions,
SubscriptionTarget,
} from '@pmndrs/cannon-worker-api';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

export class NgtCannonUtils {
static incrementingId = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { makeColor, NgtInstance, provideInstanceRef, NgtColor } from '@angular-three/core';
import { ChangeDetectionStrategy, Component, Input, NgModule } from '@angular/core';
import type { Subscription } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-color[color]',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-float16-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-float32-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-float64-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { make, NgtInstance, provideInstanceRef, NgtFog } from '@angular-three/core';
import { ChangeDetectionStrategy, Component, Input, NgModule } from '@angular/core';
import type { Subscription } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-fog[fog]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { make, NgtInstance, provideInstanceRef, NgtFogExp2 } from '@angular-three/core';
import { ChangeDetectionStrategy, Component, Input, NgModule } from '@angular/core';
import type { Subscription } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-fog-exp2[fogExp2]',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-instanced-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-int16-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-int32-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-int8-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-interleaved-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { make, NgtInstance, provideInstanceRef, NgtMatrix3 } from '@angular-three/core';
import { ChangeDetectionStrategy, Component, Input, NgModule } from '@angular/core';
import type { Subscription } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-matrix3[matrix3]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { make, NgtInstance, provideInstanceRef, NgtMatrix4 } from '@angular-three/core';
import { ChangeDetectionStrategy, Component, Input, NgModule } from '@angular/core';
import type { Subscription } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-matrix4[matrix4]',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-uint16-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-uint32-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-uint8-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAttribute, provideCommonAttributeRef } from '@angular-three/core';
import { NgModule, Component } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-uint8-clamped-buffer-attribute',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { makeVector2, NgtInstance, provideInstanceRef, NgtVector2 } from '@angular-three/core';
import { ChangeDetectionStrategy, Component, Input, NgModule } from '@angular/core';
import type { Subscription } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-vector2[vector2]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { makeVector3, NgtInstance, provideInstanceRef, NgtVector3 } from '@angular-three/core';
import { ChangeDetectionStrategy, Component, Input, NgModule } from '@angular/core';
import type { Subscription } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-vector3[vector3]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { makeVector4, NgtInstance, provideInstanceRef, NgtVector4 } from '@angular-three/core';
import { ChangeDetectionStrategy, Component, Input, NgModule } from '@angular/core';
import type { Subscription } from 'rxjs';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-vector4[vector4]',
Expand Down
2 changes: 1 addition & 1 deletion libs/core/audios/src/lib/audio-listener/audio-listener.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgtObject, NgtObjectInputsState, NgtPreObjectInit, provideObjectRef } from '@angular-three/core';
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

export interface NgtAudioListenerState extends NgtObjectInputsState<THREE.AudioListener> {
filter: AudioNode;
Expand Down
2 changes: 1 addition & 1 deletion libs/core/audios/src/lib/audio/audio.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GENERATED
import { AnyConstructor, NgtCommonAudio, provideCommonAudioRef } from '@angular-three/core';
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
import * as THREE from 'three/src/Three';
import * as THREE from 'three';

@Component({
selector: 'ngt-audio',
Expand Down
Loading

0 comments on commit 7384f93

Please sign in to comment.