@types/three 0.179.0 → 0.180.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/Addons.d.ts +1 -1
- three/examples/jsm/controls/DragControls.d.ts +0 -30
- three/examples/jsm/controls/PointerLockControls.d.ts +0 -5
- three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
- three/examples/jsm/exporters/EXRExporter.d.ts +2 -2
- three/examples/jsm/exporters/KTX2Exporter.d.ts +2 -2
- three/examples/jsm/exporters/STLExporter.d.ts +2 -2
- three/examples/jsm/exporters/USDZExporter.d.ts +2 -2
- three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +2 -2
- three/examples/jsm/loaders/HDRLoader.d.ts +22 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +5 -1
- three/examples/jsm/loaders/RGBELoader.d.ts +9 -15
- three/examples/jsm/materials/WoodNodeMaterial.d.ts +75 -0
- three/examples/jsm/math/ColorSpaces.d.ts +4 -0
- three/examples/jsm/postprocessing/SSRPass.d.ts +6 -29
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +10 -1
- three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +14 -8
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +26 -6
- three/examples/jsm/tsl/display/SSRNode.d.ts +8 -3
- three/examples/jsm/tsl/display/boxBlur.d.ts +11 -0
- three/examples/jsm/tsl/display/hashBlur.d.ts +1 -1
- three/package.json +2 -2
- three/src/Three.Core.d.ts +1 -0
- three/src/Three.TSL.d.ts +29 -4
- three/src/animation/AnimationClip.d.ts +5 -0
- three/src/constants.d.ts +3 -1
- three/src/materials/LineBasicMaterial.d.ts +1 -0
- three/src/materials/LineDashedMaterial.d.ts +1 -0
- three/src/materials/MeshBasicMaterial.d.ts +1 -0
- three/src/materials/MeshDepthMaterial.d.ts +1 -0
- three/src/materials/MeshDistanceMaterial.d.ts +2 -1
- three/src/materials/MeshLambertMaterial.d.ts +1 -0
- three/src/materials/MeshMatcapMaterial.d.ts +1 -0
- three/src/materials/MeshNormalMaterial.d.ts +1 -0
- three/src/materials/MeshPhongMaterial.d.ts +1 -0
- three/src/materials/MeshToonMaterial.d.ts +1 -0
- three/src/materials/PointsMaterial.d.ts +1 -0
- three/src/materials/ShaderMaterial.d.ts +1 -0
- three/src/materials/ShadowMaterial.d.ts +1 -0
- three/src/materials/SpriteMaterial.d.ts +1 -0
- three/src/materials/nodes/Line2NodeMaterial.d.ts +1 -0
- three/src/materials/nodes/LineBasicNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshPhongNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshStandardNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshToonNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/NodeMaterial.d.ts +1 -0
- three/src/materials/nodes/PointsNodeMaterial.d.ts +17 -0
- three/src/materials/nodes/ShadowNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/SpriteNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +1 -1
- three/src/math/ColorManagement.d.ts +1 -1
- three/src/nodes/Nodes.d.ts +3 -0
- three/src/nodes/TSL.d.ts +3 -0
- three/src/nodes/accessors/Camera.d.ts +2 -0
- three/src/nodes/accessors/TextureNode.d.ts +2 -0
- three/src/nodes/core/ContextNode.d.ts +4 -0
- three/src/nodes/core/Node.d.ts +4 -11
- three/src/nodes/core/UniformNode.d.ts +4 -4
- three/src/nodes/core/VarNode.d.ts +0 -14
- three/src/nodes/display/ScreenNode.d.ts +4 -1
- three/src/nodes/display/ToneMappingNode.d.ts +2 -2
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +3 -0
- three/src/nodes/display/ViewportSharedTextureNode.d.ts +3 -0
- three/src/nodes/display/ViewportTextureNode.d.ts +4 -0
- three/src/nodes/gpgpu/SubgroupFunctionNode.d.ts +100 -0
- three/src/nodes/math/BitcastNode.d.ts +25 -0
- three/src/nodes/math/MathNode.d.ts +0 -3
- three/src/nodes/utils/ReflectorNode.d.ts +16 -1
- three/src/nodes/utils/SampleNode.d.ts +3 -2
- three/src/nodes/utils/Timer.d.ts +0 -15
- three/src/objects/InstancedMesh.d.ts +2 -3
- three/src/renderers/WebGLRenderer.d.ts +0 -25
- three/src/renderers/common/Attributes.d.ts +1 -1
- three/src/renderers/common/Renderer.d.ts +3 -3
- three/src/renderers/common/Textures.d.ts +1 -1
- three/src/renderers/common/TimestampQueryPool.d.ts +3 -4
- three/src/renderers/common/XRManager.d.ts +10 -0
- three/src/renderers/common/nodes/NodeLibrary.d.ts +5 -5
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +1 -1
- three/src/textures/CompressedTexture.d.ts +4 -4
- three/src/textures/Data3DTexture.d.ts +2 -1
- three/src/textures/DataTexture.d.ts +3 -2
- three/src/textures/ExternalTexture.d.ts +2 -2
- three/src/textures/Texture.d.ts +1 -1
- three/examples/jsm/loaders/RGBMLoader.d.ts +0 -37
three/src/Three.TSL.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ export const buffer: typeof TSL.buffer;
|
|
|
97
97
|
export const bufferAttribute: typeof TSL.bufferAttribute;
|
|
98
98
|
export const bumpMap: typeof TSL.bumpMap;
|
|
99
99
|
export const burn: typeof TSL.burn;
|
|
100
|
+
export const builtin: typeof TSL.builtin;
|
|
100
101
|
export const bvec2: typeof TSL.bvec2;
|
|
101
102
|
export const bvec3: typeof TSL.bvec3;
|
|
102
103
|
export const bvec4: typeof TSL.bvec4;
|
|
@@ -111,6 +112,7 @@ export const cameraPosition: typeof TSL.cameraPosition;
|
|
|
111
112
|
export const cameraProjectionMatrix: typeof TSL.cameraProjectionMatrix;
|
|
112
113
|
export const cameraProjectionMatrixInverse: typeof TSL.cameraProjectionMatrixInverse;
|
|
113
114
|
export const cameraViewMatrix: typeof TSL.cameraViewMatrix;
|
|
115
|
+
export const cameraViewport: typeof TSL.cameraViewport;
|
|
114
116
|
export const cameraWorldMatrix: typeof TSL.cameraWorldMatrix;
|
|
115
117
|
export const cbrt: typeof TSL.cbrt;
|
|
116
118
|
export const cdl: typeof TSL.cdl;
|
|
@@ -177,6 +179,8 @@ export const faceDirection: typeof TSL.faceDirection;
|
|
|
177
179
|
export const faceForward: typeof TSL.faceForward;
|
|
178
180
|
export const faceforward: typeof TSL.faceforward;
|
|
179
181
|
export const float: typeof TSL.float;
|
|
182
|
+
export const floatBitsToInt: typeof TSL.floatBitsToInt;
|
|
183
|
+
export const floatBitsToUint: typeof TSL.floatBitsToUint;
|
|
180
184
|
export const floor: typeof TSL.floor;
|
|
181
185
|
export const fog: typeof TSL.fog;
|
|
182
186
|
export const fract: typeof TSL.fract;
|
|
@@ -219,6 +223,7 @@ export const instancedBufferAttribute: typeof TSL.instancedBufferAttribute;
|
|
|
219
223
|
export const instancedDynamicBufferAttribute: typeof TSL.instancedDynamicBufferAttribute;
|
|
220
224
|
export const instancedMesh: typeof TSL.instancedMesh;
|
|
221
225
|
export const int: typeof TSL.int;
|
|
226
|
+
export const intBitsToFloat: typeof TSL.intBitsToFloat;
|
|
222
227
|
export const inverse: typeof TSL.inverse;
|
|
223
228
|
export const inverseSqrt: typeof TSL.inverseSqrt;
|
|
224
229
|
export const inversesqrt: typeof TSL.inversesqrt;
|
|
@@ -465,6 +470,7 @@ export const saturate: typeof TSL.saturate;
|
|
|
465
470
|
export const saturation: typeof TSL.saturation;
|
|
466
471
|
export const screen: typeof TSL.screen;
|
|
467
472
|
export const screenCoordinate: typeof TSL.screenCoordinate;
|
|
473
|
+
export const screenDPR: typeof TSL.screenDPR;
|
|
468
474
|
export const screenSize: typeof TSL.screenSize;
|
|
469
475
|
export const screenUV: typeof TSL.screenUV;
|
|
470
476
|
export const scriptable: typeof TSL.scriptable;
|
|
@@ -504,15 +510,35 @@ export const storageTexture: typeof TSL.storageTexture;
|
|
|
504
510
|
export const string: typeof TSL.string;
|
|
505
511
|
export const struct: typeof TSL.struct;
|
|
506
512
|
export const sub: typeof TSL.sub;
|
|
513
|
+
export const subgroupAdd: typeof TSL.subgroupAdd;
|
|
514
|
+
export const subgroupAll: typeof TSL.subgroupAll;
|
|
515
|
+
export const subgroupAnd: typeof TSL.subgroupAnd;
|
|
516
|
+
export const subgroupAny: typeof TSL.subgroupAny;
|
|
517
|
+
export const subgroupBallot: typeof TSL.subgroupBallot;
|
|
518
|
+
export const subgroupBroadcast: typeof TSL.subgroupBroadcast;
|
|
519
|
+
export const subgroupBroadcastFirst: typeof TSL.subgroupBroadcastFirst;
|
|
507
520
|
export const subBuild: typeof TSL.subBuild;
|
|
521
|
+
export const subgroupElect: typeof TSL.subgroupElect;
|
|
522
|
+
export const subgroupExclusiveAdd: typeof TSL.subgroupExclusiveAdd;
|
|
523
|
+
export const subgroupExclusiveMul: typeof TSL.subgroupExclusiveMul;
|
|
524
|
+
export const subgroupInclusiveAdd: typeof TSL.subgroupInclusiveAdd;
|
|
525
|
+
export const subgroupInclusiveMul: typeof TSL.subgroupInclusiveMul;
|
|
508
526
|
export const subgroupIndex: typeof TSL.subgroupIndex;
|
|
527
|
+
export const subgroupMax: typeof TSL.subgroupMax;
|
|
528
|
+
export const subgroupMin: typeof TSL.subgroupMin;
|
|
529
|
+
export const subgroupMul: typeof TSL.subgroupMul;
|
|
530
|
+
export const subgroupOr: typeof TSL.subgroupOr;
|
|
531
|
+
export const subgroupShuffle: typeof TSL.subgroupShuffle;
|
|
532
|
+
export const subgroupShuffleDown: typeof TSL.subgroupShuffleDown;
|
|
533
|
+
export const subgroupShuffleUp: typeof TSL.subgroupShuffleUp;
|
|
534
|
+
export const subgroupShuffleXor: typeof TSL.subgroupShuffleXor;
|
|
509
535
|
export const subgroupSize: typeof TSL.subgroupSize;
|
|
536
|
+
export const subgroupXor: typeof TSL.subgroupXor;
|
|
510
537
|
export const tan: typeof TSL.tan;
|
|
511
538
|
export const tangentGeometry: typeof TSL.tangentGeometry;
|
|
512
539
|
export const tangentLocal: typeof TSL.tangentLocal;
|
|
513
540
|
export const tangentView: typeof TSL.tangentView;
|
|
514
541
|
export const tangentWorld: typeof TSL.tangentWorld;
|
|
515
|
-
export const temp: typeof TSL.temp;
|
|
516
542
|
export const texture: typeof TSL.texture;
|
|
517
543
|
export const texture3D: typeof TSL.texture3D;
|
|
518
544
|
export const textureBarrier: typeof TSL.textureBarrier;
|
|
@@ -524,9 +550,6 @@ export const textureSize: typeof TSL.textureSize;
|
|
|
524
550
|
export const textureStore: typeof TSL.textureStore;
|
|
525
551
|
export const thickness: typeof TSL.thickness;
|
|
526
552
|
export const time: typeof TSL.time;
|
|
527
|
-
export const timerDelta: typeof TSL.timerDelta;
|
|
528
|
-
export const timerGlobal: typeof TSL.timerGlobal;
|
|
529
|
-
export const timerLocal: typeof TSL.timerLocal;
|
|
530
553
|
export const toneMapping: typeof TSL.toneMapping;
|
|
531
554
|
export const toneMappingExposure: typeof TSL.toneMappingExposure;
|
|
532
555
|
export const toonOutlinePass: typeof TSL.toonOutlinePass;
|
|
@@ -543,10 +566,12 @@ export const triplanarTexture: typeof TSL.triplanarTexture;
|
|
|
543
566
|
export const triplanarTextures: typeof TSL.triplanarTextures;
|
|
544
567
|
export const trunc: typeof TSL.trunc;
|
|
545
568
|
export const uint: typeof TSL.uint;
|
|
569
|
+
export const uintBitsToFloat: typeof TSL.uintBitsToFloat;
|
|
546
570
|
export const uniform: typeof TSL.uniform;
|
|
547
571
|
export const uniformArray: typeof TSL.uniformArray;
|
|
548
572
|
export const uniformCubeTexture: typeof TSL.uniformCubeTexture;
|
|
549
573
|
export const uniformGroup: typeof TSL.uniformGroup;
|
|
574
|
+
export const uniformFlow: typeof TSL.uniformFlow;
|
|
550
575
|
export const uniformTexture: typeof TSL.uniformTexture;
|
|
551
576
|
export const unpremultiplyAlpha: typeof TSL.unpremultiplyAlpha;
|
|
552
577
|
export const userData: typeof TSL.userData;
|
|
@@ -132,6 +132,11 @@ export class AnimationClip {
|
|
|
132
132
|
* The UUID of the animation clip.
|
|
133
133
|
*/
|
|
134
134
|
readonly uuid: string;
|
|
135
|
+
/**
|
|
136
|
+
* An object that can be used to store custom data about the animation clip.
|
|
137
|
+
* It should not hold references to functions as these will not be cloned.
|
|
138
|
+
*/
|
|
139
|
+
userData: Record<string, unknown>;
|
|
135
140
|
/**
|
|
136
141
|
* Sets the duration of this clip to the duration of its longest keyframe track.
|
|
137
142
|
*
|
three/src/constants.d.ts
CHANGED
|
@@ -337,6 +337,7 @@ export const UnsignedShort4444Type: 1017;
|
|
|
337
337
|
export const UnsignedShort5551Type: 1018;
|
|
338
338
|
export const UnsignedInt248Type: 1020;
|
|
339
339
|
export const UnsignedInt5999Type: 35902;
|
|
340
|
+
export const UnsignedInt101111Type: 35899;
|
|
340
341
|
|
|
341
342
|
export type AttributeGPUType = typeof FloatType | typeof IntType;
|
|
342
343
|
|
|
@@ -358,7 +359,8 @@ export type TextureDataType =
|
|
|
358
359
|
| typeof UnsignedShort4444Type
|
|
359
360
|
| typeof UnsignedShort5551Type
|
|
360
361
|
| typeof UnsignedInt248Type
|
|
361
|
-
| typeof UnsignedInt5999Type
|
|
362
|
+
| typeof UnsignedInt5999Type
|
|
363
|
+
| typeof UnsignedInt101111Type;
|
|
362
364
|
|
|
363
365
|
///////////////////////////////////////////////////////////////////////////////
|
|
364
366
|
// Pixel formats
|
|
@@ -49,6 +49,7 @@ export class LineDashedMaterial extends LineBasicMaterial {
|
|
|
49
49
|
* @default true
|
|
50
50
|
*/
|
|
51
51
|
readonly isLineDashedMaterial: boolean;
|
|
52
|
+
setValues(values?: LineDashedMaterialParameters): void;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -167,6 +167,7 @@ export class MeshBasicMaterial extends Material {
|
|
|
167
167
|
* @default true
|
|
168
168
|
*/
|
|
169
169
|
readonly isMeshBasicMaterial: boolean;
|
|
170
|
+
setValues(values?: MeshBasicMaterialParameters): void;
|
|
170
171
|
}
|
|
171
172
|
|
|
172
173
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -99,6 +99,7 @@ export class MeshDepthMaterial extends Material {
|
|
|
99
99
|
* @default true
|
|
100
100
|
*/
|
|
101
101
|
readonly isMeshDepthMaterial: boolean;
|
|
102
|
+
setValues(values?: MeshDepthMaterialParameters): void;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -63,7 +63,7 @@ export interface MeshDistanceMaterialParameters
|
|
|
63
63
|
* Can also be used to customize the shadow casting of an object by assigning
|
|
64
64
|
* an instance of `MeshDistanceMaterial` to {@link Object3D#customDistanceMaterial}.
|
|
65
65
|
* The following examples demonstrates this approach in order to ensure
|
|
66
|
-
* transparent parts of objects do
|
|
66
|
+
* transparent parts of objects do not cast shadows.
|
|
67
67
|
*/
|
|
68
68
|
export class MeshDistanceMaterial extends Material {
|
|
69
69
|
/**
|
|
@@ -82,6 +82,7 @@ export class MeshDistanceMaterial extends Material {
|
|
|
82
82
|
* @default true
|
|
83
83
|
*/
|
|
84
84
|
readonly isMeshDistanceMaterial: boolean;
|
|
85
|
+
setValues(values?: MeshDistanceMaterialParameters): void;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -269,6 +269,7 @@ export class MeshLambertMaterial extends Material {
|
|
|
269
269
|
* @default true
|
|
270
270
|
*/
|
|
271
271
|
readonly isMeshLambertMaterial: boolean;
|
|
272
|
+
setValues(values?: MeshLambertMaterialParameters): void;
|
|
272
273
|
}
|
|
273
274
|
|
|
274
275
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -148,6 +148,7 @@ export class MeshMatcapMaterial extends Material {
|
|
|
148
148
|
* @default true
|
|
149
149
|
*/
|
|
150
150
|
readonly isMeshMatcapMaterial: boolean;
|
|
151
|
+
setValues(values?: MeshMatcapMaterialParameters): void;
|
|
151
152
|
}
|
|
152
153
|
|
|
153
154
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -117,6 +117,7 @@ export class MeshNormalMaterial extends Material {
|
|
|
117
117
|
* @default true
|
|
118
118
|
*/
|
|
119
119
|
readonly isMeshNormalMaterial: boolean;
|
|
120
|
+
setValues(values?: MeshNormalMaterialParameters): void;
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -281,6 +281,7 @@ export class MeshPhongMaterial extends Material {
|
|
|
281
281
|
* @default true
|
|
282
282
|
*/
|
|
283
283
|
readonly isMeshPhongMaterial: boolean;
|
|
284
|
+
setValues(values?: MeshPhongMaterialParameters): void;
|
|
284
285
|
}
|
|
285
286
|
|
|
286
287
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -216,6 +216,7 @@ export class MeshToonMaterial extends Material {
|
|
|
216
216
|
* @default true
|
|
217
217
|
*/
|
|
218
218
|
readonly isMeshToonMaterial: boolean;
|
|
219
|
+
setValues(values?: MeshToonMaterialParameters): void;
|
|
219
220
|
}
|
|
220
221
|
|
|
221
222
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -33,6 +33,7 @@ declare class LineBasicNodeMaterial extends NodeMaterial {
|
|
|
33
33
|
* @default true
|
|
34
34
|
*/
|
|
35
35
|
readonly isLineBasicNodeMaterial: boolean;
|
|
36
|
+
setValues(values?: LineBasicNodeMaterialParameters): void;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -79,6 +79,7 @@ declare class LineDashedNodeMaterial extends NodeMaterial {
|
|
|
79
79
|
* @default true
|
|
80
80
|
*/
|
|
81
81
|
readonly isLineDashedNodeMaterial: boolean;
|
|
82
|
+
setValues(values?: LineDashedNodeMaterialParameters): void;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -33,6 +33,7 @@ declare class MeshBasicNodeMaterial extends NodeMaterial {
|
|
|
33
33
|
* @default true
|
|
34
34
|
*/
|
|
35
35
|
readonly isMeshBasicNodeMaterial: boolean;
|
|
36
|
+
setValues(values?: MeshBasicNodeMaterialParameters): void;
|
|
36
37
|
/**
|
|
37
38
|
* Overwritten since this type of material uses {@link BasicEnvironmentNode}
|
|
38
39
|
* to implement the default environment mapping.
|
|
@@ -34,6 +34,7 @@ declare class MeshLambertNodeMaterial extends NodeMaterial {
|
|
|
34
34
|
* @default true
|
|
35
35
|
*/
|
|
36
36
|
readonly isMeshLambertNodeMaterial: boolean;
|
|
37
|
+
setValues(values?: MeshLambertNodeMaterialParameters): void;
|
|
37
38
|
/**
|
|
38
39
|
* Overwritten since this type of material uses {@link BasicEnvironmentNode}
|
|
39
40
|
* to implement the default environment mapping.
|
|
@@ -29,6 +29,7 @@ declare class MeshNormalNodeMaterial extends NodeMaterial {
|
|
|
29
29
|
* @type {boolean}
|
|
30
30
|
*/
|
|
31
31
|
readonly isMeshNormalNodeMaterial: boolean;
|
|
32
|
+
setValues(values?: MeshNormalNodeMaterialParameters): void;
|
|
32
33
|
/**
|
|
33
34
|
* Overwrites the default implementation by computing the diffuse color
|
|
34
35
|
* based on the normal data.
|
|
@@ -54,6 +54,7 @@ declare class MeshPhongNodeMaterial extends NodeMaterial {
|
|
|
54
54
|
* @default true
|
|
55
55
|
*/
|
|
56
56
|
readonly isMeshPhongNodeMaterial: boolean;
|
|
57
|
+
setValues(values?: MeshPhongNodeMaterialParameters): void;
|
|
57
58
|
/**
|
|
58
59
|
* Overwritten since this type of material uses {@link BasicEnvironmentNode}
|
|
59
60
|
* to implement the default environment mapping.
|
|
@@ -212,6 +212,7 @@ declare class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
|
212
212
|
* @default true
|
|
213
213
|
*/
|
|
214
214
|
readonly isMeshPhysicalNodeMaterial: boolean;
|
|
215
|
+
setValues(values?: MeshPhysicalNodeMaterialParameters): void;
|
|
215
216
|
/**
|
|
216
217
|
* Whether the lighting model should use clearcoat or not.
|
|
217
218
|
*
|
|
@@ -92,6 +92,7 @@ export interface MeshSSSNodeMaterialParameters
|
|
|
92
92
|
*/
|
|
93
93
|
declare class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial {
|
|
94
94
|
constructor(parameters?: MeshSSSNodeMaterialParameters);
|
|
95
|
+
setValues(values?: MeshSSSNodeMaterialParameters): void;
|
|
95
96
|
/**
|
|
96
97
|
* Whether the lighting model should use SSS or not.
|
|
97
98
|
*
|
|
@@ -65,6 +65,7 @@ declare class MeshStandardNodeMaterial extends NodeMaterial {
|
|
|
65
65
|
* @default true
|
|
66
66
|
*/
|
|
67
67
|
readonly isMeshStandardNodeMaterial: boolean;
|
|
68
|
+
setValues(values?: MeshStandardNodeMaterialParameters): void;
|
|
68
69
|
/**
|
|
69
70
|
* Overwritten since this type of material uses {@link EnvironmentNode}
|
|
70
71
|
* to implement the PBR (PMREM based) environment mapping. Besides, the
|
|
@@ -26,6 +26,22 @@ export interface PointsNodeMaterialParameters
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Node material version of {@link PointsMaterial}.
|
|
29
|
+
*
|
|
30
|
+
* This material can be used in two ways:
|
|
31
|
+
*
|
|
32
|
+
* - By rendering point primitives with {@link Points}. Since WebGPU only supports point primitives
|
|
33
|
+
* with a pixel size of `1`, it's not possible to define a size.
|
|
34
|
+
*
|
|
35
|
+
* ```js
|
|
36
|
+
* const pointCloud = new THREE.Points( geometry, new THREE.PointsNodeMaterial() );
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* - By rendering point primitives with {@link Sprites}. In this case, size is honored,
|
|
40
|
+
* see {@link PointsNodeMaterial#sizeNode}.
|
|
41
|
+
*
|
|
42
|
+
* ```js
|
|
43
|
+
* const instancedPoints = new THREE.Sprite( new THREE.PointsNodeMaterial( { positionNode: instancedBufferAttribute( positionAttribute ) } ) );
|
|
44
|
+
* ```
|
|
29
45
|
*/
|
|
30
46
|
declare class PointsNodeMaterial extends SpriteNodeMaterial {
|
|
31
47
|
constructor(parameters?: PointsNodeMaterialParameters);
|
|
@@ -35,6 +51,7 @@ declare class PointsNodeMaterial extends SpriteNodeMaterial {
|
|
|
35
51
|
* @default true
|
|
36
52
|
*/
|
|
37
53
|
readonly isPointsNodeMaterial: boolean;
|
|
54
|
+
setValues(values?: PointsNodeMaterialParameters): void;
|
|
38
55
|
}
|
|
39
56
|
|
|
40
57
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -60,6 +60,7 @@ declare class SpriteNodeMaterial extends NodeMaterial {
|
|
|
60
60
|
* @default true
|
|
61
61
|
*/
|
|
62
62
|
readonly isSpriteNodeMaterial: boolean;
|
|
63
|
+
setValues(values?: SpriteNodeMaterialParameters): void;
|
|
63
64
|
/**
|
|
64
65
|
* Setups the position node in view space. This method implements
|
|
65
66
|
* the sprite specific vertex shader.
|
|
@@ -171,7 +171,7 @@ declare class NodeMaterialObserver {
|
|
|
171
171
|
*
|
|
172
172
|
* @param {LightsNode} lightsNode - The lights node.
|
|
173
173
|
* @param {number} renderId - The render ID.
|
|
174
|
-
* @return {Array} The lights for the given lights node and render ID.
|
|
174
|
+
* @return {Array<Object>} The lights for the given lights node and render ID.
|
|
175
175
|
*/
|
|
176
176
|
getLights(lightsNode: LightsNode, renderId: number): LightData[];
|
|
177
177
|
/**
|
|
@@ -11,7 +11,7 @@ export interface ColorSpaceDefinition {
|
|
|
11
11
|
fromXYZ: Matrix3;
|
|
12
12
|
luminanceCoefficients: [number, number, number];
|
|
13
13
|
workingColorSpaceConfig?: { unpackColorSpace: string };
|
|
14
|
-
outputColorSpaceConfig?: { drawingBufferColorSpace: string };
|
|
14
|
+
outputColorSpaceConfig?: { drawingBufferColorSpace: string; toneMappingNode?: "extended" | "standard" };
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export interface ColorManagement {
|
three/src/nodes/Nodes.d.ts
CHANGED
|
@@ -68,6 +68,9 @@ export { default as SplitNode } from "./utils/SplitNode.js";
|
|
|
68
68
|
export { default as SpriteSheetUVNode } from "./utils/SpriteSheetUVNode.js";
|
|
69
69
|
export { default as StorageArrayElementNode } from "./utils/StorageArrayElementNode.js";
|
|
70
70
|
|
|
71
|
+
// math
|
|
72
|
+
export { default as BitcastNode } from "./math/BitcastNode.js";
|
|
73
|
+
|
|
71
74
|
// accessors
|
|
72
75
|
export { default as BatchNode } from "./accessors/BatchNode.js";
|
|
73
76
|
export { default as BufferAttributeNode } from "./accessors/BufferAttributeNode.js";
|
three/src/nodes/TSL.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from "./core/UniformNode.js";
|
|
|
19
19
|
export * from "./core/VaryingNode.js";
|
|
20
20
|
|
|
21
21
|
// math
|
|
22
|
+
export * from "./math/BitcastNode.js";
|
|
22
23
|
export * from "./math/Hash.js";
|
|
23
24
|
export * from "./math/MathUtils.js";
|
|
24
25
|
export * from "./math/TriNoise3D.js";
|
|
@@ -55,6 +56,7 @@ export * from "./accessors/BatchNode.js";
|
|
|
55
56
|
export * from "./accessors/Bitangent.js";
|
|
56
57
|
export * from "./accessors/BufferAttributeNode.js";
|
|
57
58
|
export * from "./accessors/BufferNode.js";
|
|
59
|
+
export * from "./accessors/BuiltinNode.js";
|
|
58
60
|
export * from "./accessors/Camera.js";
|
|
59
61
|
export * from "./accessors/CubeTextureNode.js";
|
|
60
62
|
export * from "./accessors/InstancedMeshNode.js";
|
|
@@ -128,6 +130,7 @@ export * from "./gpgpu/AtomicFunctionNode.js";
|
|
|
128
130
|
export * from "./gpgpu/BarrierNode.js";
|
|
129
131
|
export * from "./gpgpu/ComputeBuiltinNode.js";
|
|
130
132
|
export * from "./gpgpu/ComputeNode.js";
|
|
133
|
+
export * from "./gpgpu/SubgroupFunctionNode.js";
|
|
131
134
|
export * from "./gpgpu/WorkgroupInfoNode.js";
|
|
132
135
|
|
|
133
136
|
// lighting
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Matrix3 } from "../../math/Matrix3.js";
|
|
2
2
|
import { Matrix4 } from "../../math/Matrix4.js";
|
|
3
3
|
import { Vector3 } from "../../math/Vector3.js";
|
|
4
|
+
import { Vector4 } from "../../math/Vector4.js";
|
|
4
5
|
import UniformNode from "../core/UniformNode.js";
|
|
5
6
|
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
6
7
|
|
|
@@ -13,3 +14,4 @@ export const cameraViewMatrix: ShaderNodeObject<UniformNode<Matrix4>>;
|
|
|
13
14
|
export const cameraWorldMatrix: ShaderNodeObject<UniformNode<Matrix4>>;
|
|
14
15
|
export const cameraNormalMatrix: ShaderNodeObject<UniformNode<Matrix3>>;
|
|
15
16
|
export const cameraPosition: ShaderNodeObject<UniformNode<Vector3>>;
|
|
17
|
+
export const cameraViewport: ShaderNodeObject<UniformNode<Vector4>>;
|
|
@@ -48,6 +48,8 @@ export default class TextureNode extends UniformNode<Texture> {
|
|
|
48
48
|
|
|
49
49
|
bias(biasNode: Node): ShaderNodeObject<Node>;
|
|
50
50
|
|
|
51
|
+
getBase(): TextureNode;
|
|
52
|
+
|
|
51
53
|
compare(compareNode: Node): ShaderNodeObject<Node>;
|
|
52
54
|
|
|
53
55
|
grad(gradeNodeX: Node, gradeNodeY: Node): ShaderNodeObject<Node>;
|
|
@@ -14,6 +14,9 @@ declare class ContextNode extends Node {
|
|
|
14
14
|
export default ContextNode;
|
|
15
15
|
|
|
16
16
|
export const context: (node: Node, context?: NodeBuilderContext) => ShaderNodeObject<ContextNode>;
|
|
17
|
+
|
|
18
|
+
export const uniformFlow: (node: Node) => ShaderNodeObject<ContextNode>;
|
|
19
|
+
|
|
17
20
|
export const setName: (node: Node, label: string) => ShaderNodeObject<ContextNode>;
|
|
18
21
|
|
|
19
22
|
/**
|
|
@@ -25,6 +28,7 @@ declare module "../tsl/TSLCore.js" {
|
|
|
25
28
|
interface NodeElements {
|
|
26
29
|
context: typeof context;
|
|
27
30
|
label: typeof label;
|
|
31
|
+
uniformFlow: typeof uniformFlow;
|
|
28
32
|
setName: typeof setName;
|
|
29
33
|
}
|
|
30
34
|
}
|
three/src/nodes/core/Node.d.ts
CHANGED
|
@@ -139,13 +139,6 @@ declare class Node extends EventDispatcher<{
|
|
|
139
139
|
* @return {Node} A reference to this node.
|
|
140
140
|
*/
|
|
141
141
|
onReference(callback: (this: this, frame: NodeBuilder | NodeFrame) => unknown): this;
|
|
142
|
-
/**
|
|
143
|
-
* The `this` reference might point to a Proxy so this method can be used
|
|
144
|
-
* to get the reference to the actual node instance.
|
|
145
|
-
*
|
|
146
|
-
* @return {Node} A reference to the node.
|
|
147
|
-
*/
|
|
148
|
-
getSelf(): this;
|
|
149
142
|
/**
|
|
150
143
|
* Nodes might refer to other objects like materials. This method allows to dynamically update the reference
|
|
151
144
|
* to such objects based on a given state (e.g. the current node frame or builder).
|
|
@@ -296,7 +289,7 @@ declare class Node extends EventDispatcher<{
|
|
|
296
289
|
* This state builds the output node and returns the resulting shader string.
|
|
297
290
|
*
|
|
298
291
|
* @param {NodeBuilder} builder - The current node builder.
|
|
299
|
-
* @param {?string} output - Can be used to define the output type.
|
|
292
|
+
* @param {?string} [output] - Can be used to define the output type.
|
|
300
293
|
* @return {?string} The generated shader string.
|
|
301
294
|
*/
|
|
302
295
|
generate(builder: NodeBuilder, output?: string | null): string | null | undefined;
|
|
@@ -334,14 +327,14 @@ declare class Node extends EventDispatcher<{
|
|
|
334
327
|
* - **generate**: Generates the shader code for the node. Returns the generated shader string.
|
|
335
328
|
*
|
|
336
329
|
* @param {NodeBuilder} builder - The current node builder.
|
|
337
|
-
* @param {string|Node
|
|
338
|
-
* @return {Node|string
|
|
330
|
+
* @param {?(string|Node)} [output=null] - Can be used to define the output type.
|
|
331
|
+
* @return {?(Node|string)} The result of the build process, depending on the build stage.
|
|
339
332
|
*/
|
|
340
333
|
build(builder: NodeBuilder, output?: string | Node | null): Node | string | null;
|
|
341
334
|
/**
|
|
342
335
|
* Returns the child nodes as a JSON object.
|
|
343
336
|
*
|
|
344
|
-
* @return {
|
|
337
|
+
* @return {Generator<Object>} An iterable list of serialized child objects as JSON.
|
|
345
338
|
*/
|
|
346
339
|
getSerializeChildren(): Generator<import("./NodeUtils.js").NodeChild, void, unknown>;
|
|
347
340
|
/**
|
|
@@ -67,11 +67,11 @@ export default UniformNode;
|
|
|
67
67
|
*
|
|
68
68
|
* @tsl
|
|
69
69
|
* @function
|
|
70
|
-
* @param {any}
|
|
71
|
-
* @param {string} [
|
|
70
|
+
* @param {any|string} value - The value of this uniform or your type. Usually a JS primitive or three.js object (vector, matrix, color, texture).
|
|
71
|
+
* @param {string} [type] - The node type. If no explicit type is defined, the node tries to derive the type from its value.
|
|
72
72
|
* @returns {UniformNode}
|
|
73
73
|
*/
|
|
74
74
|
export declare const uniform: <TValue>(
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
value: InputNode<TValue> | TValue,
|
|
76
|
+
type?: Node | string,
|
|
77
77
|
) => import("../tsl/TSLCore.js").ShaderNodeObject<UniformNode<TValue>>;
|
|
@@ -32,17 +32,3 @@ declare module "../tsl/TSLCore.js" {
|
|
|
32
32
|
toVarIntent: (node: Node) => Node;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated Use ".toVar()" instead.
|
|
38
|
-
*/
|
|
39
|
-
export const temp: (node: Node, name?: string | null) => ShaderNodeObject<VarNode>;
|
|
40
|
-
|
|
41
|
-
declare module "../tsl/TSLCore.js" {
|
|
42
|
-
interface NodeElements {
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated Use ".toVar()" instead.
|
|
45
|
-
*/
|
|
46
|
-
temp: typeof temp;
|
|
47
|
-
}
|
|
48
|
-
}
|