@types/three 0.159.0 → 0.160.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/loaders/KTX2Loader.d.ts +2 -8
- three/examples/jsm/loaders/MaterialXLoader.d.ts +6 -0
- three/examples/jsm/misc/Timer.d.ts +80 -0
- three/examples/jsm/nodes/Nodes.d.ts +238 -60
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/BufferNode.d.ts +4 -1
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +9 -2
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/ModelNode.d.ts +7 -1
- three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/PointUVNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +4 -1
- three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/SkinningNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +8 -1
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +10 -2
- three/examples/jsm/nodes/accessors/UVNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
- three/examples/jsm/nodes/code/CodeNode.d.ts +4 -0
- three/examples/jsm/nodes/code/ExpressionNode.d.ts +3 -0
- three/examples/jsm/nodes/code/FunctionCallNode.d.ts +7 -1
- three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
- three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +1 -1
- three/examples/jsm/nodes/core/AttributeNode.d.ts +3 -0
- three/examples/jsm/nodes/core/BypassNode.d.ts +3 -0
- three/examples/jsm/nodes/core/CacheNode.d.ts +3 -0
- three/examples/jsm/nodes/core/ConstNode.d.ts +3 -3
- three/examples/jsm/nodes/core/ContextNode.d.ts +3 -0
- three/examples/jsm/nodes/core/InputNode.d.ts +4 -4
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +6 -3
- three/examples/jsm/nodes/core/NodeUniform.d.ts +12 -8
- three/examples/jsm/nodes/core/NodeUtils.d.ts +6 -3
- three/examples/jsm/nodes/core/PropertyNode.d.ts +9 -0
- three/examples/jsm/nodes/core/UniformNode.d.ts +12 -4
- three/examples/jsm/nodes/core/VarNode.d.ts +4 -0
- three/examples/jsm/nodes/core/VaryingNode.d.ts +3 -0
- three/examples/jsm/nodes/core/constants.d.ts +9 -5
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +7 -2
- three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +18 -1
- three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +4 -0
- three/examples/jsm/nodes/display/FrontFacingNode.d.ts +4 -0
- three/examples/jsm/nodes/display/NormalMapNode.d.ts +7 -1
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +6 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +8 -1
- three/examples/jsm/nodes/display/ViewportNode.d.ts +8 -0
- three/examples/jsm/nodes/fog/FogExp2Node.d.ts +3 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +3 -0
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +3 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -1
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +1 -1
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +1 -1
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +1 -1
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +3 -0
- three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +7 -0
- three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +6 -1
- three/examples/jsm/nodes/lighting/LightsNode.d.ts +3 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +18 -5
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +0 -3
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +25 -2
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +43 -34
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +5 -3
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +7 -5
- three/examples/jsm/nodes/math/CondNode.d.ts +7 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +134 -1
- three/examples/jsm/nodes/math/OperatorNode.d.ts +51 -0
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +3 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +75 -33
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +4 -2
- three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +3 -0
- three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +6 -3
- three/examples/jsm/nodes/utils/OscNode.d.ts +6 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +4 -0
- three/examples/jsm/nodes/utils/RotateUVNode.d.ts +3 -0
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +5 -1
- three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +7 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +7 -1
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -7
- three/examples/jsm/objects/QuadMesh.d.ts +13 -0
- three/examples/jsm/postprocessing/{HBAOPass.d.ts → GTAOPass.d.ts} +22 -10
- three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +3 -0
- three/examples/jsm/shaders/{HBAOShader.d.ts → GTAOShader.d.ts} +23 -8
- three/examples/jsm/shaders/PoissonDenoiseShader.d.ts +1 -1
- three/package.json +2 -2
- three/src/Three.d.ts +1 -0
- three/src/constants.d.ts +3 -1
- three/src/core/UniformsGroup.d.ts +3 -3
- three/src/lights/PointLight.d.ts +7 -0
- three/src/loaders/MaterialLoader.d.ts +6 -3
- three/src/materials/LineBasicMaterial.d.ts +7 -0
- three/src/materials/LineDashedMaterial.d.ts +7 -1
- three/src/materials/Material.d.ts +14 -14
- three/src/materials/MeshBasicMaterial.d.ts +7 -0
- three/src/materials/MeshDepthMaterial.d.ts +6 -0
- three/src/materials/MeshDistanceMaterial.d.ts +7 -0
- three/src/materials/MeshLambertMaterial.d.ts +7 -0
- three/src/materials/MeshMatcapMaterial.d.ts +7 -0
- three/src/materials/MeshNormalMaterial.d.ts +7 -0
- three/src/materials/MeshPhongMaterial.d.ts +7 -0
- three/src/materials/MeshPhysicalMaterial.d.ts +6 -1
- three/src/materials/MeshStandardMaterial.d.ts +7 -2
- three/src/materials/MeshToonMaterial.d.ts +7 -0
- three/src/materials/PointsMaterial.d.ts +7 -0
- three/src/materials/RawShaderMaterial.d.ts +9 -0
- three/src/materials/ShaderMaterial.d.ts +9 -3
- three/src/materials/ShadowMaterial.d.ts +7 -0
- three/src/materials/SpriteMaterial.d.ts +7 -2
- three/src/math/Matrix4.d.ts +30 -30
- three/src/math/Sphere.d.ts +5 -0
- three/src/math/Triangle.d.ts +8 -8
- three/src/objects/SkinnedMesh.d.ts +1 -2
- three/src/renderers/shaders/ShaderLib.d.ts +18 -18
- three/src/renderers/shaders/UniformsUtils.d.ts +3 -2
- three/src/renderers/webgl/WebGLLights.d.ts +39 -37
- three/src/renderers/webgl/WebGLPrograms.d.ts +224 -9
- three/src/textures/CompressedCubeTexture.d.ts +13 -0
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +0 -310
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +0 -166
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: Fri, 22 Dec 2023 23:06:49 GMT
|
|
12
12
|
* Dependencies: [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import { LoadingManager,
|
|
1
|
+
import { LoadingManager, Loader, CompressedTexture, WebGLRenderer } from '../../../src/Three.js';
|
|
2
2
|
import WebGPURenderer from '../renderers/webgpu/WebGPURenderer.js';
|
|
3
3
|
|
|
4
|
-
export class KTX2Loader extends
|
|
4
|
+
export class KTX2Loader extends Loader<CompressedTexture> {
|
|
5
5
|
constructor(manager?: LoadingManager);
|
|
6
6
|
|
|
7
7
|
setTranscoderPath(path: string): KTX2Loader;
|
|
8
8
|
setWorkerLimit(limit: number): KTX2Loader;
|
|
9
9
|
detectSupport(renderer: WebGLRenderer | WebGPURenderer): KTX2Loader;
|
|
10
10
|
dispose(): KTX2Loader;
|
|
11
|
-
|
|
12
|
-
parse(
|
|
13
|
-
buffer: ArrayBuffer,
|
|
14
|
-
onLoad: (texture: CompressedTexture) => void,
|
|
15
|
-
onError?: (event: ErrorEvent) => void,
|
|
16
|
-
): KTX2Loader;
|
|
17
11
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Loader, LoadingManager } from '../../../src/Three.js';
|
|
2
|
+
import { MeshPhysicalNodeMaterial } from '../nodes/Nodes.js';
|
|
3
|
+
|
|
4
|
+
export class MaterialXLoader extends Loader<{ materials: Record<string, MeshPhysicalNodeMaterial> }> {
|
|
5
|
+
constructor(manager?: LoadingManager);
|
|
6
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This class is an alternative to {@link THREE.Clock} with a different API design and behavior
|
|
3
|
+
* The goal is to avoid the conceptual flaws that became apparent in {@link THREE.Clock} over time.
|
|
4
|
+
*
|
|
5
|
+
* - {@link Timer} has an {@link .update()} method that updates its internal state. That makes it possible to call
|
|
6
|
+
* {@link .getDelta()} and {@link .getElapsed()} multiple times per simulation step without getting different values.
|
|
7
|
+
* - The class uses the Page Visibility API to avoid large time delta values when the app is inactive (e.g. tab switched
|
|
8
|
+
* or browser hidden).
|
|
9
|
+
* - It's possible to configure a fixed time delta and a time scale value (similar to Unity's Time interface).
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const timer = new Timer();
|
|
13
|
+
*
|
|
14
|
+
* function animate() {
|
|
15
|
+
* requestAnimationFrame(animate);
|
|
16
|
+
* timer.update();
|
|
17
|
+
* const delta = timer.getDelta();
|
|
18
|
+
* // do something with delta
|
|
19
|
+
* renderer.render(scene, camera);
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* @see https://threejs.org/examples/#webgl_morphtargets_sphere
|
|
23
|
+
*/
|
|
24
|
+
export class Timer {
|
|
25
|
+
constructor();
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Disables the usage of a fixed delta time.
|
|
29
|
+
*/
|
|
30
|
+
disableFixedDelta(): this;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Can be used to free all internal resources. Usually called when the timer instance isn't required anymore.
|
|
34
|
+
*/
|
|
35
|
+
dispose(): this;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Enables the usage of a fixed delta time.
|
|
39
|
+
*/
|
|
40
|
+
enableFixedDelta(): this;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Returns the time delta in seconds.
|
|
44
|
+
*/
|
|
45
|
+
getDelta(): number;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Returns the elapsed time in seconds.
|
|
49
|
+
*/
|
|
50
|
+
getElapsed(): number;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Returns the fixed time delta that has been previously configured via {@link .setFixedDelta()}.
|
|
54
|
+
*/
|
|
55
|
+
getFixedDelta(): number;
|
|
56
|
+
|
|
57
|
+
getTimescale(): number;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Resets the time computation for the current simulation step.
|
|
61
|
+
*/
|
|
62
|
+
reset(): this;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Defines a fixed time delta value which is used to update the timer per simulation step.
|
|
66
|
+
*/
|
|
67
|
+
setFixedDelta(fixedDelta: number): this;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Sets a time scale that scales the time delta in {@link .update()}.
|
|
71
|
+
* @param timescale
|
|
72
|
+
*/
|
|
73
|
+
setTimescale(timescale: number): this;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Updates the internal state of the timer. This method should be called once per simulation step and before you
|
|
77
|
+
* perform queries against the timer (e.g. via {@link .getDelta()}).
|
|
78
|
+
*/
|
|
79
|
+
update(): this;
|
|
80
|
+
}
|
|
@@ -3,11 +3,11 @@ export * from './core/constants.js';
|
|
|
3
3
|
|
|
4
4
|
// core
|
|
5
5
|
export { default as ArrayUniformNode } from './core/ArrayUniformNode.js';
|
|
6
|
-
export { default as AttributeNode } from './core/AttributeNode.js';
|
|
7
|
-
export { default as BypassNode } from './core/BypassNode.js';
|
|
8
|
-
export { default as CacheNode } from './core/CacheNode.js';
|
|
6
|
+
export { default as AttributeNode, attribute } from './core/AttributeNode.js';
|
|
7
|
+
export { default as BypassNode, bypass } from './core/BypassNode.js';
|
|
8
|
+
export { default as CacheNode, cache } from './core/CacheNode.js';
|
|
9
9
|
export { default as ConstNode } from './core/ConstNode.js';
|
|
10
|
-
export { default as ContextNode } from './core/ContextNode.js';
|
|
10
|
+
export { default as ContextNode, context } from './core/ContextNode.js';
|
|
11
11
|
export { default as Node } from './core/Node.js';
|
|
12
12
|
export { default as NodeAttribute } from './core/NodeAttribute.js';
|
|
13
13
|
export { default as NodeBuilder } from './core/NodeBuilder.js';
|
|
@@ -19,12 +19,20 @@ export { default as NodeKeywords } from './core/NodeKeywords.js';
|
|
|
19
19
|
export { default as NodeUniform } from './core/NodeUniform.js';
|
|
20
20
|
export { default as NodeVar } from './core/NodeVar.js';
|
|
21
21
|
export { default as NodeVarying } from './core/NodeVarying.js';
|
|
22
|
-
export {
|
|
22
|
+
export {
|
|
23
|
+
default as PropertyNode,
|
|
24
|
+
property,
|
|
25
|
+
diffuseColor,
|
|
26
|
+
roughness,
|
|
27
|
+
metalness,
|
|
28
|
+
specularColor,
|
|
29
|
+
shininess,
|
|
30
|
+
} from './core/PropertyNode.js';
|
|
23
31
|
export { default as StackNode } from './core/StackNode.js';
|
|
24
32
|
export { default as TempNode } from './core/TempNode.js';
|
|
25
|
-
export { default as UniformNode } from './core/UniformNode.js';
|
|
26
|
-
export { default as VarNode } from './core/VarNode.js';
|
|
27
|
-
export { default as VaryingNode } from './core/VaryingNode.js';
|
|
33
|
+
export { default as UniformNode, uniform } from './core/UniformNode.js';
|
|
34
|
+
export { default as VarNode, label, temp } from './core/VarNode.js';
|
|
35
|
+
export { default as VaryingNode, varying } from './core/VaryingNode.js';
|
|
28
36
|
|
|
29
37
|
import * as NodeUtils from './core/NodeUtils.js';
|
|
30
38
|
export { NodeUtils };
|
|
@@ -32,95 +40,265 @@ export { NodeUtils };
|
|
|
32
40
|
// math
|
|
33
41
|
export {
|
|
34
42
|
default as MathNode,
|
|
43
|
+
EPSILON,
|
|
44
|
+
INFINITY,
|
|
45
|
+
radians,
|
|
46
|
+
degrees,
|
|
47
|
+
exp,
|
|
48
|
+
exp2,
|
|
49
|
+
log,
|
|
50
|
+
log2,
|
|
51
|
+
sqrt,
|
|
52
|
+
inverseSqrt,
|
|
53
|
+
floor,
|
|
54
|
+
ceil,
|
|
55
|
+
normalize,
|
|
56
|
+
fract,
|
|
57
|
+
sin,
|
|
58
|
+
cos,
|
|
59
|
+
tan,
|
|
60
|
+
asin,
|
|
61
|
+
acos,
|
|
62
|
+
atan,
|
|
63
|
+
abs,
|
|
64
|
+
sign,
|
|
65
|
+
length,
|
|
66
|
+
negate,
|
|
67
|
+
oneMinus,
|
|
68
|
+
dFdx,
|
|
69
|
+
dFdy,
|
|
70
|
+
round,
|
|
71
|
+
reciprocal,
|
|
72
|
+
trunc,
|
|
73
|
+
fwidth,
|
|
74
|
+
bitcast,
|
|
75
|
+
atan2,
|
|
76
|
+
min,
|
|
77
|
+
max,
|
|
78
|
+
mod,
|
|
79
|
+
step,
|
|
80
|
+
reflect,
|
|
81
|
+
distance,
|
|
82
|
+
difference,
|
|
83
|
+
dot,
|
|
84
|
+
cross,
|
|
85
|
+
pow,
|
|
86
|
+
pow2,
|
|
87
|
+
pow3,
|
|
88
|
+
pow4,
|
|
89
|
+
transformDirection,
|
|
90
|
+
mix,
|
|
91
|
+
clamp,
|
|
92
|
+
saturate,
|
|
93
|
+
refract,
|
|
94
|
+
smoothstep,
|
|
95
|
+
faceForward,
|
|
35
96
|
MathNodeMethod1,
|
|
36
97
|
MathNodeMethod2,
|
|
37
98
|
MathNodeMethod3,
|
|
38
99
|
MathNodeMethod,
|
|
100
|
+
Unary,
|
|
101
|
+
Binary,
|
|
102
|
+
Ternary,
|
|
39
103
|
} from './math/MathNode.js';
|
|
40
|
-
export {
|
|
41
|
-
|
|
104
|
+
export {
|
|
105
|
+
default as OperatorNode,
|
|
106
|
+
add,
|
|
107
|
+
sub,
|
|
108
|
+
mul,
|
|
109
|
+
div,
|
|
110
|
+
remainder,
|
|
111
|
+
equal,
|
|
112
|
+
assign,
|
|
113
|
+
lessThan,
|
|
114
|
+
greaterThan,
|
|
115
|
+
lessThanEqual,
|
|
116
|
+
greaterThanEqual,
|
|
117
|
+
and,
|
|
118
|
+
or,
|
|
119
|
+
xor,
|
|
120
|
+
bitAnd,
|
|
121
|
+
bitOr,
|
|
122
|
+
bitXor,
|
|
123
|
+
shiftLeft,
|
|
124
|
+
shiftRight,
|
|
125
|
+
OperatorNodeOp,
|
|
126
|
+
Operator,
|
|
127
|
+
} from './math/OperatorNode.js';
|
|
128
|
+
export { default as CondNode, cond } from './math/CondNode.js';
|
|
42
129
|
|
|
43
130
|
// utils
|
|
44
131
|
export { default as ArrayElementNode } from './utils/ArrayElementNode.js';
|
|
45
132
|
export { default as ConvertNode } from './utils/ConvertNode.js';
|
|
46
|
-
export { default as EquirectUVNode } from './utils/EquirectUVNode.js';
|
|
133
|
+
export { default as EquirectUVNode, equirectUV } from './utils/EquirectUVNode.js';
|
|
47
134
|
export { default as JoinNode } from './utils/JoinNode.js';
|
|
48
|
-
export { default as MatcapUVNode } from './utils/MatcapUVNode.js';
|
|
49
|
-
export { default as MaxMipLevelNode } from './utils/MaxMipLevelNode.js';
|
|
50
|
-
export { default as OscNode, OscNodeMethod } from './utils/OscNode.js';
|
|
51
|
-
export { default as RemapNode } from './utils/RemapNode.js';
|
|
52
|
-
export { default as RotateUVNode } from './utils/RotateUVNode.js';
|
|
53
|
-
export { default as SpecularMIPLevelNode } from './utils/SpecularMIPLevelNode.js';
|
|
135
|
+
export { default as MatcapUVNode, matcapUV } from './utils/MatcapUVNode.js';
|
|
136
|
+
export { default as MaxMipLevelNode, maxMipLevel } from './utils/MaxMipLevelNode.js';
|
|
137
|
+
export { default as OscNode, oscSine, oscSquare, oscTriangle, oscSawtooth, OscNodeMethod } from './utils/OscNode.js';
|
|
138
|
+
export { default as RemapNode, remap, remapClamp } from './utils/RemapNode.js';
|
|
139
|
+
export { default as RotateUVNode, rotateUV } from './utils/RotateUVNode.js';
|
|
140
|
+
export { default as SpecularMIPLevelNode, specularMIPLevel } from './utils/SpecularMIPLevelNode.js';
|
|
54
141
|
export { default as SplitNode } from './utils/SplitNode.js';
|
|
55
|
-
export { default as SpriteSheetUVNode } from './utils/SpriteSheetUVNode.js';
|
|
56
|
-
export {
|
|
57
|
-
|
|
142
|
+
export { default as SpriteSheetUVNode, spritesheetUV } from './utils/SpriteSheetUVNode.js';
|
|
143
|
+
export {
|
|
144
|
+
default as TimerNode,
|
|
145
|
+
timerLocal,
|
|
146
|
+
timerGlobal,
|
|
147
|
+
timerDelta,
|
|
148
|
+
frameId,
|
|
149
|
+
TimerNodeScope,
|
|
150
|
+
} from './utils/TimerNode.js';
|
|
151
|
+
export {
|
|
152
|
+
default as TriplanarTexturesNode,
|
|
153
|
+
triplanarTextures,
|
|
154
|
+
triplanarTexture,
|
|
155
|
+
} from './utils/TriplanarTexturesNode.js';
|
|
58
156
|
|
|
59
157
|
// shader node
|
|
60
|
-
export * from './shadernode/
|
|
158
|
+
export * from './shadernode/ShaderNode.js';
|
|
61
159
|
|
|
62
160
|
// accessors
|
|
63
|
-
export {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
161
|
+
export {
|
|
162
|
+
default as BitangentNode,
|
|
163
|
+
bitangentGeometry,
|
|
164
|
+
bitangentLocal,
|
|
165
|
+
bitangentView,
|
|
166
|
+
bitangentWorld,
|
|
167
|
+
transformedBitangentView,
|
|
168
|
+
transformedBitangentWorld,
|
|
169
|
+
BitangentNodeScope,
|
|
170
|
+
} from './accessors/BitangentNode.js';
|
|
171
|
+
export { default as BufferNode, buffer } from './accessors/BufferNode.js';
|
|
172
|
+
export {
|
|
173
|
+
default as CameraNode,
|
|
174
|
+
cameraProjectionMatrix,
|
|
175
|
+
cameraViewMatrix,
|
|
176
|
+
cameraNormalMatrix,
|
|
177
|
+
cameraWorldMatrix,
|
|
178
|
+
cameraPosition,
|
|
179
|
+
CameraNodeScope,
|
|
180
|
+
} from './accessors/CameraNode.js';
|
|
181
|
+
export { default as CubeTextureNode, cubeTexture } from './accessors/CubeTextureNode.js';
|
|
182
|
+
export { default as InstanceNode, instance } from './accessors/InstanceNode.js';
|
|
183
|
+
export {
|
|
184
|
+
default as MaterialNode,
|
|
185
|
+
materialAlphaTest,
|
|
186
|
+
materialColor,
|
|
187
|
+
materialShininess,
|
|
188
|
+
materialEmissive,
|
|
189
|
+
materialOpacity,
|
|
190
|
+
materialSpecularColor,
|
|
191
|
+
materialReflectivity,
|
|
192
|
+
materialRoughness,
|
|
193
|
+
materialMetalness,
|
|
194
|
+
materialRotation,
|
|
195
|
+
MaterialNodeScope,
|
|
196
|
+
} from './accessors/MaterialNode.js';
|
|
197
|
+
export { default as MaterialReferenceNode, materialReference } from './accessors/MaterialReferenceNode.js';
|
|
198
|
+
export {
|
|
199
|
+
default as ModelNode,
|
|
200
|
+
modelViewMatrix,
|
|
201
|
+
modelNormalMatrix,
|
|
202
|
+
modelWorldMatrix,
|
|
203
|
+
modelPosition,
|
|
204
|
+
modelViewPosition,
|
|
205
|
+
} from './accessors/ModelNode.js';
|
|
206
|
+
export { default as ModelViewProjectionNode, modelViewProjection } from './accessors/ModelViewProjectionNode.js';
|
|
207
|
+
export {
|
|
208
|
+
default as NormalNode,
|
|
209
|
+
normalGeometry,
|
|
210
|
+
normalLocal,
|
|
211
|
+
normalView,
|
|
212
|
+
normalWorld,
|
|
213
|
+
transformedNormalView,
|
|
214
|
+
NormalNodeScope,
|
|
215
|
+
} from './accessors/NormalNode.js';
|
|
73
216
|
export { default as Object3DNode, Object3DNodeScope as OObject3DNodeScope } from './accessors/Object3DNode.js';
|
|
74
|
-
export { default as PointUVNode } from './accessors/PointUVNode.js';
|
|
75
|
-
export {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
217
|
+
export { default as PointUVNode, pointUV } from './accessors/PointUVNode.js';
|
|
218
|
+
export {
|
|
219
|
+
default as PositionNode,
|
|
220
|
+
positionGeometry,
|
|
221
|
+
positionLocal,
|
|
222
|
+
positionWorld,
|
|
223
|
+
positionWorldDirection,
|
|
224
|
+
positionView,
|
|
225
|
+
positionViewDirection,
|
|
226
|
+
PositionNodeScope,
|
|
227
|
+
} from './accessors/PositionNode.js';
|
|
228
|
+
export { default as ReferenceNode, reference } from './accessors/ReferenceNode.js';
|
|
229
|
+
export { default as ReflectVectorNode, reflectVector } from './accessors/ReflectVectorNode.js';
|
|
230
|
+
export { default as SkinningNode, skinning } from './accessors/SkinningNode.js';
|
|
231
|
+
export { default as StorageBufferNode, storage } from './accessors/StorageBufferNode.js';
|
|
232
|
+
export {
|
|
233
|
+
default as TangentNode,
|
|
234
|
+
tangentGeometry,
|
|
235
|
+
tangentLocal,
|
|
236
|
+
tangentView,
|
|
237
|
+
tangentWorld,
|
|
238
|
+
transformedTangentView,
|
|
239
|
+
transformedTangentWorld,
|
|
240
|
+
TangentNodeScope,
|
|
241
|
+
} from './accessors/TangentNode.js';
|
|
242
|
+
export { default as TextureNode, texture, sampler } from './accessors/TextureNode.js';
|
|
243
|
+
export { default as UVNode, uv } from './accessors/UVNode.js';
|
|
244
|
+
export { default as UserDataNode, userData } from './accessors/UserDataNode.js';
|
|
83
245
|
|
|
84
246
|
// display
|
|
85
|
-
export { default as BlendModeNode, BlendMode } from './display/BlendModeNode.js';
|
|
86
|
-
export {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
247
|
+
export { default as BlendModeNode, burn, dodge, overlay, screen, BlendMode } from './display/BlendModeNode.js';
|
|
248
|
+
export {
|
|
249
|
+
default as ColorAdjustmentNode,
|
|
250
|
+
saturation,
|
|
251
|
+
vibrance,
|
|
252
|
+
hue,
|
|
253
|
+
lumaCoeffs,
|
|
254
|
+
luminance,
|
|
255
|
+
ColorAdjustmentMethod,
|
|
256
|
+
} from './display/ColorAdjustmentNode.js';
|
|
257
|
+
export { default as ColorSpaceNode, colorSpace, ColorSpaceNodeMethod } from './display/ColorSpaceNode.js';
|
|
258
|
+
export { default as FrontFacingNode, frontFacing, faceDirection } from './display/FrontFacingNode.js';
|
|
259
|
+
export { default as NormalMapNode, normalMap, TBNViewMatrix } from './display/NormalMapNode.js';
|
|
260
|
+
export { default as PosterizeNode, posterize } from './display/PosterizeNode.js';
|
|
261
|
+
export { default as ToneMappingNode, toneMapping } from './display/ToneMappingNode.js';
|
|
262
|
+
export {
|
|
263
|
+
default as ViewportNode,
|
|
264
|
+
viewportCoordinate,
|
|
265
|
+
viewportResolution,
|
|
266
|
+
viewportTopLeft,
|
|
267
|
+
viewportBottomLeft,
|
|
268
|
+
viewportTopRight,
|
|
269
|
+
viewportBottomRight,
|
|
270
|
+
} from './display/ViewportNode.js';
|
|
93
271
|
|
|
94
272
|
// code
|
|
95
|
-
export { default as ExpressionNode } from './code/ExpressionNode.js';
|
|
96
|
-
export { default as CodeNode, CodeNodeInclude } from './code/CodeNode.js';
|
|
97
|
-
export { default as FunctionCallNode } from './code/FunctionCallNode.js';
|
|
98
|
-
export { default as FunctionNode, FunctionNodeArguments } from './code/FunctionNode.js';
|
|
273
|
+
export { default as ExpressionNode, expression } from './code/ExpressionNode.js';
|
|
274
|
+
export { default as CodeNode, code, CodeNodeInclude } from './code/CodeNode.js';
|
|
275
|
+
export { default as FunctionCallNode, call } from './code/FunctionCallNode.js';
|
|
276
|
+
export { default as FunctionNode, func, fn, FunctionNodeArguments, Fn } from './code/FunctionNode.js';
|
|
99
277
|
|
|
100
278
|
// fog
|
|
101
|
-
export { default as FogNode } from './fog/FogNode.js';
|
|
102
|
-
export { default as FogRangeNode } from './fog/FogRangeNode.js';
|
|
103
|
-
export { default as FogExp2Node } from './fog/FogExp2Node.js';
|
|
279
|
+
export { default as FogNode, fog } from './fog/FogNode.js';
|
|
280
|
+
export { default as FogRangeNode, rangeFog } from './fog/FogRangeNode.js';
|
|
281
|
+
export { default as FogExp2Node, densityFog } from './fog/FogExp2Node.js';
|
|
104
282
|
|
|
105
283
|
// geometry
|
|
106
|
-
export { default as RangeNode, RangeModeBound } from './geometry/RangeNode.js';
|
|
284
|
+
export { default as RangeNode, range, RangeModeBound } from './geometry/RangeNode.js';
|
|
107
285
|
|
|
108
286
|
// gpgpu
|
|
109
|
-
export { default as ComputeNode } from './gpgpu/ComputeNode.js';
|
|
287
|
+
export { default as ComputeNode, compute } from './gpgpu/ComputeNode.js';
|
|
110
288
|
|
|
111
289
|
// lighting
|
|
112
290
|
export { default as PointLightNode } from './lighting/PointLightNode.js';
|
|
113
291
|
export { default as SpotLightNode } from './lighting/SpotLightNode.js';
|
|
114
|
-
export { default as LightsNode } from './lighting/LightsNode.js';
|
|
292
|
+
export { default as LightsNode, lights } from './lighting/LightsNode.js';
|
|
115
293
|
export { default as LightingNode } from './lighting/LightingNode.js';
|
|
116
|
-
export { default as LightingContextNode, LightingModelNode } from './lighting/LightingContextNode.js';
|
|
294
|
+
export { default as LightingContextNode, lightingContext, LightingModelNode } from './lighting/LightingContextNode.js';
|
|
117
295
|
export { default as HemisphereLightNode } from './lighting/HemisphereLightNode.js';
|
|
118
296
|
export { default as EnvironmentNode } from './lighting/EnvironmentNode.js';
|
|
119
297
|
export { default as AONode } from './lighting/AONode.js';
|
|
120
298
|
export { default as AnalyticLightNode } from './lighting/AnalyticLightNode.js';
|
|
121
299
|
|
|
122
300
|
// procedural
|
|
123
|
-
export { default as CheckerNode } from './procedural/CheckerNode.js';
|
|
301
|
+
export { default as CheckerNode, checker } from './procedural/CheckerNode.js';
|
|
124
302
|
|
|
125
303
|
// loaders
|
|
126
304
|
export { default as NodeLoader } from './loaders/NodeLoader.js';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import MathNode from '../math/MathNode.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
4
|
|
|
3
5
|
export type BitangentNodeScope =
|
|
4
6
|
| typeof BitangentNode.LOCAL
|
|
@@ -16,3 +18,10 @@ export default class BitangentNode extends Node {
|
|
|
16
18
|
|
|
17
19
|
constructor(scope?: BitangentNodeScope);
|
|
18
20
|
}
|
|
21
|
+
|
|
22
|
+
export const bitangentGeometry: ShaderNodeObject<BitangentNode>;
|
|
23
|
+
export const bitangentLocal: ShaderNodeObject<BitangentNode>;
|
|
24
|
+
export const bitangentView: ShaderNodeObject<BitangentNode>;
|
|
25
|
+
export const bitangentWorld: ShaderNodeObject<BitangentNode>;
|
|
26
|
+
export const transformedBitangentView: ShaderNodeObject<MathNode>;
|
|
27
|
+
export const transformedBitangentWorld: ShaderNodeObject<MathNode>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { NodeTypeOption } from '../core/constants.js';
|
|
2
2
|
import UniformNode from '../core/UniformNode.js';
|
|
3
|
+
import { NodeOrType, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
|
-
export default class BufferNode extends UniformNode {
|
|
5
|
+
export default class BufferNode extends UniformNode<ArrayLike<number>> {
|
|
5
6
|
isBufferNode: true;
|
|
6
7
|
|
|
7
8
|
bufferType: string;
|
|
@@ -9,3 +10,5 @@ export default class BufferNode extends UniformNode {
|
|
|
9
10
|
|
|
10
11
|
constructor(value: ArrayLike<number>, bufferType: NodeTypeOption, bufferCount?: number);
|
|
11
12
|
}
|
|
13
|
+
|
|
14
|
+
export const buffer: (value: ArrayLike<number>, nodeOrType: NodeOrType, count: number) => ShaderNodeObject<BufferNode>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Object3DNode, { Object3DNodeScope } from './Object3DNode.js';
|
|
2
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export type CameraNodeScope = Object3DNodeScope | typeof CameraNode.PROJECTION_MATRIX;
|
|
4
5
|
|
|
@@ -10,3 +11,9 @@ export default class CameraNode extends Object3DNode {
|
|
|
10
11
|
|
|
11
12
|
constructor(scope?: CameraNodeScope);
|
|
12
13
|
}
|
|
14
|
+
|
|
15
|
+
export const cameraProjectionMatrix: ShaderNodeObject<CameraNode>;
|
|
16
|
+
export const cameraViewMatrix: ShaderNodeObject<CameraNode>;
|
|
17
|
+
export const cameraNormalMatrix: ShaderNodeObject<CameraNode>;
|
|
18
|
+
export const cameraWorldMatrix: ShaderNodeObject<CameraNode>;
|
|
19
|
+
export const cameraPosition: ShaderNodeObject<CameraNode>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import TextureNode from './TextureNode.js';
|
|
2
|
-
import { Node } from '../Nodes.js';
|
|
3
1
|
import { CubeTexture } from '../../../../src/Three.js';
|
|
2
|
+
import TextureNode from './TextureNode.js';
|
|
3
|
+
import Node from '../core/Node.js';
|
|
4
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
5
|
|
|
5
6
|
export default class CubeTextureNode extends TextureNode {
|
|
6
7
|
isCubeTextureNode: boolean;
|
|
@@ -11,3 +12,9 @@ export default class CubeTextureNode extends TextureNode {
|
|
|
11
12
|
|
|
12
13
|
getDefaultUV(): Node;
|
|
13
14
|
}
|
|
15
|
+
|
|
16
|
+
export const cubeTexture: (
|
|
17
|
+
value: CubeTexture,
|
|
18
|
+
uvNode?: NodeRepresentation,
|
|
19
|
+
levelNode?: NodeRepresentation,
|
|
20
|
+
) => ShaderNodeObject<CubeTextureNode>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InstancedMesh } from '../../../../src/Three.js';
|
|
2
2
|
import Node from '../core/Node.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class InstanceNode extends Node {
|
|
5
6
|
instanceMesh: InstancedMesh;
|
|
@@ -7,3 +8,5 @@ export default class InstanceNode extends Node {
|
|
|
7
8
|
|
|
8
9
|
constructor(instanceMesh: InstancedMesh);
|
|
9
10
|
}
|
|
11
|
+
|
|
12
|
+
export const instance: (instanceMesh: InstancedMesh) => ShaderNodeObject<InstanceNode>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export type MaterialNodeScope =
|
|
4
5
|
| typeof MaterialNode.ALPHA_TEST
|
|
@@ -21,3 +22,14 @@ export default class MaterialNode extends Node {
|
|
|
21
22
|
scope: MaterialNodeScope;
|
|
22
23
|
constructor(scope?: MaterialNodeScope);
|
|
23
24
|
}
|
|
25
|
+
|
|
26
|
+
export const materialAlphaTest: ShaderNodeObject<MaterialNode>;
|
|
27
|
+
export const materialColor: ShaderNodeObject<MaterialNode>;
|
|
28
|
+
export const materialShininess: ShaderNodeObject<MaterialNode>;
|
|
29
|
+
export const materialEmissive: ShaderNodeObject<MaterialNode>;
|
|
30
|
+
export const materialOpacity: ShaderNodeObject<MaterialNode>;
|
|
31
|
+
export const materialSpecularColor: ShaderNodeObject<MaterialNode>;
|
|
32
|
+
export const materialReflectivity: ShaderNodeObject<MaterialNode>;
|
|
33
|
+
export const materialRoughness: ShaderNodeObject<MaterialNode>;
|
|
34
|
+
export const materialMetalness: ShaderNodeObject<MaterialNode>;
|
|
35
|
+
export const materialRotation: ShaderNodeObject<MaterialNode>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { Material } from '../../../../src/Three.js';
|
|
2
2
|
import ReferenceNode from './ReferenceNode.js';
|
|
3
|
+
import { NodeOrType, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class MaterialReferenceNode extends ReferenceNode<Material | null> {
|
|
5
6
|
constructor(property: string, inputType: string, material?: Material | null);
|
|
6
7
|
}
|
|
8
|
+
|
|
9
|
+
export const materialReference: (
|
|
10
|
+
name: string,
|
|
11
|
+
nodeOrType: NodeOrType,
|
|
12
|
+
material: Material,
|
|
13
|
+
) => ShaderNodeObject<MaterialReferenceNode>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NodeFrame } from '../Nodes.js';
|
|
2
1
|
import Object3DNode, { Object3DNodeScope } from './Object3DNode.js';
|
|
2
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Similar to {@link Object3DNode} but the object comes from {@link NodeFrame}
|
|
@@ -7,3 +7,9 @@ import Object3DNode, { Object3DNodeScope } from './Object3DNode.js';
|
|
|
7
7
|
export default class ModelNode extends Object3DNode {
|
|
8
8
|
constructor(scope?: Object3DNodeScope);
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
export const modelViewMatrix: ShaderNodeObject<ModelNode>;
|
|
12
|
+
export const modelNormalMatrix: ShaderNodeObject<ModelNode>;
|
|
13
|
+
export const modelWorldMatrix: ShaderNodeObject<ModelNode>;
|
|
14
|
+
export const modelPosition: ShaderNodeObject<ModelNode>;
|
|
15
|
+
export const modelViewPosition: ShaderNodeObject<ModelNode>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
2
|
import PositionNode from './PositionNode.js';
|
|
3
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class ModelViewProjectionNode extends Node {
|
|
5
6
|
constructor(positionNode?: PositionNode);
|
|
6
7
|
}
|
|
8
|
+
|
|
9
|
+
export const modelViewProjection: (position?: NodeRepresentation) => ShaderNodeObject<ModelViewProjectionNode>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import VarNode from '../core/VarNode.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
4
|
|
|
3
5
|
export type NormalNodeScope = typeof NormalNode.GEOMETRY | typeof NormalNode.LOCAL | typeof NormalNode.VIEW;
|
|
4
6
|
|
|
@@ -10,3 +12,9 @@ export default class NormalNode extends Node {
|
|
|
10
12
|
|
|
11
13
|
constructor(scope?: NormalNodeScope);
|
|
12
14
|
}
|
|
15
|
+
|
|
16
|
+
export const normalGeometry: ShaderNodeObject<NormalNode>;
|
|
17
|
+
export const normalLocal: ShaderNodeObject<NormalNode>;
|
|
18
|
+
export const normalView: ShaderNodeObject<NormalNode>;
|
|
19
|
+
export const normalWorld: ShaderNodeObject<NormalNode>;
|
|
20
|
+
export const transformedNormalView: ShaderNodeObject<VarNode>;
|