@types/three 0.178.1 → 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 +2 -3
- 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 +3 -2
- three/examples/jsm/loaders/EXRLoader.d.ts +18 -5
- 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/loaders/USDLoader.d.ts +9 -0
- three/examples/jsm/loaders/USDZLoader.d.ts +11 -8
- 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/TRAANode.d.ts +22 -0
- three/examples/jsm/tsl/display/boxBlur.d.ts +11 -0
- three/examples/jsm/tsl/display/hashBlur.d.ts +1 -1
- three/package.json +4 -4
- three/src/Three.Core.d.ts +2 -0
- three/src/Three.TSL.d.ts +84 -17
- three/src/animation/AnimationClip.d.ts +5 -0
- three/src/animation/KeyframeTrack.d.ts +7 -2
- three/src/animation/tracks/BooleanKeyframeTrack.d.ts +2 -2
- three/src/animation/tracks/StringKeyframeTrack.d.ts +2 -2
- three/src/cameras/Camera.d.ts +15 -8
- three/src/constants.d.ts +6 -2
- three/{examples/jsm/misc → src/core}/Timer.d.ts +3 -17
- three/src/helpers/SkeletonHelper.d.ts +7 -12
- three/src/loaders/FileLoader.d.ts +2 -2
- three/src/loaders/ImageBitmapLoader.d.ts +9 -9
- three/src/loaders/Loader.d.ts +1 -0
- three/src/loaders/LoadingManager.d.ts +23 -19
- 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 -6
- 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 +22 -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 +22 -1
- three/src/math/ColorManagement.d.ts +1 -1
- three/src/math/Frustum.d.ts +1 -1
- three/src/math/Line3.d.ts +1 -0
- three/src/math/Matrix4.d.ts +2 -0
- three/src/nodes/Nodes.d.ts +4 -0
- three/src/nodes/TSL.d.ts +4 -0
- three/src/nodes/accessors/Camera.d.ts +2 -0
- three/src/nodes/accessors/TextureNode.d.ts +4 -0
- three/src/nodes/core/ContextNode.d.ts +11 -1
- three/src/nodes/core/Node.d.ts +13 -13
- three/src/nodes/core/UniformNode.d.ts +13 -4
- three/src/nodes/core/VarNode.d.ts +11 -15
- three/src/nodes/display/PassNode.d.ts +10 -0
- 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/ComputeNode.d.ts +15 -6
- three/src/nodes/gpgpu/SubgroupFunctionNode.d.ts +100 -0
- three/src/nodes/materialx/MaterialXNodes.d.ts +85 -20
- three/src/nodes/materialx/lib/mx_noise.d.ts +28 -0
- three/src/nodes/math/BitcastNode.d.ts +25 -0
- three/src/nodes/math/MathNode.d.ts +10 -5
- three/src/nodes/tsl/TSLCore.d.ts +16 -0
- three/src/nodes/utils/EventNode.d.ts +21 -0
- three/src/nodes/utils/RTTNode.d.ts +2 -0
- 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/Color4.d.ts +2 -2
- three/src/renderers/common/Renderer.d.ts +17 -9
- three/src/renderers/common/SampledTexture.d.ts +2 -9
- three/src/renderers/common/Sampler.d.ts +9 -3
- three/src/renderers/common/Storage3DTexture.d.ts +2 -0
- three/src/renderers/common/StorageArrayTexture.d.ts +2 -0
- three/src/renderers/common/StorageTexture.d.ts +2 -0
- 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 +11 -0
- three/src/renderers/common/nodes/NodeLibrary.d.ts +5 -5
- three/src/renderers/webgl/WebGLCapabilities.d.ts +2 -2
- three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +0 -1
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +1 -1
- three/src/renderers/webxr/WebXRDepthSensing.d.ts +4 -5
- three/src/renderers/webxr/WebXRManager.d.ts +4 -2
- 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 +11 -0
- three/src/textures/Texture.d.ts +1 -1
- three/examples/jsm/loaders/RGBMLoader.d.ts +0 -37
- three/examples/jsm/tsl/display/TRAAPassNode.d.ts +0 -15
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Loader } from "./Loader.js";
|
|
2
2
|
|
|
3
|
-
export const DefaultLoadingManager: LoadingManager;
|
|
4
|
-
|
|
5
3
|
/**
|
|
6
4
|
* Handles and keeps track of loaded and pending data.
|
|
7
5
|
*/
|
|
8
|
-
|
|
6
|
+
declare class LoadingManager {
|
|
9
7
|
constructor(
|
|
10
8
|
onLoad?: () => void,
|
|
11
9
|
onProgress?: (url: string, loaded: number, total: number) => void,
|
|
@@ -18,7 +16,7 @@ export class LoadingManager {
|
|
|
18
16
|
* @param loaded The number of items already loaded so far.
|
|
19
17
|
* @param total The total amount of items to be loaded.
|
|
20
18
|
*/
|
|
21
|
-
onStart
|
|
19
|
+
onStart: ((url: string, loaded: number, total: number) => void) | undefined;
|
|
22
20
|
|
|
23
21
|
/**
|
|
24
22
|
* Will be called when all items finish loading.
|
|
@@ -42,28 +40,34 @@ export class LoadingManager {
|
|
|
42
40
|
*/
|
|
43
41
|
onError: (url: string) => void;
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
setURLModifier(callback?: (url: string) => string): this;
|
|
43
|
+
abortController: AbortController;
|
|
44
|
+
|
|
45
|
+
itemStart: (url: string) => void;
|
|
46
|
+
itemEnd: (url: string) => void;
|
|
47
|
+
itemError: (url: string) => void;
|
|
52
48
|
|
|
53
49
|
/**
|
|
54
50
|
* Given a URL, uses the URL modifier callback (if any) and returns a resolved URL.
|
|
55
51
|
* If no URL modifier is set, returns the original URL.
|
|
56
52
|
* @param url the url to load
|
|
57
53
|
*/
|
|
58
|
-
resolveURL(url: string)
|
|
54
|
+
resolveURL: (url: string) => string;
|
|
59
55
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
/**
|
|
57
|
+
* If provided, the callback will be passed each resource URL before a request is sent.
|
|
58
|
+
* The callback may return the original URL, or a new URL to override loading behavior.
|
|
59
|
+
* This behavior can be used to load assets from .ZIP files, drag-and-drop APIs, and Data URIs.
|
|
60
|
+
* @param callback URL modifier callback. Called with url argument, and must return resolvedURL.
|
|
61
|
+
*/
|
|
62
|
+
setURLModifier: (callback?: (url: string) => string) => this;
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
addHandler: (regex: RegExp, loader: Loader) => this;
|
|
65
|
+
removeHandler: (regex: RegExp) => this;
|
|
66
|
+
getHandler: (file: string) => Loader | null;
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
removeHandler(regex: RegExp): this;
|
|
68
|
-
getHandler(file: string): Loader | null;
|
|
68
|
+
abort: () => this;
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
declare const DefaultLoadingManager: LoadingManager;
|
|
72
|
+
|
|
73
|
+
export { DefaultLoadingManager, LoadingManager };
|
|
@@ -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
|
|
@@ -16,12 +16,6 @@ export interface Line2NodeMaterialNodeProperties extends NodeMaterialNodePropert
|
|
|
16
16
|
* @default 0
|
|
17
17
|
*/
|
|
18
18
|
dashOffset: number;
|
|
19
|
-
/**
|
|
20
|
-
* The line width.
|
|
21
|
-
*
|
|
22
|
-
* @default 0
|
|
23
|
-
*/
|
|
24
|
-
lineWidth: number;
|
|
25
19
|
/**
|
|
26
20
|
* Defines the lines color.
|
|
27
21
|
*
|
|
@@ -93,6 +87,7 @@ declare class Line2NodeMaterial extends NodeMaterial {
|
|
|
93
87
|
* @default true
|
|
94
88
|
*/
|
|
95
89
|
readonly isLine2NodeMaterial: boolean;
|
|
90
|
+
setValues(values?: Line2NodeMaterialParameters): void;
|
|
96
91
|
}
|
|
97
92
|
|
|
98
93
|
// 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
|
|
@@ -7,6 +7,11 @@ export interface PointsNodeMaterialNodeProperties extends SpriteNodeMaterialNode
|
|
|
7
7
|
/**
|
|
8
8
|
* This node property provides an additional way to set the point size.
|
|
9
9
|
*
|
|
10
|
+
* Note that WebGPU only supports point primitives with 1 pixel size. Consequently,
|
|
11
|
+
* this node has no effect when the material is used with {@link Points} and a WebGPU
|
|
12
|
+
* backend. If an application wants to render points with a size larger than 1 pixel,
|
|
13
|
+
* the material should be used with {@link Sprite} and instancing.
|
|
14
|
+
*
|
|
10
15
|
* @default null
|
|
11
16
|
*/
|
|
12
17
|
sizeNode: Node;
|
|
@@ -21,6 +26,22 @@ export interface PointsNodeMaterialParameters
|
|
|
21
26
|
|
|
22
27
|
/**
|
|
23
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
|
+
* ```
|
|
24
45
|
*/
|
|
25
46
|
declare class PointsNodeMaterial extends SpriteNodeMaterial {
|
|
26
47
|
constructor(parameters?: PointsNodeMaterialParameters);
|
|
@@ -30,6 +51,7 @@ declare class PointsNodeMaterial extends SpriteNodeMaterial {
|
|
|
30
51
|
* @default true
|
|
31
52
|
*/
|
|
32
53
|
readonly isPointsNodeMaterial: boolean;
|
|
54
|
+
setValues(values?: PointsNodeMaterialParameters): void;
|
|
33
55
|
}
|
|
34
56
|
|
|
35
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.
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { BufferAttribute } from "../../../core/BufferAttribute.js";
|
|
2
|
+
import { Light } from "../../../lights/Light.js";
|
|
2
3
|
import { Matrix4 } from "../../../math/Matrix4.js";
|
|
3
4
|
import NodeBuilder from "../../../nodes/core/NodeBuilder.js";
|
|
4
5
|
import NodeFrame from "../../../nodes/core/NodeFrame.js";
|
|
6
|
+
import LightsNode from "../../../nodes/lighting/LightsNode.js";
|
|
5
7
|
import Renderer from "../../../renderers/common/Renderer.js";
|
|
6
8
|
import RenderObject from "../../../renderers/common/RenderObject.js";
|
|
7
9
|
import { Material } from "../../Material.js";
|
|
@@ -84,6 +86,9 @@ interface RenderObjectData {
|
|
|
84
86
|
worldMatrix: Matrix4;
|
|
85
87
|
version?: number;
|
|
86
88
|
}
|
|
89
|
+
interface LightData {
|
|
90
|
+
map: number;
|
|
91
|
+
}
|
|
87
92
|
/**
|
|
88
93
|
* This class is used by {@link WebGPURenderer} as management component.
|
|
89
94
|
* It's primary purpose is to determine whether render objects require a
|
|
@@ -150,9 +155,25 @@ declare class NodeMaterialObserver {
|
|
|
150
155
|
* Returns `true` if the given render object has not changed its state.
|
|
151
156
|
*
|
|
152
157
|
* @param {RenderObject} renderObject - The render object.
|
|
158
|
+
* @param {Array<Light>} lightsData - The current material lights.
|
|
153
159
|
* @return {boolean} Whether the given render object has changed its state or not.
|
|
154
160
|
*/
|
|
155
|
-
equals(renderObject: RenderObject): boolean;
|
|
161
|
+
equals(renderObject: RenderObject, lightsData: Light[]): boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Returns the lights data for the given material lights.
|
|
164
|
+
*
|
|
165
|
+
* @param {Array<Light>} materialLights - The material lights.
|
|
166
|
+
* @return {Array<Object>} The lights data for the given material lights.
|
|
167
|
+
*/
|
|
168
|
+
getLightsData(materialLights: Light[]): LightData[];
|
|
169
|
+
/**
|
|
170
|
+
* Returns the lights for the given lights node and render ID.
|
|
171
|
+
*
|
|
172
|
+
* @param {LightsNode} lightsNode - The lights node.
|
|
173
|
+
* @param {number} renderId - The render ID.
|
|
174
|
+
* @return {Array<Object>} The lights for the given lights node and render ID.
|
|
175
|
+
*/
|
|
176
|
+
getLights(lightsNode: LightsNode, renderId: number): LightData[];
|
|
156
177
|
/**
|
|
157
178
|
* Checks if the given render object requires a refresh.
|
|
158
179
|
*
|
|
@@ -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/math/Frustum.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export class Frustum {
|
|
|
21
21
|
set(p0: Plane, p1: Plane, p2: Plane, p3: Plane, p4: Plane, p5: Plane): Frustum;
|
|
22
22
|
clone(): this;
|
|
23
23
|
copy(frustum: Frustum): this;
|
|
24
|
-
setFromProjectionMatrix(m: Matrix4, coordinateSystem?: CoordinateSystem): this;
|
|
24
|
+
setFromProjectionMatrix(m: Matrix4, coordinateSystem?: CoordinateSystem, reversedDepth?: boolean): this;
|
|
25
25
|
intersectsObject(object: Object3D): boolean;
|
|
26
26
|
intersectsSprite(sprite: Sprite): boolean;
|
|
27
27
|
intersectsSphere(sphere: Sphere): boolean;
|
three/src/math/Line3.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export class Line3 {
|
|
|
24
24
|
at(t: number, target: Vector3): Vector3;
|
|
25
25
|
closestPointToPointParameter(point: Vector3, clampToLine?: boolean): number;
|
|
26
26
|
closestPointToPoint(point: Vector3, clampToLine: boolean, target: Vector3): Vector3;
|
|
27
|
+
distanceSqToLine3(line: Line3, c1?: Vector3, c2?: Vector3): number;
|
|
27
28
|
applyMatrix4(matrix: Matrix4): Line3;
|
|
28
29
|
equals(line: Line3): boolean;
|
|
29
30
|
}
|
three/src/math/Matrix4.d.ts
CHANGED
|
@@ -246,6 +246,7 @@ export class Matrix4 {
|
|
|
246
246
|
near: number,
|
|
247
247
|
far: number,
|
|
248
248
|
coordinateSystem?: CoordinateSystem,
|
|
249
|
+
reversedDepth?: boolean,
|
|
249
250
|
): this;
|
|
250
251
|
|
|
251
252
|
/**
|
|
@@ -259,6 +260,7 @@ export class Matrix4 {
|
|
|
259
260
|
near: number,
|
|
260
261
|
far: number,
|
|
261
262
|
coordinateSystem?: CoordinateSystem,
|
|
263
|
+
reversedDepth?: boolean,
|
|
262
264
|
): this;
|
|
263
265
|
|
|
264
266
|
equals(matrix: Matrix4): boolean;
|
three/src/nodes/Nodes.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export { NodeUtils };
|
|
|
53
53
|
export { default as ArrayElementNode } from "./utils/ArrayElementNode.js";
|
|
54
54
|
export { default as ConvertNode } from "./utils/ConvertNode.js";
|
|
55
55
|
export { default as DebugNode } from "./utils/DebugNode.js";
|
|
56
|
+
export { default as EventNode } from "./utils/EventNode.js";
|
|
56
57
|
export { default as FunctionOverloadingNode } from "./utils/FunctionOverloadingNode.js";
|
|
57
58
|
export { default as JoinNode } from "./utils/JoinNode.js";
|
|
58
59
|
export { default as LoopNode } from "./utils/LoopNode.js";
|
|
@@ -67,6 +68,9 @@ export { default as SplitNode } from "./utils/SplitNode.js";
|
|
|
67
68
|
export { default as SpriteSheetUVNode } from "./utils/SpriteSheetUVNode.js";
|
|
68
69
|
export { default as StorageArrayElementNode } from "./utils/StorageArrayElementNode.js";
|
|
69
70
|
|
|
71
|
+
// math
|
|
72
|
+
export { default as BitcastNode } from "./math/BitcastNode.js";
|
|
73
|
+
|
|
70
74
|
// accessors
|
|
71
75
|
export { default as BatchNode } from "./accessors/BatchNode.js";
|
|
72
76
|
export { default as BufferAttributeNode } from "./accessors/BufferAttributeNode.js";
|
three/src/nodes/TSL.d.ts
CHANGED
|
@@ -19,12 +19,14 @@ 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";
|
|
25
26
|
|
|
26
27
|
// utils
|
|
27
28
|
export * from "./utils/EquirectUV.js";
|
|
29
|
+
export * from "./utils/EventNode.js";
|
|
28
30
|
export * from "./utils/FunctionOverloadingNode.js";
|
|
29
31
|
export * from "./utils/LoopNode.js";
|
|
30
32
|
export * from "./utils/MatcapUV.js";
|
|
@@ -54,6 +56,7 @@ export * from "./accessors/BatchNode.js";
|
|
|
54
56
|
export * from "./accessors/Bitangent.js";
|
|
55
57
|
export * from "./accessors/BufferAttributeNode.js";
|
|
56
58
|
export * from "./accessors/BufferNode.js";
|
|
59
|
+
export * from "./accessors/BuiltinNode.js";
|
|
57
60
|
export * from "./accessors/Camera.js";
|
|
58
61
|
export * from "./accessors/CubeTextureNode.js";
|
|
59
62
|
export * from "./accessors/InstancedMeshNode.js";
|
|
@@ -127,6 +130,7 @@ export * from "./gpgpu/AtomicFunctionNode.js";
|
|
|
127
130
|
export * from "./gpgpu/BarrierNode.js";
|
|
128
131
|
export * from "./gpgpu/ComputeBuiltinNode.js";
|
|
129
132
|
export * from "./gpgpu/ComputeNode.js";
|
|
133
|
+
export * from "./gpgpu/SubgroupFunctionNode.js";
|
|
130
134
|
export * from "./gpgpu/WorkgroupInfoNode.js";
|
|
131
135
|
|
|
132
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>>;
|
|
@@ -38,6 +38,8 @@ export default class TextureNode extends UniformNode<Texture> {
|
|
|
38
38
|
|
|
39
39
|
sample(uvNode: Node): ShaderNodeObject<Node>;
|
|
40
40
|
|
|
41
|
+
load(uvNode: Node): ShaderNodeObject<Node>;
|
|
42
|
+
|
|
41
43
|
blur(amountNode: Node): ShaderNodeObject<Node>;
|
|
42
44
|
|
|
43
45
|
level(levelNode: Node): ShaderNodeObject<Node>;
|
|
@@ -46,6 +48,8 @@ export default class TextureNode extends UniformNode<Texture> {
|
|
|
46
48
|
|
|
47
49
|
bias(biasNode: Node): ShaderNodeObject<Node>;
|
|
48
50
|
|
|
51
|
+
getBase(): TextureNode;
|
|
52
|
+
|
|
49
53
|
compare(compareNode: Node): ShaderNodeObject<Node>;
|
|
50
54
|
|
|
51
55
|
grad(gradeNodeX: Node, gradeNodeY: Node): ShaderNodeObject<Node>;
|
|
@@ -14,11 +14,21 @@ declare class ContextNode extends Node {
|
|
|
14
14
|
export default ContextNode;
|
|
15
15
|
|
|
16
16
|
export const context: (node: Node, context?: NodeBuilderContext) => ShaderNodeObject<ContextNode>;
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
export const uniformFlow: (node: Node) => ShaderNodeObject<ContextNode>;
|
|
19
|
+
|
|
20
|
+
export const setName: (node: Node, label: string) => ShaderNodeObject<ContextNode>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated "label()" has been deprecated. Use "setName()" instead.
|
|
24
|
+
*/
|
|
25
|
+
export function label(node: Node, label: string): ShaderNodeObject<ContextNode>;
|
|
18
26
|
|
|
19
27
|
declare module "../tsl/TSLCore.js" {
|
|
20
28
|
interface NodeElements {
|
|
21
29
|
context: typeof context;
|
|
22
30
|
label: typeof label;
|
|
31
|
+
uniformFlow: typeof uniformFlow;
|
|
32
|
+
setName: typeof setName;
|
|
23
33
|
}
|
|
24
34
|
}
|