@types/three 0.144.0 → 0.146.0
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/animation/CCDIKSolver.d.ts +2 -1
- three/examples/jsm/animation/MMDPhysics.d.ts +6 -1
- three/examples/jsm/csm/CSMHelper.d.ts +1 -0
- three/examples/jsm/helpers/OctreeHelper.d.ts +3 -0
- three/examples/jsm/helpers/VertexNormalsHelper.d.ts +2 -0
- three/examples/jsm/helpers/VertexTangentsHelper.d.ts +2 -0
- three/examples/jsm/loaders/PCDLoader.d.ts +1 -1
- three/examples/jsm/loaders/RGBELoader.d.ts +0 -1
- three/examples/jsm/loaders/USDZLoader.d.ts +18 -0
- three/examples/jsm/nodes/Nodes.d.ts +19 -2
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +1 -6
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +2 -0
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +18 -0
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +4 -3
- three/examples/jsm/nodes/core/NodeVarying.d.ts +8 -0
- three/examples/jsm/nodes/core/constants.d.ts +13 -13
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +32 -0
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +8 -0
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +94 -0
- three/examples/jsm/nodes/materialx/{functions/lib → lib}/mx_hsv.d.ts +1 -1
- three/examples/jsm/nodes/materialx/{functions/lib → lib}/mx_noise.d.ts +1 -1
- three/examples/jsm/nodes/math/MathNode.d.ts +1 -2
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +24 -2
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +30 -0
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +6 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +13 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +6 -1
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -0
- three/examples/jsm/postprocessing/BloomPass.d.ts +1 -1
- three/examples/jsm/postprocessing/BokehPass.d.ts +0 -2
- three/examples/jsm/postprocessing/EffectComposer.d.ts +1 -0
- three/examples/jsm/postprocessing/Pass.d.ts +2 -0
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +2 -2
- three/examples/jsm/shaders/VelocityShader.d.ts +13 -0
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +1 -0
- three/examples/jsm/utils/SceneUtils.d.ts +9 -1
- three/index.d.ts +1 -1
- three/package.json +2 -2
- three/src/Three.d.ts +2 -0
- three/src/core/Object3D.d.ts +9 -1
- three/src/helpers/ArrowHelper.d.ts +4 -0
- three/src/helpers/Box3Helper.d.ts +2 -0
- three/src/helpers/BoxHelper.d.ts +2 -0
- three/src/helpers/GridHelper.d.ts +1 -4
- three/src/helpers/PlaneHelper.d.ts +2 -0
- three/src/helpers/PolarGridHelper.d.ts +2 -0
- three/src/helpers/SkeletonHelper.d.ts +2 -0
- three/src/loaders/DataTextureLoader.d.ts +1 -1
- three/src/materials/MeshLambertMaterial.d.ts +1 -1
- three/src/math/ColorManagement.d.ts +11 -1
- three/src/math/Euler.d.ts +13 -11
- three/src/math/Quaternion.d.ts +10 -1
- three/src/renderers/WebGL3DRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLArrayRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLCubeRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLMultipleRenderTargets.d.ts +1 -1
- three/src/renderers/WebGLRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLRenderer.d.ts +1 -5
- three/src/renderers/shaders/UniformsLib.d.ts +3 -2
- three/src/renderers/webgl/WebGLCapabilities.d.ts +1 -0
- three/src/scenes/Scene.d.ts +2 -5
- three/src/textures/CanvasTexture.d.ts +2 -2
- three/src/textures/CompressedArrayTexture.d.ts +17 -0
- three/src/textures/Texture.d.ts +5 -1
- three/examples/jsm/nodes/core/NodeVary.d.ts +0 -6
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: Mon, 07 Nov 2022 20:26:35 GMT
|
|
12
12
|
* Dependencies: [@types/webxr](https://npmjs.com/package/@types/webxr)
|
|
13
13
|
* Global values: `THREE`
|
|
14
14
|
|
|
@@ -115,5 +115,10 @@ export class Constraint {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
export class MMDPhysicsHelper extends Object3D {
|
|
118
|
-
|
|
118
|
+
mesh: THREE.SkinnedMesh;
|
|
119
|
+
physics: MMDPhysics;
|
|
120
|
+
materials: [THREE.MeshBasicMaterial, THREE.MeshBasicMaterial, THREE.MeshBasicMaterial];
|
|
121
|
+
|
|
122
|
+
constructor(mesh: THREE.SkinnedMesh, physics: MMDPhysics);
|
|
123
|
+
dispose(): void;
|
|
119
124
|
}
|
|
@@ -11,5 +11,5 @@ export class PCDLoader extends Loader {
|
|
|
11
11
|
onError?: (event: ErrorEvent) => void,
|
|
12
12
|
): void;
|
|
13
13
|
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Points>;
|
|
14
|
-
parse(data: ArrayBuffer | string
|
|
14
|
+
parse(data: ArrayBuffer | string): Points;
|
|
15
15
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Loader, LoadingManager, Mesh } from '../../../src/Three';
|
|
2
|
+
|
|
3
|
+
export class USDAParser {
|
|
4
|
+
parse(text: string): object;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export class USDZLoader extends Loader {
|
|
8
|
+
constructor(manager?: LoadingManager);
|
|
9
|
+
|
|
10
|
+
load(
|
|
11
|
+
url: string,
|
|
12
|
+
onLoad: (usdz: Mesh) => void,
|
|
13
|
+
onProgress?: (event: ProgressEvent) => void,
|
|
14
|
+
onError?: (event: ErrorEvent) => void,
|
|
15
|
+
): void;
|
|
16
|
+
|
|
17
|
+
parse(buffer: ArrayBuffer | string): THREE.Group;
|
|
18
|
+
}
|
|
@@ -18,7 +18,7 @@ import NodeFunctionInput from './core/NodeFunctionInput';
|
|
|
18
18
|
import NodeKeywords from './core/NodeKeywords';
|
|
19
19
|
import NodeUniform from './core/NodeUniform';
|
|
20
20
|
import NodeVar from './core/NodeVar';
|
|
21
|
-
import
|
|
21
|
+
import NodeVarying from './core/NodeVarying';
|
|
22
22
|
import PropertyNode from './core/PropertyNode';
|
|
23
23
|
import TempNode from './core/TempNode';
|
|
24
24
|
import UniformNode from './core/UniformNode';
|
|
@@ -26,6 +26,7 @@ import VarNode from './core/VarNode';
|
|
|
26
26
|
import VaryNode from './core/VaryNode';
|
|
27
27
|
|
|
28
28
|
// accessors
|
|
29
|
+
import BitangentNode, { BitangentNodeScope } from './accessors/BitangentNode';
|
|
29
30
|
import BufferNode from './accessors/BufferNode';
|
|
30
31
|
import CameraNode, { CameraNodeScope } from './accessors/CameraNode';
|
|
31
32
|
import CubeTextureNode from './accessors/CubeTextureNode';
|
|
@@ -41,6 +42,7 @@ import PositionNode, { PositionNodeScope } from './accessors/PositionNode';
|
|
|
41
42
|
import ReferenceNode from './accessors/ReferenceNode';
|
|
42
43
|
import ReflectVectorNode from './accessors/ReflectVectorNode';
|
|
43
44
|
import SkinningNode from './accessors/SkinningNode';
|
|
45
|
+
import TangentNode, { TangentNodeScope } from './accessors/TangentNode';
|
|
44
46
|
import TextureNode from './accessors/TextureNode';
|
|
45
47
|
import UVNode from './accessors/UVNode';
|
|
46
48
|
import UserDataNode from './accessors/UserDataNode';
|
|
@@ -52,10 +54,12 @@ import RangeNode, { RangeModeBound } from './geometry/RangeNode';
|
|
|
52
54
|
import ComputeNode from './gpgpu/ComputeNode';
|
|
53
55
|
|
|
54
56
|
// display
|
|
57
|
+
import BlendModeNode, { BlendMode } from './display/BlendModeNode';
|
|
55
58
|
import ColorAdjustmentNode, { ColorAdjustmentMethod } from './display/ColorAdjustmentNode';
|
|
56
59
|
import ColorSpaceNode, { ColorSpaceNodeMethod } from './display/ColorSpaceNode';
|
|
57
60
|
import FrontFacingNode from './display/FrontFacingNode';
|
|
58
61
|
import NormalMapNode from './display/NormalMapNode';
|
|
62
|
+
import PosterizeNode from './display/PosterizeNode';
|
|
59
63
|
import ToneMappingNode from './display/ToneMappingNode';
|
|
60
64
|
|
|
61
65
|
// math
|
|
@@ -77,14 +81,17 @@ import AnalyticLightNode from './lighting/AnalyticLightNode';
|
|
|
77
81
|
|
|
78
82
|
import ArrayElementNode from './utils/ArrayElementNode';
|
|
79
83
|
import ConvertNode from './utils/ConvertNode';
|
|
84
|
+
import EquirectUVNode from './utils/EquirectUVNode';
|
|
80
85
|
import JoinNode from './utils/JoinNode';
|
|
81
86
|
import MatcapUVNode from './utils/MatcapUVNode';
|
|
82
87
|
import MaxMipLevelNode from './utils/MaxMipLevelNode';
|
|
83
88
|
import OscNode, { OscNodeMethod } from './utils/OscNode';
|
|
89
|
+
import RemapNode from './utils/RemapNode';
|
|
84
90
|
import RotateUVNode from './utils/RotateUVNode';
|
|
85
91
|
import SplitNode from './utils/SplitNode';
|
|
86
92
|
import SpriteSheetUVNode from './utils/SpriteSheetUVNode';
|
|
87
93
|
import TimerNode, { TimerNodeScope } from './utils/TimerNode';
|
|
94
|
+
import TriplanarTexturesNode from './utils/TriplanarTexturesNode';
|
|
88
95
|
|
|
89
96
|
// loaders
|
|
90
97
|
import NodeLoader from './loaders/NodeLoader';
|
|
@@ -129,7 +136,7 @@ export {
|
|
|
129
136
|
NodeKeywords,
|
|
130
137
|
NodeUniform,
|
|
131
138
|
NodeVar,
|
|
132
|
-
|
|
139
|
+
NodeVarying,
|
|
133
140
|
PropertyNode,
|
|
134
141
|
TempNode,
|
|
135
142
|
UniformNode,
|
|
@@ -141,6 +148,8 @@ export {
|
|
|
141
148
|
// gpgpu
|
|
142
149
|
ComputeNode,
|
|
143
150
|
// accessors
|
|
151
|
+
BitangentNode,
|
|
152
|
+
BitangentNodeScope,
|
|
144
153
|
BufferNode,
|
|
145
154
|
CameraNode,
|
|
146
155
|
CameraNodeScope,
|
|
@@ -161,16 +170,21 @@ export {
|
|
|
161
170
|
ReferenceNode,
|
|
162
171
|
ReflectVectorNode,
|
|
163
172
|
SkinningNode,
|
|
173
|
+
TangentNode,
|
|
174
|
+
TangentNodeScope,
|
|
164
175
|
TextureNode,
|
|
165
176
|
UVNode,
|
|
166
177
|
UserDataNode,
|
|
167
178
|
// display
|
|
179
|
+
BlendModeNode,
|
|
180
|
+
BlendMode,
|
|
168
181
|
ColorAdjustmentNode,
|
|
169
182
|
ColorAdjustmentMethod,
|
|
170
183
|
ColorSpaceNode,
|
|
171
184
|
ColorSpaceNodeMethod,
|
|
172
185
|
FrontFacingNode,
|
|
173
186
|
NormalMapNode,
|
|
187
|
+
PosterizeNode,
|
|
174
188
|
ToneMappingNode,
|
|
175
189
|
// math
|
|
176
190
|
MathNode,
|
|
@@ -194,16 +208,19 @@ export {
|
|
|
194
208
|
// utils
|
|
195
209
|
ArrayElementNode,
|
|
196
210
|
ConvertNode,
|
|
211
|
+
EquirectUVNode,
|
|
197
212
|
JoinNode,
|
|
198
213
|
MatcapUVNode,
|
|
199
214
|
MaxMipLevelNode,
|
|
200
215
|
OscNode,
|
|
201
216
|
OscNodeMethod,
|
|
217
|
+
RemapNode,
|
|
202
218
|
RotateUVNode,
|
|
203
219
|
SplitNode,
|
|
204
220
|
SpriteSheetUVNode,
|
|
205
221
|
TimerNode,
|
|
206
222
|
TimerNodeScope,
|
|
223
|
+
TriplanarTexturesNode,
|
|
207
224
|
// procedural
|
|
208
225
|
CheckerNode,
|
|
209
226
|
// fog
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Node from '../core/Node';
|
|
2
|
+
|
|
3
|
+
export type BitangentNodeScope =
|
|
4
|
+
| typeof BitangentNode.LOCAL
|
|
5
|
+
| typeof BitangentNode.VIEW
|
|
6
|
+
| typeof BitangentNode.WORLD
|
|
7
|
+
| typeof BitangentNode.GEOMETRY;
|
|
8
|
+
|
|
9
|
+
export default class BitangentNode extends Node {
|
|
10
|
+
static GEOMETRY: 'geometry';
|
|
11
|
+
static LOCAL: 'local';
|
|
12
|
+
static VIEW: 'view';
|
|
13
|
+
static WORLD: 'world';
|
|
14
|
+
|
|
15
|
+
scope: BitangentNodeScope;
|
|
16
|
+
|
|
17
|
+
constructor(scope?: BitangentNodeScope);
|
|
18
|
+
}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import Node from '../core/Node';
|
|
2
2
|
|
|
3
|
-
export type NormalNodeScope =
|
|
4
|
-
| typeof NormalNode.GEOMETRY
|
|
5
|
-
| typeof NormalNode.LOCAL
|
|
6
|
-
| typeof NormalNode.WORLD
|
|
7
|
-
| typeof NormalNode.VIEW;
|
|
3
|
+
export type NormalNodeScope = typeof NormalNode.GEOMETRY | typeof NormalNode.LOCAL | typeof NormalNode.VIEW;
|
|
8
4
|
|
|
9
5
|
export default class NormalNode extends Node {
|
|
10
6
|
static GEOMETRY: 'geometry';
|
|
11
7
|
static LOCAL: 'local';
|
|
12
|
-
static WORLD: 'world';
|
|
13
8
|
static VIEW: 'view';
|
|
14
9
|
scope: NormalNodeScope;
|
|
15
10
|
|
|
@@ -4,6 +4,7 @@ export type PositionNodeScope =
|
|
|
4
4
|
| typeof PositionNode.GEOMETRY
|
|
5
5
|
| typeof PositionNode.LOCAL
|
|
6
6
|
| typeof PositionNode.WORLD
|
|
7
|
+
| typeof PositionNode.WORLD_DIRECTION
|
|
7
8
|
| typeof PositionNode.VIEW
|
|
8
9
|
| typeof PositionNode.VIEW_DIRECTION;
|
|
9
10
|
|
|
@@ -11,6 +12,7 @@ export default class PositionNode extends Node {
|
|
|
11
12
|
static GEOMETRY: 'geometry';
|
|
12
13
|
static LOCAL: 'local';
|
|
13
14
|
static WORLD: 'world';
|
|
15
|
+
static WORLD_DIRECTION: 'worldDirection';
|
|
14
16
|
static VIEW: 'view';
|
|
15
17
|
static VIEW_DIRECTION: 'viewDirection';
|
|
16
18
|
scope: PositionNodeScope;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Node from '../core/Node.js';
|
|
2
|
+
|
|
3
|
+
export type TangentNodeScope =
|
|
4
|
+
| typeof TangentNode.LOCAL
|
|
5
|
+
| typeof TangentNode.VIEW
|
|
6
|
+
| typeof TangentNode.WORLD
|
|
7
|
+
| typeof TangentNode.GEOMETRY;
|
|
8
|
+
|
|
9
|
+
export default class TangentNode extends Node {
|
|
10
|
+
static GEOMETRY: 'geometry';
|
|
11
|
+
static LOCAL: 'local';
|
|
12
|
+
static VIEW: 'view';
|
|
13
|
+
static WORLD: 'world';
|
|
14
|
+
|
|
15
|
+
scope: TangentNodeScope;
|
|
16
|
+
|
|
17
|
+
constructor(scope?: TangentNodeScope);
|
|
18
|
+
}
|
|
@@ -17,7 +17,7 @@ import NodeAttribute from './NodeAttribute';
|
|
|
17
17
|
import NodeParser from './NodeParser';
|
|
18
18
|
import NodeUniform from './NodeUniform';
|
|
19
19
|
import NodeVar from './NodeVar';
|
|
20
|
-
import
|
|
20
|
+
import NodeVarying from './NodeVarying';
|
|
21
21
|
|
|
22
22
|
export type BuildStageOption = 'construct' | 'analyze' | 'generate';
|
|
23
23
|
|
|
@@ -82,7 +82,7 @@ export default abstract class NodeBuilder {
|
|
|
82
82
|
abstract getCubeTextureLevel(textureProperty: string, uvSnippet: string, levelSnippet: string): string;
|
|
83
83
|
|
|
84
84
|
// @TODO: rename to .generateConst()
|
|
85
|
-
getConst(type: NodeTypeOption, value
|
|
85
|
+
getConst(type: NodeTypeOption, value?: unknown): Node;
|
|
86
86
|
getType(type: NodeTypeOption): NodeTypeOption;
|
|
87
87
|
|
|
88
88
|
generateMethod(method: string): string;
|
|
@@ -105,7 +105,7 @@ export default abstract class NodeBuilder {
|
|
|
105
105
|
getNodeProperties(node: Node, shaderStage?: NodeShaderStageOption): AnyObject;
|
|
106
106
|
getUniformFromNode(node: Node, shaderStage: NodeShaderStageOption, type: NodeTypeOption): NodeUniform;
|
|
107
107
|
getVarFromNode(node: Node, type: NodeTypeOption, shaderStage?: NodeShaderStageOption): NodeVar;
|
|
108
|
-
getVaryFromNode(node: Node, type: NodeTypeOption):
|
|
108
|
+
getVaryFromNode(node: Node, type: NodeTypeOption): NodeVarying;
|
|
109
109
|
getCodeFromNode(node: Node, type: NodeTypeOption, shaderStage?: NodeShaderStageOption): string;
|
|
110
110
|
addFlowCode(code: string): void;
|
|
111
111
|
getFlowData(node: Node, shaderStage: NodeShaderStageOption): FlowData;
|
|
@@ -117,6 +117,7 @@ export default abstract class NodeBuilder {
|
|
|
117
117
|
output?: string | null,
|
|
118
118
|
propertyName?: string,
|
|
119
119
|
): FlowData;
|
|
120
|
+
hasGeometryAttribute(name: string): boolean;
|
|
120
121
|
abstract getAttributes(shaderStage: NodeShaderStageOption): string;
|
|
121
122
|
abstract getVarys(shaderStage: NodeShaderStageOption): string;
|
|
122
123
|
getVars(shaderStage: NodeShaderStageOption): string;
|
|
@@ -2,14 +2,14 @@ import { Color, Matrix3, Matrix4, Vector2, Vector3, Vector4 } from '../../../../
|
|
|
2
2
|
|
|
3
3
|
// disable automatic export, we have some private declarations
|
|
4
4
|
export const NodeShaderStage: {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
VERTEX: 'vertex';
|
|
6
|
+
FRAGMENT: 'fragment';
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export const NodeUpdateType: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
NONE: 'none';
|
|
11
|
+
FRAME: 'frame';
|
|
12
|
+
OBJECT: 'object';
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export type NodeValueOption = Color | Vector2 | Vector3 | Vector4 | Matrix3 | Matrix4 | boolean | number;
|
|
@@ -66,12 +66,12 @@ export interface AnyObject {
|
|
|
66
66
|
export type AnyJson = any;
|
|
67
67
|
|
|
68
68
|
export const NodeType: {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
BOOLEAN: 'bool';
|
|
70
|
+
INTEGER: 'int';
|
|
71
|
+
FLOAT: 'float';
|
|
72
|
+
VECTOR2: 'vec2';
|
|
73
|
+
VECTOR3: 'vec3';
|
|
74
|
+
VECTOR4: 'vec4';
|
|
75
|
+
MATRIX3: 'mat3';
|
|
76
|
+
MATRIX4: 'mat4';
|
|
77
77
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import TempNode from '../core/TempNode';
|
|
2
|
+
import { ShaderNode } from '../shadernode/ShaderNodeBaseElements';
|
|
3
|
+
import { Node } from '../Nodes';
|
|
4
|
+
|
|
5
|
+
export const BurnNode: ShaderNode<{ base: Node; blendNode: Node }>;
|
|
6
|
+
|
|
7
|
+
export const DodgeNode: ShaderNode<{ base: Node; blendNode: Node }>;
|
|
8
|
+
|
|
9
|
+
export const ScreenNode: ShaderNode<{ base: Node; blendNode: Node }>;
|
|
10
|
+
|
|
11
|
+
export const OverlayNode: ShaderNode<{ base: Node; blendNode: Node }>;
|
|
12
|
+
|
|
13
|
+
export type BlendMode =
|
|
14
|
+
| typeof BlendModeNode.BURN
|
|
15
|
+
| typeof BlendModeNode.DODGE
|
|
16
|
+
| typeof BlendModeNode.SCREEN
|
|
17
|
+
| typeof BlendModeNode.OVERLAY;
|
|
18
|
+
|
|
19
|
+
export default class BlendModeNode extends TempNode {
|
|
20
|
+
static BURN: 'burn';
|
|
21
|
+
static DODGE: 'dodge';
|
|
22
|
+
static SCREEN: 'screen';
|
|
23
|
+
static OVERLAY: 'overlay';
|
|
24
|
+
|
|
25
|
+
baseNode: Node;
|
|
26
|
+
blendMode: BlendMode;
|
|
27
|
+
blendNode: Node;
|
|
28
|
+
|
|
29
|
+
constructor(blendMode: BlendMode, baseNode: Node, blendNode: Node);
|
|
30
|
+
|
|
31
|
+
construct(): Node;
|
|
32
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { mx_hsvtorgb, mx_rgbtohsv } from './lib/mx_hsv';
|
|
2
|
+
import { Swizzable } from '../shadernode/ShaderNodeElements';
|
|
3
|
+
import { UVNode, MathNode } from '../Nodes';
|
|
4
|
+
import { NodeRepresentation } from '../shadernode/ShaderNode';
|
|
5
|
+
|
|
6
|
+
export function mx_aastep(threshold?: NodeRepresentation, value?: NodeRepresentation): Swizzable<MathNode>;
|
|
7
|
+
|
|
8
|
+
export function mx_ramplr(
|
|
9
|
+
valuel?: NodeRepresentation,
|
|
10
|
+
valuer?: NodeRepresentation,
|
|
11
|
+
texcoord?: Swizzable<UVNode>,
|
|
12
|
+
): Swizzable<MathNode>;
|
|
13
|
+
export function mx_ramptb(
|
|
14
|
+
valuet?: NodeRepresentation,
|
|
15
|
+
valueb?: NodeRepresentation,
|
|
16
|
+
texcoord?: Swizzable<UVNode>,
|
|
17
|
+
): Swizzable<MathNode>;
|
|
18
|
+
|
|
19
|
+
export function mx_splitlr(
|
|
20
|
+
valuel?: NodeRepresentation,
|
|
21
|
+
valuer?: NodeRepresentation,
|
|
22
|
+
center?: NodeRepresentation,
|
|
23
|
+
texcoord?: Swizzable<UVNode>,
|
|
24
|
+
): Swizzable<MathNode>;
|
|
25
|
+
export function mx_splittb(
|
|
26
|
+
valuet?: NodeRepresentation,
|
|
27
|
+
valueb?: NodeRepresentation,
|
|
28
|
+
center?: NodeRepresentation,
|
|
29
|
+
texcoord?: Swizzable<UVNode>,
|
|
30
|
+
): Swizzable<MathNode>;
|
|
31
|
+
|
|
32
|
+
export function mx_transform_uv(
|
|
33
|
+
uv_scale?: NodeRepresentation,
|
|
34
|
+
uv_offset?: NodeRepresentation,
|
|
35
|
+
uv_geo?: Swizzable<UVNode>,
|
|
36
|
+
): Swizzable;
|
|
37
|
+
|
|
38
|
+
export function mx_noise_float(
|
|
39
|
+
texcoord?: Swizzable<UVNode>,
|
|
40
|
+
amplitude?: NodeRepresentation,
|
|
41
|
+
pivot?: NodeRepresentation,
|
|
42
|
+
): Swizzable;
|
|
43
|
+
export function mx_noise_vec2(
|
|
44
|
+
texcoord?: Swizzable<UVNode>,
|
|
45
|
+
amplitude?: NodeRepresentation,
|
|
46
|
+
pivot?: NodeRepresentation,
|
|
47
|
+
): Swizzable;
|
|
48
|
+
export function mx_noise_vec3(
|
|
49
|
+
texcoord?: Swizzable<UVNode>,
|
|
50
|
+
amplitude?: NodeRepresentation,
|
|
51
|
+
pivot?: NodeRepresentation,
|
|
52
|
+
): Swizzable;
|
|
53
|
+
export function mx_noise_vec4(
|
|
54
|
+
texcoord?: Swizzable<UVNode>,
|
|
55
|
+
amplitude?: NodeRepresentation,
|
|
56
|
+
pivot?: NodeRepresentation,
|
|
57
|
+
): Swizzable;
|
|
58
|
+
|
|
59
|
+
export function mx_worley_noise_float(texcoord?: Swizzable<UVNode>, jitter?: NodeRepresentation): Swizzable;
|
|
60
|
+
export function mx_worley_noise_vec2(texcoord?: Swizzable<UVNode>, jitter?: NodeRepresentation): Swizzable;
|
|
61
|
+
export function mx_worley_noise_vec3(texcoord?: Swizzable<UVNode>, jitter?: NodeRepresentation): Swizzable;
|
|
62
|
+
|
|
63
|
+
export function mx_cell_noise_float(texcoord?: Swizzable<UVNode>): Swizzable;
|
|
64
|
+
|
|
65
|
+
export function mx_fractal_noise_float(
|
|
66
|
+
position?: Swizzable<UVNode>,
|
|
67
|
+
octaves?: NodeRepresentation,
|
|
68
|
+
lacunarity?: NodeRepresentation,
|
|
69
|
+
diminish?: NodeRepresentation,
|
|
70
|
+
amplitude?: NodeRepresentation,
|
|
71
|
+
): Swizzable;
|
|
72
|
+
export function mx_fractal_noise_vec2(
|
|
73
|
+
position?: Swizzable<UVNode>,
|
|
74
|
+
octaves?: NodeRepresentation,
|
|
75
|
+
lacunarity?: NodeRepresentation,
|
|
76
|
+
diminish?: NodeRepresentation,
|
|
77
|
+
amplitude?: NodeRepresentation,
|
|
78
|
+
): Swizzable;
|
|
79
|
+
export function mx_fractal_noise_vec3(
|
|
80
|
+
position?: Swizzable<UVNode>,
|
|
81
|
+
octaves?: NodeRepresentation,
|
|
82
|
+
lacunarity?: NodeRepresentation,
|
|
83
|
+
diminish?: NodeRepresentation,
|
|
84
|
+
amplitude?: NodeRepresentation,
|
|
85
|
+
): Swizzable;
|
|
86
|
+
export function mx_fractal_noise_vec4(
|
|
87
|
+
position?: Swizzable<UVNode>,
|
|
88
|
+
octaves?: NodeRepresentation,
|
|
89
|
+
lacunarity?: NodeRepresentation,
|
|
90
|
+
diminish?: NodeRepresentation,
|
|
91
|
+
amplitude?: NodeRepresentation,
|
|
92
|
+
): Swizzable;
|
|
93
|
+
|
|
94
|
+
export { mx_hsvtorgb, mx_rgbtohsv };
|
|
@@ -27,7 +27,6 @@ export type MathNodeMethod1 =
|
|
|
27
27
|
| typeof MathNode.INVERT
|
|
28
28
|
| typeof MathNode.DFDX
|
|
29
29
|
| typeof MathNode.DFDY
|
|
30
|
-
| typeof MathNode.SATURATE
|
|
31
30
|
| typeof MathNode.ROUND;
|
|
32
31
|
|
|
33
32
|
export type MathNodeMethod2 =
|
|
@@ -80,8 +79,8 @@ export default class MathNode extends TempNode {
|
|
|
80
79
|
static INVERT: 'invert';
|
|
81
80
|
static DFDX: 'dFdx';
|
|
82
81
|
static DFDY: 'dFdy';
|
|
83
|
-
static SATURATE: 'saturate';
|
|
84
82
|
static ROUND: 'round';
|
|
83
|
+
static RECIPROCAL: 'reciprocal';
|
|
85
84
|
|
|
86
85
|
// 2 inputs
|
|
87
86
|
|
|
@@ -20,6 +20,7 @@ import { Material, Texture } from '../../../../src/Three';
|
|
|
20
20
|
import { NodeTypeOption, NodeUserData, NodeValueOption } from '../core/constants';
|
|
21
21
|
import { NodeBuilderContext } from '../core/NodeBuilder';
|
|
22
22
|
import {
|
|
23
|
+
BitangentNode,
|
|
23
24
|
BufferNode,
|
|
24
25
|
BypassNode,
|
|
25
26
|
CameraNode,
|
|
@@ -43,6 +44,7 @@ import {
|
|
|
43
44
|
PositionNode,
|
|
44
45
|
PropertyNode,
|
|
45
46
|
ReferenceNode,
|
|
47
|
+
TangentNode,
|
|
46
48
|
UserDataNode,
|
|
47
49
|
UVNode,
|
|
48
50
|
VarNode,
|
|
@@ -91,6 +93,8 @@ export function uniform(nodeOrType: Node | Swizzable | NodeValueOption): Swizzab
|
|
|
91
93
|
export function attribute(attributeName: string, nodeType: NodeTypeOption): Swizzable;
|
|
92
94
|
export function property(name: string, nodeOrType: Node | NodeTypeOption): Swizzable;
|
|
93
95
|
|
|
96
|
+
export function convert(node: NodeRepresentation, types: NodeTypeOption): Swizzable;
|
|
97
|
+
|
|
94
98
|
export function bypass(returnNode: NodeRepresentation, callNode: NodeRepresentation): Swizzable<BypassNode>;
|
|
95
99
|
export function code(code: string, nodeType?: NodeTypeOption): Swizzable<CodeNode>;
|
|
96
100
|
export function context(node: NodeRepresentation, context: NodeBuilderContext): Swizzable<ContextNode>;
|
|
@@ -164,6 +168,20 @@ export const normalWorld: Swizzable<NormalNode>;
|
|
|
164
168
|
export const normalView: Swizzable<NormalNode>;
|
|
165
169
|
export const transformedNormalView: Swizzable<VarNode>;
|
|
166
170
|
|
|
171
|
+
export const tangentGeometry: Swizzable<TangentNode>;
|
|
172
|
+
export const tangentLocal: Swizzable<TangentNode>;
|
|
173
|
+
export const tangentView: Swizzable<TangentNode>;
|
|
174
|
+
export const tangentWorld: Swizzable<TangentNode>;
|
|
175
|
+
export const transformedTangentView: Swizzable<MathNode>;
|
|
176
|
+
export const transformedTangentWorld: Swizzable<MathNode>;
|
|
177
|
+
|
|
178
|
+
export const bitangentGeometry: Swizzable<BitangentNode>;
|
|
179
|
+
export const bitangentLocal: Swizzable<BitangentNode>;
|
|
180
|
+
export const bitangentView: Swizzable<BitangentNode>;
|
|
181
|
+
export const bitangentWorld: Swizzable<BitangentNode>;
|
|
182
|
+
export const transformedBitangentView: Swizzable<MathNode>;
|
|
183
|
+
export const transformedBitangentWorld: Swizzable<MathNode>;
|
|
184
|
+
|
|
167
185
|
export const modelViewMatrix: Swizzable<ModelNode>;
|
|
168
186
|
export const modelNormalMatrix: Swizzable<ModelNode>;
|
|
169
187
|
export const modelWorldMatrix: Swizzable<ModelNode>;
|
|
@@ -173,6 +191,7 @@ export const modelViewPosition: Swizzable<ModelNode>;
|
|
|
173
191
|
export const positionGeometry: Swizzable<PositionNode>;
|
|
174
192
|
export const positionLocal: Swizzable<PositionNode>;
|
|
175
193
|
export const positionWorld: Swizzable<PositionNode>;
|
|
194
|
+
export const positionWorldDirection: Swizzable<PositionNode>;
|
|
176
195
|
export const positionView: Swizzable<PositionNode>;
|
|
177
196
|
export const positionViewDirection: Swizzable<PositionNode>;
|
|
178
197
|
|
|
@@ -246,8 +265,8 @@ export const negate: Unary;
|
|
|
246
265
|
export const invert: Unary;
|
|
247
266
|
export const dFdx: Unary;
|
|
248
267
|
export const dFdy: Unary;
|
|
249
|
-
export const saturate: Unary;
|
|
250
268
|
export const round: Unary;
|
|
269
|
+
export const reciprocal: Unary;
|
|
251
270
|
|
|
252
271
|
export const atan2: Binary;
|
|
253
272
|
export const min: Binary;
|
|
@@ -281,5 +300,8 @@ export const faceDirection: Swizzable;
|
|
|
281
300
|
export function element(node: NodeRepresentation, indexNode: NodeRepresentation): Swizzable;
|
|
282
301
|
|
|
283
302
|
// miscellaneous
|
|
303
|
+
export const lumaCoeffs: Swizzable<MathNode>;
|
|
304
|
+
export const luminance: Binary;
|
|
305
|
+
export const difference: Binary;
|
|
284
306
|
export const dotNV: Swizzable<MathNode>;
|
|
285
|
-
export const
|
|
307
|
+
export const TBNViewMatrix: Swizzable<MathNode>;
|