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.
Files changed (60) hide show
  1. package/esm2022/index.mjs +1 -2
  2. package/esm2022/lib/canvas.mjs +9 -11
  3. package/esm2022/lib/directives/args.mjs +12 -24
  4. package/esm2022/lib/directives/common.mjs +28 -5
  5. package/esm2022/lib/directives/parent.mjs +9 -24
  6. package/esm2022/lib/dom/events.mjs +1 -1
  7. package/esm2022/lib/events.mjs +12 -13
  8. package/esm2022/lib/instance.mjs +1 -1
  9. package/esm2022/lib/loader.mjs +2 -2
  10. package/esm2022/lib/loop.mjs +8 -20
  11. package/esm2022/lib/portal.mjs +22 -25
  12. package/esm2022/lib/ref.mjs +1 -1
  13. package/esm2022/lib/renderer/index.mjs +69 -68
  14. package/esm2022/lib/renderer/store.mjs +98 -104
  15. package/esm2022/lib/renderer/utils.mjs +4 -35
  16. package/esm2022/lib/roots.mjs +20 -21
  17. package/esm2022/lib/routed-scene.mjs +3 -3
  18. package/esm2022/lib/store.mjs +8 -8
  19. package/esm2022/lib/three-types.mjs +1 -1
  20. package/esm2022/lib/utils/apply-props.mjs +13 -13
  21. package/esm2022/lib/utils/attach.mjs +1 -1
  22. package/esm2022/lib/utils/before-render.mjs +2 -2
  23. package/esm2022/lib/utils/create-api-token.mjs +1 -1
  24. package/esm2022/lib/utils/is.mjs +1 -1
  25. package/esm2022/lib/utils/make.mjs +7 -8
  26. package/esm2022/lib/utils/signal-store.mjs +1 -1
  27. package/esm2022/lib/utils/update.mjs +1 -1
  28. package/fesm2022/angular-three.mjs +295 -370
  29. package/fesm2022/angular-three.mjs.map +1 -1
  30. package/index.d.ts +0 -1
  31. package/lib/canvas.d.ts +798 -793
  32. package/lib/directives/args.d.ts +4 -5
  33. package/lib/directives/common.d.ts +8 -3
  34. package/lib/directives/parent.d.ts +5 -7
  35. package/lib/dom/events.d.ts +3 -3
  36. package/lib/events.d.ts +13 -13
  37. package/lib/instance.d.ts +6 -6
  38. package/lib/loader.d.ts +5 -5
  39. package/lib/loop.d.ts +2 -26
  40. package/lib/portal.d.ts +15 -17
  41. package/lib/ref.d.ts +2 -2
  42. package/lib/renderer/index.d.ts +6 -6
  43. package/lib/renderer/store.d.ts +4 -4
  44. package/lib/renderer/utils.d.ts +1 -1
  45. package/lib/roots.d.ts +3 -3
  46. package/lib/store.d.ts +18 -18
  47. package/lib/three-types.d.ts +132 -134
  48. package/lib/utils/apply-props.d.ts +2 -2
  49. package/lib/utils/attach.d.ts +4 -4
  50. package/lib/utils/before-render.d.ts +1 -1
  51. package/lib/utils/create-api-token.d.ts +2 -2
  52. package/lib/utils/is.d.ts +11 -11
  53. package/lib/utils/make.d.ts +10 -10
  54. package/lib/utils/signal-store.d.ts +1 -1
  55. package/lib/utils/update.d.ts +1 -1
  56. package/metadata.json +1 -1
  57. package/package.json +71 -71
  58. package/web-types.json +1 -1
  59. package/esm2022/lib/utils/inputs.mjs +0 -18
  60. package/lib/utils/inputs.d.ts +0 -5
@@ -1,30 +1,30 @@
1
- import type * as THREE from 'three';
2
- import type { NgtEventHandlers } from './events';
3
- import type { NgtAfterAttach, NgtAttachFunction, NgtInstanceNode } from './instance';
4
- import type { NgtBeforeRenderEvent } from './store';
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 THREE.Color | undefined ? THREE.ColorRepresentation : T[K];
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 = THREE.Euler | Parameters<THREE.Euler['set']>;
18
- export type NgtMatrix4 = THREE.Matrix4 | Parameters<THREE.Matrix4['set']> | Readonly<THREE.Matrix4['set']>;
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 THREE.Vector in to the type that an r3f component would accept as a prop.
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 THREE.Vector2 | THREE.Vector3 | THREE.Vector4> = VectorClass | Parameters<VectorClass['set']> | Readonly<Parameters<VectorClass['set']>> | Parameters<VectorClass['setScalar']>[0];
23
- export type NgtVector2 = NgtVectorLike<THREE.Vector2>;
24
- export type NgtVector3 = NgtVectorLike<THREE.Vector3>;
25
- export type NgtVector4 = NgtVectorLike<THREE.Vector4>;
26
- export type NgtLayers = THREE.Layers | Parameters<THREE.Layers['set']>[0];
27
- export type NgtQuaternion = THREE.Quaternion | Parameters<THREE.Quaternion['set']>;
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 THREE.BufferGeometry, TConstructor> = NgtNode<TGeometry, TConstructor>;
56
- export type NgtMaterial<TMaterial extends THREE.Material, TConstructor> = NgtNode<TMaterial, TConstructor>;
57
- export type NgtLight<T extends THREE.Light, P> = NgtObject3DNode<T, P>;
58
- export type NgtObject3D = NgtObject3DNode<THREE.Object3D, typeof THREE.Object3D>;
59
- export type NgtAudio = NgtObject3DNode<THREE.Audio, typeof THREE.Audio>;
60
- export type NgtAudioListener = NgtObject3DNode<THREE.AudioListener, typeof THREE.AudioListener>;
61
- export type NgtPositionalAudio = NgtObject3DNode<THREE.PositionalAudio, typeof THREE.PositionalAudio>;
62
- export type NgtMesh = NgtObject3DNode<THREE.Mesh, typeof THREE.Mesh>;
63
- export type NgtInstancedMesh = NgtObject3DNode<THREE.InstancedMesh, typeof THREE.InstancedMesh>;
64
- export type NgtScene = NgtObject3DNode<THREE.Scene, typeof THREE.Scene>;
65
- export type NgtSprite = NgtObject3DNode<THREE.Sprite, typeof THREE.Sprite>;
66
- export type NgtLOD = NgtObject3DNode<THREE.LOD, typeof THREE.LOD>;
67
- export type NgtSkinnedMesh = NgtObject3DNode<THREE.SkinnedMesh, typeof THREE.SkinnedMesh>;
68
- export type NgtSkeleton = NgtObject3DNode<THREE.Skeleton, typeof THREE.Skeleton>;
69
- export type NgtBone = NgtObject3DNode<THREE.Bone, typeof THREE.Bone>;
70
- export type NgtLine = NgtObject3DNode<THREE.Line, typeof THREE.Line>;
71
- export type NgtLineSegments = NgtObject3DNode<THREE.LineSegments, typeof THREE.LineSegments>;
72
- export type NgtLineLoop = NgtObject3DNode<THREE.LineLoop, typeof THREE.LineLoop>;
73
- export type NgtPoints = NgtObject3DNode<THREE.Points, typeof THREE.Points>;
74
- export type NgtGroup = NgtObject3DNode<THREE.Group, typeof THREE.Group>;
75
- export type NgtCameraNode = NgtObject3DNode<THREE.Camera, typeof THREE.Camera>;
76
- export type NgtPerspectiveCamera = NgtObject3DNode<THREE.PerspectiveCamera, typeof THREE.PerspectiveCamera>;
77
- export type NgtOrthographicCamera = NgtObject3DNode<THREE.OrthographicCamera, typeof THREE.OrthographicCamera>;
78
- export type NgtCubeCamera = NgtObject3DNode<THREE.CubeCamera, typeof THREE.CubeCamera>;
79
- export type NgtArrayCamera = NgtObject3DNode<THREE.ArrayCamera, typeof THREE.ArrayCamera>;
80
- export type NgtInstancedBufferGeometry = NgtGeometry<THREE.InstancedBufferGeometry, typeof THREE.InstancedBufferGeometry>;
81
- export type NgtBufferGeometry = NgtGeometry<THREE.BufferGeometry, typeof THREE.BufferGeometry>;
82
- export type NgtWireframeGeometry = NgtGeometry<THREE.WireframeGeometry, typeof THREE.WireframeGeometry>;
83
- export type NgtTetrahedronGeometry = NgtGeometry<THREE.TetrahedronGeometry, typeof THREE.TetrahedronGeometry>;
84
- export type NgtOctahedronGeometry = NgtGeometry<THREE.OctahedronGeometry, typeof THREE.OctahedronGeometry>;
85
- export type NgtIcosahedronGeometry = NgtGeometry<THREE.IcosahedronGeometry, typeof THREE.IcosahedronGeometry>;
86
- export type NgtDodecahedronGeometry = NgtGeometry<THREE.DodecahedronGeometry, typeof THREE.DodecahedronGeometry>;
87
- export type NgtPolyhedronGeometry = NgtGeometry<THREE.PolyhedronGeometry, typeof THREE.PolyhedronGeometry>;
88
- export type NgtTubeGeometry = NgtGeometry<THREE.TubeGeometry, typeof THREE.TubeGeometry>;
89
- export type NgtTorusKnotGeometry = NgtGeometry<THREE.TorusKnotGeometry, typeof THREE.TorusKnotGeometry>;
90
- export type NgtTorusGeometry = NgtGeometry<THREE.TorusGeometry, typeof THREE.TorusGeometry>;
91
- export type NgtSphereGeometry = NgtGeometry<THREE.SphereGeometry, typeof THREE.SphereGeometry>;
92
- export type NgtRingGeometry = NgtGeometry<THREE.RingGeometry, typeof THREE.RingGeometry>;
93
- export type NgtPlaneGeometry = NgtGeometry<THREE.PlaneGeometry, typeof THREE.PlaneGeometry>;
94
- export type NgtLatheGeometry = NgtGeometry<THREE.LatheGeometry, typeof THREE.LatheGeometry>;
95
- export type NgtShapeGeometry = NgtGeometry<THREE.ShapeGeometry, typeof THREE.ShapeGeometry>;
96
- export type NgtExtrudeGeometry = NgtGeometry<THREE.ExtrudeGeometry, typeof THREE.ExtrudeGeometry>;
97
- export type NgtEdgesGeometry = NgtGeometry<THREE.EdgesGeometry, typeof THREE.EdgesGeometry>;
98
- export type NgtConeGeometry = NgtGeometry<THREE.ConeGeometry, typeof THREE.ConeGeometry>;
99
- export type NgtCylinderGeometry = NgtGeometry<THREE.CylinderGeometry, typeof THREE.CylinderGeometry>;
100
- export type NgtCircleGeometry = NgtGeometry<THREE.CircleGeometry, typeof THREE.CircleGeometry>;
101
- export type NgtBoxGeometry = NgtGeometry<THREE.BoxGeometry, typeof THREE.BoxGeometry>;
102
- export type NgtCapsuleGeometry = NgtGeometry<THREE.CapsuleGeometry, typeof THREE.CapsuleGeometry>;
103
- export type NgtShadowMaterial = NgtMaterial<THREE.ShadowMaterial, [THREE.ShaderMaterialParameters]>;
104
- export type NgtSpriteMaterial = NgtMaterial<THREE.SpriteMaterial, [THREE.SpriteMaterialParameters]>;
105
- export type NgtRawShaderMaterial = NgtMaterial<THREE.RawShaderMaterial, [THREE.ShaderMaterialParameters]>;
106
- export type NgtShaderMaterial = NgtMaterial<THREE.ShaderMaterial, [THREE.ShaderMaterialParameters]>;
107
- export type NgtPointsMaterial = NgtMaterial<THREE.PointsMaterial, [THREE.PointsMaterialParameters]>;
108
- export type NgtMeshPhysicalMaterial = NgtMaterial<THREE.MeshPhysicalMaterial, [THREE.MeshPhysicalMaterialParameters]>;
109
- export type NgtMeshStandardMaterial = NgtMaterial<THREE.MeshStandardMaterial, [THREE.MeshStandardMaterialParameters]>;
110
- export type NgtMeshPhongMaterial = NgtMaterial<THREE.MeshPhongMaterial, [THREE.MeshPhongMaterialParameters]>;
111
- export type NgtMeshToonMaterial = NgtMaterial<THREE.MeshToonMaterial, [THREE.MeshToonMaterialParameters]>;
112
- export type NgtMeshNormalMaterial = NgtMaterial<THREE.MeshNormalMaterial, [THREE.MeshNormalMaterialParameters]>;
113
- export type NgtMeshLambertMaterial = NgtMaterial<THREE.MeshLambertMaterial, [THREE.MeshLambertMaterialParameters]>;
114
- export type NgtMeshDepthMaterial = NgtMaterial<THREE.MeshDepthMaterial, [THREE.MeshDepthMaterialParameters]>;
115
- export type NgtMeshDistanceMaterial = NgtMaterial<THREE.MeshDistanceMaterial, [THREE.MeshDistanceMaterialParameters]>;
116
- export type NgtMeshBasicMaterial = NgtMaterial<THREE.MeshBasicMaterial, [THREE.MeshBasicMaterialParameters]>;
117
- export type NgtMeshMatcapMaterial = NgtMaterial<THREE.MeshMatcapMaterial, [THREE.MeshMatcapMaterialParameters]>;
118
- export type NgtLineDashedMaterial = NgtMaterial<THREE.LineDashedMaterial, [THREE.LineDashedMaterialParameters]>;
119
- export type NgtLineBasicMaterial = NgtMaterial<THREE.LineBasicMaterial, [THREE.LineBasicMaterialParameters]>;
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<THREE.LightShadow, typeof THREE.LightShadow>;
125
- export type NgtSpotLightShadow = NgtNode<THREE.SpotLightShadow, typeof THREE.SpotLightShadow>;
126
- export type NgtDirectionalLightShadow = NgtNode<THREE.DirectionalLightShadow, typeof THREE.DirectionalLightShadow>;
127
- export type NgtSpotLight = NgtLight<THREE.SpotLight, typeof THREE.SpotLight>;
128
- export type NgtPointLight = NgtLight<THREE.PointLight, typeof THREE.PointLight>;
129
- export type NgtRectAreaLight = NgtLight<THREE.RectAreaLight, typeof THREE.RectAreaLight>;
130
- export type NgtHemisphereLight = NgtLight<THREE.HemisphereLight, typeof THREE.HemisphereLight>;
131
- export type NgtDirectionalLight = NgtLight<THREE.DirectionalLight, typeof THREE.DirectionalLight>;
132
- export type NgtAmbientLight = NgtLight<THREE.AmbientLight, typeof THREE.AmbientLight>;
133
- export type NgtLightProbe = NgtLight<THREE.LightProbe, typeof THREE.LightProbe>;
134
- export type NgtSpotLightHelper = NgtObject3DNode<THREE.SpotLightHelper, typeof THREE.SpotLightHelper>;
135
- export type NgtSkeletonHelper = NgtObject3DNode<THREE.SkeletonHelper, typeof THREE.SkeletonHelper>;
136
- export type NgtPointLightHelper = NgtObject3DNode<THREE.PointLightHelper, typeof THREE.PointLightHelper>;
137
- export type NgtHemisphereLightHelper = NgtObject3DNode<THREE.HemisphereLightHelper, typeof THREE.HemisphereLightHelper>;
138
- export type NgtGridHelper = NgtObject3DNode<THREE.GridHelper, typeof THREE.GridHelper>;
139
- export type NgtPolarGridHelper = NgtObject3DNode<THREE.PolarGridHelper, typeof THREE.PolarGridHelper>;
140
- export type NgtDirectionalLightHelper = NgtObject3DNode<THREE.DirectionalLightHelper, typeof THREE.DirectionalLightHelper>;
141
- export type NgtCameraHelper = NgtObject3DNode<THREE.CameraHelper, typeof THREE.CameraHelper>;
142
- export type NgtBoxHelper = NgtObject3DNode<THREE.BoxHelper, typeof THREE.BoxHelper>;
143
- export type NgtBox3Helper = NgtObject3DNode<THREE.Box3Helper, typeof THREE.Box3Helper>;
144
- export type NgtPlaneHelper = NgtObject3DNode<THREE.PlaneHelper, typeof THREE.PlaneHelper>;
145
- export type NgtArrowHelper = NgtObject3DNode<THREE.ArrowHelper, typeof THREE.ArrowHelper>;
146
- export type NgtAxesHelper = NgtObject3DNode<THREE.AxesHelper, typeof THREE.AxesHelper>;
147
- export type NgtTexture = NgtNode<THREE.Texture, typeof THREE.Texture>;
148
- export type NgtVideoTexture = NgtNode<THREE.VideoTexture, typeof THREE.VideoTexture>;
149
- export type NgtDataTexture = NgtNode<THREE.DataTexture, typeof THREE.DataTexture>;
150
- export type NgtData3DTexture = NgtNode<THREE.Data3DTexture, typeof THREE.Data3DTexture>;
151
- export type NgtCompressedTexture = NgtNode<THREE.CompressedTexture, typeof THREE.CompressedTexture>;
152
- export type NgtCubeTexture = NgtNode<THREE.CubeTexture, typeof THREE.CubeTexture>;
153
- export type NgtCanvasTexture = NgtNode<THREE.CanvasTexture, typeof THREE.CanvasTexture>;
154
- export type NgtDepthTexture = NgtNode<THREE.DepthTexture, typeof THREE.DepthTexture>;
155
- export type NgtRaycaster = NgtNode<THREE.Raycaster, typeof THREE.Raycaster>;
156
- export type NgtVector2Node = NgtNode<THREE.Vector2, typeof THREE.Vector2>;
157
- export type NgtVector3Node = NgtNode<THREE.Vector3, typeof THREE.Vector3>;
158
- export type NgtVector4Node = NgtNode<THREE.Vector4, typeof THREE.Vector4>;
159
- export type NgtEulerNode = NgtNode<THREE.Euler, typeof THREE.Euler>;
160
- export type NgtMatrix3Node = NgtNode<THREE.Matrix3, typeof THREE.Matrix3>;
161
- export type NgtMatrix4Node = NgtNode<THREE.Matrix4, typeof THREE.Matrix4>;
162
- export type NgtQuaternionNode = NgtNode<THREE.Quaternion, typeof THREE.Quaternion>;
163
- export type NgtBufferAttribute = NgtNode<THREE.BufferAttribute, typeof THREE.BufferAttribute>;
164
- export type NgtFloat16BufferAttribute = NgtNode<THREE.Float16BufferAttribute, typeof THREE.Float16BufferAttribute>;
165
- export type NgtFloat32BufferAttribute = NgtNode<THREE.Float32BufferAttribute, typeof THREE.Float32BufferAttribute>;
166
- export type NgtFloat64BufferAttribute = NgtNode<THREE.Float64BufferAttribute, typeof THREE.Float64BufferAttribute>;
167
- export type NgtInt8BufferAttribute = NgtNode<THREE.Int8BufferAttribute, typeof THREE.Int8BufferAttribute>;
168
- export type NgtInt16BufferAttribute = NgtNode<THREE.Int16BufferAttribute, typeof THREE.Int16BufferAttribute>;
169
- export type NgtInt32BufferAttribute = NgtNode<THREE.Int32BufferAttribute, typeof THREE.Int32BufferAttribute>;
170
- export type NgtUint8BufferAttribute = NgtNode<THREE.Uint8BufferAttribute, typeof THREE.Uint8BufferAttribute>;
171
- export type NgtUint16BufferAttribute = NgtNode<THREE.Uint16BufferAttribute, typeof THREE.Uint16BufferAttribute>;
172
- export type NgtUint32BufferAttribute = NgtNode<THREE.Uint32BufferAttribute, typeof THREE.Uint32BufferAttribute>;
173
- export type NgtInstancedBufferAttribute = NgtNode<THREE.InstancedBufferAttribute, typeof THREE.InstancedBufferAttribute>;
174
- export type NgtColor = NgtNode<THREE.Color, THREE.ColorRepresentation>;
175
- export type NgtFog = NgtNode<THREE.Fog, typeof THREE.Fog>;
176
- export type NgtFogExp2 = NgtNode<THREE.FogExp2, typeof THREE.FogExp2>;
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 { type NgtInstanceNode } from '../instance';
2
- import type { NgtAnyRecord } from '../types';
1
+ import { NgtInstanceNode } from '../instance';
2
+ import { NgtAnyRecord } from '../types';
3
3
  export declare function applyProps(instance: NgtInstanceNode, props: NgtAnyRecord): any;
@@ -1,7 +1,7 @@
1
- import { type NgtAttachFunction } from '../instance';
2
- import type { NgtState } from '../store';
3
- import type { NgtAnyRecord } from '../types';
4
- import type { NgtSignalStore } from './signal-store';
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 { type NgtBeforeRenderRecord } from '../store';
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 { type Type } from '@angular/core';
2
- import { type CreateInjectionTokenOptions } from 'ngxtension/create-injection-token';
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 type * as THREE from 'three';
3
- import type { NgtRendererLike } from '../store';
4
- import type { NgtEquConfig } from '../types';
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 THREE.Material;
8
- geometry: (a: unknown) => a is THREE.BufferGeometry<THREE.NormalBufferAttributes>;
9
- orthographicCamera: (a: unknown) => a is THREE.OrthographicCamera;
10
- perspectiveCamera: (a: unknown) => a is THREE.PerspectiveCamera;
11
- camera: (a: unknown) => a is THREE.Camera;
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 THREE.Scene;
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 THREE.Object3D<THREE.Object3DEventMap>;
17
- colorSpaceExist: <T extends object | NgtRendererLike | THREE.Texture, P = T extends NgtRendererLike ? {
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;
@@ -1,19 +1,19 @@
1
- import * as THREE from 'three';
2
- import type { NgtGLOptions } from '../canvas';
3
- import type { NgtIntersection } from '../events';
4
- import type { NgtCanvasElement } from '../roots';
5
- import type { NgtDpr, NgtSize } from '../store';
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): THREE.WebGLRenderer;
9
- export declare function makeCameraInstance(isOrthographic: boolean, size: NgtSize): THREE.OrthographicCamera | THREE.PerspectiveCamera;
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]: THREE.Object3D;
12
+ [name: string]: Object3D;
13
13
  };
14
14
  materials: {
15
- [name: string]: THREE.Material;
15
+ [name: string]: Material;
16
16
  };
17
17
  [key: string]: any;
18
18
  };
19
- export declare function makeObjectGraph(object: THREE.Object3D): NgtObjectMap;
19
+ export declare function makeObjectGraph(object: Object3D): NgtObjectMap;
@@ -1,4 +1,4 @@
1
- import { type CreateComputedOptions, type CreateSignalOptions, type Signal } from '@angular/core';
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]>;
@@ -1,4 +1,4 @@
1
- import type { NgtCameraManual, NgtSize } from '../store';
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;