@types/three 0.159.0 → 0.160.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/loaders/KTX2Loader.d.ts +2 -8
- three/examples/jsm/loaders/MaterialXLoader.d.ts +6 -0
- three/examples/jsm/misc/Timer.d.ts +80 -0
- three/examples/jsm/nodes/Nodes.d.ts +238 -60
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/BufferNode.d.ts +4 -1
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +9 -2
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/ModelNode.d.ts +7 -1
- three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/PointUVNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +4 -1
- three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/SkinningNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +8 -1
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +10 -2
- three/examples/jsm/nodes/accessors/UVNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
- three/examples/jsm/nodes/code/CodeNode.d.ts +4 -0
- three/examples/jsm/nodes/code/ExpressionNode.d.ts +3 -0
- three/examples/jsm/nodes/code/FunctionCallNode.d.ts +7 -1
- three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
- three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +1 -1
- three/examples/jsm/nodes/core/AttributeNode.d.ts +3 -0
- three/examples/jsm/nodes/core/BypassNode.d.ts +3 -0
- three/examples/jsm/nodes/core/CacheNode.d.ts +3 -0
- three/examples/jsm/nodes/core/ConstNode.d.ts +3 -3
- three/examples/jsm/nodes/core/ContextNode.d.ts +3 -0
- three/examples/jsm/nodes/core/InputNode.d.ts +4 -4
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +6 -3
- three/examples/jsm/nodes/core/NodeUniform.d.ts +12 -8
- three/examples/jsm/nodes/core/NodeUtils.d.ts +6 -3
- three/examples/jsm/nodes/core/PropertyNode.d.ts +9 -0
- three/examples/jsm/nodes/core/UniformNode.d.ts +12 -4
- three/examples/jsm/nodes/core/VarNode.d.ts +4 -0
- three/examples/jsm/nodes/core/VaryingNode.d.ts +3 -0
- three/examples/jsm/nodes/core/constants.d.ts +9 -5
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +7 -2
- three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +18 -1
- three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +4 -0
- three/examples/jsm/nodes/display/FrontFacingNode.d.ts +4 -0
- three/examples/jsm/nodes/display/NormalMapNode.d.ts +7 -1
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +6 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +8 -1
- three/examples/jsm/nodes/display/ViewportNode.d.ts +8 -0
- three/examples/jsm/nodes/fog/FogExp2Node.d.ts +3 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +3 -0
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +3 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -1
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +1 -1
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +1 -1
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +1 -1
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +3 -0
- three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +7 -0
- three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +6 -1
- three/examples/jsm/nodes/lighting/LightsNode.d.ts +3 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +18 -5
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +0 -3
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +25 -2
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +43 -34
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +5 -3
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +7 -5
- three/examples/jsm/nodes/math/CondNode.d.ts +7 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +134 -1
- three/examples/jsm/nodes/math/OperatorNode.d.ts +51 -0
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +3 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +75 -33
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +4 -2
- three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +3 -0
- three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +6 -3
- three/examples/jsm/nodes/utils/OscNode.d.ts +6 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +4 -0
- three/examples/jsm/nodes/utils/RotateUVNode.d.ts +3 -0
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +5 -1
- three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +7 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +7 -1
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -7
- three/examples/jsm/objects/QuadMesh.d.ts +13 -0
- three/examples/jsm/postprocessing/{HBAOPass.d.ts → GTAOPass.d.ts} +22 -10
- three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +3 -0
- three/examples/jsm/shaders/{HBAOShader.d.ts → GTAOShader.d.ts} +23 -8
- three/examples/jsm/shaders/PoissonDenoiseShader.d.ts +1 -1
- three/package.json +2 -2
- three/src/Three.d.ts +1 -0
- three/src/constants.d.ts +3 -1
- three/src/core/UniformsGroup.d.ts +3 -3
- three/src/lights/PointLight.d.ts +7 -0
- three/src/loaders/MaterialLoader.d.ts +6 -3
- three/src/materials/LineBasicMaterial.d.ts +7 -0
- three/src/materials/LineDashedMaterial.d.ts +7 -1
- three/src/materials/Material.d.ts +14 -14
- three/src/materials/MeshBasicMaterial.d.ts +7 -0
- three/src/materials/MeshDepthMaterial.d.ts +6 -0
- three/src/materials/MeshDistanceMaterial.d.ts +7 -0
- three/src/materials/MeshLambertMaterial.d.ts +7 -0
- three/src/materials/MeshMatcapMaterial.d.ts +7 -0
- three/src/materials/MeshNormalMaterial.d.ts +7 -0
- three/src/materials/MeshPhongMaterial.d.ts +7 -0
- three/src/materials/MeshPhysicalMaterial.d.ts +6 -1
- three/src/materials/MeshStandardMaterial.d.ts +7 -2
- three/src/materials/MeshToonMaterial.d.ts +7 -0
- three/src/materials/PointsMaterial.d.ts +7 -0
- three/src/materials/RawShaderMaterial.d.ts +9 -0
- three/src/materials/ShaderMaterial.d.ts +9 -3
- three/src/materials/ShadowMaterial.d.ts +7 -0
- three/src/materials/SpriteMaterial.d.ts +7 -2
- three/src/math/Matrix4.d.ts +30 -30
- three/src/math/Sphere.d.ts +5 -0
- three/src/math/Triangle.d.ts +8 -8
- three/src/objects/SkinnedMesh.d.ts +1 -2
- three/src/renderers/shaders/ShaderLib.d.ts +18 -18
- three/src/renderers/shaders/UniformsUtils.d.ts +3 -2
- three/src/renderers/webgl/WebGLLights.d.ts +39 -37
- three/src/renderers/webgl/WebGLPrograms.d.ts +224 -9
- three/src/textures/CompressedCubeTexture.d.ts +13 -0
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +0 -310
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +0 -166
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plane } from '../math/Plane.js';
|
|
2
2
|
import { EventDispatcher } from '../core/EventDispatcher.js';
|
|
3
|
+
import { WebGLProgramParametersWithUniforms } from '../renderers/webgl/WebGLPrograms.js';
|
|
3
4
|
import { WebGLRenderer } from '../renderers/WebGLRenderer.js';
|
|
4
|
-
import { Shader } from '../renderers/shaders/ShaderLib.js';
|
|
5
5
|
import {
|
|
6
6
|
BlendingDstFactor,
|
|
7
7
|
BlendingEquation,
|
|
@@ -69,6 +69,13 @@ export interface MaterialParameters {
|
|
|
69
69
|
export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
70
70
|
constructor();
|
|
71
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Read-only flag to check if a given object is of type {@link Material}.
|
|
74
|
+
* @remarks This is a _constant_ value
|
|
75
|
+
* @defaultValue `true`
|
|
76
|
+
*/
|
|
77
|
+
readonly isMaterial: true;
|
|
78
|
+
|
|
72
79
|
/**
|
|
73
80
|
* Enables alpha hashed transparency, an alternative to {@link .transparent} or {@link .alphaTest}. The material
|
|
74
81
|
* will not be rendered if opacity is lower than a random threshold. Randomization introduces some grain or noise,
|
|
@@ -256,12 +263,6 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
256
263
|
*/
|
|
257
264
|
stencilZPass: StencilOp;
|
|
258
265
|
|
|
259
|
-
/**
|
|
260
|
-
* Used to check whether this or derived classes are materials. Default is true.
|
|
261
|
-
* You should not change this, as it used internally for optimisation.
|
|
262
|
-
*/
|
|
263
|
-
readonly isMaterial: true;
|
|
264
|
-
|
|
265
266
|
/**
|
|
266
267
|
* Material name. Default is an empty string.
|
|
267
268
|
* @default ''
|
|
@@ -338,8 +339,8 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
338
339
|
shadowSide: Side | null;
|
|
339
340
|
|
|
340
341
|
/**
|
|
341
|
-
* Defines whether this material is tone mapped according to the renderer's
|
|
342
|
-
*
|
|
342
|
+
* Defines whether this material is tone mapped according to the renderer's
|
|
343
|
+
* {@link WebGLRenderer.toneMapping toneMapping} setting. It is ignored when rendering to a render target.
|
|
343
344
|
* @default true
|
|
344
345
|
*/
|
|
345
346
|
toneMapped: boolean;
|
|
@@ -347,7 +348,6 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
347
348
|
/**
|
|
348
349
|
* Defines whether this material is transparent. This has an effect on rendering as transparent objects need special treatment and are rendered after non-transparent objects.
|
|
349
350
|
* When set to true, the extent to which the material is transparent is controlled by setting it's .opacity property.
|
|
350
|
-
* Default is false.
|
|
351
351
|
* @default false
|
|
352
352
|
*/
|
|
353
353
|
transparent: boolean;
|
|
@@ -405,12 +405,12 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
405
405
|
|
|
406
406
|
/**
|
|
407
407
|
* An optional callback that is executed immediately before the shader program is compiled.
|
|
408
|
-
* This function is called with the
|
|
408
|
+
* This function is called with the associated WebGL program parameters and renderer.
|
|
409
409
|
* Useful for the modification of built-in materials.
|
|
410
|
-
* @param
|
|
411
|
-
* @param renderer WebGLRenderer
|
|
410
|
+
* @param parameters WebGL program parameters
|
|
411
|
+
* @param renderer WebGLRenderer context that is initializing the material
|
|
412
412
|
*/
|
|
413
|
-
onBeforeCompile(
|
|
413
|
+
onBeforeCompile(parameters: WebGLProgramParametersWithUniforms, renderer: WebGLRenderer): void;
|
|
414
414
|
|
|
415
415
|
/**
|
|
416
416
|
* In case onBeforeCompile is used, this callback can be used to identify values of settings used in onBeforeCompile, so three.js can reuse a cached shader or recompile the shader as needed.
|
|
@@ -29,6 +29,13 @@ export interface MeshBasicMaterialParameters extends MaterialParameters {
|
|
|
29
29
|
export class MeshBasicMaterial extends Material {
|
|
30
30
|
constructor(parameters?: MeshBasicMaterialParameters);
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Read-only flag to check if a given object is of type {@link MeshBasicMaterial}.
|
|
34
|
+
* @remarks This is a _constant_ value
|
|
35
|
+
* @defaultValue `true`
|
|
36
|
+
*/
|
|
37
|
+
readonly isMeshBasicMaterial: true;
|
|
38
|
+
|
|
32
39
|
/**
|
|
33
40
|
* @default 'MeshBasicMaterial'
|
|
34
41
|
*/
|
|
@@ -15,6 +15,12 @@ export interface MeshDepthMaterialParameters extends MaterialParameters {
|
|
|
15
15
|
|
|
16
16
|
export class MeshDepthMaterial extends Material {
|
|
17
17
|
constructor(parameters?: MeshDepthMaterialParameters);
|
|
18
|
+
/**
|
|
19
|
+
* Read-only flag to check if a given object is of type {@link MeshDepthMaterial}.
|
|
20
|
+
* @remarks This is a _constant_ value
|
|
21
|
+
* @defaultValue `true`
|
|
22
|
+
*/
|
|
23
|
+
readonly isMeshDepthMaterial: true;
|
|
18
24
|
|
|
19
25
|
/**
|
|
20
26
|
* @default 'MeshDepthMaterial'
|
|
@@ -16,6 +16,13 @@ export interface MeshDistanceMaterialParameters extends MaterialParameters {
|
|
|
16
16
|
export class MeshDistanceMaterial extends Material {
|
|
17
17
|
constructor(parameters?: MeshDistanceMaterialParameters);
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Read-only flag to check if a given object is of type {@link MeshDistanceMaterial}.
|
|
21
|
+
* @remarks This is a _constant_ value
|
|
22
|
+
* @defaultValue `true`
|
|
23
|
+
*/
|
|
24
|
+
readonly isMeshDistanceMaterial: true;
|
|
25
|
+
|
|
19
26
|
/**
|
|
20
27
|
* @default 'MeshDistanceMaterial'
|
|
21
28
|
*/
|
|
@@ -38,6 +38,13 @@ export interface MeshLambertMaterialParameters extends MaterialParameters {
|
|
|
38
38
|
export class MeshLambertMaterial extends Material {
|
|
39
39
|
constructor(parameters?: MeshLambertMaterialParameters);
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Read-only flag to check if a given object is of type {@link MeshLambertMaterial}.
|
|
43
|
+
* @remarks This is a _constant_ value
|
|
44
|
+
* @defaultValue `true`
|
|
45
|
+
*/
|
|
46
|
+
readonly isMeshLambertMaterial: true;
|
|
47
|
+
|
|
41
48
|
/**
|
|
42
49
|
* @default 'MeshLambertMaterial'
|
|
43
50
|
*/
|
|
@@ -24,6 +24,13 @@ export interface MeshMatcapMaterialParameters extends MaterialParameters {
|
|
|
24
24
|
export class MeshMatcapMaterial extends Material {
|
|
25
25
|
constructor(parameters?: MeshMatcapMaterialParameters);
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Read-only flag to check if a given object is of type {@link MeshMatcapMaterial}.
|
|
29
|
+
* @remarks This is a _constant_ value
|
|
30
|
+
* @defaultValue `true`
|
|
31
|
+
*/
|
|
32
|
+
readonly isMeshMatcapMaterial: true;
|
|
33
|
+
|
|
27
34
|
/**
|
|
28
35
|
* @default 'MeshMatcapMaterial'
|
|
29
36
|
*/
|
|
@@ -21,6 +21,13 @@ export interface MeshNormalMaterialParameters extends MaterialParameters {
|
|
|
21
21
|
export class MeshNormalMaterial extends Material {
|
|
22
22
|
constructor(parameters?: MeshNormalMaterialParameters);
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Read-only flag to check if a given object is of type {@link MeshNormalMaterial}.
|
|
26
|
+
* @remarks This is a _constant_ value
|
|
27
|
+
* @defaultValue `true`
|
|
28
|
+
*/
|
|
29
|
+
readonly isMeshNormalMaterial: true;
|
|
30
|
+
|
|
24
31
|
/**
|
|
25
32
|
* @default 'MeshNormalMaterial'
|
|
26
33
|
*/
|
|
@@ -43,6 +43,13 @@ export interface MeshPhongMaterialParameters extends MaterialParameters {
|
|
|
43
43
|
export class MeshPhongMaterial extends Material {
|
|
44
44
|
constructor(parameters?: MeshPhongMaterialParameters);
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Read-only flag to check if a given object is of type {@link MeshPhongMaterial}.
|
|
48
|
+
* @remarks This is a _constant_ value
|
|
49
|
+
* @defaultValue `true`
|
|
50
|
+
*/
|
|
51
|
+
readonly isMeshPhongMaterial: true;
|
|
52
|
+
|
|
46
53
|
/**
|
|
47
54
|
* @default 'MeshNormalMaterial'
|
|
48
55
|
*/
|
|
@@ -48,7 +48,12 @@ export interface MeshPhysicalMaterialParameters extends MeshStandardMaterialPara
|
|
|
48
48
|
export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
49
49
|
constructor(parameters?: MeshPhysicalMaterialParameters);
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Read-only flag to check if a given object is of type {@link MeshPhysicalMaterial}.
|
|
53
|
+
* @remarks This is a _constant_ value
|
|
54
|
+
* @defaultValue `true`
|
|
55
|
+
*/
|
|
56
|
+
readonly isMeshPhysicalMaterial: true;
|
|
52
57
|
|
|
53
58
|
/**
|
|
54
59
|
* @default 'MeshPhysicalMaterial'
|
|
@@ -38,6 +38,13 @@ export interface MeshStandardMaterialParameters extends MaterialParameters {
|
|
|
38
38
|
export class MeshStandardMaterial extends Material {
|
|
39
39
|
constructor(parameters?: MeshStandardMaterialParameters);
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Read-only flag to check if a given object is of type {@link MeshStandardMaterial}.
|
|
43
|
+
* @remarks This is a _constant_ value
|
|
44
|
+
* @defaultValue `true`
|
|
45
|
+
*/
|
|
46
|
+
readonly isMeshStandardMaterial: true;
|
|
47
|
+
|
|
41
48
|
/**
|
|
42
49
|
* @default 'MeshStandardMaterial'
|
|
43
50
|
*/
|
|
@@ -200,7 +207,5 @@ export class MeshStandardMaterial extends Material {
|
|
|
200
207
|
*/
|
|
201
208
|
fog: boolean;
|
|
202
209
|
|
|
203
|
-
isMeshStandardMaterial: boolean;
|
|
204
|
-
|
|
205
210
|
setValues(parameters: MeshStandardMaterialParameters): void;
|
|
206
211
|
}
|
|
@@ -36,6 +36,13 @@ export interface MeshToonMaterialParameters extends MaterialParameters {
|
|
|
36
36
|
export class MeshToonMaterial extends Material {
|
|
37
37
|
constructor(parameters?: MeshToonMaterialParameters);
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Read-only flag to check if a given object is of type {@link MeshToonMaterial}.
|
|
41
|
+
* @remarks This is a _constant_ value
|
|
42
|
+
* @defaultValue `true`
|
|
43
|
+
*/
|
|
44
|
+
readonly isMeshToonMaterial: true;
|
|
45
|
+
|
|
39
46
|
/**
|
|
40
47
|
* @default 'MeshToonMaterial'
|
|
41
48
|
*/
|
|
@@ -14,6 +14,13 @@ export interface PointsMaterialParameters extends MaterialParameters {
|
|
|
14
14
|
export class PointsMaterial extends Material {
|
|
15
15
|
constructor(parameters?: PointsMaterialParameters);
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Read-only flag to check if a given object is of type {@link PointsMaterial}.
|
|
19
|
+
* @remarks This is a _constant_ value
|
|
20
|
+
* @defaultValue `true`
|
|
21
|
+
*/
|
|
22
|
+
readonly isPointsMaterial: true;
|
|
23
|
+
|
|
17
24
|
/**
|
|
18
25
|
* @default 'PointsMaterial'
|
|
19
26
|
*/
|
|
@@ -2,4 +2,13 @@ import { ShaderMaterialParameters, ShaderMaterial } from './ShaderMaterial.js';
|
|
|
2
2
|
|
|
3
3
|
export class RawShaderMaterial extends ShaderMaterial {
|
|
4
4
|
constructor(parameters?: ShaderMaterialParameters);
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Read-only flag to check if a given object is of type {@link RawShaderMaterial}.
|
|
8
|
+
* @remarks This is a _constant_ value
|
|
9
|
+
* @defaultValue `true`
|
|
10
|
+
*/
|
|
11
|
+
readonly isRawShaderMaterial: true;
|
|
12
|
+
|
|
13
|
+
override readonly type: 'RawShaderMaterial';
|
|
5
14
|
}
|
|
@@ -28,6 +28,13 @@ export interface ShaderMaterialParameters extends MaterialParameters {
|
|
|
28
28
|
export class ShaderMaterial extends Material {
|
|
29
29
|
constructor(parameters?: ShaderMaterialParameters);
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Read-only flag to check if a given object is of type {@link ShaderMaterial}.
|
|
33
|
+
* @remarks This is a _constant_ value
|
|
34
|
+
* @defaultValue `true`
|
|
35
|
+
*/
|
|
36
|
+
readonly isShaderMaterial: true;
|
|
37
|
+
|
|
31
38
|
/**
|
|
32
39
|
* @default 'ShaderMaterial'
|
|
33
40
|
*/
|
|
@@ -85,13 +92,14 @@ export class ShaderMaterial extends Material {
|
|
|
85
92
|
derivatives: any;
|
|
86
93
|
|
|
87
94
|
/**
|
|
88
|
-
* @default { derivatives: false, fragDepth: false, drawBuffers: false, shaderTextureLOD: false }
|
|
95
|
+
* @default { derivatives: false, fragDepth: false, drawBuffers: false, shaderTextureLOD: false, clipCullDistance: false }
|
|
89
96
|
*/
|
|
90
97
|
extensions: {
|
|
91
98
|
derivatives: boolean;
|
|
92
99
|
fragDepth: boolean;
|
|
93
100
|
drawBuffers: boolean;
|
|
94
101
|
shaderTextureLOD: boolean;
|
|
102
|
+
clipCullDistance: boolean;
|
|
95
103
|
};
|
|
96
104
|
|
|
97
105
|
/**
|
|
@@ -114,8 +122,6 @@ export class ShaderMaterial extends Material {
|
|
|
114
122
|
*/
|
|
115
123
|
glslVersion: GLSLVersion | null;
|
|
116
124
|
|
|
117
|
-
isShaderMaterial: boolean;
|
|
118
|
-
|
|
119
125
|
setValues(parameters: ShaderMaterialParameters): void;
|
|
120
126
|
toJSON(meta: any): any;
|
|
121
127
|
}
|
|
@@ -9,6 +9,13 @@ export interface ShadowMaterialParameters extends MaterialParameters {
|
|
|
9
9
|
export class ShadowMaterial extends Material {
|
|
10
10
|
constructor(parameters?: ShadowMaterialParameters);
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Read-only flag to check if a given object is of type {@link ShadowMaterial}.
|
|
14
|
+
* @remarks This is a _constant_ value
|
|
15
|
+
* @defaultValue `true`
|
|
16
|
+
*/
|
|
17
|
+
readonly isShadowMaterial: true;
|
|
18
|
+
|
|
12
19
|
/**
|
|
13
20
|
* @default 'ShadowMaterial'
|
|
14
21
|
*/
|
|
@@ -13,6 +13,13 @@ export interface SpriteMaterialParameters extends MaterialParameters {
|
|
|
13
13
|
|
|
14
14
|
export class SpriteMaterial extends Material {
|
|
15
15
|
constructor(parameters?: SpriteMaterialParameters);
|
|
16
|
+
/**
|
|
17
|
+
* Read-only flag to check if a given object is of type {@link SpriteMaterial}.
|
|
18
|
+
* @remarks This is a _constant_ value
|
|
19
|
+
* @defaultValue `true`
|
|
20
|
+
*/
|
|
21
|
+
readonly isSpriteMaterial: true;
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
* @default 'SpriteMaterial'
|
|
18
25
|
*/
|
|
@@ -54,8 +61,6 @@ export class SpriteMaterial extends Material {
|
|
|
54
61
|
*/
|
|
55
62
|
fog: boolean;
|
|
56
63
|
|
|
57
|
-
readonly isSpriteMaterial: true;
|
|
58
|
-
|
|
59
64
|
setValues(parameters: SpriteMaterialParameters): void;
|
|
60
65
|
copy(source: SpriteMaterial): this;
|
|
61
66
|
}
|
three/src/math/Matrix4.d.ts
CHANGED
|
@@ -94,40 +94,40 @@ export class Matrix4 implements Matrix {
|
|
|
94
94
|
n42: number,
|
|
95
95
|
n43: number,
|
|
96
96
|
n44: number,
|
|
97
|
-
):
|
|
97
|
+
): this;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* Resets this matrix to identity.
|
|
101
101
|
*/
|
|
102
|
-
identity():
|
|
102
|
+
identity(): this;
|
|
103
103
|
clone(): Matrix4;
|
|
104
104
|
copy(m: Matrix4): this;
|
|
105
|
-
copyPosition(m: Matrix4):
|
|
106
|
-
extractBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3):
|
|
107
|
-
makeBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3):
|
|
105
|
+
copyPosition(m: Matrix4): this;
|
|
106
|
+
extractBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): this;
|
|
107
|
+
makeBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): this;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* Copies the rotation component of the supplied matrix m into this matrix rotation component.
|
|
111
111
|
*/
|
|
112
|
-
extractRotation(m: Matrix4):
|
|
113
|
-
makeRotationFromEuler(euler: Euler):
|
|
114
|
-
makeRotationFromQuaternion(q: Quaternion):
|
|
112
|
+
extractRotation(m: Matrix4): this;
|
|
113
|
+
makeRotationFromEuler(euler: Euler): this;
|
|
114
|
+
makeRotationFromQuaternion(q: Quaternion): this;
|
|
115
115
|
/**
|
|
116
116
|
* Constructs a rotation matrix, looking from eye towards center with defined up vector.
|
|
117
117
|
*/
|
|
118
|
-
lookAt(eye: Vector3, target: Vector3, up: Vector3):
|
|
118
|
+
lookAt(eye: Vector3, target: Vector3, up: Vector3): this;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* Multiplies this matrix by m.
|
|
122
122
|
*/
|
|
123
|
-
multiply(m: Matrix4):
|
|
123
|
+
multiply(m: Matrix4): this;
|
|
124
124
|
|
|
125
|
-
premultiply(m: Matrix4):
|
|
125
|
+
premultiply(m: Matrix4): this;
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
128
|
* Sets this matrix to a x b.
|
|
129
129
|
*/
|
|
130
|
-
multiplyMatrices(a: Matrix4, b: Matrix4):
|
|
130
|
+
multiplyMatrices(a: Matrix4, b: Matrix4): this;
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* Sets this matrix to a x b and stores the result into the flat array r.
|
|
@@ -140,7 +140,7 @@ export class Matrix4 implements Matrix {
|
|
|
140
140
|
/**
|
|
141
141
|
* Multiplies this matrix by s.
|
|
142
142
|
*/
|
|
143
|
-
multiplyScalar(s: number):
|
|
143
|
+
multiplyScalar(s: number): this;
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
146
|
* Computes determinant of this matrix.
|
|
@@ -151,23 +151,23 @@ export class Matrix4 implements Matrix {
|
|
|
151
151
|
/**
|
|
152
152
|
* Transposes this matrix.
|
|
153
153
|
*/
|
|
154
|
-
transpose():
|
|
154
|
+
transpose(): this;
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
157
|
* Sets the position component for this matrix from vector v.
|
|
158
158
|
*/
|
|
159
|
-
setPosition(v: Vector3):
|
|
160
|
-
setPosition(x: number, y: number, z: number):
|
|
159
|
+
setPosition(v: Vector3): this;
|
|
160
|
+
setPosition(x: number, y: number, z: number): this;
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
163
|
* Inverts this matrix.
|
|
164
164
|
*/
|
|
165
|
-
invert():
|
|
165
|
+
invert(): this;
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
168
|
* Multiplies the columns of this matrix by vector v.
|
|
169
169
|
*/
|
|
170
|
-
scale(v: Vector3):
|
|
170
|
+
scale(v: Vector3): this;
|
|
171
171
|
|
|
172
172
|
getMaxScaleOnAxis(): number;
|
|
173
173
|
/**
|
|
@@ -181,21 +181,21 @@ export class Matrix4 implements Matrix {
|
|
|
181
181
|
*
|
|
182
182
|
* @param theta Rotation angle in radians.
|
|
183
183
|
*/
|
|
184
|
-
makeRotationX(theta: number):
|
|
184
|
+
makeRotationX(theta: number): this;
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
187
|
* Sets this matrix as rotation transform around y axis by theta radians.
|
|
188
188
|
*
|
|
189
189
|
* @param theta Rotation angle in radians.
|
|
190
190
|
*/
|
|
191
|
-
makeRotationY(theta: number):
|
|
191
|
+
makeRotationY(theta: number): this;
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
194
|
* Sets this matrix as rotation transform around z axis by theta radians.
|
|
195
195
|
*
|
|
196
196
|
* @param theta Rotation angle in radians.
|
|
197
197
|
*/
|
|
198
|
-
makeRotationZ(theta: number):
|
|
198
|
+
makeRotationZ(theta: number): this;
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
201
|
* Sets this matrix as rotation transform around axis by angle radians.
|
|
@@ -204,27 +204,27 @@ export class Matrix4 implements Matrix {
|
|
|
204
204
|
* @param axis Rotation axis.
|
|
205
205
|
* @param theta Rotation angle in radians.
|
|
206
206
|
*/
|
|
207
|
-
makeRotationAxis(axis: Vector3, angle: number):
|
|
207
|
+
makeRotationAxis(axis: Vector3, angle: number): this;
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
210
|
* Sets this matrix as scale transform.
|
|
211
211
|
*/
|
|
212
|
-
makeScale(x: number, y: number, z: number):
|
|
212
|
+
makeScale(x: number, y: number, z: number): this;
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
215
|
* Sets this matrix as shear transform.
|
|
216
216
|
*/
|
|
217
|
-
makeShear(xy: number, xz: number, yx: number, yz: number, zx: number, zy: number):
|
|
217
|
+
makeShear(xy: number, xz: number, yx: number, yz: number, zx: number, zy: number): this;
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
220
|
* Sets this matrix to the transformation composed of translation, rotation and scale.
|
|
221
221
|
*/
|
|
222
|
-
compose(translation: Vector3, rotation: Quaternion, scale: Vector3):
|
|
222
|
+
compose(translation: Vector3, rotation: Quaternion, scale: Vector3): this;
|
|
223
223
|
|
|
224
224
|
/**
|
|
225
225
|
* Decomposes this matrix into it's position, quaternion and scale components.
|
|
226
226
|
*/
|
|
227
|
-
decompose(translation: Vector3, rotation: Quaternion, scale: Vector3):
|
|
227
|
+
decompose(translation: Vector3, rotation: Quaternion, scale: Vector3): this;
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
230
|
* Creates a perspective projection matrix.
|
|
@@ -237,7 +237,7 @@ export class Matrix4 implements Matrix {
|
|
|
237
237
|
near: number,
|
|
238
238
|
far: number,
|
|
239
239
|
coordinateSystem?: CoordinateSystem,
|
|
240
|
-
):
|
|
240
|
+
): this;
|
|
241
241
|
|
|
242
242
|
/**
|
|
243
243
|
* Creates an orthographic projection matrix.
|
|
@@ -250,7 +250,7 @@ export class Matrix4 implements Matrix {
|
|
|
250
250
|
near: number,
|
|
251
251
|
far: number,
|
|
252
252
|
coordinateSystem?: CoordinateSystem,
|
|
253
|
-
):
|
|
253
|
+
): this;
|
|
254
254
|
equals(matrix: Matrix4): boolean;
|
|
255
255
|
|
|
256
256
|
/**
|
|
@@ -258,7 +258,7 @@ export class Matrix4 implements Matrix {
|
|
|
258
258
|
* @param array the source array or array-like.
|
|
259
259
|
* @param offset (optional) offset into the array-like. Default is 0.
|
|
260
260
|
*/
|
|
261
|
-
fromArray(array: number[] | ArrayLike<number>, offset?: number):
|
|
261
|
+
fromArray(array: number[] | ArrayLike<number>, offset?: number): this;
|
|
262
262
|
|
|
263
263
|
/**
|
|
264
264
|
* Returns an array with the values of this matrix, or copies them into the provided array.
|
|
@@ -280,7 +280,7 @@ export class Matrix4 implements Matrix {
|
|
|
280
280
|
/**
|
|
281
281
|
* Set the upper 3x3 elements of this matrix to the values of the Matrix3 m.
|
|
282
282
|
*/
|
|
283
|
-
setFromMatrix3(m: Matrix3):
|
|
283
|
+
setFromMatrix3(m: Matrix3): this;
|
|
284
284
|
|
|
285
285
|
/**
|
|
286
286
|
* @deprecated Use {@link Matrix4#copyPosition .copyPosition()} instead.
|
three/src/math/Sphere.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ import { Matrix4 } from './Matrix4.js';
|
|
|
6
6
|
export class Sphere {
|
|
7
7
|
constructor(center?: Vector3, radius?: number);
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Read-only flag to check if a given object is of type {@link Sphere}.
|
|
11
|
+
*/
|
|
12
|
+
readonly isSphere: true;
|
|
13
|
+
|
|
9
14
|
/**
|
|
10
15
|
* @default new Vector3()
|
|
11
16
|
*/
|
three/src/math/Triangle.d.ts
CHANGED
|
@@ -39,14 +39,14 @@ export class Triangle {
|
|
|
39
39
|
getMidpoint(target: Vector3): Vector3;
|
|
40
40
|
getNormal(target: Vector3): Vector3;
|
|
41
41
|
getPlane(target: Plane): Plane;
|
|
42
|
-
getBarycoord(point: Vector3, target: Vector3): Vector3;
|
|
42
|
+
getBarycoord(point: Vector3, target: Vector3): Vector3 | null;
|
|
43
43
|
/**
|
|
44
44
|
* @deprecated Triangle.getUV() has been renamed to Triangle.getInterpolation().
|
|
45
45
|
*/
|
|
46
46
|
getUV(point: Vector3, uv1: Vector2, uv2: Vector2, uv3: Vector2, target: Vector2): Vector2;
|
|
47
|
-
getInterpolation(point: Vector3, v1: Vector2, v2: Vector2, v3: Vector2, target: Vector2): Vector2;
|
|
48
|
-
getInterpolation(point: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target: Vector3): Vector3;
|
|
49
|
-
getInterpolation(point: Vector3, v1: Vector4, v2: Vector4, v3: Vector4, target: Vector4): Vector4;
|
|
47
|
+
getInterpolation(point: Vector3, v1: Vector2, v2: Vector2, v3: Vector2, target: Vector2): Vector2 | null;
|
|
48
|
+
getInterpolation(point: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target: Vector3): Vector3 | null;
|
|
49
|
+
getInterpolation(point: Vector3, v1: Vector4, v2: Vector4, v3: Vector4, target: Vector4): Vector4 | null;
|
|
50
50
|
containsPoint(point: Vector3): boolean;
|
|
51
51
|
intersectsBox(box: Box3): boolean;
|
|
52
52
|
isFrontFacing(direction: Vector3): boolean;
|
|
@@ -54,7 +54,7 @@ export class Triangle {
|
|
|
54
54
|
equals(triangle: Triangle): boolean;
|
|
55
55
|
|
|
56
56
|
static getNormal(a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3;
|
|
57
|
-
static getBarycoord(point: Vector3, a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3;
|
|
57
|
+
static getBarycoord(point: Vector3, a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3 | null;
|
|
58
58
|
static containsPoint(point: Vector3, a: Vector3, b: Vector3, c: Vector3): boolean;
|
|
59
59
|
/**
|
|
60
60
|
* @deprecated THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().
|
|
@@ -78,7 +78,7 @@ export class Triangle {
|
|
|
78
78
|
v2: Vector2,
|
|
79
79
|
v3: Vector2,
|
|
80
80
|
target: Vector2,
|
|
81
|
-
): Vector2;
|
|
81
|
+
): Vector2 | null;
|
|
82
82
|
static getInterpolation(
|
|
83
83
|
point: Vector3,
|
|
84
84
|
p1: Vector3,
|
|
@@ -88,7 +88,7 @@ export class Triangle {
|
|
|
88
88
|
v2: Vector3,
|
|
89
89
|
v3: Vector3,
|
|
90
90
|
target: Vector3,
|
|
91
|
-
): Vector3;
|
|
91
|
+
): Vector3 | null;
|
|
92
92
|
static getInterpolation(
|
|
93
93
|
point: Vector3,
|
|
94
94
|
p1: Vector3,
|
|
@@ -98,6 +98,6 @@ export class Triangle {
|
|
|
98
98
|
v2: Vector4,
|
|
99
99
|
v3: Vector4,
|
|
100
100
|
target: Vector4,
|
|
101
|
-
): Vector4;
|
|
101
|
+
): Vector4 | null;
|
|
102
102
|
static isFrontFacing(a: Vector3, b: Vector3, c: Vector3, direction: Vector3): boolean;
|
|
103
103
|
}
|
|
@@ -11,8 +11,7 @@ import { BindMode } from '../constants.js';
|
|
|
11
11
|
/**
|
|
12
12
|
* 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.
|
|
13
13
|
* @remarks
|
|
14
|
-
* {@link SkinnedMesh} can only be used with WebGL 2
|
|
15
|
-
* With WebGL 1 `OES_texture_float` and vertex textures support is required.
|
|
14
|
+
* {@link SkinnedMesh} can only be used with WebGL 2.
|
|
16
15
|
* @example
|
|
17
16
|
* ```typescript
|
|
18
17
|
* const geometry = new THREE.CylinderGeometry(5, 5, 5, 5, 15, 5, 30);
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { IUniform } from './UniformsLib.js';
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface ShaderLibShader {
|
|
4
4
|
uniforms: { [uniform: string]: IUniform };
|
|
5
5
|
vertexShader: string;
|
|
6
6
|
fragmentShader: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export let ShaderLib: {
|
|
10
|
-
[name: string]:
|
|
11
|
-
basic:
|
|
12
|
-
lambert:
|
|
13
|
-
phong:
|
|
14
|
-
standard:
|
|
15
|
-
matcap:
|
|
16
|
-
points:
|
|
17
|
-
dashed:
|
|
18
|
-
depth:
|
|
19
|
-
normal:
|
|
20
|
-
sprite:
|
|
21
|
-
background:
|
|
22
|
-
cube:
|
|
23
|
-
equirect:
|
|
24
|
-
distanceRGBA:
|
|
25
|
-
shadow:
|
|
26
|
-
physical:
|
|
10
|
+
[name: string]: ShaderLibShader;
|
|
11
|
+
basic: ShaderLibShader;
|
|
12
|
+
lambert: ShaderLibShader;
|
|
13
|
+
phong: ShaderLibShader;
|
|
14
|
+
standard: ShaderLibShader;
|
|
15
|
+
matcap: ShaderLibShader;
|
|
16
|
+
points: ShaderLibShader;
|
|
17
|
+
dashed: ShaderLibShader;
|
|
18
|
+
depth: ShaderLibShader;
|
|
19
|
+
normal: ShaderLibShader;
|
|
20
|
+
sprite: ShaderLibShader;
|
|
21
|
+
background: ShaderLibShader;
|
|
22
|
+
cube: ShaderLibShader;
|
|
23
|
+
equirect: ShaderLibShader;
|
|
24
|
+
distanceRGBA: ShaderLibShader;
|
|
25
|
+
shadow: ShaderLibShader;
|
|
26
|
+
physical: ShaderLibShader;
|
|
27
27
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { UniformsGroup } from '../../core/UniformsGroup.js';
|
|
2
|
+
import { IUniform } from './UniformsLib.js';
|
|
2
3
|
|
|
3
|
-
export function cloneUniforms(
|
|
4
|
-
export function mergeUniforms(uniforms:
|
|
4
|
+
export function cloneUniforms<T extends { [uniform: string]: IUniform }>(uniformsSrc: T): T;
|
|
5
|
+
export function mergeUniforms(uniforms: Array<{ [uniform: string]: IUniform }>): { [uniform: string]: IUniform };
|
|
5
6
|
|
|
6
7
|
export function cloneUniformsGroups(src: UniformsGroup[]): UniformsGroup[];
|
|
7
8
|
|