@types/three 0.162.0 → 0.164.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/animation/CCDIKSolver.d.ts +19 -6
- three/examples/jsm/controls/OrbitControls.d.ts +1 -1
- three/examples/jsm/exporters/USDZExporter.d.ts +8 -1
- three/examples/jsm/geometries/TextGeometry.d.ts +8 -0
- three/examples/jsm/interactive/SelectionBox.d.ts +1 -0
- three/examples/jsm/loaders/FontLoader.d.ts +18 -4
- three/examples/jsm/loaders/LUT3dlLoader.d.ts +1 -2
- three/examples/jsm/loaders/LUTCubeLoader.d.ts +1 -2
- three/examples/jsm/loaders/RGBMLoader.d.ts +5 -0
- three/examples/jsm/loaders/TTFLoader.d.ts +5 -3
- three/examples/jsm/math/Octree.d.ts +2 -1
- three/examples/jsm/nodes/Nodes.d.ts +33 -5
- three/examples/jsm/nodes/accessors/AccessorsUtils.d.ts +2 -0
- three/examples/jsm/nodes/accessors/BatchNode.d.ts +14 -0
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +2 -1
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +84 -1
- three/examples/jsm/nodes/accessors/RendererReferenceNode.d.ts +16 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +11 -1
- 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/Node.d.ts +7 -3
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +1 -1
- three/examples/jsm/nodes/core/NodeUtils.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/display/PassNode.d.ts +2 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +12 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +10 -5
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +9 -5
- 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 +2 -0
- three/examples/jsm/nodes/materials/MeshNormalNodeMaterial.d.ts +23 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +24 -14
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +9 -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/pmrem/PMREMNode.d.ts +20 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +6 -3
- three/examples/jsm/objects/QuadMesh.d.ts +5 -8
- three/examples/jsm/physics/JoltPhysics.d.ts +10 -0
- three/examples/jsm/postprocessing/RenderTransitionPass.d.ts +33 -0
- three/examples/jsm/renderers/common/Info.d.ts +3 -7
- three/examples/jsm/renderers/common/PostProcessing.d.ts +3 -1
- three/examples/jsm/renderers/common/Renderer.d.ts +11 -5
- three/examples/jsm/renderers/common/extras/PMREMGenerator.d.ts +8 -0
- three/examples/jsm/renderers/webgl/WebGLBackend.d.ts +4 -0
- 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/index.d.ts +1 -1
- three/package.json +4 -4
- three/src/Three.d.ts +0 -1
- three/src/cameras/Camera.d.ts +3 -0
- three/src/constants.d.ts +10 -40
- three/src/core/Object3D.d.ts +6 -5
- three/src/core/RenderTarget.d.ts +25 -10
- three/src/materials/Material.d.ts +46 -23
- three/src/materials/MeshPhysicalMaterial.d.ts +65 -51
- three/src/materials/ShaderMaterial.d.ts +2 -17
- three/src/objects/BatchedMesh.d.ts +11 -1
- three/src/objects/InstancedMesh.d.ts +1 -1
- three/src/objects/SkinnedMesh.d.ts +0 -2
- three/src/renderers/WebGLRenderer.d.ts +2 -2
- three/src/renderers/shaders/ShaderChunk.d.ts +0 -1
- three/src/renderers/webgl/WebGLAttributes.d.ts +1 -2
- three/src/renderers/webgl/WebGLBindingStates.d.ts +1 -8
- three/src/renderers/webgl/WebGLBufferRenderer.d.ts +6 -3
- three/src/renderers/webgl/WebGLCapabilities.d.ts +13 -6
- three/src/renderers/webgl/WebGLExtensions.d.ts +1 -3
- three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +7 -1
- three/src/renderers/webgl/WebGLLights.d.ts +1 -2
- three/src/renderers/webgl/WebGLPrograms.d.ts +2 -9
- three/src/renderers/webgl/WebGLState.d.ts +1 -3
- three/src/renderers/webgl/WebGLUtils.d.ts +0 -2
- three/src/scenes/Scene.d.ts +6 -0
- three/src/textures/Data3DTexture.d.ts +0 -1
- three/src/textures/DataArrayTexture.d.ts +0 -1
- three/src/textures/DepthTexture.d.ts +0 -3
- three/src/textures/Texture.d.ts +13 -7
- three/src/textures/types.d.ts +4 -4
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +0 -12
- three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +0 -3
- three/src/renderers/WebGL1Renderer.d.ts +0 -6
three/src/core/RenderTarget.d.ts
CHANGED
|
@@ -16,15 +16,17 @@ export interface RenderTargetOptions {
|
|
|
16
16
|
wrapT?: Wrapping | undefined;
|
|
17
17
|
magFilter?: MagnificationTextureFilter | undefined;
|
|
18
18
|
minFilter?: MinificationTextureFilter | undefined;
|
|
19
|
-
generateMipmaps?: boolean | undefined; // true
|
|
20
|
-
format?: number | undefined; // RGBAFormat
|
|
21
|
-
type?: TextureDataType | undefined; // UnsignedByteType
|
|
22
|
-
anisotropy?: number | undefined; // 1
|
|
19
|
+
generateMipmaps?: boolean | undefined; // true
|
|
20
|
+
format?: number | undefined; // RGBAFormat
|
|
21
|
+
type?: TextureDataType | undefined; // UnsignedByteType
|
|
22
|
+
anisotropy?: number | undefined; // 1
|
|
23
23
|
colorSpace?: ColorSpace | undefined;
|
|
24
|
-
internalFormat?: PixelFormatGPU | null | undefined;
|
|
25
|
-
depthBuffer?: boolean | undefined; // true
|
|
26
|
-
stencilBuffer?: boolean | undefined; // false
|
|
27
|
-
|
|
24
|
+
internalFormat?: PixelFormatGPU | null | undefined; // null
|
|
25
|
+
depthBuffer?: boolean | undefined; // true
|
|
26
|
+
stencilBuffer?: boolean | undefined; // false
|
|
27
|
+
resolveDepthBuffer?: boolean | undefined; // true
|
|
28
|
+
resolveStencilBuffer?: boolean | undefined; // true
|
|
29
|
+
depthTexture?: DepthTexture | null | undefined; // null
|
|
28
30
|
/**
|
|
29
31
|
* Defines the count of MSAA samples. Can only be used with WebGL 2. Default is **0**.
|
|
30
32
|
* @default 0
|
|
@@ -54,14 +56,27 @@ export class RenderTarget<TTexture extends Texture | Texture[] = Texture> extend
|
|
|
54
56
|
depthBuffer: boolean;
|
|
55
57
|
|
|
56
58
|
/**
|
|
57
|
-
* @default
|
|
59
|
+
* @default false
|
|
58
60
|
*/
|
|
59
61
|
stencilBuffer: boolean;
|
|
60
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Defines whether the depth buffer should be resolved when rendering into a multisampled render target.
|
|
65
|
+
* @default true
|
|
66
|
+
*/
|
|
67
|
+
resolveDepthBuffer: boolean;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Defines whether the stencil buffer should be resolved when rendering into a multisampled render target.
|
|
71
|
+
* This property has no effect when {@link .resolveDepthBuffer} is set to `false`.
|
|
72
|
+
* @default true
|
|
73
|
+
*/
|
|
74
|
+
resolveStencilBuffer: boolean;
|
|
75
|
+
|
|
61
76
|
/**
|
|
62
77
|
* @default null
|
|
63
78
|
*/
|
|
64
|
-
depthTexture: DepthTexture;
|
|
79
|
+
depthTexture: DepthTexture | null;
|
|
65
80
|
|
|
66
81
|
/**
|
|
67
82
|
* Defines the count of MSAA samples. Can only be used with WebGL 2. Default is **0**.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Camera } from "../cameras/Camera.js";
|
|
1
2
|
import {
|
|
2
3
|
Blending,
|
|
3
4
|
BlendingDstFactor,
|
|
@@ -9,11 +10,15 @@ import {
|
|
|
9
10
|
StencilFunc,
|
|
10
11
|
StencilOp,
|
|
11
12
|
} from "../constants.js";
|
|
13
|
+
import { BufferGeometry } from "../core/BufferGeometry.js";
|
|
12
14
|
import { EventDispatcher } from "../core/EventDispatcher.js";
|
|
15
|
+
import { Object3D } from "../core/Object3D.js";
|
|
13
16
|
import { Color, ColorRepresentation } from "../math/Color.js";
|
|
14
17
|
import { Plane } from "../math/Plane.js";
|
|
18
|
+
import { Group } from "../objects/Group.js";
|
|
15
19
|
import { WebGLProgramParametersWithUniforms } from "../renderers/webgl/WebGLPrograms.js";
|
|
16
20
|
import { WebGLRenderer } from "../renderers/WebGLRenderer.js";
|
|
21
|
+
import { Scene } from "../scenes/Scene.js";
|
|
17
22
|
|
|
18
23
|
export interface MaterialParameters {
|
|
19
24
|
alphaHash?: boolean | undefined;
|
|
@@ -84,12 +89,6 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
84
89
|
*/
|
|
85
90
|
alphaHash: boolean;
|
|
86
91
|
|
|
87
|
-
/**
|
|
88
|
-
* Sets the alpha value to be used when running an alpha test. Default is 0.
|
|
89
|
-
* @default 0
|
|
90
|
-
*/
|
|
91
|
-
alphaTest: number;
|
|
92
|
-
|
|
93
92
|
/**
|
|
94
93
|
* Enables alpha to coverage. Can only be used with MSAA-enabled rendering contexts (meaning when the renderer was
|
|
95
94
|
* created with *antialias* parameter set to `true`). Enabling this will smooth aliasing on clip plane edges and
|
|
@@ -271,13 +270,6 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
271
270
|
*/
|
|
272
271
|
name: string;
|
|
273
272
|
|
|
274
|
-
/**
|
|
275
|
-
* Specifies that the material needs to be updated, WebGL wise. Set it to true if you made changes that need to be reflected in WebGL.
|
|
276
|
-
* This property is automatically set to true when instancing a new material.
|
|
277
|
-
* @default false
|
|
278
|
-
*/
|
|
279
|
-
needsUpdate: boolean;
|
|
280
|
-
|
|
281
273
|
/**
|
|
282
274
|
* Opacity. Default is 1.
|
|
283
275
|
* @default 1
|
|
@@ -342,7 +334,8 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
342
334
|
|
|
343
335
|
/**
|
|
344
336
|
* Defines whether this material is tone mapped according to the renderer's
|
|
345
|
-
* {@link WebGLRenderer.toneMapping toneMapping} setting. It is ignored when rendering to a render target
|
|
337
|
+
* {@link WebGLRenderer.toneMapping toneMapping} setting. It is ignored when rendering to a render target or using
|
|
338
|
+
* post processing.
|
|
346
339
|
* @default true
|
|
347
340
|
*/
|
|
348
341
|
toneMapped: boolean;
|
|
@@ -390,20 +383,27 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
390
383
|
version: number;
|
|
391
384
|
|
|
392
385
|
/**
|
|
393
|
-
*
|
|
386
|
+
* Gets the alpha value to be used when running an alpha test. Default is 0.
|
|
387
|
+
* @default 0
|
|
394
388
|
*/
|
|
395
|
-
|
|
389
|
+
get alphaTest(): number;
|
|
396
390
|
|
|
397
391
|
/**
|
|
398
|
-
*
|
|
399
|
-
* @
|
|
392
|
+
* Sets the alpha value to be used when running an alpha test. Default is 0.
|
|
393
|
+
* @default 0
|
|
400
394
|
*/
|
|
401
|
-
|
|
395
|
+
set alphaTest(value: number);
|
|
402
396
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
397
|
+
onBuild(object: Object3D, parameters: WebGLProgramParametersWithUniforms, renderer: WebGLRenderer): void;
|
|
398
|
+
|
|
399
|
+
onBeforeRender(
|
|
400
|
+
renderer: WebGLRenderer,
|
|
401
|
+
scene: Scene,
|
|
402
|
+
camera: Camera,
|
|
403
|
+
geometry: BufferGeometry,
|
|
404
|
+
object: Object3D,
|
|
405
|
+
group: Group,
|
|
406
|
+
): void;
|
|
407
407
|
|
|
408
408
|
/**
|
|
409
409
|
* An optional callback that is executed immediately before the shader program is compiled.
|
|
@@ -430,4 +430,27 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
430
430
|
* @param meta Object containing metadata such as textures or images for the material.
|
|
431
431
|
*/
|
|
432
432
|
toJSON(meta?: any): any;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Return a new material with the same parameters as this material.
|
|
436
|
+
*/
|
|
437
|
+
clone(): this;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Copy the parameters from the passed material into this material.
|
|
441
|
+
* @param material
|
|
442
|
+
*/
|
|
443
|
+
copy(material: Material): this;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* This disposes the material. Textures of a material don't get disposed. These needs to be disposed by {@link Texture}.
|
|
447
|
+
*/
|
|
448
|
+
dispose(): void;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Specifies that the material needs to be updated, WebGL wise. Set it to true if you made changes that need to be reflected in WebGL.
|
|
452
|
+
* This property is automatically set to true when instancing a new material.
|
|
453
|
+
* @default false
|
|
454
|
+
*/
|
|
455
|
+
set needsUpdate(value: boolean);
|
|
433
456
|
}
|
|
@@ -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
|
}
|
|
@@ -16,10 +16,8 @@ export interface ShaderMaterialParameters extends MaterialParameters {
|
|
|
16
16
|
fog?: boolean | undefined;
|
|
17
17
|
extensions?:
|
|
18
18
|
| {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
drawBuffers?: boolean | undefined;
|
|
22
|
-
shaderTextureLOD?: boolean | undefined;
|
|
19
|
+
clipCullDistance?: boolean | undefined;
|
|
20
|
+
multiDraw?: boolean | undefined;
|
|
23
21
|
}
|
|
24
22
|
| undefined;
|
|
25
23
|
glslVersion?: GLSLVersion | undefined;
|
|
@@ -86,26 +84,13 @@ export class ShaderMaterial extends Material {
|
|
|
86
84
|
*/
|
|
87
85
|
clipping: boolean;
|
|
88
86
|
|
|
89
|
-
/**
|
|
90
|
-
* @deprecated Use {@link ShaderMaterial#extensions.derivatives extensions.derivatives} instead.
|
|
91
|
-
*/
|
|
92
|
-
derivatives: any;
|
|
93
|
-
|
|
94
87
|
/**
|
|
95
88
|
* @default {
|
|
96
|
-
* derivatives: false,
|
|
97
|
-
* fragDepth: false,
|
|
98
|
-
* drawBuffers: false,
|
|
99
|
-
* shaderTextureLOD: false,
|
|
100
89
|
* clipCullDistance: false,
|
|
101
90
|
* multiDraw: false
|
|
102
91
|
* }
|
|
103
92
|
*/
|
|
104
93
|
extensions: {
|
|
105
|
-
derivatives: boolean;
|
|
106
|
-
fragDepth: boolean;
|
|
107
|
-
drawBuffers: boolean;
|
|
108
|
-
shaderTextureLOD: boolean;
|
|
109
94
|
clipCullDistance: boolean;
|
|
110
95
|
multiDraw: boolean;
|
|
111
96
|
};
|
|
@@ -157,8 +157,18 @@ declare class BatchedMesh extends Mesh<BufferGeometry, Material> {
|
|
|
157
157
|
setGeometryAt(index: number, geometry: BufferGeometry): number;
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
|
-
*
|
|
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].
|
|
161
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
|
+
|
|
162
172
|
deleteGeometry(index: number): this;
|
|
163
173
|
|
|
164
174
|
getBoundingBoxAt(index: number, target: Box3): Box3 | null;
|
|
@@ -11,8 +11,6 @@ import { Skeleton } from "./Skeleton.js";
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* A mesh that has a {@link THREE.Skeleton | Skeleton} with {@link Bone | bones} that can then be used to animate the vertices of the geometry.
|
|
14
|
-
* @remarks
|
|
15
|
-
* {@link SkinnedMesh} can only be used with WebGL 2.
|
|
16
14
|
* @example
|
|
17
15
|
* ```typescript
|
|
18
16
|
* const geometry = new THREE.CylinderGeometry(5, 5, 5, 5, 15, 5, 30);
|
|
@@ -65,7 +65,7 @@ export interface WebGLRendererParameters {
|
|
|
65
65
|
antialias?: boolean | undefined;
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* default is
|
|
68
|
+
* default is false.
|
|
69
69
|
*/
|
|
70
70
|
stencil?: boolean | undefined;
|
|
71
71
|
|
|
@@ -177,7 +177,7 @@ export class WebGLRenderer implements Renderer {
|
|
|
177
177
|
/**
|
|
178
178
|
* @default []
|
|
179
179
|
*/
|
|
180
|
-
clippingPlanes:
|
|
180
|
+
clippingPlanes: Plane[];
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
183
|
* @default false
|
|
@@ -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;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { BufferAttribute } from "../../core/BufferAttribute.js";
|
|
2
2
|
import { GLBufferAttribute } from "../../core/GLBufferAttribute.js";
|
|
3
3
|
import { InterleavedBufferAttribute } from "../../core/InterleavedBufferAttribute.js";
|
|
4
|
-
import { WebGLCapabilities } from "./WebGLCapabilities.js";
|
|
5
4
|
|
|
6
5
|
export class WebGLAttributes {
|
|
7
|
-
constructor(gl: WebGLRenderingContext | WebGL2RenderingContext
|
|
6
|
+
constructor(gl: WebGLRenderingContext | WebGL2RenderingContext);
|
|
8
7
|
|
|
9
8
|
get(attribute: BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute):
|
|
10
9
|
| {
|
|
@@ -3,17 +3,10 @@ import { BufferGeometry } from "../../core/BufferGeometry.js";
|
|
|
3
3
|
import { Object3D } from "../../core/Object3D.js";
|
|
4
4
|
import { Material } from "../../materials/Material.js";
|
|
5
5
|
import { WebGLAttributes } from "./WebGLAttributes.js";
|
|
6
|
-
import { WebGLCapabilities } from "./WebGLCapabilities.js";
|
|
7
|
-
import { WebGLExtensions } from "./WebGLExtensions.js";
|
|
8
6
|
import { WebGLProgram } from "./WebGLProgram.js";
|
|
9
7
|
|
|
10
8
|
export class WebGLBindingStates {
|
|
11
|
-
constructor(
|
|
12
|
-
gl: WebGLRenderingContext,
|
|
13
|
-
extensions: WebGLExtensions,
|
|
14
|
-
attributes: WebGLAttributes,
|
|
15
|
-
capabilities: WebGLCapabilities,
|
|
16
|
-
);
|
|
9
|
+
constructor(gl: WebGLRenderingContext, attributes: WebGLAttributes);
|
|
17
10
|
|
|
18
11
|
setup(
|
|
19
12
|
object: Object3D,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// Renderers / WebGL /////////////////////////////////////////////////////////////////////
|
|
2
|
-
import { WebGLCapabilities } from "./WebGLCapabilities.js";
|
|
3
1
|
import { WebGLExtensions } from "./WebGLExtensions.js";
|
|
4
2
|
import { WebGLInfo } from "./WebGLInfo.js";
|
|
5
3
|
|
|
@@ -8,11 +6,16 @@ export class WebGLBufferRenderer {
|
|
|
8
6
|
gl: WebGLRenderingContext,
|
|
9
7
|
extensions: WebGLExtensions,
|
|
10
8
|
info: WebGLInfo,
|
|
11
|
-
capabilities: WebGLCapabilities,
|
|
12
9
|
);
|
|
13
10
|
|
|
14
11
|
setMode: (value: any) => void;
|
|
15
12
|
render: (start: any, count: number) => void;
|
|
16
13
|
renderInstances: (start: any, count: number, primcount: number) => void;
|
|
17
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;
|
|
18
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;
|
|
@@ -7,22 +9,27 @@ export class WebGLCapabilities {
|
|
|
7
9
|
constructor(gl: WebGLRenderingContext, extensions: any, parameters: WebGLCapabilitiesParameters);
|
|
8
10
|
|
|
9
11
|
readonly isWebGL2: boolean;
|
|
10
|
-
|
|
12
|
+
|
|
13
|
+
getMaxAnisotropy: () => number;
|
|
14
|
+
getMaxPrecision: (precision: string) => string;
|
|
15
|
+
|
|
16
|
+
textureFormatReadable: (textureFormat: PixelFormat) => boolean;
|
|
17
|
+
textureTypeReadable: (textureType: TextureDataType) => boolean;
|
|
18
|
+
|
|
11
19
|
precision: string;
|
|
12
20
|
logarithmicDepthBuffer: boolean;
|
|
21
|
+
|
|
13
22
|
maxTextures: number;
|
|
14
23
|
maxVertexTextures: number;
|
|
15
24
|
maxTextureSize: number;
|
|
16
25
|
maxCubemapSize: number;
|
|
26
|
+
|
|
17
27
|
maxAttributes: number;
|
|
18
28
|
maxVertexUniforms: number;
|
|
19
29
|
maxVaryings: number;
|
|
20
30
|
maxFragmentUniforms: number;
|
|
31
|
+
|
|
21
32
|
vertexTextures: boolean;
|
|
22
|
-
floatFragmentTextures: boolean;
|
|
23
|
-
floatVertexTextures: boolean;
|
|
24
|
-
maxSamples: number;
|
|
25
33
|
|
|
26
|
-
|
|
27
|
-
getMaxPrecision(precision: string): string;
|
|
34
|
+
maxSamples: number;
|
|
28
35
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
export class WebGLIndexedBufferRenderer {
|
|
2
|
-
constructor(gl: WebGLRenderingContext, extensions: any, info: any
|
|
2
|
+
constructor(gl: WebGLRenderingContext, extensions: any, info: any);
|
|
3
3
|
|
|
4
4
|
setMode: (value: any) => void;
|
|
5
5
|
setIndex: (index: any) => void;
|
|
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
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { WebGLCapabilities } from "./WebGLCapabilities.js";
|
|
2
1
|
import { WebGLExtensions } from "./WebGLExtensions.js";
|
|
3
2
|
|
|
4
3
|
export interface WebGLLightsState {
|
|
@@ -40,7 +39,7 @@ export interface WebGLLightsState {
|
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
export class WebGLLights {
|
|
43
|
-
constructor(extensions: WebGLExtensions
|
|
42
|
+
constructor(extensions: WebGLExtensions);
|
|
44
43
|
|
|
45
44
|
state: WebGLLightsState;
|
|
46
45
|
|