angular-three 2.0.0-beta.230 → 2.0.0-beta.232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/index.mjs +1 -2
- package/esm2022/lib/canvas.mjs +9 -11
- package/esm2022/lib/directives/args.mjs +12 -24
- package/esm2022/lib/directives/common.mjs +28 -5
- package/esm2022/lib/directives/parent.mjs +9 -24
- package/esm2022/lib/dom/events.mjs +1 -1
- package/esm2022/lib/events.mjs +12 -13
- package/esm2022/lib/instance.mjs +1 -1
- package/esm2022/lib/loader.mjs +2 -2
- package/esm2022/lib/loop.mjs +8 -20
- package/esm2022/lib/portal.mjs +22 -25
- package/esm2022/lib/ref.mjs +1 -1
- package/esm2022/lib/renderer/index.mjs +69 -68
- package/esm2022/lib/renderer/store.mjs +98 -104
- package/esm2022/lib/renderer/utils.mjs +4 -35
- package/esm2022/lib/roots.mjs +20 -21
- package/esm2022/lib/routed-scene.mjs +3 -3
- package/esm2022/lib/store.mjs +8 -8
- package/esm2022/lib/three-types.mjs +1 -1
- package/esm2022/lib/utils/apply-props.mjs +13 -13
- package/esm2022/lib/utils/attach.mjs +1 -1
- package/esm2022/lib/utils/before-render.mjs +2 -2
- package/esm2022/lib/utils/create-api-token.mjs +1 -1
- package/esm2022/lib/utils/is.mjs +1 -1
- package/esm2022/lib/utils/make.mjs +7 -8
- package/esm2022/lib/utils/signal-store.mjs +1 -1
- package/esm2022/lib/utils/update.mjs +1 -1
- package/fesm2022/angular-three.mjs +295 -370
- package/fesm2022/angular-three.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/lib/canvas.d.ts +798 -793
- package/lib/directives/args.d.ts +4 -5
- package/lib/directives/common.d.ts +8 -3
- package/lib/directives/parent.d.ts +5 -7
- package/lib/dom/events.d.ts +3 -3
- package/lib/events.d.ts +13 -13
- package/lib/instance.d.ts +6 -6
- package/lib/loader.d.ts +5 -5
- package/lib/loop.d.ts +2 -26
- package/lib/portal.d.ts +15 -17
- package/lib/ref.d.ts +2 -2
- package/lib/renderer/index.d.ts +6 -6
- package/lib/renderer/store.d.ts +4 -4
- package/lib/renderer/utils.d.ts +1 -1
- package/lib/roots.d.ts +3 -3
- package/lib/store.d.ts +18 -18
- package/lib/three-types.d.ts +132 -134
- package/lib/utils/apply-props.d.ts +2 -2
- package/lib/utils/attach.d.ts +4 -4
- package/lib/utils/before-render.d.ts +1 -1
- package/lib/utils/create-api-token.d.ts +2 -2
- package/lib/utils/is.d.ts +11 -11
- package/lib/utils/make.d.ts +10 -10
- package/lib/utils/signal-store.d.ts +1 -1
- package/lib/utils/update.d.ts +1 -1
- package/metadata.json +1 -1
- package/package.json +71 -71
- package/web-types.json +1 -1
- package/esm2022/lib/utils/inputs.mjs +0 -18
- package/lib/utils/inputs.d.ts +0 -5
package/lib/three-types.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { AmbientLight, ArrayCamera, ArrowHelper, Audio, AxesHelper, Bone, Box3Helper, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CircleGeometry, Color, ColorRepresentation, CompressedTexture, ConeGeometry, CubeCamera, CubeTexture, CylinderGeometry, Data3DTexture, DataTexture, DepthTexture, DirectionalLight, DirectionalLightHelper, DirectionalLightShadow, DodecahedronGeometry, EdgesGeometry, Euler, ExtrudeGeometry, Float16BufferAttribute, Float32BufferAttribute, Fog, FogExp2, GridHelper, Group, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, InstancedBufferAttribute, InstancedBufferGeometry, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, LOD, LatheGeometry, Layers, Light, LightProbe, LightShadow, Line, LineBasicMaterial, LineBasicMaterialParameters, LineDashedMaterial, LineDashedMaterialParameters, LineLoop, LineSegments, Material, Matrix3, Matrix4, Mesh, MeshBasicMaterial, MeshBasicMaterialParameters, MeshDepthMaterial, MeshDepthMaterialParameters, MeshDistanceMaterial, MeshDistanceMaterialParameters, MeshLambertMaterial, MeshLambertMaterialParameters, MeshMatcapMaterial, MeshMatcapMaterialParameters, MeshNormalMaterial, MeshNormalMaterialParameters, MeshPhongMaterial, MeshPhongMaterialParameters, MeshPhysicalMaterial, MeshPhysicalMaterialParameters, MeshStandardMaterial, MeshStandardMaterialParameters, MeshToonMaterial, MeshToonMaterialParameters, Object3D, OctahedronGeometry, OrthographicCamera, PerspectiveCamera, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PointsMaterialParameters, PolarGridHelper, PolyhedronGeometry, PositionalAudio, Quaternion, RawShaderMaterial, Raycaster, RectAreaLight, RingGeometry, Scene, ShaderMaterial, ShaderMaterialParameters, ShadowMaterial, Shape, ShapeGeometry, Skeleton, SkeletonHelper, SkinnedMesh, SphereGeometry, SpotLight, SpotLightHelper, SpotLightShadow, Sprite, SpriteMaterial, SpriteMaterialParameters, TetrahedronGeometry, Texture, TorusGeometry, TorusKnotGeometry, TubeGeometry, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Vector2, Vector3, Vector4, VideoTexture, WireframeGeometry } from 'three';
|
|
2
|
+
import { NgtEventHandlers } from './events';
|
|
3
|
+
import { NgtAfterAttach, NgtAttachFunction, NgtInstanceNode } from './instance';
|
|
4
|
+
import { NgtBeforeRenderEvent } from './store';
|
|
5
5
|
type NoEvent<T> = Omit<T, 'addEventListener' | 'removeEventListener'>;
|
|
6
6
|
export type NgtNonFunctionKeys<T> = {
|
|
7
7
|
[K in keyof T]-?: T[K] extends Function ? never : K;
|
|
8
8
|
}[keyof T];
|
|
9
9
|
export type NgtOverwrite<T, O> = Omit<T, NgtNonFunctionKeys<O>> & O;
|
|
10
10
|
export type NgtExtendedColors<T> = {
|
|
11
|
-
[K in keyof T]: T[K] extends
|
|
11
|
+
[K in keyof T]: T[K] extends Color | undefined ? ColorRepresentation : T[K];
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* If **T** contains a constructor, @see ConstructorParameters must be used, otherwise **T**.
|
|
15
15
|
*/
|
|
16
16
|
type NgtArguments<T> = T extends new (...args: any) => any ? ConstructorParameters<T> : T;
|
|
17
|
-
export type NgtEuler =
|
|
18
|
-
export type NgtMatrix4 =
|
|
17
|
+
export type NgtEuler = Euler | Parameters<Euler['set']>;
|
|
18
|
+
export type NgtMatrix4 = Matrix4 | Parameters<Matrix4['set']> | Readonly<Matrix4['set']>;
|
|
19
19
|
/**
|
|
20
|
-
* Turn an implementation of
|
|
20
|
+
* Turn an implementation of Vector in to the type that an r3f component would accept as a prop.
|
|
21
21
|
*/
|
|
22
|
-
type NgtVectorLike<VectorClass extends
|
|
23
|
-
export type NgtVector2 = NgtVectorLike<
|
|
24
|
-
export type NgtVector3 = NgtVectorLike<
|
|
25
|
-
export type NgtVector4 = NgtVectorLike<
|
|
26
|
-
export type NgtLayers =
|
|
27
|
-
export type NgtQuaternion =
|
|
22
|
+
type NgtVectorLike<VectorClass extends Vector2 | Vector3 | Vector4> = VectorClass | Parameters<VectorClass['set']> | Readonly<Parameters<VectorClass['set']>> | Parameters<VectorClass['setScalar']>[0];
|
|
23
|
+
export type NgtVector2 = NgtVectorLike<Vector2>;
|
|
24
|
+
export type NgtVector3 = NgtVectorLike<Vector3>;
|
|
25
|
+
export type NgtVector4 = NgtVectorLike<Vector4>;
|
|
26
|
+
export type NgtLayers = Layers | Parameters<Layers['set']>[0];
|
|
27
|
+
export type NgtQuaternion = Quaternion | Parameters<Quaternion['set']>;
|
|
28
28
|
export interface NgtNodeEventMap<TOriginal> {
|
|
29
29
|
afterAttach: NgtAfterAttach<NgtInstanceNode, TOriginal>;
|
|
30
30
|
afterUpdate: TOriginal;
|
|
@@ -52,129 +52,128 @@ export type NgtObject3DNode<TOriginal, TConstructor, TNoEvent = NoEvent<TOrigina
|
|
|
52
52
|
addEventListener<TEventKey extends keyof NgtObject3DEventsMap>(type: TEventKey, listener: (this: NgtObject3DNode<TOriginal, TConstructor>, ev: NgtObject3DEventsMap[TEventKey]) => any): void;
|
|
53
53
|
removeEventListener<TEventKey extends keyof NgtObject3DEventsMap>(type: TEventKey, listener: (this: NgtObject3DNode<TOriginal, TConstructor>, ev: NgtObject3DEventsMap[TEventKey]) => any): void;
|
|
54
54
|
}>;
|
|
55
|
-
export type NgtGeometry<TGeometry extends
|
|
56
|
-
export type NgtMaterial<TMaterial extends
|
|
57
|
-
export type NgtLight<T extends
|
|
58
|
-
export type NgtObject3D = NgtObject3DNode<
|
|
59
|
-
export type NgtAudio = NgtObject3DNode<
|
|
60
|
-
export type NgtAudioListener = NgtObject3DNode<
|
|
61
|
-
export type NgtPositionalAudio = NgtObject3DNode<
|
|
62
|
-
export type NgtMesh = NgtObject3DNode<
|
|
63
|
-
export type NgtInstancedMesh = NgtObject3DNode<
|
|
64
|
-
export type NgtScene = NgtObject3DNode<
|
|
65
|
-
export type NgtSprite = NgtObject3DNode<
|
|
66
|
-
export type NgtLOD = NgtObject3DNode<
|
|
67
|
-
export type NgtSkinnedMesh = NgtObject3DNode<
|
|
68
|
-
export type NgtSkeleton = NgtObject3DNode<
|
|
69
|
-
export type NgtBone = NgtObject3DNode<
|
|
70
|
-
export type NgtLine = NgtObject3DNode<
|
|
71
|
-
export type NgtLineSegments = NgtObject3DNode<
|
|
72
|
-
export type NgtLineLoop = NgtObject3DNode<
|
|
73
|
-
export type NgtPoints = NgtObject3DNode<
|
|
74
|
-
export type NgtGroup = NgtObject3DNode<
|
|
75
|
-
export type NgtCameraNode = NgtObject3DNode<
|
|
76
|
-
export type NgtPerspectiveCamera = NgtObject3DNode<
|
|
77
|
-
export type NgtOrthographicCamera = NgtObject3DNode<
|
|
78
|
-
export type NgtCubeCamera = NgtObject3DNode<
|
|
79
|
-
export type NgtArrayCamera = NgtObject3DNode<
|
|
80
|
-
export type NgtInstancedBufferGeometry = NgtGeometry<
|
|
81
|
-
export type NgtBufferGeometry = NgtGeometry<
|
|
82
|
-
export type NgtWireframeGeometry = NgtGeometry<
|
|
83
|
-
export type NgtTetrahedronGeometry = NgtGeometry<
|
|
84
|
-
export type NgtOctahedronGeometry = NgtGeometry<
|
|
85
|
-
export type NgtIcosahedronGeometry = NgtGeometry<
|
|
86
|
-
export type NgtDodecahedronGeometry = NgtGeometry<
|
|
87
|
-
export type NgtPolyhedronGeometry = NgtGeometry<
|
|
88
|
-
export type NgtTubeGeometry = NgtGeometry<
|
|
89
|
-
export type NgtTorusKnotGeometry = NgtGeometry<
|
|
90
|
-
export type NgtTorusGeometry = NgtGeometry<
|
|
91
|
-
export type NgtSphereGeometry = NgtGeometry<
|
|
92
|
-
export type NgtRingGeometry = NgtGeometry<
|
|
93
|
-
export type NgtPlaneGeometry = NgtGeometry<
|
|
94
|
-
export type NgtLatheGeometry = NgtGeometry<
|
|
95
|
-
export type NgtShapeGeometry = NgtGeometry<
|
|
96
|
-
export type NgtExtrudeGeometry = NgtGeometry<
|
|
97
|
-
export type NgtEdgesGeometry = NgtGeometry<
|
|
98
|
-
export type NgtConeGeometry = NgtGeometry<
|
|
99
|
-
export type NgtCylinderGeometry = NgtGeometry<
|
|
100
|
-
export type NgtCircleGeometry = NgtGeometry<
|
|
101
|
-
export type NgtBoxGeometry = NgtGeometry<
|
|
102
|
-
export type NgtCapsuleGeometry = NgtGeometry<
|
|
103
|
-
export type NgtShadowMaterial = NgtMaterial<
|
|
104
|
-
export type NgtSpriteMaterial = NgtMaterial<
|
|
105
|
-
export type NgtRawShaderMaterial = NgtMaterial<
|
|
106
|
-
export type NgtShaderMaterial = NgtMaterial<
|
|
107
|
-
export type NgtPointsMaterial = NgtMaterial<
|
|
108
|
-
export type NgtMeshPhysicalMaterial = NgtMaterial<
|
|
109
|
-
export type NgtMeshStandardMaterial = NgtMaterial<
|
|
110
|
-
export type NgtMeshPhongMaterial = NgtMaterial<
|
|
111
|
-
export type NgtMeshToonMaterial = NgtMaterial<
|
|
112
|
-
export type NgtMeshNormalMaterial = NgtMaterial<
|
|
113
|
-
export type NgtMeshLambertMaterial = NgtMaterial<
|
|
114
|
-
export type NgtMeshDepthMaterial = NgtMaterial<
|
|
115
|
-
export type NgtMeshDistanceMaterial = NgtMaterial<
|
|
116
|
-
export type NgtMeshBasicMaterial = NgtMaterial<
|
|
117
|
-
export type NgtMeshMatcapMaterial = NgtMaterial<
|
|
118
|
-
export type NgtLineDashedMaterial = NgtMaterial<
|
|
119
|
-
export type NgtLineBasicMaterial = NgtMaterial<
|
|
55
|
+
export type NgtGeometry<TGeometry extends BufferGeometry, TConstructor> = NgtNode<TGeometry, TConstructor>;
|
|
56
|
+
export type NgtMaterial<TMaterial extends Material, TConstructor> = NgtNode<TMaterial, TConstructor>;
|
|
57
|
+
export type NgtLight<T extends Light, P> = NgtObject3DNode<T, P>;
|
|
58
|
+
export type NgtObject3D = NgtObject3DNode<Object3D, typeof Object3D>;
|
|
59
|
+
export type NgtAudio = NgtObject3DNode<Audio, typeof Audio>;
|
|
60
|
+
export type NgtAudioListener = NgtObject3DNode<AudioListener, typeof AudioListener>;
|
|
61
|
+
export type NgtPositionalAudio = NgtObject3DNode<PositionalAudio, typeof PositionalAudio>;
|
|
62
|
+
export type NgtMesh = NgtObject3DNode<Mesh, typeof Mesh>;
|
|
63
|
+
export type NgtInstancedMesh = NgtObject3DNode<InstancedMesh, typeof InstancedMesh>;
|
|
64
|
+
export type NgtScene = NgtObject3DNode<Scene, typeof Scene>;
|
|
65
|
+
export type NgtSprite = NgtObject3DNode<Sprite, typeof Sprite>;
|
|
66
|
+
export type NgtLOD = NgtObject3DNode<LOD, typeof LOD>;
|
|
67
|
+
export type NgtSkinnedMesh = NgtObject3DNode<SkinnedMesh, typeof SkinnedMesh>;
|
|
68
|
+
export type NgtSkeleton = NgtObject3DNode<Skeleton, typeof Skeleton>;
|
|
69
|
+
export type NgtBone = NgtObject3DNode<Bone, typeof Bone>;
|
|
70
|
+
export type NgtLine = NgtObject3DNode<Line, typeof Line>;
|
|
71
|
+
export type NgtLineSegments = NgtObject3DNode<LineSegments, typeof LineSegments>;
|
|
72
|
+
export type NgtLineLoop = NgtObject3DNode<LineLoop, typeof LineLoop>;
|
|
73
|
+
export type NgtPoints = NgtObject3DNode<Points, typeof Points>;
|
|
74
|
+
export type NgtGroup = NgtObject3DNode<Group, typeof Group>;
|
|
75
|
+
export type NgtCameraNode = NgtObject3DNode<Camera, typeof Camera>;
|
|
76
|
+
export type NgtPerspectiveCamera = NgtObject3DNode<PerspectiveCamera, typeof PerspectiveCamera>;
|
|
77
|
+
export type NgtOrthographicCamera = NgtObject3DNode<OrthographicCamera, typeof OrthographicCamera>;
|
|
78
|
+
export type NgtCubeCamera = NgtObject3DNode<CubeCamera, typeof CubeCamera>;
|
|
79
|
+
export type NgtArrayCamera = NgtObject3DNode<ArrayCamera, typeof ArrayCamera>;
|
|
80
|
+
export type NgtInstancedBufferGeometry = NgtGeometry<InstancedBufferGeometry, typeof InstancedBufferGeometry>;
|
|
81
|
+
export type NgtBufferGeometry = NgtGeometry<BufferGeometry, typeof BufferGeometry>;
|
|
82
|
+
export type NgtWireframeGeometry = NgtGeometry<WireframeGeometry, typeof WireframeGeometry>;
|
|
83
|
+
export type NgtTetrahedronGeometry = NgtGeometry<TetrahedronGeometry, typeof TetrahedronGeometry>;
|
|
84
|
+
export type NgtOctahedronGeometry = NgtGeometry<OctahedronGeometry, typeof OctahedronGeometry>;
|
|
85
|
+
export type NgtIcosahedronGeometry = NgtGeometry<IcosahedronGeometry, typeof IcosahedronGeometry>;
|
|
86
|
+
export type NgtDodecahedronGeometry = NgtGeometry<DodecahedronGeometry, typeof DodecahedronGeometry>;
|
|
87
|
+
export type NgtPolyhedronGeometry = NgtGeometry<PolyhedronGeometry, typeof PolyhedronGeometry>;
|
|
88
|
+
export type NgtTubeGeometry = NgtGeometry<TubeGeometry, typeof TubeGeometry>;
|
|
89
|
+
export type NgtTorusKnotGeometry = NgtGeometry<TorusKnotGeometry, typeof TorusKnotGeometry>;
|
|
90
|
+
export type NgtTorusGeometry = NgtGeometry<TorusGeometry, typeof TorusGeometry>;
|
|
91
|
+
export type NgtSphereGeometry = NgtGeometry<SphereGeometry, typeof SphereGeometry>;
|
|
92
|
+
export type NgtRingGeometry = NgtGeometry<RingGeometry, typeof RingGeometry>;
|
|
93
|
+
export type NgtPlaneGeometry = NgtGeometry<PlaneGeometry, typeof PlaneGeometry>;
|
|
94
|
+
export type NgtLatheGeometry = NgtGeometry<LatheGeometry, typeof LatheGeometry>;
|
|
95
|
+
export type NgtShapeGeometry = NgtGeometry<ShapeGeometry, typeof ShapeGeometry>;
|
|
96
|
+
export type NgtExtrudeGeometry = NgtGeometry<ExtrudeGeometry, typeof ExtrudeGeometry>;
|
|
97
|
+
export type NgtEdgesGeometry = NgtGeometry<EdgesGeometry, typeof EdgesGeometry>;
|
|
98
|
+
export type NgtConeGeometry = NgtGeometry<ConeGeometry, typeof ConeGeometry>;
|
|
99
|
+
export type NgtCylinderGeometry = NgtGeometry<CylinderGeometry, typeof CylinderGeometry>;
|
|
100
|
+
export type NgtCircleGeometry = NgtGeometry<CircleGeometry, typeof CircleGeometry>;
|
|
101
|
+
export type NgtBoxGeometry = NgtGeometry<BoxGeometry, typeof BoxGeometry>;
|
|
102
|
+
export type NgtCapsuleGeometry = NgtGeometry<CapsuleGeometry, typeof CapsuleGeometry>;
|
|
103
|
+
export type NgtShadowMaterial = NgtMaterial<ShadowMaterial, [ShaderMaterialParameters]>;
|
|
104
|
+
export type NgtSpriteMaterial = NgtMaterial<SpriteMaterial, [SpriteMaterialParameters]>;
|
|
105
|
+
export type NgtRawShaderMaterial = NgtMaterial<RawShaderMaterial, [ShaderMaterialParameters]>;
|
|
106
|
+
export type NgtShaderMaterial = NgtMaterial<ShaderMaterial, [ShaderMaterialParameters]>;
|
|
107
|
+
export type NgtPointsMaterial = NgtMaterial<PointsMaterial, [PointsMaterialParameters]>;
|
|
108
|
+
export type NgtMeshPhysicalMaterial = NgtMaterial<MeshPhysicalMaterial, [MeshPhysicalMaterialParameters]>;
|
|
109
|
+
export type NgtMeshStandardMaterial = NgtMaterial<MeshStandardMaterial, [MeshStandardMaterialParameters]>;
|
|
110
|
+
export type NgtMeshPhongMaterial = NgtMaterial<MeshPhongMaterial, [MeshPhongMaterialParameters]>;
|
|
111
|
+
export type NgtMeshToonMaterial = NgtMaterial<MeshToonMaterial, [MeshToonMaterialParameters]>;
|
|
112
|
+
export type NgtMeshNormalMaterial = NgtMaterial<MeshNormalMaterial, [MeshNormalMaterialParameters]>;
|
|
113
|
+
export type NgtMeshLambertMaterial = NgtMaterial<MeshLambertMaterial, [MeshLambertMaterialParameters]>;
|
|
114
|
+
export type NgtMeshDepthMaterial = NgtMaterial<MeshDepthMaterial, [MeshDepthMaterialParameters]>;
|
|
115
|
+
export type NgtMeshDistanceMaterial = NgtMaterial<MeshDistanceMaterial, [MeshDistanceMaterialParameters]>;
|
|
116
|
+
export type NgtMeshBasicMaterial = NgtMaterial<MeshBasicMaterial, [MeshBasicMaterialParameters]>;
|
|
117
|
+
export type NgtMeshMatcapMaterial = NgtMaterial<MeshMatcapMaterial, [MeshMatcapMaterialParameters]>;
|
|
118
|
+
export type NgtLineDashedMaterial = NgtMaterial<LineDashedMaterial, [LineDashedMaterialParameters]>;
|
|
119
|
+
export type NgtLineBasicMaterial = NgtMaterial<LineBasicMaterial, [LineBasicMaterialParameters]>;
|
|
120
120
|
export type NgtPrimitive = NgtNodeElement<any, any>;
|
|
121
121
|
export type NgtValue = NgtNode<{
|
|
122
122
|
rawValue: any;
|
|
123
123
|
}, {}>;
|
|
124
|
-
export type NgtLightShadow = NgtNode<
|
|
125
|
-
export type NgtSpotLightShadow = NgtNode<
|
|
126
|
-
export type NgtDirectionalLightShadow = NgtNode<
|
|
127
|
-
export type NgtSpotLight = NgtLight<
|
|
128
|
-
export type NgtPointLight = NgtLight<
|
|
129
|
-
export type NgtRectAreaLight = NgtLight<
|
|
130
|
-
export type NgtHemisphereLight = NgtLight<
|
|
131
|
-
export type NgtDirectionalLight = NgtLight<
|
|
132
|
-
export type NgtAmbientLight = NgtLight<
|
|
133
|
-
export type NgtLightProbe = NgtLight<
|
|
134
|
-
export type NgtSpotLightHelper = NgtObject3DNode<
|
|
135
|
-
export type NgtSkeletonHelper = NgtObject3DNode<
|
|
136
|
-
export type NgtPointLightHelper = NgtObject3DNode<
|
|
137
|
-
export type NgtHemisphereLightHelper = NgtObject3DNode<
|
|
138
|
-
export type NgtGridHelper = NgtObject3DNode<
|
|
139
|
-
export type NgtPolarGridHelper = NgtObject3DNode<
|
|
140
|
-
export type NgtDirectionalLightHelper = NgtObject3DNode<
|
|
141
|
-
export type NgtCameraHelper = NgtObject3DNode<
|
|
142
|
-
export type NgtBoxHelper = NgtObject3DNode<
|
|
143
|
-
export type NgtBox3Helper = NgtObject3DNode<
|
|
144
|
-
export type NgtPlaneHelper = NgtObject3DNode<
|
|
145
|
-
export type NgtArrowHelper = NgtObject3DNode<
|
|
146
|
-
export type NgtAxesHelper = NgtObject3DNode<
|
|
147
|
-
export type NgtTexture = NgtNode<
|
|
148
|
-
export type NgtVideoTexture = NgtNode<
|
|
149
|
-
export type NgtDataTexture = NgtNode<
|
|
150
|
-
export type NgtData3DTexture = NgtNode<
|
|
151
|
-
export type NgtCompressedTexture = NgtNode<
|
|
152
|
-
export type NgtCubeTexture = NgtNode<
|
|
153
|
-
export type NgtCanvasTexture = NgtNode<
|
|
154
|
-
export type NgtDepthTexture = NgtNode<
|
|
155
|
-
export type NgtRaycaster = NgtNode<
|
|
156
|
-
export type NgtVector2Node = NgtNode<
|
|
157
|
-
export type NgtVector3Node = NgtNode<
|
|
158
|
-
export type NgtVector4Node = NgtNode<
|
|
159
|
-
export type NgtEulerNode = NgtNode<
|
|
160
|
-
export type NgtMatrix3Node = NgtNode<
|
|
161
|
-
export type NgtMatrix4Node = NgtNode<
|
|
162
|
-
export type NgtQuaternionNode = NgtNode<
|
|
163
|
-
export type NgtBufferAttribute = NgtNode<
|
|
164
|
-
export type NgtFloat16BufferAttribute = NgtNode<
|
|
165
|
-
export type NgtFloat32BufferAttribute = NgtNode<
|
|
166
|
-
export type
|
|
167
|
-
export type
|
|
168
|
-
export type
|
|
169
|
-
export type
|
|
170
|
-
export type
|
|
171
|
-
export type
|
|
172
|
-
export type
|
|
173
|
-
export type
|
|
174
|
-
export type
|
|
175
|
-
export type
|
|
176
|
-
export type
|
|
177
|
-
export type NgtShape = NgtNode<THREE.Shape, typeof THREE.Shape>;
|
|
124
|
+
export type NgtLightShadow = NgtNode<LightShadow, typeof LightShadow>;
|
|
125
|
+
export type NgtSpotLightShadow = NgtNode<SpotLightShadow, typeof SpotLightShadow>;
|
|
126
|
+
export type NgtDirectionalLightShadow = NgtNode<DirectionalLightShadow, typeof DirectionalLightShadow>;
|
|
127
|
+
export type NgtSpotLight = NgtLight<SpotLight, typeof SpotLight>;
|
|
128
|
+
export type NgtPointLight = NgtLight<PointLight, typeof PointLight>;
|
|
129
|
+
export type NgtRectAreaLight = NgtLight<RectAreaLight, typeof RectAreaLight>;
|
|
130
|
+
export type NgtHemisphereLight = NgtLight<HemisphereLight, typeof HemisphereLight>;
|
|
131
|
+
export type NgtDirectionalLight = NgtLight<DirectionalLight, typeof DirectionalLight>;
|
|
132
|
+
export type NgtAmbientLight = NgtLight<AmbientLight, typeof AmbientLight>;
|
|
133
|
+
export type NgtLightProbe = NgtLight<LightProbe, typeof LightProbe>;
|
|
134
|
+
export type NgtSpotLightHelper = NgtObject3DNode<SpotLightHelper, typeof SpotLightHelper>;
|
|
135
|
+
export type NgtSkeletonHelper = NgtObject3DNode<SkeletonHelper, typeof SkeletonHelper>;
|
|
136
|
+
export type NgtPointLightHelper = NgtObject3DNode<PointLightHelper, typeof PointLightHelper>;
|
|
137
|
+
export type NgtHemisphereLightHelper = NgtObject3DNode<HemisphereLightHelper, typeof HemisphereLightHelper>;
|
|
138
|
+
export type NgtGridHelper = NgtObject3DNode<GridHelper, typeof GridHelper>;
|
|
139
|
+
export type NgtPolarGridHelper = NgtObject3DNode<PolarGridHelper, typeof PolarGridHelper>;
|
|
140
|
+
export type NgtDirectionalLightHelper = NgtObject3DNode<DirectionalLightHelper, typeof DirectionalLightHelper>;
|
|
141
|
+
export type NgtCameraHelper = NgtObject3DNode<CameraHelper, typeof CameraHelper>;
|
|
142
|
+
export type NgtBoxHelper = NgtObject3DNode<BoxHelper, typeof BoxHelper>;
|
|
143
|
+
export type NgtBox3Helper = NgtObject3DNode<Box3Helper, typeof Box3Helper>;
|
|
144
|
+
export type NgtPlaneHelper = NgtObject3DNode<PlaneHelper, typeof PlaneHelper>;
|
|
145
|
+
export type NgtArrowHelper = NgtObject3DNode<ArrowHelper, typeof ArrowHelper>;
|
|
146
|
+
export type NgtAxesHelper = NgtObject3DNode<AxesHelper, typeof AxesHelper>;
|
|
147
|
+
export type NgtTexture = NgtNode<Texture, typeof Texture>;
|
|
148
|
+
export type NgtVideoTexture = NgtNode<VideoTexture, typeof VideoTexture>;
|
|
149
|
+
export type NgtDataTexture = NgtNode<DataTexture, typeof DataTexture>;
|
|
150
|
+
export type NgtData3DTexture = NgtNode<Data3DTexture, typeof Data3DTexture>;
|
|
151
|
+
export type NgtCompressedTexture = NgtNode<CompressedTexture, typeof CompressedTexture>;
|
|
152
|
+
export type NgtCubeTexture = NgtNode<CubeTexture, typeof CubeTexture>;
|
|
153
|
+
export type NgtCanvasTexture = NgtNode<CanvasTexture, typeof CanvasTexture>;
|
|
154
|
+
export type NgtDepthTexture = NgtNode<DepthTexture, typeof DepthTexture>;
|
|
155
|
+
export type NgtRaycaster = NgtNode<Raycaster, typeof Raycaster>;
|
|
156
|
+
export type NgtVector2Node = NgtNode<Vector2, typeof Vector2>;
|
|
157
|
+
export type NgtVector3Node = NgtNode<Vector3, typeof Vector3>;
|
|
158
|
+
export type NgtVector4Node = NgtNode<Vector4, typeof Vector4>;
|
|
159
|
+
export type NgtEulerNode = NgtNode<Euler, typeof Euler>;
|
|
160
|
+
export type NgtMatrix3Node = NgtNode<Matrix3, typeof Matrix3>;
|
|
161
|
+
export type NgtMatrix4Node = NgtNode<Matrix4, typeof Matrix4>;
|
|
162
|
+
export type NgtQuaternionNode = NgtNode<Quaternion, typeof Quaternion>;
|
|
163
|
+
export type NgtBufferAttribute = NgtNode<BufferAttribute, typeof BufferAttribute>;
|
|
164
|
+
export type NgtFloat16BufferAttribute = NgtNode<Float16BufferAttribute, typeof Float16BufferAttribute>;
|
|
165
|
+
export type NgtFloat32BufferAttribute = NgtNode<Float32BufferAttribute, typeof Float32BufferAttribute>;
|
|
166
|
+
export type NgtInt8BufferAttribute = NgtNode<Int8BufferAttribute, typeof Int8BufferAttribute>;
|
|
167
|
+
export type NgtInt16BufferAttribute = NgtNode<Int16BufferAttribute, typeof Int16BufferAttribute>;
|
|
168
|
+
export type NgtInt32BufferAttribute = NgtNode<Int32BufferAttribute, typeof Int32BufferAttribute>;
|
|
169
|
+
export type NgtUint8BufferAttribute = NgtNode<Uint8BufferAttribute, typeof Uint8BufferAttribute>;
|
|
170
|
+
export type NgtUint16BufferAttribute = NgtNode<Uint16BufferAttribute, typeof Uint16BufferAttribute>;
|
|
171
|
+
export type NgtUint32BufferAttribute = NgtNode<Uint32BufferAttribute, typeof Uint32BufferAttribute>;
|
|
172
|
+
export type NgtInstancedBufferAttribute = NgtNode<InstancedBufferAttribute, typeof InstancedBufferAttribute>;
|
|
173
|
+
export type NgtColor = NgtNode<Color, ColorRepresentation>;
|
|
174
|
+
export type NgtFog = NgtNode<Fog, typeof Fog>;
|
|
175
|
+
export type NgtFogExp2 = NgtNode<FogExp2, typeof FogExp2>;
|
|
176
|
+
export type NgtShape = NgtNode<Shape, typeof Shape>;
|
|
178
177
|
export interface ThreeElements {
|
|
179
178
|
'ngt-object3D': NgtObject3D;
|
|
180
179
|
'ngt-audio': NgtAudio;
|
|
@@ -282,7 +281,6 @@ export interface ThreeElements {
|
|
|
282
281
|
'ngt-buffer-attribute': NgtBufferAttribute;
|
|
283
282
|
'ngt-float16-buffer-attribute': NgtFloat16BufferAttribute;
|
|
284
283
|
'ngt-float32-buffer-attribute': NgtFloat32BufferAttribute;
|
|
285
|
-
'ngt-float64-buffer-attribute': NgtFloat64BufferAttribute;
|
|
286
284
|
'ngt-int8-buffer-attribute': NgtInt8BufferAttribute;
|
|
287
285
|
'ngt-int16-buffer-attribute': NgtInt16BufferAttribute;
|
|
288
286
|
'ngt-int32-buffer-attribute': NgtInt32BufferAttribute;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { NgtInstanceNode } from '../instance';
|
|
2
|
+
import { NgtAnyRecord } from '../types';
|
|
3
3
|
export declare function applyProps(instance: NgtInstanceNode, props: NgtAnyRecord): any;
|
package/lib/utils/attach.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { NgtAttachFunction } from '../instance';
|
|
2
|
+
import { NgtState } from '../store';
|
|
3
|
+
import { NgtAnyRecord } from '../types';
|
|
4
|
+
import { NgtSignalStore } from './signal-store';
|
|
5
5
|
export declare function attach(object: NgtAnyRecord, value: unknown, paths?: string[]): void;
|
|
6
6
|
export declare function detach(parent: NgtAnyRecord, child: NgtAnyRecord, attachProp: string[] | NgtAttachFunction): void;
|
|
7
7
|
export declare function createAttachFunction<TChild = any, TParent = any>(cb: (params: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { NgtBeforeRenderRecord } from '../store';
|
|
3
3
|
export declare function injectBeforeRender(cb: NgtBeforeRenderRecord['callback'], { priority, injector }?: {
|
|
4
4
|
priority?: number;
|
|
5
5
|
injector?: Injector;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { CreateInjectionTokenOptions } from 'ngxtension/create-injection-token';
|
|
3
3
|
declare function apiFactory<TObject extends {
|
|
4
4
|
api: any;
|
|
5
5
|
}, TApi = TObject extends {
|
package/lib/utils/is.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { BufferGeometry, Camera, Material, Object3D, OrthographicCamera, PerspectiveCamera, Scene, Texture } from 'three';
|
|
3
|
+
import { NgtRendererLike } from '../store';
|
|
4
|
+
import { NgtEquConfig } from '../types';
|
|
5
5
|
export declare const is: {
|
|
6
6
|
obj: (a: unknown) => a is object;
|
|
7
|
-
material: (a: unknown) => a is
|
|
8
|
-
geometry: (a: unknown) => a is
|
|
9
|
-
orthographicCamera: (a: unknown) => a is
|
|
10
|
-
perspectiveCamera: (a: unknown) => a is
|
|
11
|
-
camera: (a: unknown) => a is
|
|
7
|
+
material: (a: unknown) => a is Material;
|
|
8
|
+
geometry: (a: unknown) => a is BufferGeometry<import("three").NormalBufferAttributes>;
|
|
9
|
+
orthographicCamera: (a: unknown) => a is OrthographicCamera;
|
|
10
|
+
perspectiveCamera: (a: unknown) => a is PerspectiveCamera;
|
|
11
|
+
camera: (a: unknown) => a is Camera;
|
|
12
12
|
renderer: (a: unknown) => boolean;
|
|
13
|
-
scene: (a: unknown) => a is
|
|
13
|
+
scene: (a: unknown) => a is Scene;
|
|
14
14
|
ref: (a: unknown) => a is ElementRef<any>;
|
|
15
15
|
instance: (a: unknown) => a is any;
|
|
16
|
-
object3D: (a: unknown) => a is
|
|
17
|
-
colorSpaceExist: <T extends object |
|
|
16
|
+
object3D: (a: unknown) => a is Object3D<import("three").Object3DEventMap>;
|
|
17
|
+
colorSpaceExist: <T extends object | Texture | NgtRendererLike, P = T extends NgtRendererLike ? {
|
|
18
18
|
outputColorSpace: string;
|
|
19
19
|
} : {
|
|
20
20
|
colorSpace: string;
|
package/lib/utils/make.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { Material, Object3D, OrthographicCamera, PerspectiveCamera, WebGLRenderer } from 'three';
|
|
2
|
+
import { NgtGLOptions } from '../canvas';
|
|
3
|
+
import { NgtIntersection } from '../events';
|
|
4
|
+
import { NgtCanvasElement } from '../roots';
|
|
5
|
+
import { NgtDpr, NgtSize } from '../store';
|
|
6
6
|
export declare function makeId(event?: NgtIntersection): string;
|
|
7
7
|
export declare function makeDpr(dpr: NgtDpr, window?: Window): number;
|
|
8
|
-
export declare function makeRendererInstance<TCanvas extends NgtCanvasElement>(glOptions: NgtGLOptions, canvas: TCanvas):
|
|
9
|
-
export declare function makeCameraInstance(isOrthographic: boolean, size: NgtSize):
|
|
8
|
+
export declare function makeRendererInstance<TCanvas extends NgtCanvasElement>(glOptions: NgtGLOptions, canvas: TCanvas): WebGLRenderer;
|
|
9
|
+
export declare function makeCameraInstance(isOrthographic: boolean, size: NgtSize): PerspectiveCamera | OrthographicCamera;
|
|
10
10
|
export type NgtObjectMap = {
|
|
11
11
|
nodes: {
|
|
12
|
-
[name: string]:
|
|
12
|
+
[name: string]: Object3D;
|
|
13
13
|
};
|
|
14
14
|
materials: {
|
|
15
|
-
[name: string]:
|
|
15
|
+
[name: string]: Material;
|
|
16
16
|
};
|
|
17
17
|
[key: string]: any;
|
|
18
18
|
};
|
|
19
|
-
export declare function makeObjectGraph(object:
|
|
19
|
+
export declare function makeObjectGraph(object: Object3D): NgtObjectMap;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateComputedOptions, CreateSignalOptions, Signal } from '@angular/core';
|
|
2
2
|
export type NgtSignalStore<State extends object> = {
|
|
3
3
|
select<Key1 extends keyof State, Key2 extends keyof State[Key1], Key3 extends keyof State[Key1][Key2], Key4 extends keyof State[Key1][Key2][Key3]>(key1: Key1, key2: Key2, key3: Key3, key4: Key4, options?: CreateComputedOptions<State[Key1][Key2][Key3][Key4]>): Signal<State[Key1][Key2][Key3][Key4]>;
|
|
4
4
|
select<Key1 extends keyof State, Key2 extends keyof State[Key1], Key3 extends keyof State[Key1][Key2]>(key1: Key1, key2: Key2, key3: Key3, options?: CreateComputedOptions<State[Key1][Key2][Key3]>): Signal<State[Key1][Key2][Key3]>;
|
package/lib/utils/update.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { NgtCameraManual, NgtSize } from '../store';
|
|
2
2
|
export declare function checkNeedsUpdate(value: unknown): void;
|
|
3
3
|
export declare function checkUpdate(value: unknown): void;
|
|
4
4
|
export declare function updateCamera(camera: NgtCameraManual, size: NgtSize): void;
|