@types/three 0.163.0 → 0.164.1
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/animation/CCDIKSolver.d.ts +19 -6
- three/examples/jsm/exporters/USDZExporter.d.ts +8 -1
- three/examples/jsm/geometries/TextGeometry.d.ts +1 -1
- three/examples/jsm/interactive/SelectionBox.d.ts +1 -0
- three/examples/jsm/math/Octree.d.ts +2 -1
- three/examples/jsm/nodes/Nodes.d.ts +28 -4
- three/examples/jsm/nodes/accessors/AccessorsUtils.d.ts +2 -0
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +84 -1
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +3 -0
- three/examples/jsm/nodes/code/CodeNode.d.ts +7 -2
- three/examples/jsm/nodes/code/FunctionNode.d.ts +10 -4
- three/examples/jsm/nodes/core/LightingModel.d.ts +1 -0
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +1 -1
- three/examples/jsm/nodes/core/OutputStructNode.d.ts +12 -0
- three/examples/jsm/nodes/core/PropertyNode.d.ts +10 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +3 -1
- three/examples/jsm/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +10 -0
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +7 -2
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +16 -0
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +10 -2
- three/examples/jsm/nodes/functions/ShadowMaskModel.d.ts +9 -0
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +3 -2
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +3 -2
- three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +0 -2
- three/examples/jsm/nodes/lighting/IrradianceNode.d.ts +8 -0
- three/examples/jsm/nodes/lighting/LightUtils.d.ts +7 -2
- three/examples/jsm/nodes/materials/Materials.d.ts +1 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +24 -14
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +6 -2
- three/examples/jsm/nodes/materials/ShadowNodeMaterial.d.ts +15 -0
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +36 -32
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +3 -4
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +127 -6
- three/examples/jsm/nodes/materialx/lib/mx_transform_color.d.ts +4 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +6 -3
- three/examples/jsm/physics/JoltPhysics.d.ts +10 -0
- three/examples/jsm/postprocessing/RenderTransitionPass.d.ts +33 -0
- three/examples/jsm/renderers/common/Renderer.d.ts +7 -4
- three/examples/jsm/utils/SceneUtils.d.ts +18 -0
- three/examples/jsm/webxr/OculusHandModel.d.ts +5 -2
- three/examples/jsm/webxr/XRHandModelFactory.d.ts +8 -2
- three/package.json +2 -2
- three/src/core/Object3D.d.ts +6 -5
- three/src/core/RenderTarget.d.ts +25 -10
- three/src/materials/MeshPhysicalMaterial.d.ts +65 -51
- three/src/objects/BatchedMesh.d.ts +13 -0
- three/src/renderers/shaders/ShaderChunk.d.ts +0 -1
- three/src/renderers/webgl/WebGLBufferRenderer.d.ts +6 -0
- three/src/renderers/webgl/WebGLCapabilities.d.ts +5 -0
- three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +6 -0
- three/src/renderers/webgl/WebGLPrograms.d.ts +2 -0
- three/src/textures/types.d.ts +4 -4
- three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +0 -3
|
@@ -4,45 +4,47 @@ import { Texture } from "../textures/Texture.js";
|
|
|
4
4
|
import { MeshStandardMaterial, MeshStandardMaterialParameters } from "./MeshStandardMaterial.js";
|
|
5
5
|
|
|
6
6
|
export interface MeshPhysicalMaterialParameters extends MeshStandardMaterialParameters {
|
|
7
|
-
|
|
7
|
+
anisotropyRotation?: number | undefined;
|
|
8
|
+
anisotropyMap?: Texture | null | undefined;
|
|
9
|
+
|
|
8
10
|
clearcoatMap?: Texture | null | undefined;
|
|
9
11
|
clearcoatRoughness?: number | undefined;
|
|
10
12
|
clearcoatRoughnessMap?: Texture | null | undefined;
|
|
11
13
|
clearcoatNormalScale?: Vector2 | undefined;
|
|
12
14
|
clearcoatNormalMap?: Texture | null | undefined;
|
|
13
15
|
|
|
14
|
-
reflectivity?: number | undefined;
|
|
15
16
|
ior?: number | undefined;
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
reflectivity?: number | undefined;
|
|
19
|
+
|
|
20
|
+
iridescenceMap?: Texture | null | undefined;
|
|
21
|
+
iridescenceIOR?: number | undefined;
|
|
22
|
+
iridescenceThicknessRange?: [number, number] | undefined;
|
|
23
|
+
iridescenceThicknessMap?: Texture | null | undefined;
|
|
24
|
+
|
|
18
25
|
sheenColor?: ColorRepresentation | undefined;
|
|
19
26
|
sheenColorMap?: Texture | null | undefined;
|
|
20
27
|
sheenRoughness?: number | undefined;
|
|
21
28
|
sheenRoughnessMap?: Texture | null | undefined;
|
|
22
29
|
|
|
23
|
-
transmission?: number | undefined;
|
|
24
30
|
transmissionMap?: Texture | null | undefined;
|
|
25
31
|
|
|
26
32
|
thickness?: number | undefined;
|
|
27
33
|
thicknessMap?: Texture | null | undefined;
|
|
28
|
-
|
|
29
34
|
attenuationDistance?: number | undefined;
|
|
30
35
|
attenuationColor?: ColorRepresentation | undefined;
|
|
31
36
|
|
|
32
37
|
specularIntensity?: number | undefined;
|
|
33
|
-
specularColor?: ColorRepresentation | undefined;
|
|
34
38
|
specularIntensityMap?: Texture | null | undefined;
|
|
39
|
+
specularColor?: ColorRepresentation | undefined;
|
|
35
40
|
specularColorMap?: Texture | null | undefined;
|
|
36
41
|
|
|
37
|
-
iridescenceMap?: Texture | null | undefined;
|
|
38
|
-
iridescenceIOR?: number | undefined;
|
|
39
|
-
iridescence?: number | undefined;
|
|
40
|
-
iridescenceThicknessRange?: [number, number] | undefined;
|
|
41
|
-
iridescenceThicknessMap?: Texture | null | undefined;
|
|
42
|
-
|
|
43
42
|
anisotropy?: number | undefined;
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
clearcoat?: number | undefined;
|
|
44
|
+
iridescence?: number | undefined;
|
|
45
|
+
dispersion?: number | undefined;
|
|
46
|
+
sheen?: number | undefined;
|
|
47
|
+
transmission?: number | undefined;
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
@@ -55,20 +57,25 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
55
57
|
*/
|
|
56
58
|
readonly isMeshPhysicalMaterial: true;
|
|
57
59
|
|
|
60
|
+
/**
|
|
61
|
+
* @default { 'STANDARD': '', 'PHYSICAL': '' }
|
|
62
|
+
*/
|
|
63
|
+
defines: { [key: string]: any };
|
|
64
|
+
|
|
58
65
|
/**
|
|
59
66
|
* @default 'MeshPhysicalMaterial'
|
|
60
67
|
*/
|
|
61
68
|
type: string;
|
|
62
69
|
|
|
63
70
|
/**
|
|
64
|
-
* @default
|
|
71
|
+
* @default 0
|
|
65
72
|
*/
|
|
66
|
-
|
|
73
|
+
anisotropyRotation?: number;
|
|
67
74
|
|
|
68
75
|
/**
|
|
69
|
-
* @default
|
|
76
|
+
* @default null
|
|
70
77
|
*/
|
|
71
|
-
|
|
78
|
+
anisotropyMap?: Texture | null;
|
|
72
79
|
|
|
73
80
|
/**
|
|
74
81
|
* @default null
|
|
@@ -95,20 +102,36 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
95
102
|
*/
|
|
96
103
|
clearcoatNormalMap: Texture | null;
|
|
97
104
|
|
|
105
|
+
/**
|
|
106
|
+
* @default 1.5
|
|
107
|
+
*/
|
|
108
|
+
ior: number;
|
|
109
|
+
|
|
98
110
|
/**
|
|
99
111
|
* @default 0.5
|
|
100
112
|
*/
|
|
101
|
-
reflectivity: number;
|
|
113
|
+
get reflectivity(): number;
|
|
114
|
+
set reflectivity(reflectivity: number);
|
|
102
115
|
|
|
103
116
|
/**
|
|
104
|
-
* @default
|
|
117
|
+
* @default null
|
|
105
118
|
*/
|
|
106
|
-
|
|
119
|
+
iridescenceMap: Texture | null;
|
|
107
120
|
|
|
108
121
|
/**
|
|
109
|
-
* @default
|
|
122
|
+
* @default 1.3
|
|
123
|
+
*/
|
|
124
|
+
iridescenceIOR: number;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @default [100, 400]
|
|
128
|
+
*/
|
|
129
|
+
iridescenceThicknessRange: [number, number];
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @default null
|
|
110
133
|
*/
|
|
111
|
-
|
|
134
|
+
iridescenceThicknessMap: Texture | null;
|
|
112
135
|
|
|
113
136
|
/**
|
|
114
137
|
* @default Color( 0x000000 )
|
|
@@ -130,11 +153,6 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
130
153
|
*/
|
|
131
154
|
sheenRoughnessMap: Texture | null;
|
|
132
155
|
|
|
133
|
-
/**
|
|
134
|
-
* @default 0
|
|
135
|
-
*/
|
|
136
|
-
transmission: number;
|
|
137
|
-
|
|
138
156
|
/**
|
|
139
157
|
* @default null
|
|
140
158
|
*/
|
|
@@ -165,58 +183,54 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
165
183
|
*/
|
|
166
184
|
specularIntensity: number;
|
|
167
185
|
|
|
168
|
-
/**
|
|
169
|
-
* @default Color(1, 1, 1)
|
|
170
|
-
*/
|
|
171
|
-
specularColor: Color;
|
|
172
|
-
|
|
173
186
|
/**
|
|
174
187
|
* @default null
|
|
175
188
|
*/
|
|
176
189
|
specularIntensityMap: Texture | null;
|
|
177
190
|
|
|
178
191
|
/**
|
|
179
|
-
* @default
|
|
192
|
+
* @default Color(1, 1, 1)
|
|
180
193
|
*/
|
|
181
|
-
|
|
194
|
+
specularColor: Color;
|
|
182
195
|
|
|
183
196
|
/**
|
|
184
197
|
* @default null
|
|
185
198
|
*/
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* @default 1.3
|
|
190
|
-
*/
|
|
191
|
-
iridescenceIOR: number;
|
|
199
|
+
specularColorMap: Texture | null;
|
|
192
200
|
|
|
193
201
|
/**
|
|
194
202
|
* @default 0
|
|
195
203
|
*/
|
|
196
|
-
|
|
204
|
+
get anisotropy(): number;
|
|
205
|
+
set anisotropy(value: number);
|
|
197
206
|
|
|
198
207
|
/**
|
|
199
|
-
* @default
|
|
208
|
+
* @default 0
|
|
200
209
|
*/
|
|
201
|
-
|
|
210
|
+
get clearcoat(): number;
|
|
211
|
+
set clearcoat(value: number);
|
|
202
212
|
|
|
203
213
|
/**
|
|
204
|
-
* @default
|
|
214
|
+
* @default 0
|
|
205
215
|
*/
|
|
206
|
-
|
|
216
|
+
get iridescence(): number;
|
|
217
|
+
set iridescence(value: number);
|
|
207
218
|
|
|
208
219
|
/**
|
|
209
220
|
* @default 0
|
|
210
221
|
*/
|
|
211
|
-
|
|
222
|
+
get dispersion(): number;
|
|
223
|
+
set dispersion(value: number);
|
|
212
224
|
|
|
213
225
|
/**
|
|
214
|
-
* @default 0
|
|
226
|
+
* @default 0.0
|
|
215
227
|
*/
|
|
216
|
-
|
|
228
|
+
get sheen(): number;
|
|
229
|
+
set sheen(value: number);
|
|
217
230
|
|
|
218
231
|
/**
|
|
219
|
-
* @default
|
|
232
|
+
* @default 0
|
|
220
233
|
*/
|
|
221
|
-
|
|
234
|
+
get transmission(): number;
|
|
235
|
+
set transmission(value: number);
|
|
222
236
|
}
|
|
@@ -156,6 +156,19 @@ declare class BatchedMesh extends Mesh<BufferGeometry, Material> {
|
|
|
156
156
|
*/
|
|
157
157
|
setGeometryAt(index: number, geometry: BufferGeometry): number;
|
|
158
158
|
|
|
159
|
+
/**
|
|
160
|
+
* Gets the instance count of the geometry at `index`. Returns `null` if instance counts are not configured.
|
|
161
|
+
* @param index The index of an instance. Values have to be in the range [0, count].
|
|
162
|
+
*/
|
|
163
|
+
getInstanceCountAt(index: number): number | null;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Sets an instance count of the geometry at `index`.
|
|
167
|
+
* @param index Which geometry index to configure an instance count for.
|
|
168
|
+
* @param instanceCount The number of instances to render of the given geometry index.
|
|
169
|
+
*/
|
|
170
|
+
setInstanceCountAt(index: number, instanceCount: number): number;
|
|
171
|
+
|
|
159
172
|
deleteGeometry(index: number): this;
|
|
160
173
|
|
|
161
174
|
getBoundingBoxAt(index: number, target: Box3): Box3 | null;
|
|
@@ -42,7 +42,6 @@ export const ShaderChunk: {
|
|
|
42
42
|
fog_fragment: string;
|
|
43
43
|
fog_pars_fragment: string;
|
|
44
44
|
gradientmap_pars_fragment: string;
|
|
45
|
-
lightmap_fragment: string;
|
|
46
45
|
lightmap_pars_fragment: string;
|
|
47
46
|
lights_lambert_fragment: string;
|
|
48
47
|
lights_lambert_pars_fragment: string;
|
|
@@ -12,4 +12,10 @@ export class WebGLBufferRenderer {
|
|
|
12
12
|
render: (start: any, count: number) => void;
|
|
13
13
|
renderInstances: (start: any, count: number, primcount: number) => void;
|
|
14
14
|
renderMultiDraw: (starts: Int32Array, counts: Int32Array, drawCount: number) => void;
|
|
15
|
+
renderMultiDrawInstances: (
|
|
16
|
+
starts: Int32Array,
|
|
17
|
+
counts: Int32Array,
|
|
18
|
+
drawCount: number,
|
|
19
|
+
primcount: Int32Array,
|
|
20
|
+
) => void;
|
|
15
21
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PixelFormat, TextureDataType } from "../../constants.js";
|
|
2
|
+
|
|
1
3
|
export interface WebGLCapabilitiesParameters {
|
|
2
4
|
precision?: string | undefined;
|
|
3
5
|
logarithmicDepthBuffer?: boolean | undefined;
|
|
@@ -11,6 +13,9 @@ export class WebGLCapabilities {
|
|
|
11
13
|
getMaxAnisotropy: () => number;
|
|
12
14
|
getMaxPrecision: (precision: string) => string;
|
|
13
15
|
|
|
16
|
+
textureFormatReadable: (textureFormat: PixelFormat) => boolean;
|
|
17
|
+
textureTypeReadable: (textureType: TextureDataType) => boolean;
|
|
18
|
+
|
|
14
19
|
precision: string;
|
|
15
20
|
logarithmicDepthBuffer: boolean;
|
|
16
21
|
|
|
@@ -6,4 +6,10 @@ export class WebGLIndexedBufferRenderer {
|
|
|
6
6
|
render: (start: any, count: number) => void;
|
|
7
7
|
renderInstances: (start: any, count: number, primcount: number) => void;
|
|
8
8
|
renderMultiDraw: (starts: Int32Array, counts: Int32Array, drawCount: number) => void;
|
|
9
|
+
renderMultiDrawInstances: (
|
|
10
|
+
starts: Int32Array,
|
|
11
|
+
counts: Int32Array,
|
|
12
|
+
drawCount: number,
|
|
13
|
+
primcount: Int32Array,
|
|
14
|
+
) => void;
|
|
9
15
|
}
|
three/src/textures/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export interface TextureImageData {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
data: Uint8Array | Uint8ClampedArray;
|
|
3
|
+
height: number;
|
|
4
|
+
width: number;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export interface Texture3DImageData extends TextureImageData {
|
|
8
|
-
|
|
8
|
+
depth: number;
|
|
9
9
|
}
|