@types/three 0.141.0 → 0.143.1

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 (133) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/controls/FirstPersonControls.d.ts +1 -1
  3. three/examples/jsm/controls/FlyControls.d.ts +1 -1
  4. three/examples/jsm/controls/OrbitControls.d.ts +3 -3
  5. three/examples/jsm/curves/NURBSUtils.d.ts +18 -20
  6. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
  7. three/examples/jsm/nodes/Nodes.d.ts +215 -0
  8. three/examples/jsm/nodes/accessors/BufferNode.d.ts +11 -0
  9. three/examples/jsm/nodes/accessors/CameraNode.d.ts +12 -0
  10. three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +11 -0
  11. three/examples/jsm/nodes/accessors/InstanceNode.d.ts +9 -0
  12. three/examples/jsm/nodes/accessors/MaterialNode.d.ts +23 -0
  13. three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +6 -0
  14. three/examples/jsm/nodes/accessors/ModelNode.d.ts +9 -0
  15. three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +6 -0
  16. three/examples/jsm/nodes/accessors/NormalNode.d.ts +17 -0
  17. three/examples/jsm/nodes/accessors/Object3DNode.d.ts +22 -0
  18. three/examples/jsm/nodes/accessors/PointUVNode.d.ts +7 -0
  19. three/examples/jsm/nodes/accessors/PositionNode.d.ts +19 -0
  20. three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +13 -0
  21. three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +8 -0
  22. three/examples/jsm/nodes/accessors/SkinningNode.d.ts +13 -0
  23. three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +6 -0
  24. three/examples/jsm/nodes/accessors/TextureNode.d.ts +12 -0
  25. three/examples/jsm/nodes/accessors/UVNode.d.ts +8 -0
  26. three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
  27. three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +8 -0
  28. three/examples/jsm/nodes/core/AttributeNode.d.ts +9 -0
  29. three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
  30. three/examples/jsm/nodes/core/CodeNode.d.ts +16 -0
  31. three/examples/jsm/nodes/core/ConstNode.d.ts +10 -0
  32. three/examples/jsm/nodes/core/ContextNode.d.ts +10 -0
  33. three/examples/jsm/nodes/core/ExpressionNode.d.ts +7 -0
  34. three/examples/jsm/nodes/core/FunctionCallNode.d.ts +13 -0
  35. three/examples/jsm/nodes/core/FunctionNode.d.ts +15 -0
  36. three/examples/jsm/nodes/core/InputNode.d.ts +12 -0
  37. three/examples/jsm/nodes/core/InstanceIndexNode.d.ts +6 -0
  38. three/examples/jsm/nodes/core/Node.d.ts +30 -0
  39. three/examples/jsm/nodes/core/NodeAttribute.d.ts +6 -0
  40. three/examples/jsm/nodes/core/NodeBuilder.d.ts +134 -0
  41. three/examples/jsm/nodes/core/NodeCode.d.ts +4 -0
  42. three/examples/jsm/nodes/core/NodeFrame.d.ts +19 -0
  43. three/examples/jsm/nodes/core/NodeFunction.d.ts +13 -0
  44. three/examples/jsm/nodes/core/NodeFunctionInput.d.ts +7 -0
  45. three/examples/jsm/nodes/core/NodeKeywords.d.ts +14 -0
  46. three/examples/jsm/nodes/core/NodeParser.d.ts +5 -0
  47. three/examples/jsm/nodes/core/NodeUniform.d.ts +13 -0
  48. three/examples/jsm/nodes/core/NodeUtils.d.ts +6 -0
  49. three/examples/jsm/nodes/core/NodeVar.d.ts +6 -0
  50. three/examples/jsm/nodes/core/NodeVary.d.ts +6 -0
  51. three/examples/jsm/nodes/core/PropertyNode.d.ts +6 -0
  52. three/examples/jsm/nodes/core/TempNode.d.ts +8 -0
  53. three/examples/jsm/nodes/core/UniformNode.d.ts +10 -0
  54. three/examples/jsm/nodes/core/VarNode.d.ts +16 -0
  55. three/examples/jsm/nodes/core/VaryNode.d.ts +8 -0
  56. three/examples/jsm/nodes/core/constants.d.ts +77 -0
  57. three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +20 -0
  58. three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +15 -0
  59. three/examples/jsm/nodes/display/FrontFacingNode.d.ts +6 -0
  60. three/examples/jsm/nodes/display/NormalMapNode.d.ts +12 -0
  61. three/examples/jsm/nodes/display/ToneMappingNode.d.ts +14 -0
  62. three/examples/jsm/nodes/fog/FogNode.d.ts +10 -0
  63. three/examples/jsm/nodes/fog/FogRangeNode.d.ts +10 -0
  64. three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +6 -0
  65. three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +6 -0
  66. three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +10 -0
  67. three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +9 -0
  68. three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +6 -0
  69. three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +6 -0
  70. three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +11 -0
  71. three/examples/jsm/nodes/functions/light/getDistanceAttenuation.d.ts +5 -0
  72. three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +5 -0
  73. three/examples/jsm/nodes/functions/material/getRoughness.d.ts +6 -0
  74. three/examples/jsm/nodes/geometry/RangeNode.d.ts +12 -0
  75. three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +11 -0
  76. three/examples/jsm/nodes/lighting/AONode.d.ts +8 -0
  77. three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +10 -0
  78. three/examples/jsm/nodes/lighting/EnvironmentNode.d.ts +8 -0
  79. three/examples/jsm/nodes/lighting/HemisphereLightNode.d.ts +13 -0
  80. three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +15 -0
  81. three/examples/jsm/nodes/lighting/LightingNode.d.ts +5 -0
  82. three/examples/jsm/nodes/lighting/LightsNode.d.ts +19 -0
  83. three/examples/jsm/nodes/lighting/PunctualLightNode.d.ts +12 -0
  84. three/examples/jsm/nodes/loaders/NodeLoader.d.ts +21 -0
  85. three/examples/jsm/nodes/loaders/NodeMaterialLoader.d.ts +8 -0
  86. three/examples/jsm/nodes/loaders/NodeObjectLoader.d.ts +11 -0
  87. three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +16 -0
  88. three/examples/jsm/nodes/materials/Materials.d.ts +15 -0
  89. three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +19 -0
  90. three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +27 -0
  91. three/examples/jsm/nodes/materials/NodeMaterial.d.ts +22 -0
  92. three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +15 -0
  93. three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +23 -0
  94. three/examples/jsm/nodes/math/CondNode.d.ts +9 -0
  95. three/examples/jsm/nodes/math/MathNode.d.ts +116 -0
  96. three/examples/jsm/nodes/math/OperatorNode.d.ts +31 -0
  97. three/examples/jsm/nodes/procedural/CheckerNode.d.ts +6 -0
  98. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +155 -0
  99. three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +267 -0
  100. three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +128 -0
  101. three/examples/jsm/nodes/utils/ArrayElementNode.d.ts +9 -0
  102. three/examples/jsm/nodes/utils/ConvertNode.d.ts +8 -0
  103. three/examples/jsm/nodes/utils/JoinNode.d.ts +10 -0
  104. three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +5 -0
  105. three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +7 -0
  106. three/examples/jsm/nodes/utils/OscNode.d.ts +19 -0
  107. three/examples/jsm/nodes/utils/RotateUVNode.d.ts +10 -0
  108. three/examples/jsm/nodes/utils/SplitNode.d.ts +16 -0
  109. three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +9 -0
  110. three/examples/jsm/nodes/utils/TimerNode.d.ts +14 -0
  111. three/examples/jsm/objects/GroundProjectedEnv.d.ts +13 -0
  112. three/examples/jsm/postprocessing/SAOPass.d.ts +1 -1
  113. three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +5 -0
  114. three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +56 -0
  115. three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +3 -0
  116. three/examples/jsm/renderers/webgl/nodes/WebGLPhysicalContextNode.d.ts +13 -0
  117. three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +10 -0
  118. three/examples/jsm/textures/FlakesTexture.d.ts +3 -0
  119. three/examples/jsm/utils/CameraUtils.d.ts +7 -9
  120. three/examples/jsm/utils/GeometryCompressionUtils.d.ts +3 -5
  121. three/examples/jsm/utils/GeometryUtils.d.ts +23 -25
  122. three/examples/jsm/utils/SkeletonUtils.d.ts +16 -22
  123. three/index.d.ts +2 -2
  124. three/package.json +3 -3
  125. three/src/Three.d.ts +4 -1
  126. three/src/animation/AnimationUtils.d.ts +32 -34
  127. three/src/audio/AudioContext.d.ts +1 -1
  128. three/src/core/UniformsGroup.d.ts +27 -0
  129. three/src/extras/DataUtils.d.ts +2 -4
  130. three/src/renderers/WebGLRenderer.d.ts +0 -5
  131. three/src/renderers/shaders/UniformsUtils.d.ts +6 -1
  132. three/src/renderers/webgl/WebGLUniformsGroups.d.ts +17 -0
  133. three/examples/jsm/shaders/SSRrShader.d.ts +0 -48
three/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for three (https://threejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 31 May 2022 18:31:37 GMT
11
+ * Last updated: Wed, 17 Aug 2022 12:32:25 GMT
12
12
  * Dependencies: [@types/webxr](https://npmjs.com/package/@types/webxr)
13
13
  * Global values: `THREE`
14
14
 
@@ -4,7 +4,7 @@ export class FirstPersonControls {
4
4
  constructor(object: Camera, domElement?: HTMLElement);
5
5
 
6
6
  object: Camera;
7
- domElement: HTMLElement | HTMLDocument;
7
+ domElement: HTMLElement | Document;
8
8
 
9
9
  enabled: boolean;
10
10
  movementSpeed: number;
@@ -4,7 +4,7 @@ export class FlyControls extends EventDispatcher {
4
4
  constructor(object: Camera, domElement?: HTMLElement);
5
5
 
6
6
  object: Camera;
7
- domElement: HTMLElement | HTMLDocument;
7
+ domElement: HTMLElement | Document;
8
8
 
9
9
  movementSpeed: number;
10
10
  rollSpeed: number;
@@ -4,7 +4,7 @@ export class OrbitControls {
4
4
  constructor(object: Camera, domElement?: HTMLElement);
5
5
 
6
6
  object: Camera;
7
- domElement: HTMLElement | HTMLDocument;
7
+ domElement: HTMLElement | Document;
8
8
 
9
9
  // API
10
10
  enabled: boolean;
@@ -43,8 +43,8 @@ export class OrbitControls {
43
43
  autoRotateSpeed: number;
44
44
 
45
45
  keys: { LEFT: string; UP: string; RIGHT: string; BOTTOM: string };
46
- mouseButtons: { LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE };
47
- touches: { ONE: TOUCH; TWO: TOUCH };
46
+ mouseButtons: Partial<{ LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE }>;
47
+ touches: Partial<{ ONE: TOUCH; TWO: TOUCH }>;
48
48
 
49
49
  target0: Vector3;
50
50
  position0: Vector3;
@@ -1,22 +1,20 @@
1
1
  import { Vector3, Vector4 } from '../../../src/Three';
2
2
 
3
- export namespace NURBSUtils {
4
- function findSpan(p: number, u: number, U: number[]): number;
5
- function calcBasisFunctions(span: number, u: number, p: number, U: number[]): number[];
6
- function calcBSplinePoint(p: number, U: number[], P: Vector4[], u: number): Vector4;
7
- function calcBasisFunctionDerivatives(span: number, u: number, p: number, n: number, U: number[]): number[][];
8
- function calcBSplineDerivatives(p: number, U: number[], P: Vector4[], u: number, nd: number): Vector4[];
9
- function calcKoverI(k: number, i: number): number;
10
- function calcRationalCurveDerivatives(Pders: Vector4[]): Vector3[];
11
- function calcNURBSDerivatives(p: number, U: number[], P: Vector4[], u: number, nd: number): Vector3[];
12
- function calcSurfacePoint(
13
- p: number,
14
- q: number,
15
- U: number[],
16
- V: number[],
17
- P: Vector4[],
18
- u: number,
19
- v: number,
20
- target: Vector3,
21
- ): Vector3;
22
- }
3
+ export function findSpan(p: number, u: number, U: number[]): number;
4
+ export function calcBasisFunctions(span: number, u: number, p: number, U: number[]): number[];
5
+ export function calcBSplinePoint(p: number, U: number[], P: Vector4[], u: number): Vector4;
6
+ export function calcBasisFunctionDerivatives(span: number, u: number, p: number, n: number, U: number[]): number[][];
7
+ export function calcBSplineDerivatives(p: number, U: number[], P: Vector4[], u: number, nd: number): Vector4[];
8
+ export function calcKoverI(k: number, i: number): number;
9
+ export function calcRationalCurveDerivatives(Pders: Vector4[]): Vector3[];
10
+ export function calcNURBSDerivatives(p: number, U: number[], P: Vector4[], u: number, nd: number): Vector3[];
11
+ export function calcSurfacePoint(
12
+ p: number,
13
+ q: number,
14
+ U: number[],
15
+ V: number[],
16
+ P: Vector4[],
17
+ u: number,
18
+ v: number,
19
+ target: Vector3,
20
+ ): Vector3;
@@ -65,7 +65,7 @@ export class GLTFLoader extends Loader {
65
65
  onError?: (event: ErrorEvent) => void,
66
66
  ): void;
67
67
 
68
- parseAsync(data: ArrayBuffer | string, path: string): Promise<void>;
68
+ parseAsync(data: ArrayBuffer | string, path: string): Promise<GLTF>;
69
69
  }
70
70
 
71
71
  export type GLTFReferenceType = 'materials' | 'nodes' | 'textures' | 'meshes';
@@ -0,0 +1,215 @@
1
+ // core
2
+ import ArrayUniformNode from './core/ArrayUniformNode';
3
+ import AttributeNode from './core/AttributeNode';
4
+ import BypassNode from './core/BypassNode';
5
+ import CodeNode, { CodeNodeInclude } from './core/CodeNode';
6
+ import ConstNode from './core/ConstNode';
7
+ import ContextNode from './core/ContextNode';
8
+ import ExpressionNode from './core/ExpressionNode';
9
+ import FunctionCallNode from './core/FunctionCallNode';
10
+ import FunctionNode from './core/FunctionNode';
11
+ import InstanceIndexNode from './core/InstanceIndexNode';
12
+ import Node from './core/Node';
13
+ import NodeAttribute from './core/NodeAttribute';
14
+ import NodeBuilder from './core/NodeBuilder';
15
+ import NodeCode from './core/NodeCode';
16
+ import NodeFrame from './core/NodeFrame';
17
+ import NodeFunctionInput from './core/NodeFunctionInput';
18
+ import NodeKeywords from './core/NodeKeywords';
19
+ import NodeUniform from './core/NodeUniform';
20
+ import NodeVar from './core/NodeVar';
21
+ import NodeVary from './core/NodeVary';
22
+ import PropertyNode from './core/PropertyNode';
23
+ import TempNode from './core/TempNode';
24
+ import UniformNode from './core/UniformNode';
25
+ import VarNode from './core/VarNode';
26
+ import VaryNode from './core/VaryNode';
27
+
28
+ // accessors
29
+ import BufferNode from './accessors/BufferNode';
30
+ import CameraNode, { CameraNodeScope } from './accessors/CameraNode';
31
+ import CubeTextureNode from './accessors/CubeTextureNode';
32
+ import InstanceNode from './accessors/InstanceNode';
33
+ import MaterialNode, { MaterialNodeScope } from './accessors/MaterialNode';
34
+ import MaterialReferenceNode from './accessors/MaterialReferenceNode';
35
+ import ModelNode from './accessors/ModelNode';
36
+ import ModelViewProjectionNode from './accessors/ModelViewProjectionNode';
37
+ import NormalNode, { NormalNodeScope } from './accessors/NormalNode';
38
+ import Object3DNode, { Object3DNodeScope } from './accessors/Object3DNode';
39
+ import PointUVNode from './accessors/PointUVNode';
40
+ import PositionNode, { PositionNodeScope } from './accessors/PositionNode';
41
+ import ReferenceNode from './accessors/ReferenceNode';
42
+ import ReflectVectorNode from './accessors/ReflectVectorNode';
43
+ import SkinningNode from './accessors/SkinningNode';
44
+ import TextureNode from './accessors/TextureNode';
45
+ import UVNode from './accessors/UVNode';
46
+ import UserDataNode from './accessors/UserDataNode';
47
+
48
+ // geometry
49
+ import RangeNode, { RangeModeBound } from './geometry/RangeNode';
50
+
51
+ // gpgpu
52
+ import ComputeNode from './gpgpu/ComputeNode';
53
+
54
+ // display
55
+ import ColorAdjustmentNode, { ColorAdjustmentMethod } from './display/ColorAdjustmentNode';
56
+ import ColorSpaceNode, { ColorSpaceNodeMethod } from './display/ColorSpaceNode';
57
+ import FrontFacingNode from './display/FrontFacingNode';
58
+ import NormalMapNode from './display/NormalMapNode';
59
+ import ToneMappingNode from './display/ToneMappingNode';
60
+
61
+ // math
62
+ import MathNode, { MathNodeMethod1, MathNodeMethod2, MathNodeMethod3, MathNodeMethod } from './math/MathNode';
63
+ import OperatorNode, { OperatorNodeOp } from './math/OperatorNode';
64
+ import CondNode from './math/CondNode';
65
+
66
+ // lighting
67
+ import PunctualLightNode from './lighting/PunctualLightNode';
68
+ import LightsNode from './lighting/LightsNode';
69
+ import LightingNode from './lighting/LightingNode';
70
+ import LightingContextNode, { LightingModelNode } from './lighting/LightingContextNode';
71
+ import HemisphereLightNode from './lighting/HemisphereLightNode';
72
+ import EnvironmentNode from './lighting/EnvironmentNode';
73
+ import AONode from './lighting/AONode';
74
+ import AnalyticLightNode from './lighting/AnalyticLightNode';
75
+
76
+ // utils
77
+
78
+ import ArrayElementNode from './utils/ArrayElementNode';
79
+ import ConvertNode from './utils/ConvertNode';
80
+ import JoinNode from './utils/JoinNode';
81
+ import MatcapUVNode from './utils/MatcapUVNode';
82
+ import MaxMipLevelNode from './utils/MaxMipLevelNode';
83
+ import OscNode, { OscNodeMethod } from './utils/OscNode';
84
+ import RotateUVNode from './utils/RotateUVNode';
85
+ import SplitNode from './utils/SplitNode';
86
+ import SpriteSheetUVNode from './utils/SpriteSheetUVNode';
87
+ import TimerNode, { TimerNodeScope } from './utils/TimerNode';
88
+
89
+ // loaders
90
+ import NodeLoader from './loaders/NodeLoader';
91
+ import NodeObjectLoader from './loaders/NodeObjectLoader';
92
+ import NodeMaterialLoader from './loaders/NodeMaterialLoader';
93
+
94
+ // procedural
95
+ import CheckerNode from './procedural/CheckerNode';
96
+ // fog
97
+ import FogNode from './fog/FogNode';
98
+ import FogRangeNode from './fog/FogRangeNode';
99
+
100
+ // core
101
+ export * from './core/constants';
102
+
103
+ // materials
104
+ export * from './materials/Materials';
105
+
106
+ // shader node
107
+ export * from './shadernode/ShaderNodeElements';
108
+
109
+ export {
110
+ // core
111
+ ArrayUniformNode,
112
+ AttributeNode,
113
+ BypassNode,
114
+ CodeNode,
115
+ CodeNodeInclude,
116
+ ContextNode,
117
+ ConstNode,
118
+ ExpressionNode,
119
+ FunctionCallNode,
120
+ FunctionNode,
121
+ InstanceIndexNode,
122
+ Node,
123
+ NodeAttribute,
124
+ NodeBuilder,
125
+ NodeCode,
126
+ NodeFrame,
127
+ NodeFunctionInput,
128
+ NodeKeywords,
129
+ NodeUniform,
130
+ NodeVar,
131
+ NodeVary,
132
+ PropertyNode,
133
+ TempNode,
134
+ UniformNode,
135
+ VarNode,
136
+ VaryNode,
137
+ // geometry
138
+ RangeNode,
139
+ RangeModeBound,
140
+ // gpgpu
141
+ ComputeNode,
142
+ // accessors
143
+ BufferNode,
144
+ CameraNode,
145
+ CameraNodeScope,
146
+ CubeTextureNode,
147
+ InstanceNode,
148
+ MaterialNode,
149
+ MaterialNodeScope,
150
+ MaterialReferenceNode,
151
+ ModelNode,
152
+ ModelViewProjectionNode,
153
+ NormalNode,
154
+ NormalNodeScope,
155
+ Object3DNode,
156
+ Object3DNodeScope as OObject3DNodeScope,
157
+ PointUVNode,
158
+ PositionNode,
159
+ PositionNodeScope,
160
+ ReferenceNode,
161
+ ReflectVectorNode,
162
+ SkinningNode,
163
+ TextureNode,
164
+ UVNode,
165
+ UserDataNode,
166
+ // display
167
+ ColorAdjustmentNode,
168
+ ColorAdjustmentMethod,
169
+ ColorSpaceNode,
170
+ ColorSpaceNodeMethod,
171
+ FrontFacingNode,
172
+ NormalMapNode,
173
+ ToneMappingNode,
174
+ // math
175
+ MathNode,
176
+ MathNodeMethod1,
177
+ MathNodeMethod2,
178
+ MathNodeMethod3,
179
+ MathNodeMethod,
180
+ OperatorNode,
181
+ OperatorNodeOp,
182
+ CondNode,
183
+ // lighting
184
+ PunctualLightNode,
185
+ LightsNode,
186
+ LightingNode,
187
+ LightingContextNode,
188
+ LightingModelNode,
189
+ HemisphereLightNode,
190
+ EnvironmentNode,
191
+ AONode,
192
+ AnalyticLightNode,
193
+ // utils
194
+ ArrayElementNode,
195
+ ConvertNode,
196
+ JoinNode,
197
+ MatcapUVNode,
198
+ MaxMipLevelNode,
199
+ OscNode,
200
+ OscNodeMethod,
201
+ RotateUVNode,
202
+ SplitNode,
203
+ SpriteSheetUVNode,
204
+ TimerNode,
205
+ TimerNodeScope,
206
+ // procedural
207
+ CheckerNode,
208
+ // fog
209
+ FogNode,
210
+ FogRangeNode,
211
+ // loaders
212
+ NodeLoader,
213
+ NodeObjectLoader,
214
+ NodeMaterialLoader,
215
+ };
@@ -0,0 +1,11 @@
1
+ import { NodeTypeOption } from '../core/constants';
2
+ import UniformNode from '../core/UniformNode';
3
+
4
+ export default class BufferNode extends UniformNode {
5
+ isBufferNode: true;
6
+
7
+ bufferType: string;
8
+ bufferCount: number;
9
+
10
+ constructor(value: ArrayLike<number>, bufferType: NodeTypeOption, bufferCount?: number);
11
+ }
@@ -0,0 +1,12 @@
1
+ import Object3DNode, { Object3DNodeScope } from './Object3DNode';
2
+
3
+ export type CameraNodeScope = Object3DNodeScope | typeof CameraNode.PROJECTION_MATRIX;
4
+
5
+ export default class CameraNode extends Object3DNode {
6
+ static PROJECTION_MATRIX: 'projectionMatrix';
7
+
8
+ // @ts-expect-error
9
+ scope: CameraNodeScope;
10
+
11
+ constructor(scope?: CameraNodeScope);
12
+ }
@@ -0,0 +1,11 @@
1
+ import TextureNode from './TextureNode';
2
+ import { Node } from '../Nodes';
3
+ import { CubeTexture } from '../../../../src/Three';
4
+
5
+ export default class CubeTextureNode extends TextureNode {
6
+ isCubeTextureNode: boolean;
7
+ uvNode: Node | null;
8
+ levelNode: Node | null;
9
+
10
+ constructor(value: CubeTexture, uvNode?: Node | null, levelNode?: Node | null);
11
+ }
@@ -0,0 +1,9 @@
1
+ import { InstancedMesh } from '../../../../src/Three';
2
+ import Node from '../core/Node';
3
+
4
+ export default class InstanceNode extends Node {
5
+ instanceMesh: InstancedMesh;
6
+ instanceMatrixNode: Node;
7
+
8
+ constructor(instanceMesh: InstancedMesh);
9
+ }
@@ -0,0 +1,23 @@
1
+ import Node from '../core/Node';
2
+
3
+ export type MaterialNodeScope =
4
+ | typeof MaterialNode.ALPHA_TEST
5
+ | typeof MaterialNode.COLOR
6
+ | typeof MaterialNode.OPACITY
7
+ | typeof MaterialNode.ROUGHNESS
8
+ | typeof MaterialNode.METALNESS
9
+ | typeof MaterialNode.EMISSIVE
10
+ | typeof MaterialNode.ROTATION;
11
+
12
+ export default class MaterialNode extends Node {
13
+ static ALPHA_TEST: 'alphaTest';
14
+ static COLOR: 'color';
15
+ static OPACITY: 'opacity';
16
+ static ROUGHNESS: 'roughness';
17
+ static METALNESS: 'metalness';
18
+ static EMISSIVE: 'emissive';
19
+ static ROTATION: 'rotation';
20
+
21
+ scope: MaterialNodeScope;
22
+ constructor(scope?: MaterialNodeScope);
23
+ }
@@ -0,0 +1,6 @@
1
+ import { Material } from '../../../../src/Three';
2
+ import ReferenceNode from './ReferenceNode';
3
+
4
+ export default class MaterialReferenceNode extends ReferenceNode<Material | null> {
5
+ constructor(property: string, inputType: string, material?: Material | null);
6
+ }
@@ -0,0 +1,9 @@
1
+ import { NodeFrame } from '../Nodes';
2
+ import Object3DNode, { Object3DNodeScope } from './Object3DNode';
3
+
4
+ /**
5
+ * Similar to {@link Object3DNode} but the object comes from {@link NodeFrame}
6
+ */
7
+ export default class ModelNode extends Object3DNode {
8
+ constructor(scope?: Object3DNodeScope);
9
+ }
@@ -0,0 +1,6 @@
1
+ import Node from '../core/Node';
2
+ import PositionNode from './PositionNode';
3
+
4
+ export default class ModelViewProjectionNode extends Node {
5
+ constructor(position?: PositionNode);
6
+ }
@@ -0,0 +1,17 @@
1
+ import Node from '../core/Node';
2
+
3
+ export type NormalNodeScope =
4
+ | typeof NormalNode.GEOMETRY
5
+ | typeof NormalNode.LOCAL
6
+ | typeof NormalNode.WORLD
7
+ | typeof NormalNode.VIEW;
8
+
9
+ export default class NormalNode extends Node {
10
+ static GEOMETRY: 'geometry';
11
+ static LOCAL: 'local';
12
+ static WORLD: 'world';
13
+ static VIEW: 'view';
14
+ scope: NormalNodeScope;
15
+
16
+ constructor(scope?: NormalNodeScope);
17
+ }
@@ -0,0 +1,22 @@
1
+ import { Object3D } from '../../../../src/Three';
2
+ import Node from '../core/Node';
3
+
4
+ export type Object3DNodeScope =
5
+ | typeof Object3DNode.VIEW_MATRIX
6
+ | typeof Object3DNode.NORMAL_MATRIX
7
+ | typeof Object3DNode.WORLD_MATRIX
8
+ | typeof Object3DNode.POSITION
9
+ | typeof Object3DNode.VIEW_POSITION;
10
+
11
+ export default class Object3DNode extends Node {
12
+ static VIEW_MATRIX: 'viewMatrix';
13
+ static NORMAL_MATRIX: 'normalMatrix';
14
+ static WORLD_MATRIX: 'worldMatrix';
15
+ static POSITION: 'position';
16
+ static VIEW_POSITION: 'viewPosition';
17
+
18
+ scope: Object3DNodeScope;
19
+ object3d: Object3D | null;
20
+
21
+ constructor(scope?: Object3DNodeScope, object3d?: Object3D | null);
22
+ }
@@ -0,0 +1,7 @@
1
+ import Node from '../core/Node';
2
+
3
+ export default class PointUVNode extends Node {
4
+ isPointUVNode: true;
5
+
6
+ constructor();
7
+ }
@@ -0,0 +1,19 @@
1
+ import Node from '../core/Node';
2
+
3
+ export type PositionNodeScope =
4
+ | typeof PositionNode.GEOMETRY
5
+ | typeof PositionNode.LOCAL
6
+ | typeof PositionNode.WORLD
7
+ | typeof PositionNode.VIEW
8
+ | typeof PositionNode.VIEW_DIRECTION;
9
+
10
+ export default class PositionNode extends Node {
11
+ static GEOMETRY: 'geometry';
12
+ static LOCAL: 'local';
13
+ static WORLD: 'world';
14
+ static VIEW: 'view';
15
+ static VIEW_DIRECTION: 'viewDirection';
16
+ scope: PositionNodeScope;
17
+
18
+ constructor(scope?: PositionNodeScope);
19
+ }
@@ -0,0 +1,13 @@
1
+ import Node from '../core/Node';
2
+ import { NodeTypeOption } from '../Nodes';
3
+
4
+ export default class ReferenceNode<T> extends Node {
5
+ object: T;
6
+ property: string;
7
+ uniformType: string;
8
+ node: Node | null;
9
+
10
+ constructor(property: string, uniformType: NodeTypeOption, object?: T | null);
11
+
12
+ setNodeType(uniformType: NodeTypeOption): void;
13
+ }
@@ -0,0 +1,8 @@
1
+ import Node from '../core/Node';
2
+
3
+ export default class ReflectVectorNode extends Node {
4
+ constructor();
5
+
6
+ getHash(): 'reflectVector';
7
+ construct(): Node;
8
+ }
@@ -0,0 +1,13 @@
1
+ import { SkinnedMesh } from '../../../../src/Three';
2
+ import Node from '../core/Node';
3
+
4
+ export default class SkinningNode extends Node {
5
+ skinIndexNode: Node;
6
+ skinWeightNode: Node;
7
+
8
+ bindMatrixNode: Node;
9
+ bindMatrixInverseNode: Node;
10
+ boneMatricesNode: Node;
11
+
12
+ constructor(skinnedMesh: SkinnedMesh);
13
+ }
@@ -0,0 +1,6 @@
1
+ import { NodeTypeOption } from '../Nodes';
2
+ import BufferNode from './BufferNode';
3
+
4
+ export default class StorageBufferNode extends BufferNode {
5
+ constructor(value: ArrayLike<number>, bufferType: NodeTypeOption, bufferCount?: number);
6
+ }
@@ -0,0 +1,12 @@
1
+ import { Texture } from '../../../../src/Three';
2
+ import UniformNode from '../core/UniformNode';
3
+ import { Node } from '../Nodes';
4
+
5
+ export default class TextureNode extends UniformNode {
6
+ isTextureNode: true;
7
+
8
+ uvNode: Node | null;
9
+ levelNode: Node | null;
10
+
11
+ constructor(value: Texture, uvNode?: Node, levelNode?: Node | null);
12
+ }
@@ -0,0 +1,8 @@
1
+ import AttributeNode from '../core/AttributeNode';
2
+
3
+ export default class UVNode extends AttributeNode {
4
+ isUVNode: true;
5
+ index: number;
6
+
7
+ constructor(index?: number);
8
+ }
@@ -0,0 +1,7 @@
1
+ import { NodeTypeOption, NodeUserData } from '../core/constants';
2
+ import ReferenceNode from './ReferenceNode';
3
+
4
+ export default class UserDataNode extends ReferenceNode<NodeUserData> {
5
+ userData: NodeUserData | null;
6
+ constructor(property: string, inputType: NodeTypeOption, userData?: NodeUserData | null);
7
+ }
@@ -0,0 +1,8 @@
1
+ import UniformNode from './UniformNode';
2
+ import Node from './Node';
3
+
4
+ export default class ArrayUniformNode extends UniformNode {
5
+ isArrayUniformNode: true;
6
+ nodes: Node[];
7
+ constructor(nodes?: Node[]);
8
+ }
@@ -0,0 +1,9 @@
1
+ import { NodeTypeOption } from './constants';
2
+ import Node from './Node';
3
+ import NodeBuilder from './NodeBuilder';
4
+
5
+ export default class AttributeNode extends Node {
6
+ constructor(attributeName: string, nodeType?: NodeTypeOption | null);
7
+ setAttributeName(attributeName: string): this;
8
+ getAttributeName(builder: NodeBuilder): string;
9
+ }
@@ -0,0 +1,9 @@
1
+ import Node from './Node';
2
+
3
+ export default class BypassNode extends Node {
4
+ isBypassNode: true;
5
+ outputNode: Node;
6
+ callNode: Node;
7
+
8
+ constructor(returnNode: Node, callNode: Node);
9
+ }
@@ -0,0 +1,16 @@
1
+ import { NodeTypeOption } from './constants';
2
+ import Node from './Node';
3
+ import NodeBuilder from './NodeBuilder';
4
+
5
+ export interface CodeNodeInclude {
6
+ build(): void;
7
+ }
8
+
9
+ export default class CodeNode extends Node {
10
+ isCodeNode: true;
11
+ code: string;
12
+ constructor(code: string, nodeType?: NodeTypeOption);
13
+
14
+ setIncludes(includes: CodeNodeInclude[]): this;
15
+ getIncludes(builder: NodeBuilder): CodeNodeInclude[];
16
+ }
@@ -0,0 +1,10 @@
1
+ import { NodeTypeOption, NodeValueOption } from './constants';
2
+ import InputNode from './InputNode';
3
+ import NodeBuilder from './NodeBuilder';
4
+
5
+ export default class ConstNode extends InputNode {
6
+ isConstNode: true;
7
+ constructor(value: NodeValueOption, nodeType?: NodeTypeOption | null);
8
+
9
+ generateConst(builder: NodeBuilder): string;
10
+ }
@@ -0,0 +1,10 @@
1
+ import Node from './Node';
2
+ import { NodeBuilderContext } from './NodeBuilder';
3
+
4
+ export default class ContextNode extends Node {
5
+ isContextNode: true;
6
+ node: Node;
7
+ context: NodeBuilderContext;
8
+
9
+ constructor(node: Node, context: NodeBuilderContext);
10
+ }
@@ -0,0 +1,7 @@
1
+ import { NodeTypeOption } from './constants';
2
+ import TempNode from './TempNode';
3
+
4
+ export default class ExpressionNode extends TempNode {
5
+ snipped: string; /* sic */
6
+ constructor(snipped?: string, nodeType?: NodeTypeOption);
7
+ }