@types/three 0.143.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.
- three/README.md +1 -1
- three/examples/jsm/nodes/Nodes.d.ts +215 -0
- three/examples/jsm/nodes/accessors/BufferNode.d.ts +11 -0
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +11 -0
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +23 -0
- three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/ModelNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +17 -0
- three/examples/jsm/nodes/accessors/Object3DNode.d.ts +22 -0
- three/examples/jsm/nodes/accessors/PointUVNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +19 -0
- three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +13 -0
- three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/SkinningNode.d.ts +13 -0
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/UVNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
- three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +8 -0
- three/examples/jsm/nodes/core/AttributeNode.d.ts +9 -0
- three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
- three/examples/jsm/nodes/core/CodeNode.d.ts +16 -0
- three/examples/jsm/nodes/core/ConstNode.d.ts +10 -0
- three/examples/jsm/nodes/core/ContextNode.d.ts +10 -0
- three/examples/jsm/nodes/core/ExpressionNode.d.ts +7 -0
- three/examples/jsm/nodes/core/FunctionCallNode.d.ts +13 -0
- three/examples/jsm/nodes/core/FunctionNode.d.ts +15 -0
- three/examples/jsm/nodes/core/InputNode.d.ts +12 -0
- three/examples/jsm/nodes/core/InstanceIndexNode.d.ts +6 -0
- three/examples/jsm/nodes/core/Node.d.ts +30 -0
- three/examples/jsm/nodes/core/NodeAttribute.d.ts +6 -0
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +134 -0
- three/examples/jsm/nodes/core/NodeCode.d.ts +4 -0
- three/examples/jsm/nodes/core/NodeFrame.d.ts +19 -0
- three/examples/jsm/nodes/core/NodeFunction.d.ts +13 -0
- three/examples/jsm/nodes/core/NodeFunctionInput.d.ts +7 -0
- three/examples/jsm/nodes/core/NodeKeywords.d.ts +14 -0
- three/examples/jsm/nodes/core/NodeParser.d.ts +5 -0
- three/examples/jsm/nodes/core/NodeUniform.d.ts +13 -0
- three/examples/jsm/nodes/core/NodeUtils.d.ts +6 -0
- three/examples/jsm/nodes/core/NodeVar.d.ts +6 -0
- three/examples/jsm/nodes/core/NodeVary.d.ts +6 -0
- three/examples/jsm/nodes/core/PropertyNode.d.ts +6 -0
- three/examples/jsm/nodes/core/TempNode.d.ts +8 -0
- three/examples/jsm/nodes/core/UniformNode.d.ts +10 -0
- three/examples/jsm/nodes/core/VarNode.d.ts +16 -0
- three/examples/jsm/nodes/core/VaryNode.d.ts +8 -0
- three/examples/jsm/nodes/core/constants.d.ts +77 -0
- three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +20 -0
- three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +15 -0
- three/examples/jsm/nodes/display/FrontFacingNode.d.ts +6 -0
- three/examples/jsm/nodes/display/NormalMapNode.d.ts +12 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +14 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +10 -0
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +10 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +10 -0
- three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +9 -0
- three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +6 -0
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +11 -0
- three/examples/jsm/nodes/functions/light/getDistanceAttenuation.d.ts +5 -0
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +5 -0
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +6 -0
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +12 -0
- three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +11 -0
- three/examples/jsm/nodes/lighting/AONode.d.ts +8 -0
- three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +10 -0
- three/examples/jsm/nodes/lighting/EnvironmentNode.d.ts +8 -0
- three/examples/jsm/nodes/lighting/HemisphereLightNode.d.ts +13 -0
- three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +15 -0
- three/examples/jsm/nodes/lighting/LightingNode.d.ts +5 -0
- three/examples/jsm/nodes/lighting/LightsNode.d.ts +19 -0
- three/examples/jsm/nodes/lighting/PunctualLightNode.d.ts +12 -0
- three/examples/jsm/nodes/loaders/NodeLoader.d.ts +21 -0
- three/examples/jsm/nodes/loaders/NodeMaterialLoader.d.ts +8 -0
- three/examples/jsm/nodes/loaders/NodeObjectLoader.d.ts +11 -0
- three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +16 -0
- three/examples/jsm/nodes/materials/Materials.d.ts +15 -0
- three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +19 -0
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +27 -0
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +22 -0
- three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +15 -0
- three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +23 -0
- three/examples/jsm/nodes/math/CondNode.d.ts +9 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +116 -0
- three/examples/jsm/nodes/math/OperatorNode.d.ts +31 -0
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +6 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +155 -0
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +267 -0
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +128 -0
- three/examples/jsm/nodes/utils/ArrayElementNode.d.ts +9 -0
- three/examples/jsm/nodes/utils/ConvertNode.d.ts +8 -0
- three/examples/jsm/nodes/utils/JoinNode.d.ts +10 -0
- three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +5 -0
- three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +7 -0
- three/examples/jsm/nodes/utils/OscNode.d.ts +19 -0
- three/examples/jsm/nodes/utils/RotateUVNode.d.ts +10 -0
- three/examples/jsm/nodes/utils/SplitNode.d.ts +16 -0
- three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +9 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +14 -0
- three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +5 -0
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +56 -0
- three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +3 -0
- three/examples/jsm/renderers/webgl/nodes/WebGLPhysicalContextNode.d.ts +13 -0
- three/index.d.ts +1 -1
- three/package.json +2 -2
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:
|
|
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
|
|
|
@@ -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,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,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,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,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,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,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,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,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,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,13 @@
|
|
|
1
|
+
import FunctionNode from './FunctionNode';
|
|
2
|
+
import TempNode from './TempNode';
|
|
3
|
+
import Node from './Node';
|
|
4
|
+
|
|
5
|
+
export default class FunctionCallNode extends TempNode {
|
|
6
|
+
functionNode: FunctionNode;
|
|
7
|
+
parameters: { [name: string]: Node };
|
|
8
|
+
|
|
9
|
+
constructor(functionNode?: FunctionNode, parameters?: { [name: string]: Node });
|
|
10
|
+
|
|
11
|
+
setParameters(parameters: { [name: string]: Node }): this;
|
|
12
|
+
getParameters(): { [name: string]: Node };
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import CodeNode from './CodeNode';
|
|
2
|
+
import FunctionCallNode from './FunctionCallNode';
|
|
3
|
+
import NodeBuilder from './NodeBuilder';
|
|
4
|
+
import NodeFunction from './NodeFunction';
|
|
5
|
+
import NodeFunctionInput from './NodeFunctionInput';
|
|
6
|
+
import Node from './Node';
|
|
7
|
+
|
|
8
|
+
export default class FunctionNode extends CodeNode {
|
|
9
|
+
keywords: { [key: string]: Node };
|
|
10
|
+
constructor(code?: string);
|
|
11
|
+
|
|
12
|
+
getInputs(builder: NodeBuilder): NodeFunctionInput[];
|
|
13
|
+
getNodeFunction(builder: NodeBuilder): NodeFunction;
|
|
14
|
+
call(parameters: { [name: string]: Node }): FunctionCallNode;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NodeTypeOption, NodeValueOption } from './constants';
|
|
2
|
+
import Node from './Node';
|
|
3
|
+
import NodeBuilder from './NodeBuilder';
|
|
4
|
+
|
|
5
|
+
export default abstract class InputNode extends Node {
|
|
6
|
+
isInputNode: true;
|
|
7
|
+
value: NodeValueOption;
|
|
8
|
+
|
|
9
|
+
constructor(value: NodeValueOption, nodeType?: NodeTypeOption | null);
|
|
10
|
+
|
|
11
|
+
getInputType(builder: NodeBuilder): string | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AnyJson, NodeTypeOption, NodeUpdateTypeOption } from './constants';
|
|
2
|
+
import NodeBuilder from './NodeBuilder';
|
|
3
|
+
import NodeFrame from './NodeFrame';
|
|
4
|
+
|
|
5
|
+
export default abstract class Node {
|
|
6
|
+
uuid: string;
|
|
7
|
+
type: string;
|
|
8
|
+
isNode: true;
|
|
9
|
+
nodeType: NodeTypeOption | null;
|
|
10
|
+
updateType: NodeUpdateTypeOption;
|
|
11
|
+
id: number;
|
|
12
|
+
|
|
13
|
+
constructor(nodeType?: NodeTypeOption | null);
|
|
14
|
+
|
|
15
|
+
getChildren(): Node[];
|
|
16
|
+
getHash(builder: NodeBuilder): string;
|
|
17
|
+
getUpdateType(builder: NodeBuilder): NodeUpdateTypeOption;
|
|
18
|
+
getNodeType(builder: NodeBuilder, output?: string | null): NodeTypeOption | null;
|
|
19
|
+
getConstructHash(builder: NodeBuilder): string;
|
|
20
|
+
getReference(builder: NodeBuilder): Node;
|
|
21
|
+
construct(builder: NodeBuilder): Node | null;
|
|
22
|
+
analyze(builder: NodeBuilder): void;
|
|
23
|
+
generate(builder: NodeBuilder, output?: string | null): string;
|
|
24
|
+
/** This method must be overriden when {@link updateType} !== 'none' */
|
|
25
|
+
update(frame: NodeFrame): void;
|
|
26
|
+
build(builder: NodeBuilder, output?: string | null): string;
|
|
27
|
+
serialize(json: AnyJson): void;
|
|
28
|
+
deserialize(json: AnyJson): void;
|
|
29
|
+
toJSON(meta?: string | { textures: {}; images: {}; nodes: {} }): AnyJson;
|
|
30
|
+
}
|