@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
|
@@ -5,7 +5,8 @@ export type ScreenNodeScope =
|
|
|
5
5
|
| typeof ScreenNode.COORDINATE
|
|
6
6
|
| typeof ScreenNode.VIEWPORT
|
|
7
7
|
| typeof ScreenNode.SIZE
|
|
8
|
-
| typeof ScreenNode.UV
|
|
8
|
+
| typeof ScreenNode.UV
|
|
9
|
+
| typeof ScreenNode.DPR;
|
|
9
10
|
|
|
10
11
|
declare class ScreenNode extends Node {
|
|
11
12
|
scope: ScreenNodeScope;
|
|
@@ -18,12 +19,14 @@ declare class ScreenNode extends Node {
|
|
|
18
19
|
static VIEWPORT: "viewport";
|
|
19
20
|
static SIZE: "size";
|
|
20
21
|
static UV: "uv";
|
|
22
|
+
static DPR: "dpr";
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export default ScreenNode;
|
|
24
26
|
|
|
25
27
|
// Screen
|
|
26
28
|
|
|
29
|
+
export const screenDPR: ShaderNodeObject<ScreenNode>;
|
|
27
30
|
export const screenUV: ShaderNodeObject<ScreenNode>;
|
|
28
31
|
export const screenSize: ShaderNodeObject<ScreenNode>;
|
|
29
32
|
export const screenCoordinate: ShaderNodeObject<ScreenNode>;
|
|
@@ -16,7 +16,7 @@ export default ToneMappingNode;
|
|
|
16
16
|
|
|
17
17
|
export const toneMapping: (
|
|
18
18
|
mapping: ToneMapping,
|
|
19
|
-
exposure: Node,
|
|
19
|
+
exposure: Node | number,
|
|
20
20
|
color?: Node,
|
|
21
21
|
) => ShaderNodeObject<ToneMappingNode>;
|
|
22
22
|
export const toneMappingExposure: ShaderNodeObject<RendererReferenceNode>;
|
|
@@ -26,7 +26,7 @@ declare module "../tsl/TSLCore.js" {
|
|
|
26
26
|
toneMapping: (
|
|
27
27
|
color: Node,
|
|
28
28
|
mapping?: ToneMapping,
|
|
29
|
-
exposure?: Node,
|
|
29
|
+
exposure?: Node | number,
|
|
30
30
|
) => ShaderNodeObject<ToneMappingNode>;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { DepthTexture } from "../../textures/DepthTexture.js";
|
|
1
2
|
import Node from "../core/Node.js";
|
|
2
3
|
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
4
|
import ViewportTextureNode from "./ViewportTextureNode.js";
|
|
4
5
|
|
|
5
6
|
declare class ViewportDepthTextureNode extends ViewportTextureNode {
|
|
6
7
|
constructor(uvNode?: Node, levelNode?: Node | null);
|
|
8
|
+
|
|
9
|
+
getTextureForReference(): DepthTexture;
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
export default ViewportDepthTextureNode;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { FramebufferTexture } from "../../textures/FramebufferTexture.js";
|
|
1
2
|
import Node from "../core/Node.js";
|
|
2
3
|
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
4
|
import ViewportTextureNode from "./ViewportTextureNode.js";
|
|
4
5
|
|
|
5
6
|
declare class ViewportSharedTextureNode extends ViewportTextureNode {
|
|
6
7
|
constructor(uvNode?: Node, levelNode?: Node | null);
|
|
8
|
+
|
|
9
|
+
getTextureForReference(): FramebufferTexture;
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
export default ViewportSharedTextureNode;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { RenderTarget } from "../../core/RenderTarget.js";
|
|
1
2
|
import { FramebufferTexture } from "../../textures/FramebufferTexture.js";
|
|
3
|
+
import { Texture } from "../../textures/Texture.js";
|
|
2
4
|
import TextureNode from "../accessors/TextureNode.js";
|
|
3
5
|
import { NodeUpdateType } from "../core/constants.js";
|
|
4
6
|
import Node from "../core/Node.js";
|
|
@@ -12,6 +14,8 @@ declare class ViewportTextureNode extends TextureNode {
|
|
|
12
14
|
updateBeforeType: NodeUpdateType;
|
|
13
15
|
|
|
14
16
|
constructor(uvNode?: Node, levelNode?: Node | null, framebufferTexture?: FramebufferTexture | null);
|
|
17
|
+
|
|
18
|
+
getTextureForReference(reference?: RenderTarget | null): Texture;
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
export default ViewportTextureNode;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import TempNode from "../core/TempNode.js";
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
|
+
|
|
5
|
+
export type SubgroupFunctionNodeMethod0 = typeof SubgroupFunctionNode.SUBGROUP_ELECT;
|
|
6
|
+
|
|
7
|
+
export type SubgroupFunctionNodeMethod1 =
|
|
8
|
+
| typeof SubgroupFunctionNode.SUBGROUP_BALLOT
|
|
9
|
+
| typeof SubgroupFunctionNode.SUBGROUP_ADD
|
|
10
|
+
| typeof SubgroupFunctionNode.SUBGROUP_INCLUSIVE_ADD
|
|
11
|
+
| typeof SubgroupFunctionNode.SUBGROUP_EXCLUSIVE_AND
|
|
12
|
+
| typeof SubgroupFunctionNode.SUBGROUP_MUL
|
|
13
|
+
| typeof SubgroupFunctionNode.SUBGROUP_INCLUSIVE_MUL
|
|
14
|
+
| typeof SubgroupFunctionNode.SUBGROUP_EXCLUSIVE_MUL
|
|
15
|
+
| typeof SubgroupFunctionNode.SUBGROUP_AND
|
|
16
|
+
| typeof SubgroupFunctionNode.SUBGROUP_OR
|
|
17
|
+
| typeof SubgroupFunctionNode.SUBGROUP_XOR
|
|
18
|
+
| typeof SubgroupFunctionNode.SUBGROUP_MIN
|
|
19
|
+
| typeof SubgroupFunctionNode.SUBGROUP_MAX
|
|
20
|
+
| typeof SubgroupFunctionNode.SUBGROUP_ALL
|
|
21
|
+
| typeof SubgroupFunctionNode.SUBGROUP_ANY
|
|
22
|
+
| typeof SubgroupFunctionNode.SUBGROUP_BROADCAST_FIRST
|
|
23
|
+
| typeof SubgroupFunctionNode.QUAD_SWAP_X
|
|
24
|
+
| typeof SubgroupFunctionNode.QUAD_SWAP_Y
|
|
25
|
+
| typeof SubgroupFunctionNode.QUAD_SWAP_DIAGONAL;
|
|
26
|
+
|
|
27
|
+
export type SubgroupFunctionNodeMethod2 =
|
|
28
|
+
| typeof SubgroupFunctionNode.SUBGROUP_BROADCAST
|
|
29
|
+
| typeof SubgroupFunctionNode.SUBGROUP_SHUFFLE
|
|
30
|
+
| typeof SubgroupFunctionNode.SUBGROUP_SHUFFLE_XOR
|
|
31
|
+
| typeof SubgroupFunctionNode.SUBGROUP_SHUFFLE_UP
|
|
32
|
+
| typeof SubgroupFunctionNode.SUBGROUP_SHUFFLE_DOWN
|
|
33
|
+
| typeof SubgroupFunctionNode.QUAD_BROADCAST;
|
|
34
|
+
|
|
35
|
+
declare class SubgroupFunctionNode extends TempNode {
|
|
36
|
+
constructor(method: SubgroupFunctionNodeMethod0);
|
|
37
|
+
constructor(method: SubgroupFunctionNodeMethod1, aNode: Node);
|
|
38
|
+
constructor(method: SubgroupFunctionNodeMethod2, aNode: Node, bNode: Node);
|
|
39
|
+
|
|
40
|
+
// 0 inputs
|
|
41
|
+
static SUBGROUP_ELECT: "subgroupElect";
|
|
42
|
+
|
|
43
|
+
// 1 input
|
|
44
|
+
static SUBGROUP_BALLOT: "subgroupBallot";
|
|
45
|
+
static SUBGROUP_ADD: "subgroupAdd";
|
|
46
|
+
static SUBGROUP_INCLUSIVE_ADD: "subgroupInclusiveAdd";
|
|
47
|
+
static SUBGROUP_EXCLUSIVE_AND: "subgroupExclusiveAdd";
|
|
48
|
+
static SUBGROUP_MUL: "subgroupMul";
|
|
49
|
+
static SUBGROUP_INCLUSIVE_MUL: "subgroupInclusiveMul";
|
|
50
|
+
static SUBGROUP_EXCLUSIVE_MUL: "subgroupExclusiveMul";
|
|
51
|
+
static SUBGROUP_AND: "subgroupAnd";
|
|
52
|
+
static SUBGROUP_OR: "subgroupOr";
|
|
53
|
+
static SUBGROUP_XOR: "subgroupXor";
|
|
54
|
+
static SUBGROUP_MIN: "subgroupMin";
|
|
55
|
+
static SUBGROUP_MAX: "subgroupMax";
|
|
56
|
+
static SUBGROUP_ALL: "subgroupAll";
|
|
57
|
+
static SUBGROUP_ANY: "subgroupAny";
|
|
58
|
+
static SUBGROUP_BROADCAST_FIRST: "subgroupBroadcastFirst";
|
|
59
|
+
static QUAD_SWAP_X: "quadSwapX";
|
|
60
|
+
static QUAD_SWAP_Y: "quadSwapY";
|
|
61
|
+
static QUAD_SWAP_DIAGONAL: "quadSwapDiagonal";
|
|
62
|
+
|
|
63
|
+
// 2 inputs
|
|
64
|
+
static SUBGROUP_BROADCAST: "subgroupBroadcast";
|
|
65
|
+
static SUBGROUP_SHUFFLE: "subgroupShuffle";
|
|
66
|
+
static SUBGROUP_SHUFFLE_XOR: "subgroupShuffleXor";
|
|
67
|
+
static SUBGROUP_SHUFFLE_UP: "subgroupShuffleUp";
|
|
68
|
+
static SUBGROUP_SHUFFLE_DOWN: "subgroupShuffleDown";
|
|
69
|
+
static QUAD_BROADCAST: "quadBroadcast";
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export default SubgroupFunctionNode;
|
|
73
|
+
|
|
74
|
+
export const subgroupElect: () => ShaderNodeObject<Node>;
|
|
75
|
+
|
|
76
|
+
export const subgroupBallot: (pred: Node) => ShaderNodeObject<Node>;
|
|
77
|
+
export const subgroupAdd: (e: Node) => ShaderNodeObject<Node>;
|
|
78
|
+
export const subgroupInclusiveAdd: (e: Node) => ShaderNodeObject<Node>;
|
|
79
|
+
export const subgroupExclusiveAdd: (e: Node) => ShaderNodeObject<Node>;
|
|
80
|
+
export const subgroupMul: (e: Node) => ShaderNodeObject<Node>;
|
|
81
|
+
export const subgroupInclusiveMul: (e: Node) => ShaderNodeObject<Node>;
|
|
82
|
+
export const subgroupExclusiveMul: (e: Node) => ShaderNodeObject<Node>;
|
|
83
|
+
export const subgroupAnd: (e: Node) => ShaderNodeObject<Node>;
|
|
84
|
+
export const subgroupOr: (e: Node) => ShaderNodeObject<Node>;
|
|
85
|
+
export const subgroupXor: (e: Node) => ShaderNodeObject<Node>;
|
|
86
|
+
export const subgroupMin: (e: Node) => ShaderNodeObject<Node>;
|
|
87
|
+
export const subgroupMax: (e: Node) => ShaderNodeObject<Node>;
|
|
88
|
+
export const subgroupAll: () => ShaderNodeObject<Node>;
|
|
89
|
+
export const subgroupAny: () => ShaderNodeObject<Node>;
|
|
90
|
+
export const subgroupBroadcastFirst: (e: Node, id: Node) => ShaderNodeObject<Node>;
|
|
91
|
+
export const quadSwapX: (e: Node) => ShaderNodeObject<Node>;
|
|
92
|
+
export const quadSwapY: (e: Node) => ShaderNodeObject<Node>;
|
|
93
|
+
export const quadSwapDiagonal: (e: Node) => ShaderNodeObject<Node>;
|
|
94
|
+
|
|
95
|
+
export const subgroupBroadcast: (e: Node, id: Node) => ShaderNodeObject<Node>;
|
|
96
|
+
export const subgroupShuffle: (v: Node, id: Node) => ShaderNodeObject<Node>;
|
|
97
|
+
export const subgroupShuffleXor: (v: Node, mask: Node) => ShaderNodeObject<Node>;
|
|
98
|
+
export const subgroupShuffleUp: (v: Node, delta: Node) => ShaderNodeObject<Node>;
|
|
99
|
+
export const subgroupShuffleDown: (v: Node, delta: Node) => ShaderNodeObject<Node>;
|
|
100
|
+
export const quadBroadcast: (e: Node) => ShaderNodeObject<Node>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import TempNode from "../core/TempNode.js";
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
|
+
|
|
5
|
+
declare class BitcastNode extends TempNode {
|
|
6
|
+
valueNode: Node;
|
|
7
|
+
conversionType: string;
|
|
8
|
+
inputType: string | null;
|
|
9
|
+
|
|
10
|
+
readonly isBitcastNode: true;
|
|
11
|
+
|
|
12
|
+
constructor(valueNode: Node, conversionType: string, inputType: string | null);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default BitcastNode;
|
|
16
|
+
|
|
17
|
+
export const bitcast: (x: Node | number, y: string) => ShaderNodeObject<BitcastNode>;
|
|
18
|
+
|
|
19
|
+
export const floatBitsToInt: (value: Node) => ShaderNodeObject<BitcastNode>;
|
|
20
|
+
|
|
21
|
+
export const floatBitsToUint: (value: Node) => ShaderNodeObject<BitcastNode>;
|
|
22
|
+
|
|
23
|
+
export const intBitsToFloat: (value: Node) => ShaderNodeObject<BitcastNode>;
|
|
24
|
+
|
|
25
|
+
export const uintBitsToFloat: (value: Node) => ShaderNodeObject<BitcastNode>;
|
|
@@ -34,7 +34,6 @@ export type MathNodeMethod1 =
|
|
|
34
34
|
| typeof MathNode.RECIPROCAL
|
|
35
35
|
| typeof MathNode.TRUNC
|
|
36
36
|
| typeof MathNode.FWIDTH
|
|
37
|
-
| typeof MathNode.BITCAST
|
|
38
37
|
| typeof MathNode.TRANSPOSE
|
|
39
38
|
| typeof MathNode.DETERMINANT
|
|
40
39
|
| typeof MathNode.INVERSE;
|
|
@@ -95,7 +94,6 @@ export default class MathNode extends TempNode {
|
|
|
95
94
|
static RECIPROCAL: "reciprocal";
|
|
96
95
|
static TRUNC: "trunc";
|
|
97
96
|
static FWIDTH: "fwidth";
|
|
98
|
-
static BITCAST: "bitcast";
|
|
99
97
|
static TRANSPOSE: "transpose";
|
|
100
98
|
static DETERMINANT: "determinant";
|
|
101
99
|
static INVERSE: "inverse";
|
|
@@ -184,7 +182,6 @@ export const inverse: (x: Node) => ShaderNodeObject<MathNode>;
|
|
|
184
182
|
|
|
185
183
|
type Binary = (a: MathNodeParameter, b: MathNodeParameter) => ShaderNodeObject<MathNode>;
|
|
186
184
|
|
|
187
|
-
export const bitcast: Binary;
|
|
188
185
|
export const min: (
|
|
189
186
|
x: MathNodeParameter,
|
|
190
187
|
y: MathNodeParameter,
|
|
@@ -7,9 +7,15 @@ import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
|
7
7
|
|
|
8
8
|
export interface ReflectorNodeParameters {
|
|
9
9
|
target?: Object3D | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated The "resolution" parameter has been renamed to "resolutionScale".
|
|
12
|
+
*/
|
|
10
13
|
resolution?: number | undefined;
|
|
14
|
+
resolutionScale?: number | undefined;
|
|
11
15
|
generateMipmaps?: boolean | undefined;
|
|
12
16
|
bounces?: boolean | undefined;
|
|
17
|
+
depth?: boolean | undefined;
|
|
18
|
+
samples?: number | undefined;
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
declare class ReflectorNode extends TextureNode {
|
|
@@ -26,7 +32,7 @@ declare class ReflectorBaseNode extends Node {
|
|
|
26
32
|
textureNode: TextureNode;
|
|
27
33
|
|
|
28
34
|
target: Object3D;
|
|
29
|
-
|
|
35
|
+
resolutionScale: number;
|
|
30
36
|
generateMipmaps: boolean;
|
|
31
37
|
bounces: boolean;
|
|
32
38
|
|
|
@@ -40,6 +46,15 @@ declare class ReflectorBaseNode extends Node {
|
|
|
40
46
|
getVirtualCamera(camera: Camera): Camera;
|
|
41
47
|
|
|
42
48
|
getRenderTarget(camera: Camera): RenderTarget;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
|
|
52
|
+
*/
|
|
53
|
+
get resolution(): number;
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
|
|
56
|
+
*/
|
|
57
|
+
set resolution(value: number);
|
|
43
58
|
}
|
|
44
59
|
|
|
45
60
|
export const reflector: (parameters?: ReflectorNodeParameters) => ShaderNodeObject<ReflectorNode>;
|
|
@@ -3,14 +3,15 @@ import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
|
3
3
|
|
|
4
4
|
declare class SampleNode extends Node {
|
|
5
5
|
callback: (uv: Node) => Node;
|
|
6
|
+
uvNode: Node | null;
|
|
6
7
|
|
|
7
8
|
readonly isSampleNode: true;
|
|
8
9
|
|
|
9
|
-
constructor(callback: (uv: Node) => Node);
|
|
10
|
+
constructor(callback: (uv: Node) => Node, uvNode?: Node | null);
|
|
10
11
|
|
|
11
12
|
sample(uv: Node): Node;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export default SampleNode;
|
|
15
16
|
|
|
16
|
-
export const sample: (callback: (uv: Node) => Node) => ShaderNodeObject<SampleNode>;
|
|
17
|
+
export const sample: (callback: (uv: Node) => Node, uv?: Node | null) => ShaderNodeObject<SampleNode>;
|
three/src/nodes/utils/Timer.d.ts
CHANGED
|
@@ -4,18 +4,3 @@ import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
|
4
4
|
export const time: ShaderNodeObject<Node>;
|
|
5
5
|
export const deltaTime: ShaderNodeObject<Node>;
|
|
6
6
|
export const frameId: ShaderNodeObject<Node>;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Use "time" instead.
|
|
10
|
-
*/
|
|
11
|
-
export const timerLocal: (timeScale?: number) => ShaderNodeObject<Node>;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated Use "time" instead.
|
|
15
|
-
*/
|
|
16
|
-
export const timerGlobal: (timeScale?: number) => ShaderNodeObject<Node>;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Use "deltaTime" instead.
|
|
20
|
-
*/
|
|
21
|
-
export const timerDelta: (timeScale?: number) => ShaderNodeObject<Node>;
|
|
@@ -28,7 +28,6 @@ export interface InstancedMeshEventMap extends Object3DEventMap {
|
|
|
28
28
|
* A special version of {@link THREE.Mesh | Mesh} with instanced rendering support
|
|
29
29
|
* @remarks
|
|
30
30
|
* Use {@link InstancedMesh} if you have to render a large number of objects with the same geometry and material(s) but with different world transformations
|
|
31
|
-
* @remarks
|
|
32
31
|
* The usage of {@link InstancedMesh} will help you to reduce the number of draw calls and thus improve the overall rendering performance in your application.
|
|
33
32
|
* @see Example: {@link https://threejs.org/examples/#webgl_instancing_dynamic | WebGL / instancing / dynamic}
|
|
34
33
|
* @see Example: {@link https://threejs.org/examples/#webgl_instancing_performance | WebGL / instancing / performance}
|
|
@@ -76,8 +75,8 @@ export class InstancedMesh<
|
|
|
76
75
|
* @remarks
|
|
77
76
|
* The `count` value passed into the {@link InstancedMesh | constructor} represents the **maximum** number of instances of this mesh.
|
|
78
77
|
* You can change the number of instances at runtime to an integer value in the range `[0, count]`.
|
|
79
|
-
*
|
|
80
|
-
*
|
|
78
|
+
* If you need more instances than the original `count` value, you have to create a new InstancedMesh.
|
|
79
|
+
* Expects a `Integer`
|
|
81
80
|
*/
|
|
82
81
|
count: number;
|
|
83
82
|
|
|
@@ -12,8 +12,6 @@ import { Vector2 } from "../math/Vector2.js";
|
|
|
12
12
|
import { Vector3 } from "../math/Vector3.js";
|
|
13
13
|
import { Vector4 } from "../math/Vector4.js";
|
|
14
14
|
import { Scene } from "../scenes/Scene.js";
|
|
15
|
-
import { Data3DTexture } from "../textures/Data3DTexture.js";
|
|
16
|
-
import { DataArrayTexture } from "../textures/DataArrayTexture.js";
|
|
17
15
|
import { OffscreenCanvas, Texture } from "../textures/Texture.js";
|
|
18
16
|
import { WebGLCapabilities, WebGLCapabilitiesParameters } from "./webgl/WebGLCapabilities.js";
|
|
19
17
|
import { WebGLExtensions } from "./webgl/WebGLExtensions.js";
|
|
@@ -456,29 +454,6 @@ export class WebGLRenderer {
|
|
|
456
454
|
dstLevel?: number,
|
|
457
455
|
): void;
|
|
458
456
|
|
|
459
|
-
/**
|
|
460
|
-
* @deprecated Use "copyTextureToTexture" instead.
|
|
461
|
-
*
|
|
462
|
-
* Copies the pixels of a texture in the bounds `srcRegion` in the destination texture starting from the given
|
|
463
|
-
* position. The `depthTexture` and `texture` property of 3D render targets are supported as well.
|
|
464
|
-
*
|
|
465
|
-
* When using render target textures as `srcTexture` and `dstTexture`, you must make sure both render targets are
|
|
466
|
-
* initialized e.g. via {@link .initRenderTarget}().
|
|
467
|
-
*
|
|
468
|
-
* @param srcTexture Specifies the source texture.
|
|
469
|
-
* @param dstTexture Specifies the destination texture.
|
|
470
|
-
* @param srcRegion Specifies the bounds
|
|
471
|
-
* @param dstPosition Specifies the pixel offset into the dstTexture where the copy will occur.
|
|
472
|
-
* @param level Specifies the destination mipmap level of the texture.
|
|
473
|
-
*/
|
|
474
|
-
copyTextureToTexture3D(
|
|
475
|
-
srcTexture: Texture,
|
|
476
|
-
dstTexture: Data3DTexture | DataArrayTexture,
|
|
477
|
-
srcRegion?: Box3 | null,
|
|
478
|
-
dstPosition?: Vector3 | null,
|
|
479
|
-
level?: number,
|
|
480
|
-
): void;
|
|
481
|
-
|
|
482
457
|
/**
|
|
483
458
|
* Initializes the given WebGLRenderTarget memory. Useful for initializing a render target so data can be copied
|
|
484
459
|
* into it using {@link WebGLRenderer.copyTextureToTexture} before it has been rendered to.
|
|
@@ -30,7 +30,7 @@ declare class Attributes extends DataMap<{
|
|
|
30
30
|
* Deletes the data for the given attribute.
|
|
31
31
|
*
|
|
32
32
|
* @param {BufferAttribute} attribute - The attribute.
|
|
33
|
-
* @return {Object
|
|
33
|
+
* @return {?Object} The deleted attribute data.
|
|
34
34
|
*/
|
|
35
35
|
delete(attribute: BufferAttribute | InterleavedBufferAttribute): Data;
|
|
36
36
|
/**
|
|
@@ -742,7 +742,7 @@ declare class Renderer {
|
|
|
742
742
|
* if the renderer has been initialized.
|
|
743
743
|
*
|
|
744
744
|
* @param {Node|Array<Node>} computeNodes - The compute node(s).
|
|
745
|
-
* @param {Array<number>|number} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count.
|
|
745
|
+
* @param {?(Array<number>|number)} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count.
|
|
746
746
|
* @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized.
|
|
747
747
|
*/
|
|
748
748
|
compute(
|
|
@@ -754,7 +754,7 @@ declare class Renderer {
|
|
|
754
754
|
*
|
|
755
755
|
* @async
|
|
756
756
|
* @param {Node|Array<Node>} computeNodes - The compute node(s).
|
|
757
|
-
* @param {Array<number>|number} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count.
|
|
757
|
+
* @param {?(Array<number>|number)} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count.
|
|
758
758
|
* @return {Promise} A Promise that resolve when the compute has finished.
|
|
759
759
|
*/
|
|
760
760
|
computeAsync(
|
|
@@ -806,7 +806,7 @@ declare class Renderer {
|
|
|
806
806
|
* Copies the current bound framebuffer into the given texture.
|
|
807
807
|
*
|
|
808
808
|
* @param {FramebufferTexture} framebufferTexture - The texture.
|
|
809
|
-
* @param {?Vector2|Vector4} [rectangle=null] - A two or four dimensional vector that defines the rectangular portion of the framebuffer that should be copied.
|
|
809
|
+
* @param {?(Vector2|Vector4)} [rectangle=null] - A two or four dimensional vector that defines the rectangular portion of the framebuffer that should be copied.
|
|
810
810
|
*/
|
|
811
811
|
copyFramebufferToTexture(framebufferTexture: FramebufferTexture, rectangle?: Rectangle | null): void;
|
|
812
812
|
/**
|
|
@@ -110,7 +110,7 @@ declare class Textures extends DataMap<{
|
|
|
110
110
|
*/
|
|
111
111
|
getMipLevels(texture: Texture, width: number, height: number): number;
|
|
112
112
|
/**
|
|
113
|
-
* Returns `true` if the given texture
|
|
113
|
+
* Returns `true` if the given texture makes use of mipmapping.
|
|
114
114
|
*
|
|
115
115
|
* @param {Texture} texture - The texture.
|
|
116
116
|
* @return {boolean} Whether mipmaps are required or not.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import RenderContext from "./RenderContext.js";
|
|
2
1
|
/**
|
|
3
2
|
* Abstract base class of a timestamp query pool.
|
|
4
3
|
*
|
|
@@ -19,13 +18,13 @@ declare abstract class TimestampQueryPool {
|
|
|
19
18
|
*/
|
|
20
19
|
constructor(maxQueries?: number);
|
|
21
20
|
/**
|
|
22
|
-
* Allocate queries for a specific
|
|
21
|
+
* Allocate queries for a specific uid.
|
|
23
22
|
*
|
|
24
23
|
* @abstract
|
|
25
|
-
* @param {
|
|
24
|
+
* @param {string} uid - A unique identifier for the render context.
|
|
26
25
|
* @returns {?number}
|
|
27
26
|
*/
|
|
28
|
-
abstract allocateQueriesForContext(
|
|
27
|
+
abstract allocateQueriesForContext(uid: string): number | null;
|
|
29
28
|
/**
|
|
30
29
|
* Resolve all timestamps and return data (or process them).
|
|
31
30
|
*
|
|
@@ -78,6 +78,7 @@ declare class XRManager extends EventDispatcher<XRManagerEventMap> {
|
|
|
78
78
|
_controllerInputSources: (XRInputSource | null)[];
|
|
79
79
|
_xrRenderTarget: XRRenderTarget | null;
|
|
80
80
|
_layers: XRLayerObject[];
|
|
81
|
+
_sessionUsesLayers: boolean;
|
|
81
82
|
_supportsLayers: boolean;
|
|
82
83
|
_supportsGlBinding: boolean;
|
|
83
84
|
_frameBufferTargets:
|
|
@@ -208,6 +209,15 @@ declare class XRManager extends EventDispatcher<XRManagerEventMap> {
|
|
|
208
209
|
* @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session.
|
|
209
210
|
*/
|
|
210
211
|
getEnvironmentBlendMode(): XREnvironmentBlendMode | undefined;
|
|
212
|
+
/**
|
|
213
|
+
* Returns the current XR binding.
|
|
214
|
+
*
|
|
215
|
+
* Creates a new binding if needed and the browser is
|
|
216
|
+
* capable of doing so.
|
|
217
|
+
*
|
|
218
|
+
* @return {?XRWebGLBinding} The XR binding. Returns `null` if one cannot be created.
|
|
219
|
+
*/
|
|
220
|
+
getBinding(): XRWebGLBinding | null;
|
|
211
221
|
/**
|
|
212
222
|
* Returns the current XR frame.
|
|
213
223
|
*
|
|
@@ -92,17 +92,17 @@ declare class NodeLibrary {
|
|
|
92
92
|
/**
|
|
93
93
|
* Adds a node class definition for the given type to the provided type library.
|
|
94
94
|
*
|
|
95
|
-
* @param {
|
|
95
|
+
* @param {Node.constructor} nodeClass - The node class definition.
|
|
96
96
|
* @param {number|string} type - The object type.
|
|
97
|
-
* @param {Map} library - The type library.
|
|
97
|
+
* @param {Map<number|string,Node.constructor>} library - The type library.
|
|
98
98
|
*/
|
|
99
99
|
addType<TNodeClass, TType>(nodeClass: TNodeClass, type: TType, library: Map<TType, TNodeClass>): void;
|
|
100
100
|
/**
|
|
101
101
|
* Adds a node class definition for the given class definition to the provided type library.
|
|
102
102
|
*
|
|
103
|
-
* @param {
|
|
104
|
-
* @param {
|
|
105
|
-
* @param {WeakMap} library - The type library.
|
|
103
|
+
* @param {Node.constructor} nodeClass - The node class definition.
|
|
104
|
+
* @param {Node.constructor} baseClass - The class definition.
|
|
105
|
+
* @param {WeakMap<Node.constructor, Node.constructor>} library - The type library.
|
|
106
106
|
*/
|
|
107
107
|
addClass<TNodeClass, TBaseClass extends object>(
|
|
108
108
|
nodeClass: TNodeClass,
|
|
@@ -39,9 +39,9 @@ export class CompressedTexture extends Texture {
|
|
|
39
39
|
* @param colorSpace See {@link Texture.colorSpace .colorSpace}. Default {@link NoColorSpace}
|
|
40
40
|
*/
|
|
41
41
|
constructor(
|
|
42
|
-
mipmaps
|
|
43
|
-
width
|
|
44
|
-
height
|
|
42
|
+
mipmaps: CompressedTextureMipmap[],
|
|
43
|
+
width: number,
|
|
44
|
+
height: number,
|
|
45
45
|
format?: CompressedPixelFormat,
|
|
46
46
|
type?: TextureDataType,
|
|
47
47
|
mapping?: Mapping,
|
|
@@ -71,7 +71,7 @@ export class CompressedTexture extends Texture {
|
|
|
71
71
|
* The mipmaps array should contain objects with data, width and height. The mipmaps should be of the correct
|
|
72
72
|
* format and type.
|
|
73
73
|
*/
|
|
74
|
-
mipmaps: CompressedTextureMipmap[]
|
|
74
|
+
mipmaps: CompressedTextureMipmap[];
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* @override
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MagnificationTextureFilter, MinificationTextureFilter, Wrapping } from "../constants.js";
|
|
2
|
+
import { TypedArray } from "../core/BufferAttribute.js";
|
|
2
3
|
import { TextureImageData } from "./DataTexture.js";
|
|
3
4
|
import { Texture } from "./Texture.js";
|
|
4
5
|
|
|
@@ -40,7 +41,7 @@ export class Data3DTexture extends Texture {
|
|
|
40
41
|
* @param height Height of the texture. Default `1`.
|
|
41
42
|
* @param depth Depth of the texture. Default `1`.
|
|
42
43
|
*/
|
|
43
|
-
constructor(data?:
|
|
44
|
+
constructor(data?: TypedArray | null, width?: number, height?: number, depth?: number);
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
47
|
* Read-only flag to check if a given object is of type {@link Data3DTexture}.
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
TextureDataType,
|
|
7
7
|
Wrapping,
|
|
8
8
|
} from "../constants.js";
|
|
9
|
+
import { TypedArray } from "../core/BufferAttribute.js";
|
|
9
10
|
import { Texture } from "./Texture.js";
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -51,7 +52,7 @@ export class DataTexture extends Texture {
|
|
|
51
52
|
* @param colorSpace See {@link Texture.colorSpace | .colorSpace}. Default {@link NoColorSpace}
|
|
52
53
|
*/
|
|
53
54
|
constructor(
|
|
54
|
-
data?:
|
|
55
|
+
data?: TypedArray | null,
|
|
55
56
|
width?: number,
|
|
56
57
|
height?: number,
|
|
57
58
|
format?: PixelFormat,
|
|
@@ -111,7 +112,7 @@ export class DataTexture extends Texture {
|
|
|
111
112
|
}
|
|
112
113
|
|
|
113
114
|
export interface TextureImageData {
|
|
114
|
-
data:
|
|
115
|
+
data: TypedArray;
|
|
115
116
|
height: number;
|
|
116
117
|
width: number;
|
|
117
118
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Texture } from "./Texture.js";
|
|
2
2
|
|
|
3
3
|
declare class ExternalTexture extends Texture {
|
|
4
|
-
sourceTexture: WebGLTexture | null;
|
|
4
|
+
sourceTexture: WebGLTexture | GPUTexture | null;
|
|
5
5
|
|
|
6
6
|
readonly isExternalTexture: true;
|
|
7
7
|
|
|
8
|
-
constructor(sourceTexture?: WebGLTexture | null);
|
|
8
|
+
constructor(sourceTexture?: WebGLTexture | GPUTexture | null);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export { ExternalTexture };
|
three/src/textures/Texture.d.ts
CHANGED
|
@@ -207,7 +207,7 @@ export class Texture extends EventDispatcher<{ dispose: {} }> {
|
|
|
207
207
|
* Array of user-specified mipmaps
|
|
208
208
|
* @defaultValue `[]`
|
|
209
209
|
*/
|
|
210
|
-
mipmaps: CompressedTextureMipmap[] | CubeTexture[] | HTMLCanvasElement[]
|
|
210
|
+
mipmaps: CompressedTextureMipmap[] | CubeTexture[] | HTMLCanvasElement[];
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
213
|
* How the image is applied to the object.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { CubeTexture, DataTextureLoader, LoadingManager, PixelFormat, TextureDataType } from "three";
|
|
2
|
-
|
|
3
|
-
export interface RGBM {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
data: Uint16Array | Float32Array;
|
|
7
|
-
header: string;
|
|
8
|
-
format: PixelFormat;
|
|
9
|
-
type: TextureDataType;
|
|
10
|
-
flipY: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export class RGBMLoader extends DataTextureLoader {
|
|
14
|
-
type: TextureDataType;
|
|
15
|
-
|
|
16
|
-
maxRange: number;
|
|
17
|
-
|
|
18
|
-
constructor(manager?: LoadingManager);
|
|
19
|
-
|
|
20
|
-
loadCubemap(
|
|
21
|
-
urls: string[],
|
|
22
|
-
onLoad?: (texture: CubeTexture) => void,
|
|
23
|
-
onProgress?: (event: ProgressEvent) => void,
|
|
24
|
-
onError?: (event: ErrorEvent) => void,
|
|
25
|
-
): CubeTexture;
|
|
26
|
-
|
|
27
|
-
loadCubemapAsync(
|
|
28
|
-
urls: string[],
|
|
29
|
-
onProgress?: (event: ProgressEvent) => void,
|
|
30
|
-
): Promise<CubeTexture>;
|
|
31
|
-
|
|
32
|
-
parse(buffer: ArrayBuffer): RGBM;
|
|
33
|
-
|
|
34
|
-
setDataType(dataType: TextureDataType): this;
|
|
35
|
-
|
|
36
|
-
setMaxRange(value: number): this;
|
|
37
|
-
}
|