@types/three 0.168.0 → 0.169.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/build/three.webgpu.nodes.d.ts +1 -0
- three/build/three.webgpu.nodes.min.d.ts +1 -0
- three/examples/jsm/Addons.d.ts +0 -7
- three/examples/jsm/controls/DragControls.d.ts +0 -15
- three/examples/jsm/controls/TransformControls.d.ts +152 -25
- three/examples/jsm/exporters/EXRExporter.d.ts +7 -2
- three/examples/jsm/exporters/KTX2Exporter.d.ts +3 -1
- three/examples/jsm/helpers/LightProbeHelper.d.ts +5 -3
- three/examples/jsm/helpers/LightProbeHelperGPU.d.ts +12 -0
- three/examples/jsm/lights/LightProbeGenerator.d.ts +5 -1
- three/examples/jsm/lines/Line2.d.ts +15 -1
- three/examples/jsm/lines/LineGeometry.d.ts +18 -1
- three/examples/jsm/lines/LineMaterial.d.ts +65 -12
- three/examples/jsm/lines/LineSegments2.d.ts +25 -2
- three/examples/jsm/lines/LineSegmentsGeometry.d.ts +46 -9
- three/examples/jsm/loaders/DRACOLoader.d.ts +6 -0
- three/examples/jsm/modifiers/CurveModifier.d.ts +7 -3
- three/examples/jsm/modifiers/CurveModifierGPU.d.ts +31 -0
- three/examples/jsm/objects/Lensflare.d.ts +13 -9
- three/examples/jsm/objects/LensflareMesh.d.ts +21 -0
- three/examples/jsm/utils/GeometryCompressionUtils.d.ts +20 -4
- three/examples/jsm/utils/ShadowMapViewer.d.ts +8 -6
- three/examples/jsm/utils/ShadowMapViewerGPU.d.ts +26 -0
- three/examples/jsm/utils/SkeletonUtils.d.ts +25 -5
- three/examples/jsm/utils/TextureUtilsGPU.d.ts +3 -0
- three/package.json +2 -2
- three/src/Three.WebGPU.Nodes.d.ts +201 -0
- three/src/Three.WebGPU.d.ts +2 -1
- three/src/audio/Audio.d.ts +4 -1
- three/src/core/BufferAttribute.d.ts +0 -15
- three/src/core/InterleavedBuffer.d.ts +0 -12
- three/src/core/Object3D.d.ts +1 -1
- three/src/core/Raycaster.d.ts +2 -1
- three/src/extras/Controls.d.ts +3 -3
- three/src/loaders/MaterialLoader.d.ts +2 -0
- three/src/loaders/nodes/NodeLoader.d.ts +5 -0
- three/src/loaders/nodes/NodeMaterialLoader.d.ts +3 -0
- three/src/loaders/nodes/NodeObjectLoader.d.ts +12 -0
- three/src/materials/nodes/NodeMaterial.d.ts +2 -4
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +81 -0
- three/src/math/Quaternion.d.ts +4 -3
- three/src/math/Triangle.d.ts +24 -0
- three/src/nodes/Nodes.d.ts +2 -2
- three/src/nodes/TSL.d.ts +92 -186
- three/src/nodes/accessors/BufferAttributeNode.d.ts +1 -0
- three/src/nodes/accessors/MaterialNode.d.ts +0 -1
- three/src/nodes/accessors/ModelNode.d.ts +7 -3
- three/src/nodes/accessors/Normal.d.ts +6 -0
- three/src/nodes/accessors/Object3DNode.d.ts +1 -5
- three/src/nodes/accessors/VelocityNode.d.ts +2 -1
- three/src/nodes/core/Node.d.ts +3 -12
- three/src/nodes/core/NodeUtils.d.ts +5 -1
- three/src/nodes/core/StructTypeNode.d.ts +1 -0
- three/src/nodes/core/UniformNode.d.ts +1 -0
- three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -2
- three/src/nodes/display/ColorSpaceNode.d.ts +26 -7
- three/src/nodes/display/ScreenNode.d.ts +48 -0
- three/src/nodes/display/ToneMappingFunctions.d.ts +6 -6
- three/src/nodes/display/ToonOutlinePassNode.d.ts +24 -0
- three/src/nodes/functions/material/getShIrradianceAt.d.ts +6 -0
- three/src/objects/BatchedMesh.d.ts +33 -0
- three/src/objects/Group.d.ts +0 -6
- three/src/objects/LOD.d.ts +7 -0
- three/src/renderers/WebGLRenderer.d.ts +2 -12
- three/src/renderers/common/BundleGroup.d.ts +10 -0
- three/src/renderers/common/ClippingContext.d.ts +1 -1
- three/src/renderers/common/RenderBundles.d.ts +3 -3
- three/src/renderers/common/RenderContext.d.ts +2 -2
- three/src/renderers/common/RenderList.d.ts +2 -1
- three/src/renderers/common/RenderObject.d.ts +19 -1
- three/src/renderers/common/Renderer.d.ts +8 -1
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +3 -2
- three/src/renderers/common/nodes/Nodes.d.ts +8 -0
- three/src/renderers/webgl/WebGLCapabilities.d.ts +13 -0
- three/src/renderers/webgl/WebGLPrograms.d.ts +1 -0
- three/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts +12 -0
- three/src/renderers/webgpu/WebGPURenderer.d.ts +7 -3
- three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +5 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +5 -0
- three/examples/jsm/geometries/SDFGeometryGenerator.d.ts +0 -16
- three/examples/jsm/loaders/TiltLoader.d.ts +0 -7
- three/examples/jsm/utils/GPUStatsPanel.d.ts +0 -12
- three/examples/jsm/utils/PackedPhongMaterial.d.ts +0 -10
- three/src/nodes/display/ViewportNode.d.ts +0 -38
- three/src/renderers/common/StandardRenderer.d.ts +0 -12
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Matrix4 } from "../../../math/Matrix4.js";
|
|
2
|
+
import NodeBuilder from "../../../nodes/core/NodeBuilder.js";
|
|
3
|
+
import NodeFrame from "../../../nodes/core/NodeFrame.js";
|
|
4
|
+
import RenderObject from "../../../renderers/common/RenderObject.js";
|
|
5
|
+
import { Material } from "../../Material.js";
|
|
6
|
+
declare const refreshUniforms: readonly [
|
|
7
|
+
"alphaMap",
|
|
8
|
+
"alphaTest",
|
|
9
|
+
"anisotropy",
|
|
10
|
+
"anisotropyMap",
|
|
11
|
+
"anisotropyRotation",
|
|
12
|
+
"aoMap",
|
|
13
|
+
"attenuationColor",
|
|
14
|
+
"attenuationDistance",
|
|
15
|
+
"bumpMap",
|
|
16
|
+
"clearcoat",
|
|
17
|
+
"clearcoatMap",
|
|
18
|
+
"clearcoatNormalMap",
|
|
19
|
+
"clearcoatNormalScale",
|
|
20
|
+
"clearcoatRoughness",
|
|
21
|
+
"color",
|
|
22
|
+
"dispersion",
|
|
23
|
+
"displacementMap",
|
|
24
|
+
"emissive",
|
|
25
|
+
"emissiveMap",
|
|
26
|
+
"envMap",
|
|
27
|
+
"gradientMap",
|
|
28
|
+
"ior",
|
|
29
|
+
"iridescence",
|
|
30
|
+
"iridescenceIOR",
|
|
31
|
+
"iridescenceMap",
|
|
32
|
+
"iridescenceThicknessMap",
|
|
33
|
+
"lightMap",
|
|
34
|
+
"map",
|
|
35
|
+
"matcap",
|
|
36
|
+
"metalness",
|
|
37
|
+
"metalnessMap",
|
|
38
|
+
"normalMap",
|
|
39
|
+
"normalScale",
|
|
40
|
+
"opacity",
|
|
41
|
+
"roughness",
|
|
42
|
+
"roughnessMap",
|
|
43
|
+
"sheen",
|
|
44
|
+
"sheenColor",
|
|
45
|
+
"sheenColorMap",
|
|
46
|
+
"sheenRoughnessMap",
|
|
47
|
+
"shininess",
|
|
48
|
+
"specular",
|
|
49
|
+
"specularColor",
|
|
50
|
+
"specularColorMap",
|
|
51
|
+
"specularIntensity",
|
|
52
|
+
"specularIntensityMap",
|
|
53
|
+
"specularMap",
|
|
54
|
+
"thickness",
|
|
55
|
+
"transmission",
|
|
56
|
+
"transmissionMap",
|
|
57
|
+
];
|
|
58
|
+
type RefreshUniform = (typeof refreshUniforms)[number];
|
|
59
|
+
type MaterialData = {
|
|
60
|
+
[K in RefreshUniform]?: unknown;
|
|
61
|
+
};
|
|
62
|
+
interface RenderObjectData {
|
|
63
|
+
material: MaterialData;
|
|
64
|
+
worldMatrix: Matrix4;
|
|
65
|
+
version?: number;
|
|
66
|
+
}
|
|
67
|
+
declare class NodeMaterialObserver {
|
|
68
|
+
renderObjects: WeakMap<RenderObject, RenderObjectData>;
|
|
69
|
+
hasNode: boolean;
|
|
70
|
+
hasAnimation: boolean;
|
|
71
|
+
refreshUniforms: readonly RefreshUniform[];
|
|
72
|
+
renderId: number;
|
|
73
|
+
constructor(builder: NodeBuilder);
|
|
74
|
+
firstInitialization(renderObject: RenderObject): boolean;
|
|
75
|
+
getRenderObjectData(renderObject: RenderObject): RenderObjectData;
|
|
76
|
+
containsNode(builder: NodeBuilder): boolean;
|
|
77
|
+
getMaterialData(material: Material): MaterialData;
|
|
78
|
+
equals(renderObject: RenderObject): boolean;
|
|
79
|
+
needsRefresh(renderObject: RenderObject, nodeFrame: NodeFrame): boolean;
|
|
80
|
+
}
|
|
81
|
+
export default NodeMaterialObserver;
|
three/src/math/Quaternion.d.ts
CHANGED
|
@@ -129,7 +129,7 @@ export class Quaternion {
|
|
|
129
129
|
* @param array the source array or array-like.
|
|
130
130
|
* @param offset (optional) offset into the array. Default is 0.
|
|
131
131
|
*/
|
|
132
|
-
fromArray(array:
|
|
132
|
+
fromArray(array: number[] | ArrayLike<number>, offset?: number): this;
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* Returns an array [x, y, z, w], or copies x, y, z and w into the provided array.
|
|
@@ -137,7 +137,8 @@ export class Quaternion {
|
|
|
137
137
|
* @param offset (optional) optional offset into the array.
|
|
138
138
|
* @return The created or provided array.
|
|
139
139
|
*/
|
|
140
|
-
toArray(array?: number[], offset?: number):
|
|
140
|
+
toArray(array?: number[], offset?: number): number[];
|
|
141
|
+
toArray(array?: QuaternionTuple, offset?: 0): QuaternionTuple;
|
|
141
142
|
|
|
142
143
|
/**
|
|
143
144
|
* Copies x, y, z and w into the provided array-like.
|
|
@@ -145,7 +146,7 @@ export class Quaternion {
|
|
|
145
146
|
* @param offset (optional) optional offset into the array.
|
|
146
147
|
* @return The provided array-like.
|
|
147
148
|
*/
|
|
148
|
-
toArray(array: ArrayLike<number>, offset?: number):
|
|
149
|
+
toArray(array: ArrayLike<number>, offset?: number): ArrayLike<number>;
|
|
149
150
|
|
|
150
151
|
/**
|
|
151
152
|
* This method defines the serialization result of Quaternion.
|
three/src/math/Triangle.d.ts
CHANGED
|
@@ -82,5 +82,29 @@ export class Triangle {
|
|
|
82
82
|
v3: Vector4,
|
|
83
83
|
target: Vector4,
|
|
84
84
|
): Vector4 | null;
|
|
85
|
+
static getInterpolatedAttribute(
|
|
86
|
+
attr: BufferAttribute,
|
|
87
|
+
i1: number,
|
|
88
|
+
i2: number,
|
|
89
|
+
i3: number,
|
|
90
|
+
barycoord: Vector3,
|
|
91
|
+
target: Vector2,
|
|
92
|
+
): Vector2;
|
|
93
|
+
static getInterpolatedAttribute(
|
|
94
|
+
attr: BufferAttribute,
|
|
95
|
+
i1: number,
|
|
96
|
+
i2: number,
|
|
97
|
+
i3: number,
|
|
98
|
+
barycoord: Vector3,
|
|
99
|
+
target: Vector3,
|
|
100
|
+
): Vector3;
|
|
101
|
+
static getInterpolatedAttribute(
|
|
102
|
+
attr: BufferAttribute,
|
|
103
|
+
i1: number,
|
|
104
|
+
i2: number,
|
|
105
|
+
i3: number,
|
|
106
|
+
barycoord: Vector3,
|
|
107
|
+
target: Vector4,
|
|
108
|
+
): Vector4;
|
|
85
109
|
static isFrontFacing(a: Vector3, b: Vector3, c: Vector3, direction: Vector3): boolean;
|
|
86
110
|
}
|
three/src/nodes/Nodes.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export {
|
|
|
17
17
|
LightingModelReflectedLight,
|
|
18
18
|
} from "./core/LightingModel.js";
|
|
19
19
|
export { default as MRTNode } from "./core/MRTNode.js";
|
|
20
|
-
export { default as Node, NodeJSONInputData, NodeJSONIntermediateOutputData
|
|
20
|
+
export { default as Node, NodeJSONInputData, NodeJSONIntermediateOutputData } from "./core/Node.js";
|
|
21
21
|
export { default as NodeAttribute } from "./core/NodeAttribute.js";
|
|
22
22
|
export {
|
|
23
23
|
BuildStageOption,
|
|
@@ -116,6 +116,7 @@ export { default as PixelationPassNode } from "./display/PixelationPassNode.js";
|
|
|
116
116
|
export { default as PosterizeNode } from "./display/PosterizeNode.js";
|
|
117
117
|
export { default as RenderOutputNode } from "./display/RenderOutputNode.js";
|
|
118
118
|
export { default as RGBShiftNode } from "./display/RGBShiftNode.js";
|
|
119
|
+
export { default as ScreenNode, ScreenNodeScope } from "./display/ScreenNode.js";
|
|
119
120
|
export { default as SobelOperatorNode } from "./display/SobelOperatorNode.js";
|
|
120
121
|
export { default as SSAAPassNode } from "./display/SSAAPassNode.js";
|
|
121
122
|
export { default as StereoPassNode } from "./display/StereoPassNode.js";
|
|
@@ -123,7 +124,6 @@ export { default as ToneMappingNode } from "./display/ToneMappingNode.js";
|
|
|
123
124
|
export { default as TransitionNode } from "./display/TransitionNode.js";
|
|
124
125
|
export { default as ViewportDepthNode, ViewportDepthNodeScope } from "./display/ViewportDepthNode.js";
|
|
125
126
|
export { default as ViewportDepthTextureNode } from "./display/ViewportDepthTextureNode.js";
|
|
126
|
-
export { default as ViewportNode, ViewportNodeScope } from "./display/ViewportNode.js";
|
|
127
127
|
export { default as ViewportSharedTextureNode } from "./display/ViewportSharedTextureNode.js";
|
|
128
128
|
export { default as ViewportTextureNode } from "./display/ViewportTextureNode.js";
|
|
129
129
|
|
three/src/nodes/TSL.d.ts
CHANGED
|
@@ -23,32 +23,21 @@ export * from "./math/MathUtils.js";
|
|
|
23
23
|
export * from "./math/TriNoise3D.js";
|
|
24
24
|
|
|
25
25
|
// utils
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
26
|
+
export * from "./utils/EquirectUVNode.js";
|
|
27
|
+
export * from "./utils/FunctionOverloadingNode.js";
|
|
28
|
+
export * from "./utils/LoopNode.js";
|
|
29
|
+
export * from "./utils/MatcapUVNode.js";
|
|
30
|
+
export * from "./utils/MaxMipLevelNode.js";
|
|
31
|
+
export * from "./utils/OscNode.js";
|
|
32
32
|
export * from "./utils/Packing.js";
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
33
|
+
export * from "./utils/ReflectorNode.js";
|
|
34
|
+
export * from "./utils/RemapNode.js";
|
|
35
|
+
export * from "./utils/RotateNode.js";
|
|
36
|
+
export * from "./utils/RTTNode.js";
|
|
37
|
+
export * from "./utils/SpriteSheetUVNode.js";
|
|
38
38
|
export * from "./utils/SpriteUtils.js";
|
|
39
|
-
export
|
|
40
|
-
|
|
41
|
-
frameId,
|
|
42
|
-
timerDelta,
|
|
43
|
-
timerGlobal,
|
|
44
|
-
timerLocal,
|
|
45
|
-
TimerNodeScope,
|
|
46
|
-
} from "./utils/TimerNode.js";
|
|
47
|
-
export {
|
|
48
|
-
default as TriplanarTexturesNode,
|
|
49
|
-
triplanarTexture,
|
|
50
|
-
triplanarTextures,
|
|
51
|
-
} from "./utils/TriplanarTexturesNode.js";
|
|
39
|
+
export * from "./utils/TimerNode.js";
|
|
40
|
+
export * from "./utils/TriplanarTexturesNode.js";
|
|
52
41
|
export * from "./utils/UVUtils.js";
|
|
53
42
|
export * from "./utils/ViewportUtils.js";
|
|
54
43
|
|
|
@@ -57,195 +46,111 @@ export * from "./tsl/TSLBase.js";
|
|
|
57
46
|
|
|
58
47
|
// accessors
|
|
59
48
|
export * from "./accessors/AccessorsUtils.js";
|
|
60
|
-
export
|
|
49
|
+
export * from "./accessors/BatchNode.js";
|
|
61
50
|
export * from "./accessors/Bitangent.js";
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
default as BufferAttributeNode,
|
|
65
|
-
dynamicBufferAttribute,
|
|
66
|
-
instancedBufferAttribute,
|
|
67
|
-
instancedDynamicBufferAttribute,
|
|
68
|
-
} from "./accessors/BufferAttributeNode.js";
|
|
69
|
-
export { buffer, default as BufferNode } from "./accessors/BufferNode.js";
|
|
51
|
+
export * from "./accessors/BufferAttributeNode.js";
|
|
52
|
+
export * from "./accessors/BufferNode.js";
|
|
70
53
|
export * from "./accessors/Camera.js";
|
|
71
|
-
export
|
|
72
|
-
export
|
|
73
|
-
export
|
|
74
|
-
default as MaterialNode,
|
|
75
|
-
materialAlphaTest,
|
|
76
|
-
materialAnisotropy,
|
|
77
|
-
materialAnisotropyVector,
|
|
78
|
-
materialAOMap,
|
|
79
|
-
materialClearcoat,
|
|
80
|
-
materialClearcoatNormal,
|
|
81
|
-
materialClearcoatRoughness,
|
|
82
|
-
materialColor,
|
|
83
|
-
materialDispersion,
|
|
84
|
-
materialEmissive,
|
|
85
|
-
materialIridescence,
|
|
86
|
-
materialIridescenceIOR,
|
|
87
|
-
materialIridescenceThickness,
|
|
88
|
-
materialLightMap,
|
|
89
|
-
materialLineDashOffset,
|
|
90
|
-
materialLineDashSize,
|
|
91
|
-
materialLineGapSize,
|
|
92
|
-
materialLineScale,
|
|
93
|
-
materialLineWidth,
|
|
94
|
-
materialMetalness,
|
|
95
|
-
MaterialNodeScope,
|
|
96
|
-
materialNormal,
|
|
97
|
-
materialOpacity,
|
|
98
|
-
materialPointWidth,
|
|
99
|
-
materialReflectivity,
|
|
100
|
-
materialRotation,
|
|
101
|
-
materialRoughness,
|
|
102
|
-
materialSheen,
|
|
103
|
-
materialSheenRoughness,
|
|
104
|
-
materialShininess,
|
|
105
|
-
materialSpecular,
|
|
106
|
-
materialSpecularStrength,
|
|
107
|
-
} from "./accessors/MaterialNode.js";
|
|
54
|
+
export * from "./accessors/CubeTextureNode.js";
|
|
55
|
+
export * from "./accessors/InstanceNode.js";
|
|
56
|
+
export * from "./accessors/MaterialNode.js";
|
|
108
57
|
export * from "./accessors/MaterialProperties.js";
|
|
109
|
-
export
|
|
110
|
-
export
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
modelNormalMatrix,
|
|
114
|
-
modelPosition,
|
|
115
|
-
modelScale,
|
|
116
|
-
modelViewMatrix,
|
|
117
|
-
modelViewPosition,
|
|
118
|
-
modelWorldMatrix,
|
|
119
|
-
modelWorldMatrixInverse,
|
|
120
|
-
} from "./accessors/ModelNode.js";
|
|
121
|
-
export { default as ModelViewProjectionNode, modelViewProjection } from "./accessors/ModelViewProjectionNode.js";
|
|
122
|
-
export { default as MorphNode, morphReference } from "./accessors/MorphNode.js";
|
|
58
|
+
export * from "./accessors/MaterialReferenceNode.js";
|
|
59
|
+
export * from "./accessors/ModelNode.js";
|
|
60
|
+
export * from "./accessors/ModelViewProjectionNode.js";
|
|
61
|
+
export * from "./accessors/MorphNode.js";
|
|
123
62
|
export * from "./accessors/Normal.js";
|
|
124
|
-
export
|
|
125
|
-
|
|
126
|
-
objectDirection,
|
|
127
|
-
objectNormalMatrix,
|
|
128
|
-
objectPosition,
|
|
129
|
-
objectScale,
|
|
130
|
-
objectViewMatrix,
|
|
131
|
-
objectViewPosition,
|
|
132
|
-
objectWorldMatrix,
|
|
133
|
-
} from "./accessors/Object3DNode.js";
|
|
134
|
-
export { default as PointUVNode, pointUV } from "./accessors/PointUVNode.js";
|
|
63
|
+
export * from "./accessors/Object3DNode.js";
|
|
64
|
+
export * from "./accessors/PointUVNode.js";
|
|
135
65
|
export * from "./accessors/Position.js";
|
|
136
|
-
export
|
|
66
|
+
export * from "./accessors/ReferenceNode.js";
|
|
137
67
|
export * from "./accessors/ReflectVector.js";
|
|
138
|
-
export
|
|
139
|
-
export
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
SceneNodeScope,
|
|
144
|
-
} from "./accessors/SceneNode.js";
|
|
145
|
-
export { default as SkinningNode, skinning, skinningReference } from "./accessors/SkinningNode.js";
|
|
146
|
-
export { default as StorageBufferNode, storage, storageObject } from "./accessors/StorageBufferNode.js";
|
|
147
|
-
export { default as StorageTextureNode, storageTexture, textureStore } from "./accessors/StorageTextureNode.js";
|
|
68
|
+
export * from "./accessors/RendererReferenceNode.js";
|
|
69
|
+
export * from "./accessors/SceneNode.js";
|
|
70
|
+
export * from "./accessors/SkinningNode.js";
|
|
71
|
+
export * from "./accessors/StorageBufferNode.js";
|
|
72
|
+
export * from "./accessors/StorageTextureNode.js";
|
|
148
73
|
export * from "./accessors/Tangent.js";
|
|
149
|
-
export
|
|
74
|
+
export * from "./accessors/Texture3DNode.js";
|
|
150
75
|
export * from "./accessors/TextureBicubic.js";
|
|
151
|
-
export
|
|
152
|
-
export
|
|
153
|
-
export
|
|
154
|
-
export
|
|
76
|
+
export * from "./accessors/TextureNode.js";
|
|
77
|
+
export * from "./accessors/TextureSizeNode.js";
|
|
78
|
+
export * from "./accessors/UniformArrayNode.js";
|
|
79
|
+
export * from "./accessors/UserDataNode.js";
|
|
155
80
|
export * from "./accessors/UV.js";
|
|
156
81
|
export * from "./accessors/VelocityNode.js";
|
|
157
|
-
export
|
|
82
|
+
export * from "./accessors/VertexColorNode.js";
|
|
158
83
|
|
|
159
84
|
// display
|
|
160
|
-
export
|
|
161
|
-
export
|
|
162
|
-
export
|
|
163
|
-
export
|
|
85
|
+
export * from "./display/AfterImageNode.js";
|
|
86
|
+
export * from "./display/AnaglyphPassNode.js";
|
|
87
|
+
export * from "./display/AnamorphicNode.js";
|
|
88
|
+
export * from "./display/BleachBypass.js";
|
|
164
89
|
export * from "./display/BlendMode.js";
|
|
165
|
-
export
|
|
166
|
-
export
|
|
90
|
+
export * from "./display/BloomNode.js";
|
|
91
|
+
export * from "./display/BumpMapNode.js";
|
|
167
92
|
export * from "./display/ColorAdjustment.js";
|
|
168
|
-
export
|
|
169
|
-
export
|
|
170
|
-
export
|
|
171
|
-
export
|
|
172
|
-
export
|
|
173
|
-
export
|
|
174
|
-
export
|
|
175
|
-
export
|
|
176
|
-
export
|
|
177
|
-
export
|
|
93
|
+
export * from "./display/ColorSpaceNode.js";
|
|
94
|
+
export * from "./display/DenoiseNode.js";
|
|
95
|
+
export * from "./display/DepthOfFieldNode.js";
|
|
96
|
+
export * from "./display/DotScreenNode.js";
|
|
97
|
+
export * from "./display/FilmNode.js";
|
|
98
|
+
export * from "./display/FrontFacingNode.js";
|
|
99
|
+
export * from "./display/FXAANode.js";
|
|
100
|
+
export * from "./display/GaussianBlurNode.js";
|
|
101
|
+
export * from "./display/GTAONode.js";
|
|
102
|
+
export * from "./display/Lut3DNode.js";
|
|
178
103
|
export * from "./display/MotionBlur.js";
|
|
179
|
-
export
|
|
180
|
-
export
|
|
181
|
-
export
|
|
182
|
-
export
|
|
183
|
-
export
|
|
184
|
-
export
|
|
185
|
-
export
|
|
186
|
-
export
|
|
187
|
-
export
|
|
188
|
-
export
|
|
189
|
-
export
|
|
190
|
-
export
|
|
191
|
-
export
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
export
|
|
202
|
-
export {
|
|
203
|
-
default as ViewportNode,
|
|
204
|
-
viewport,
|
|
205
|
-
viewportBottomLeft,
|
|
206
|
-
viewportCoordinate,
|
|
207
|
-
ViewportNodeScope,
|
|
208
|
-
viewportResolution,
|
|
209
|
-
viewportTopLeft,
|
|
210
|
-
viewportUV,
|
|
211
|
-
} from "./display/ViewportNode.js";
|
|
212
|
-
export { default as ViewportSharedTextureNode, viewportSharedTexture } from "./display/ViewportSharedTextureNode.js";
|
|
213
|
-
export { default as ViewportTextureNode, viewportMipTexture, viewportTexture } from "./display/ViewportTextureNode.js";
|
|
214
|
-
|
|
215
|
-
export { default as PassNode, depthPass, pass, PassNodeScope, passTexture } from "./display/PassNode.js";
|
|
216
|
-
|
|
217
|
-
import * as ColorSpaceFunctions from "./display/ColorSpaceFunctions.js";
|
|
218
|
-
export { ColorSpaceFunctions };
|
|
219
|
-
|
|
220
|
-
import * as ToneMappingFunctions from "./display/ToneMappingFunctions.js";
|
|
221
|
-
export { ToneMappingFunctions };
|
|
104
|
+
export * from "./display/NormalMapNode.js";
|
|
105
|
+
export * from "./display/ParallaxBarrierPassNode.js";
|
|
106
|
+
export * from "./display/PixelationPassNode.js";
|
|
107
|
+
export * from "./display/PosterizeNode.js";
|
|
108
|
+
export * from "./display/RenderOutputNode.js";
|
|
109
|
+
export * from "./display/RGBShiftNode.js";
|
|
110
|
+
export * from "./display/ScreenNode.js";
|
|
111
|
+
export * from "./display/Sepia.js";
|
|
112
|
+
export * from "./display/SobelOperatorNode.js";
|
|
113
|
+
export * from "./display/SSAAPassNode.js";
|
|
114
|
+
export * from "./display/StereoPassNode.js";
|
|
115
|
+
export * from "./display/ToneMappingNode.js";
|
|
116
|
+
export * from "./display/ToonOutlinePassNode.js";
|
|
117
|
+
export * from "./display/TransitionNode.js";
|
|
118
|
+
export * from "./display/ViewportDepthNode.js";
|
|
119
|
+
export * from "./display/ViewportDepthTextureNode.js";
|
|
120
|
+
export * from "./display/ViewportSharedTextureNode.js";
|
|
121
|
+
export * from "./display/ViewportTextureNode.js";
|
|
122
|
+
|
|
123
|
+
export * from "./display/PassNode.js";
|
|
124
|
+
|
|
125
|
+
export * from "./display/ColorSpaceFunctions.js";
|
|
126
|
+
export * from "./display/ToneMappingFunctions.js";
|
|
222
127
|
|
|
223
128
|
// code
|
|
224
|
-
export
|
|
225
|
-
export
|
|
226
|
-
export
|
|
227
|
-
export
|
|
228
|
-
export
|
|
229
|
-
export
|
|
129
|
+
export * from "./code/CodeNode.js";
|
|
130
|
+
export * from "./code/ExpressionNode.js";
|
|
131
|
+
export * from "./code/FunctionCallNode.js";
|
|
132
|
+
export * from "./code/FunctionNode.js";
|
|
133
|
+
export * from "./code/ScriptableNode.js";
|
|
134
|
+
export * from "./code/ScriptableValueNode.js";
|
|
230
135
|
|
|
231
136
|
// fog
|
|
232
|
-
export
|
|
233
|
-
export
|
|
234
|
-
export
|
|
137
|
+
export * from "./fog/FogExp2Node.js";
|
|
138
|
+
export * from "./fog/FogNode.js";
|
|
139
|
+
export * from "./fog/FogRangeNode.js";
|
|
235
140
|
|
|
236
141
|
// geometry
|
|
237
|
-
export
|
|
142
|
+
export * from "./geometry/RangeNode.js";
|
|
238
143
|
|
|
239
144
|
// gpgpu
|
|
240
|
-
export
|
|
145
|
+
export * from "./gpgpu/ComputeNode.js";
|
|
241
146
|
|
|
242
147
|
// lighting
|
|
243
|
-
export
|
|
244
|
-
export
|
|
245
|
-
export
|
|
148
|
+
export * from "./lighting/LightingContextNode.js";
|
|
149
|
+
export * from "./lighting/LightNode.js";
|
|
150
|
+
export * from "./lighting/LightsNode.js";
|
|
246
151
|
|
|
247
152
|
// pmrem
|
|
248
|
-
export
|
|
153
|
+
export * from "./pmrem/PMREMNode.js";
|
|
249
154
|
export * from "./pmrem/PMREMUtils.js";
|
|
250
155
|
|
|
251
156
|
// procedural
|
|
@@ -267,3 +172,4 @@ export * from "./lighting/LightUtils.js";
|
|
|
267
172
|
|
|
268
173
|
export { default as getGeometryRoughness } from "./functions/material/getGeometryRoughness.js";
|
|
269
174
|
export { default as getRoughness } from "./functions/material/getRoughness.js";
|
|
175
|
+
export { default as getShIrradianceAt } from "./functions/material/getShIrradianceAt.js";
|
|
@@ -5,6 +5,7 @@ import { InterleavedBufferAttribute } from "../../core/InterleavedBufferAttribut
|
|
|
5
5
|
import InputNode from "../core/InputNode.js";
|
|
6
6
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
7
7
|
declare class BufferAttributeNode extends InputNode<TypedArray | InterleavedBuffer | BufferAttribute> {
|
|
8
|
+
static get type(): string;
|
|
8
9
|
readonly isBufferNode: true;
|
|
9
10
|
bufferType: string | null;
|
|
10
11
|
bufferStride: number;
|
|
@@ -126,5 +126,4 @@ export const materialPointWidth: ShaderNodeObject<MaterialNode>;
|
|
|
126
126
|
export const materialDispersion: ShaderNodeObject<MaterialNode>;
|
|
127
127
|
export const materialLightMap: ShaderNodeObject<MaterialNode>;
|
|
128
128
|
export const materialAOMap: ShaderNodeObject<MaterialNode>;
|
|
129
|
-
export const materialRefractionRatio: ShaderNodeObject<MaterialNode>;
|
|
130
129
|
export const materialAnisotropyVector: ShaderNodeObject<UniformNode<Vector2>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Matrix4 } from "../../math/Matrix4.js";
|
|
2
|
+
import Node from "../core/Node.js";
|
|
2
3
|
import { UniformNode } from "../Nodes.js";
|
|
3
4
|
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
5
|
import Object3DNode from "./Object3DNode.js";
|
|
@@ -7,14 +8,17 @@ import Object3DNode from "./Object3DNode.js";
|
|
|
7
8
|
* Similar to {@link Object3DNode} but the object comes from {@link NodeFrame}
|
|
8
9
|
*/
|
|
9
10
|
export default class ModelNode extends Object3DNode {
|
|
10
|
-
constructor(scope
|
|
11
|
+
constructor(scope: string);
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export const modelDirection: ShaderNodeObject<ModelNode>;
|
|
14
|
-
export const modelViewMatrix: ShaderNodeObject<ModelNode>;
|
|
15
|
-
export const modelNormalMatrix: ShaderNodeObject<ModelNode>;
|
|
16
15
|
export const modelWorldMatrix: ShaderNodeObject<ModelNode>;
|
|
17
16
|
export const modelPosition: ShaderNodeObject<ModelNode>;
|
|
18
17
|
export const modelScale: ShaderNodeObject<ModelNode>;
|
|
19
18
|
export const modelViewPosition: ShaderNodeObject<ModelNode>;
|
|
19
|
+
export const modelNormalMatrix: ShaderNodeObject<Node>;
|
|
20
20
|
export const modelWorldMatrixInverse: ShaderNodeObject<UniformNode<Matrix4>>;
|
|
21
|
+
export const modelViewMatrix: ShaderNodeObject<ModelNode>;
|
|
22
|
+
|
|
23
|
+
export const highPrecisionModelViewMatrix: ShaderNodeObject<Node>;
|
|
24
|
+
export const highPrecisionModelNormalViewMatrix: ShaderNodeObject<Node>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Matrix4 } from "../../math/Matrix4.js";
|
|
1
2
|
import AttributeNode from "../core/AttributeNode.js";
|
|
3
|
+
import Node from "../core/Node.js";
|
|
2
4
|
import VarNode from "../core/VarNode.js";
|
|
3
5
|
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
6
|
|
|
@@ -17,3 +19,7 @@ export const transformedNormalView: ShaderNodeObject<VarNode>;
|
|
|
17
19
|
export const transformedNormalWorld: ShaderNodeObject<VarNode>;
|
|
18
20
|
|
|
19
21
|
export const transformedClearcoatNormalView: ShaderNodeObject<VarNode>;
|
|
22
|
+
|
|
23
|
+
export const transformNormal: (normal: Node, matrix?: Node) => ShaderNodeObject<Node>;
|
|
24
|
+
|
|
25
|
+
export const transformNormalToView: (normal: Node) => ShaderNodeObject<Node>;
|
|
@@ -6,10 +6,8 @@ export default class Object3DNode extends Node {
|
|
|
6
6
|
scope: string;
|
|
7
7
|
object3d: Object3D | null;
|
|
8
8
|
|
|
9
|
-
constructor(scope
|
|
9
|
+
constructor(scope: string, object3d?: Object3D | null);
|
|
10
10
|
|
|
11
|
-
static VIEW_MATRIX: "viewMatrix";
|
|
12
|
-
static NORMAL_MATRIX: "normalMatrix";
|
|
13
11
|
static WORLD_MATRIX: "worldMatrix";
|
|
14
12
|
static POSITION: "position";
|
|
15
13
|
static SCALE: "scale";
|
|
@@ -18,8 +16,6 @@ export default class Object3DNode extends Node {
|
|
|
18
16
|
}
|
|
19
17
|
|
|
20
18
|
export const objectDirection: (object3d: Object3D) => ShaderNodeObject<Object3DNode>;
|
|
21
|
-
export const objectViewMatrix: (object3d: Object3D) => ShaderNodeObject<Object3DNode>;
|
|
22
|
-
export const objectNormalMatrix: (object3d: Object3D) => ShaderNodeObject<Object3DNode>;
|
|
23
19
|
export const objectWorldMatrix: (object3d: Object3D) => ShaderNodeObject<Object3DNode>;
|
|
24
20
|
export const objectPosition: (object3d: Object3D) => ShaderNodeObject<Object3DNode>;
|
|
25
21
|
export const objectScale: (object3d: Object3D) => ShaderNodeObject<Object3DNode>;
|
|
@@ -4,8 +4,9 @@ import UniformNode from "../core/UniformNode.js";
|
|
|
4
4
|
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
5
|
|
|
6
6
|
declare class VelocityNode extends TempNode {
|
|
7
|
+
previousModelWorldMatrix: UniformNode<Matrix4>;
|
|
7
8
|
previousProjectionMatrix: UniformNode<Matrix4>;
|
|
8
|
-
|
|
9
|
+
previousCameraViewMatrix: UniformNode<Matrix4>;
|
|
9
10
|
|
|
10
11
|
constructor();
|
|
11
12
|
}
|
three/src/nodes/core/Node.d.ts
CHANGED
|
@@ -60,13 +60,14 @@ interface NodeJSONOutputData {
|
|
|
60
60
|
declare class Node extends EventDispatcher<{
|
|
61
61
|
dispose: {};
|
|
62
62
|
}> {
|
|
63
|
+
static get type(): string;
|
|
63
64
|
nodeType: string | null;
|
|
64
65
|
updateType: NodeUpdateType;
|
|
65
66
|
updateBeforeType: NodeUpdateType;
|
|
66
67
|
updateAfterType: NodeUpdateType;
|
|
67
68
|
uuid: string;
|
|
68
69
|
version: number;
|
|
69
|
-
_cacheKey:
|
|
70
|
+
_cacheKey: number | null;
|
|
70
71
|
_cacheKeyVersion: number;
|
|
71
72
|
global: boolean;
|
|
72
73
|
readonly isNode: true;
|
|
@@ -86,7 +87,7 @@ declare class Node extends EventDispatcher<{
|
|
|
86
87
|
getChildren(): Generator<Node, void, unknown>;
|
|
87
88
|
dispose(): void;
|
|
88
89
|
traverse(callback: (node: Node) => void): void;
|
|
89
|
-
getCacheKey(force?: boolean):
|
|
90
|
+
getCacheKey(force?: boolean): number;
|
|
90
91
|
getScope(): this;
|
|
91
92
|
getHash(builder: NodeBuilder): string;
|
|
92
93
|
getUpdateType(): NodeUpdateType;
|
|
@@ -108,13 +109,3 @@ declare class Node extends EventDispatcher<{
|
|
|
108
109
|
toJSON(meta?: NodeJSONMeta | string): NodeJSONOutputData;
|
|
109
110
|
}
|
|
110
111
|
export default Node;
|
|
111
|
-
export declare function registerNode(type: string, nodeClass: {
|
|
112
|
-
new(...args: any[]): Node;
|
|
113
|
-
}): string | undefined;
|
|
114
|
-
export declare function createNodeFromType(type: string): Node | undefined;
|
|
115
|
-
/**
|
|
116
|
-
* @deprecated Function addNodeClass() is deprecated. Use registerNodeClass() instead.
|
|
117
|
-
*/
|
|
118
|
-
export declare function addNodeClass(type: string, nodeClass: {
|
|
119
|
-
new(...args: any[]): Node;
|
|
120
|
-
}): void;
|
|
@@ -12,7 +12,11 @@ export interface NodeChild {
|
|
|
12
12
|
childNode: Node;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export
|
|
15
|
+
export const hashString: (str: string) => number;
|
|
16
|
+
export const hashArray: (array: number[]) => number;
|
|
17
|
+
export const hash: (...params: number[]) => number;
|
|
18
|
+
|
|
19
|
+
export function getCacheKey(object: Node, force?: boolean): number;
|
|
16
20
|
export function getNodeChildren(object: Node): Generator<NodeChild, void>;
|
|
17
21
|
export function getValueType(value: unknown): string | null;
|
|
18
22
|
export function getValueFromType(
|