@types/three 0.176.0 → 0.178.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 +0 -1
- three/examples/jsm/capabilities/WebGL.d.ts +0 -11
- three/examples/jsm/controls/TransformControls.d.ts +16 -1
- three/examples/jsm/helpers/TextureHelper.d.ts +2 -2
- three/examples/jsm/helpers/TextureHelperGPU.d.ts +2 -2
- three/examples/jsm/loaders/LDrawLoader.d.ts +8 -3
- three/examples/jsm/loaders/SVGLoader.d.ts +1 -1
- three/examples/jsm/math/Octree.d.ts +3 -0
- three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
- three/examples/jsm/postprocessing/AfterimagePass.d.ts +13 -10
- three/examples/jsm/postprocessing/FXAAPass.d.ts +7 -0
- three/examples/jsm/transpiler/AST.d.ts +77 -26
- three/examples/jsm/transpiler/TSLEncoder.d.ts +9 -3
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +4 -4
- three/examples/jsm/tsl/display/BleachBypass.d.ts +2 -2
- three/examples/jsm/tsl/display/BloomNode.d.ts +2 -2
- three/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +20 -0
- three/examples/jsm/tsl/display/DenoiseNode.d.ts +4 -4
- three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +6 -6
- three/examples/jsm/tsl/display/DotScreenNode.d.ts +2 -2
- three/examples/jsm/tsl/display/FXAANode.d.ts +3 -3
- three/examples/jsm/tsl/display/FilmNode.d.ts +4 -4
- three/examples/jsm/tsl/display/GTAONode.d.ts +3 -3
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +5 -5
- three/examples/jsm/tsl/display/LensflareNode.d.ts +8 -8
- three/examples/jsm/tsl/display/Lut3DNode.d.ts +4 -4
- three/examples/jsm/tsl/display/MotionBlur.d.ts +4 -4
- three/examples/jsm/tsl/display/OutlineNode.d.ts +3 -3
- three/examples/jsm/tsl/display/RGBShiftNode.d.ts +3 -3
- three/examples/jsm/tsl/display/SMAANode.d.ts +3 -3
- three/examples/jsm/tsl/display/SSRNode.d.ts +5 -5
- three/examples/jsm/tsl/display/Sepia.d.ts +2 -2
- three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +3 -3
- three/examples/jsm/tsl/display/TransitionNode.d.ts +4 -4
- three/examples/jsm/tsl/display/hashBlur.d.ts +10 -4
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +5 -5
- three/package.json +3 -3
- three/src/Three.Core.d.ts +0 -2
- three/src/Three.TSL.d.ts +11 -18
- three/src/Three.WebGPU.Nodes.d.ts +1 -0
- three/src/Three.WebGPU.d.ts +3 -0
- three/src/animation/tracks/NumberKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/StringKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/VectorKeyframeTrack.d.ts +1 -1
- three/src/constants.d.ts +13 -5
- three/src/core/BufferGeometry.d.ts +11 -2
- three/src/core/GLBufferAttribute.d.ts +18 -1
- three/src/core/RenderTarget.d.ts +3 -20
- three/src/extras/DataUtils.d.ts +4 -4
- three/src/geometries/CapsuleGeometry.d.ts +1 -0
- three/src/helpers/AxesHelper.d.ts +3 -1
- three/src/lights/SpotLightShadow.d.ts +2 -0
- three/src/lights/webgpu/ProjectorLight.d.ts +17 -0
- three/src/materials/LineBasicMaterial.d.ts +66 -34
- three/src/materials/LineDashedMaterial.d.ts +41 -21
- three/src/materials/Material.d.ts +408 -398
- three/src/materials/MeshBasicMaterial.d.ts +101 -62
- three/src/materials/MeshDepthMaterial.d.ts +71 -32
- three/src/materials/MeshDistanceMaterial.d.ts +65 -29
- three/src/materials/MeshLambertMaterial.d.ts +179 -103
- three/src/materials/MeshMatcapMaterial.d.ts +97 -55
- three/src/materials/MeshNormalMaterial.d.ts +76 -41
- three/src/materials/MeshPhongMaterial.d.ts +164 -100
- three/src/materials/MeshPhysicalMaterial.d.ts +164 -116
- three/src/materials/MeshStandardMaterial.d.ts +178 -91
- three/src/materials/MeshToonMaterial.d.ts +130 -81
- three/src/materials/PointsMaterial.d.ts +77 -30
- three/src/materials/RawShaderMaterial.d.ts +12 -7
- three/src/materials/ShaderMaterial.d.ts +186 -98
- three/src/materials/ShadowMaterial.d.ts +49 -23
- three/src/materials/SpriteMaterial.d.ts +62 -33
- three/src/materials/nodes/Line2NodeMaterial.d.ts +87 -40
- three/src/materials/nodes/LineBasicNodeMaterial.d.ts +35 -16
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +75 -20
- three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +49 -30
- three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +49 -42
- three/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +38 -26
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +36 -22
- three/src/materials/nodes/MeshPhongNodeMaterial.d.ts +68 -48
- three/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +240 -65
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +99 -3
- three/src/materials/nodes/MeshStandardNodeMaterial.d.ts +83 -47
- three/src/materials/nodes/MeshToonNodeMaterial.d.ts +42 -36
- three/src/materials/nodes/NodeMaterial.d.ts +418 -55
- three/src/materials/nodes/NodeMaterials.d.ts +3 -2
- three/src/materials/nodes/PointsNodeMaterial.d.ts +31 -7
- three/src/materials/nodes/ShadowNodeMaterial.d.ts +38 -11
- three/src/materials/nodes/SpriteNodeMaterial.d.ts +68 -18
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +50 -14
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +4 -0
- three/src/math/Box3.d.ts +8 -0
- three/src/math/Color.d.ts +1 -1
- three/src/math/ColorManagement.d.ts +12 -2
- three/src/math/Sphere.d.ts +8 -0
- three/src/math/Triangle.d.ts +3 -3
- three/src/nodes/Nodes.d.ts +2 -3
- three/src/nodes/TSL.d.ts +4 -3
- three/src/nodes/accessors/AccessorsUtils.d.ts +3 -3
- three/src/nodes/accessors/Bitangent.d.ts +0 -2
- three/src/nodes/accessors/CubeTextureNode.d.ts +16 -5
- three/src/nodes/accessors/Normal.d.ts +19 -5
- three/src/nodes/accessors/ReferenceBaseNode.d.ts +1 -1
- three/src/nodes/accessors/StorageBufferNode.d.ts +3 -2
- three/src/nodes/accessors/StorageTextureNode.d.ts +5 -5
- three/src/nodes/accessors/Tangent.d.ts +0 -2
- three/src/nodes/accessors/TangentUtils.d.ts +22 -0
- three/src/nodes/accessors/Texture3DNode.d.ts +5 -4
- three/src/nodes/accessors/TextureBicubic.d.ts +4 -2
- three/src/nodes/accessors/TextureNode.d.ts +24 -19
- three/src/nodes/accessors/TextureSizeNode.d.ts +3 -3
- three/src/nodes/accessors/UniformArrayNode.d.ts +2 -7
- three/src/nodes/code/FunctionCallNode.d.ts +3 -1
- three/src/nodes/code/FunctionNode.d.ts +2 -2
- three/src/nodes/code/ScriptableNode.d.ts +2 -2
- three/src/nodes/core/AssignNode.d.ts +7 -3
- three/src/nodes/core/AttributeNode.d.ts +1 -1
- three/src/nodes/core/BypassNode.d.ts +2 -2
- three/src/nodes/core/CacheNode.d.ts +1 -0
- three/src/nodes/core/ContextNode.d.ts +3 -3
- three/src/nodes/core/Node.d.ts +5 -4
- three/src/nodes/core/NodeUtils.d.ts +4 -0
- three/src/nodes/core/StackNode.d.ts +3 -13
- three/src/nodes/core/SubBuildNode.d.ts +15 -0
- three/src/nodes/core/VarNode.d.ts +4 -4
- three/src/nodes/core/VaryingNode.d.ts +3 -3
- three/src/nodes/display/BlendModes.d.ts +14 -10
- three/src/nodes/display/BumpMapNode.d.ts +4 -3
- three/src/nodes/display/ColorAdjustment.d.ts +17 -17
- three/src/nodes/display/ColorSpaceFunctions.d.ts +3 -3
- three/src/nodes/display/ColorSpaceNode.d.ts +6 -16
- three/src/nodes/display/FrontFacingNode.d.ts +1 -0
- three/src/nodes/display/PosterizeNode.d.ts +3 -3
- three/src/nodes/display/RenderOutputNode.d.ts +2 -2
- three/src/nodes/display/ScreenNode.d.ts +0 -10
- three/src/nodes/display/ToneMappingFunctions.d.ts +7 -7
- three/src/nodes/display/ToneMappingNode.d.ts +6 -6
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +3 -3
- three/src/nodes/fog/Fog.d.ts +10 -10
- three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +4 -4
- three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +2 -2
- three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +4 -4
- three/src/nodes/geometry/RangeNode.d.ts +9 -2
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +20 -20
- three/src/nodes/gpgpu/ComputeNode.d.ts +2 -2
- three/src/nodes/lighting/PointShadowNode.d.ts +11 -11
- three/src/nodes/lighting/ProjectorLightNode.d.ts +5 -0
- three/src/nodes/lighting/ShadowFilterNode.d.ts +11 -11
- three/src/nodes/lighting/SpotLightNode.d.ts +15 -1
- three/src/nodes/materialx/MaterialXNodes.d.ts +59 -59
- three/src/nodes/materialx/lib/mx_hsv.d.ts +3 -3
- three/src/nodes/materialx/lib/mx_noise.d.ts +206 -206
- three/src/nodes/materialx/lib/mx_transform_color.d.ts +2 -2
- three/src/nodes/math/ConditionalNode.d.ts +4 -19
- three/src/nodes/math/Hash.d.ts +2 -2
- three/src/nodes/math/MathNode.d.ts +21 -17
- three/src/nodes/math/OperatorNode.d.ts +41 -52
- three/src/nodes/math/TriNoise3D.d.ts +6 -6
- three/src/nodes/pmrem/PMREMNode.d.ts +3 -3
- three/src/nodes/pmrem/PMREMUtils.d.ts +20 -20
- three/src/nodes/procedural/Checker.d.ts +2 -2
- three/src/nodes/shapes/Shapes.d.ts +2 -2
- three/src/nodes/tsl/TSLBase.d.ts +1 -0
- three/src/nodes/tsl/TSLCore.d.ts +186 -81
- three/src/nodes/utils/CubeMapNode.d.ts +2 -2
- three/src/nodes/utils/DebugNode.d.ts +2 -2
- three/src/nodes/utils/Discard.d.ts +2 -2
- three/src/nodes/utils/EquirectUV.d.ts +4 -0
- three/src/nodes/utils/LoopNode.d.ts +2 -7
- three/src/nodes/utils/MatcapUV.d.ts +4 -0
- three/src/nodes/utils/Oscillators.d.ts +5 -5
- three/src/nodes/utils/Packing.d.ts +3 -3
- three/src/nodes/utils/PostProcessingUtils.d.ts +9 -9
- three/src/nodes/utils/RTTNode.d.ts +3 -3
- three/src/nodes/utils/ReflectorNode.d.ts +1 -0
- three/src/nodes/utils/RemapNode.d.ts +9 -9
- three/src/nodes/utils/RotateNode.d.ts +3 -3
- three/src/nodes/utils/SampleNode.d.ts +16 -0
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +4 -4
- three/src/nodes/utils/SpriteUtils.d.ts +2 -2
- three/src/nodes/utils/StorageArrayElementNode.d.ts +4 -3
- three/src/nodes/utils/TriplanarTextures.d.ts +20 -0
- three/src/nodes/utils/UVUtils.d.ts +8 -7
- three/src/nodes/utils/ViewportUtils.d.ts +2 -2
- three/src/objects/LOD.d.ts +1 -1
- three/src/objects/Mesh.d.ts +8 -0
- three/src/objects/Sprite.d.ts +8 -0
- three/src/renderers/WebGLRenderer.d.ts +3 -3
- three/src/renderers/common/Backend.d.ts +3 -3
- three/src/renderers/common/RenderObject.d.ts +10 -2
- three/src/renderers/common/Renderer.d.ts +10 -5
- three/src/renderers/common/Storage3DTexture.d.ts +40 -0
- three/src/renderers/common/StorageArrayTexture.d.ts +29 -0
- three/src/renderers/common/Textures.d.ts +2 -2
- three/src/renderers/common/XRManager.d.ts +45 -0
- three/src/renderers/common/XRRenderTarget.d.ts +3 -2
- three/src/renderers/common/nodes/NodeLibrary.d.ts +4 -9
- three/src/renderers/common/nodes/NodeSampledTexture.d.ts +1 -1
- three/src/renderers/common/nodes/Nodes.d.ts +1 -1
- three/src/renderers/webgpu/WebGPURenderer.d.ts +3 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +65 -0
- three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +1 -0
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +10 -1
- three/src/textures/DepthTexture.d.ts +4 -2
- three/src/textures/Source.d.ts +20 -16
- three/src/textures/Texture.d.ts +69 -2
- three/examples/jsm/effects/PeppersGhostEffect.d.ts +0 -10
- three/src/core/RenderTargetArray.d.ts +0 -9
- three/src/nodes/utils/EquirectUVNode.d.ts +0 -8
- three/src/nodes/utils/MatcapUVNode.d.ts +0 -8
- three/src/nodes/utils/TriplanarTexturesNode.d.ts +0 -36
- three/src/renderers/common/nodes/StandardNodeLibrary.d.ts +0 -5
- three/src/textures/DepthArrayTexture.d.ts +0 -14
|
@@ -1,231 +1,279 @@
|
|
|
1
|
-
import { Color
|
|
1
|
+
import { Color } from "../math/Color.js";
|
|
2
2
|
import { Vector2 } from "../math/Vector2.js";
|
|
3
3
|
import { Texture } from "../textures/Texture.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export interface MeshPhysicalMaterialParameters extends MeshStandardMaterialParameters {
|
|
7
|
-
anisotropyRotation?: number | undefined;
|
|
8
|
-
anisotropyMap?: Texture | null | undefined;
|
|
9
|
-
|
|
10
|
-
clearcoatMap?: Texture | null | undefined;
|
|
11
|
-
clearcoatRoughness?: number | undefined;
|
|
12
|
-
clearcoatRoughnessMap?: Texture | null | undefined;
|
|
13
|
-
clearcoatNormalScale?: Vector2 | undefined;
|
|
14
|
-
clearcoatNormalMap?: Texture | null | undefined;
|
|
15
|
-
|
|
16
|
-
ior?: number | undefined;
|
|
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
|
-
|
|
25
|
-
sheenColor?: ColorRepresentation | undefined;
|
|
26
|
-
sheenColorMap?: Texture | null | undefined;
|
|
27
|
-
sheenRoughness?: number | undefined;
|
|
28
|
-
sheenRoughnessMap?: Texture | null | undefined;
|
|
29
|
-
|
|
30
|
-
transmissionMap?: Texture | null | undefined;
|
|
31
|
-
|
|
32
|
-
thickness?: number | undefined;
|
|
33
|
-
thicknessMap?: Texture | null | undefined;
|
|
34
|
-
attenuationDistance?: number | undefined;
|
|
35
|
-
attenuationColor?: ColorRepresentation | undefined;
|
|
36
|
-
|
|
37
|
-
specularIntensity?: number | undefined;
|
|
38
|
-
specularIntensityMap?: Texture | null | undefined;
|
|
39
|
-
specularColor?: ColorRepresentation | undefined;
|
|
40
|
-
specularColorMap?: Texture | null | undefined;
|
|
41
|
-
|
|
42
|
-
anisotropy?: number | undefined;
|
|
43
|
-
clearcoat?: number | undefined;
|
|
44
|
-
iridescence?: number | undefined;
|
|
45
|
-
dispersion?: number | undefined;
|
|
46
|
-
sheen?: number | undefined;
|
|
47
|
-
transmission?: number | undefined;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
51
|
-
constructor(parameters?: MeshPhysicalMaterialParameters);
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Read-only flag to check if a given object is of type {@link MeshPhysicalMaterial}.
|
|
55
|
-
* @remarks This is a _constant_ value
|
|
56
|
-
* @defaultValue `true`
|
|
57
|
-
*/
|
|
58
|
-
readonly isMeshPhysicalMaterial: true;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* @default { 'STANDARD': '', 'PHYSICAL': '' }
|
|
62
|
-
*/
|
|
63
|
-
defines: { [key: string]: any };
|
|
4
|
+
import { MapColorPropertiesToColorRepresentations } from "./Material.js";
|
|
5
|
+
import { MeshStandardMaterial, MeshStandardMaterialProperties } from "./MeshStandardMaterial.js";
|
|
64
6
|
|
|
7
|
+
export interface MeshPhysicalMaterialProperties extends MeshStandardMaterialProperties {
|
|
65
8
|
/**
|
|
66
|
-
*
|
|
9
|
+
* The rotation of the anisotropy in tangent, bitangent space, measured in radians
|
|
10
|
+
* counter-clockwise from the tangent. When `anisotropyMap` is present, this
|
|
11
|
+
* property provides additional rotation to the vectors in the texture.
|
|
12
|
+
*
|
|
13
|
+
* @default 1
|
|
67
14
|
*/
|
|
68
|
-
anisotropyRotation
|
|
69
|
-
|
|
15
|
+
anisotropyRotation: number;
|
|
70
16
|
/**
|
|
17
|
+
* Red and green channels represent the anisotropy direction in `[-1, 1]` tangent,
|
|
18
|
+
* bitangent space, to be rotated by `anisotropyRotation`. The blue channel
|
|
19
|
+
* contains strength as `[0, 1]` to be multiplied by `anisotropy`.
|
|
20
|
+
*
|
|
71
21
|
* @default null
|
|
72
22
|
*/
|
|
73
|
-
anisotropyMap
|
|
74
|
-
|
|
23
|
+
anisotropyMap: Texture | null;
|
|
75
24
|
/**
|
|
25
|
+
* The red channel of this texture is multiplied against `clearcoat`,
|
|
26
|
+
* for per-pixel control over a coating's intensity.
|
|
27
|
+
*
|
|
76
28
|
* @default null
|
|
77
29
|
*/
|
|
78
30
|
clearcoatMap: Texture | null;
|
|
79
|
-
|
|
80
31
|
/**
|
|
32
|
+
* Roughness of the clear coat layer, from `0.0` to `1.0`.
|
|
33
|
+
*
|
|
81
34
|
* @default 0
|
|
82
35
|
*/
|
|
83
36
|
clearcoatRoughness: number;
|
|
84
|
-
|
|
85
37
|
/**
|
|
38
|
+
* The green channel of this texture is multiplied against
|
|
39
|
+
* `clearcoatRoughness`, for per-pixel control over a coating's roughness.
|
|
40
|
+
*
|
|
86
41
|
* @default null
|
|
87
42
|
*/
|
|
88
43
|
clearcoatRoughnessMap: Texture | null;
|
|
89
|
-
|
|
90
44
|
/**
|
|
91
|
-
*
|
|
45
|
+
* How much `clearcoatNormalMap` affects the clear coat layer, from
|
|
46
|
+
* `(0,0)` to `(1,1)`.
|
|
47
|
+
*
|
|
48
|
+
* @default (1,1)
|
|
92
49
|
*/
|
|
93
50
|
clearcoatNormalScale: Vector2;
|
|
94
|
-
|
|
95
51
|
/**
|
|
52
|
+
* Can be used to enable independent normals for the clear coat layer.
|
|
53
|
+
*
|
|
96
54
|
* @default null
|
|
97
55
|
*/
|
|
98
56
|
clearcoatNormalMap: Texture | null;
|
|
99
|
-
|
|
100
57
|
/**
|
|
58
|
+
* Index-of-refraction for non-metallic materials, from `1.0` to `2.333`.
|
|
59
|
+
*
|
|
101
60
|
* @default 1.5
|
|
102
61
|
*/
|
|
103
62
|
ior: number;
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* @default 0.5
|
|
107
|
-
*/
|
|
108
|
-
get reflectivity(): number;
|
|
109
|
-
set reflectivity(reflectivity: number);
|
|
110
|
-
|
|
111
63
|
/**
|
|
64
|
+
* The red channel of this texture is multiplied against `iridescence`, for per-pixel
|
|
65
|
+
* control over iridescence.
|
|
66
|
+
*
|
|
112
67
|
* @default null
|
|
113
68
|
*/
|
|
114
69
|
iridescenceMap: Texture | null;
|
|
115
|
-
|
|
116
70
|
/**
|
|
71
|
+
* Strength of the iridescence RGB color shift effect, represented by an index-of-refraction.
|
|
72
|
+
* Between `1.0` to `2.333`.
|
|
73
|
+
*
|
|
117
74
|
* @default 1.3
|
|
118
75
|
*/
|
|
119
76
|
iridescenceIOR: number;
|
|
120
|
-
|
|
121
77
|
/**
|
|
122
|
-
*
|
|
78
|
+
*Array of exactly 2 elements, specifying minimum and maximum thickness of the iridescence layer.
|
|
79
|
+
Thickness of iridescence layer has an equivalent effect of the one `thickness` has on `ior`.
|
|
80
|
+
*
|
|
81
|
+
* @default [100,400]
|
|
123
82
|
*/
|
|
124
83
|
iridescenceThicknessRange: [number, number];
|
|
125
|
-
|
|
126
84
|
/**
|
|
85
|
+
* A texture that defines the thickness of the iridescence layer, stored in the green channel.
|
|
86
|
+
* Minimum and maximum values of thickness are defined by `iridescenceThicknessRange` array:
|
|
87
|
+
* - `0.0` in the green channel will result in thickness equal to first element of the array.
|
|
88
|
+
* - `1.0` in the green channel will result in thickness equal to second element of the array.
|
|
89
|
+
* - Values in-between will linearly interpolate between the elements of the array.
|
|
90
|
+
*
|
|
127
91
|
* @default null
|
|
128
92
|
*/
|
|
129
93
|
iridescenceThicknessMap: Texture | null;
|
|
130
|
-
|
|
131
94
|
/**
|
|
132
|
-
*
|
|
95
|
+
* The sheen tint.
|
|
96
|
+
*
|
|
97
|
+
* @default (0,0,0)
|
|
133
98
|
*/
|
|
134
99
|
sheenColor: Color;
|
|
135
|
-
|
|
136
100
|
/**
|
|
101
|
+
* The RGB channels of this texture are multiplied against `sheenColor`, for per-pixel control
|
|
102
|
+
* over sheen tint.
|
|
103
|
+
*
|
|
137
104
|
* @default null
|
|
138
105
|
*/
|
|
139
106
|
sheenColorMap: Texture | null;
|
|
140
|
-
|
|
141
107
|
/**
|
|
142
|
-
*
|
|
108
|
+
* Roughness of the sheen layer, from `0.0` to `1.0`.
|
|
109
|
+
*
|
|
110
|
+
* @default 1
|
|
143
111
|
*/
|
|
144
112
|
sheenRoughness: number;
|
|
145
|
-
|
|
146
113
|
/**
|
|
114
|
+
* The alpha channel of this texture is multiplied against `sheenRoughness`, for per-pixel control
|
|
115
|
+
* over sheen roughness.
|
|
116
|
+
*
|
|
147
117
|
* @default null
|
|
148
118
|
*/
|
|
149
119
|
sheenRoughnessMap: Texture | null;
|
|
150
|
-
|
|
151
120
|
/**
|
|
121
|
+
* The red channel of this texture is multiplied against `transmission`, for per-pixel control over
|
|
122
|
+
* optical transparency.
|
|
123
|
+
*
|
|
152
124
|
* @default null
|
|
153
125
|
*/
|
|
154
126
|
transmissionMap: Texture | null;
|
|
155
|
-
|
|
156
127
|
/**
|
|
157
|
-
*
|
|
128
|
+
* The thickness of the volume beneath the surface. The value is given in the
|
|
129
|
+
* coordinate space of the mesh. If the value is `0` the material is
|
|
130
|
+
* thin-walled. Otherwise the material is a volume boundary.
|
|
131
|
+
*
|
|
132
|
+
* @default 0
|
|
158
133
|
*/
|
|
159
134
|
thickness: number;
|
|
160
|
-
|
|
161
135
|
/**
|
|
136
|
+
* A texture that defines the thickness, stored in the green channel. This will
|
|
137
|
+
* be multiplied by `thickness`.
|
|
138
|
+
*
|
|
162
139
|
* @default null
|
|
163
140
|
*/
|
|
164
141
|
thicknessMap: Texture | null;
|
|
165
|
-
|
|
166
142
|
/**
|
|
167
|
-
*
|
|
143
|
+
* Density of the medium given as the average distance that light travels in
|
|
144
|
+
* the medium before interacting with a particle. The value is given in world
|
|
145
|
+
* space units, and must be greater than zero.
|
|
146
|
+
*
|
|
147
|
+
* @default Infinity
|
|
168
148
|
*/
|
|
169
149
|
attenuationDistance: number;
|
|
170
|
-
|
|
171
150
|
/**
|
|
172
|
-
*
|
|
151
|
+
* The color that white light turns into due to absorption when reaching the
|
|
152
|
+
* attenuation distance.
|
|
153
|
+
*
|
|
154
|
+
* @default (1,1,1)
|
|
173
155
|
*/
|
|
174
156
|
attenuationColor: Color;
|
|
175
|
-
|
|
176
157
|
/**
|
|
177
|
-
*
|
|
158
|
+
* A float that scales the amount of specular reflection for non-metals only.
|
|
159
|
+
* When set to zero, the model is effectively Lambertian. From `0.0` to `1.0`.
|
|
160
|
+
*
|
|
161
|
+
* @default 1
|
|
178
162
|
*/
|
|
179
163
|
specularIntensity: number;
|
|
180
|
-
|
|
181
164
|
/**
|
|
165
|
+
* The alpha channel of this texture is multiplied against `specularIntensity`,
|
|
166
|
+
* for per-pixel control over specular intensity.
|
|
167
|
+
*
|
|
182
168
|
* @default null
|
|
183
169
|
*/
|
|
184
170
|
specularIntensityMap: Texture | null;
|
|
185
|
-
|
|
186
171
|
/**
|
|
187
|
-
*
|
|
172
|
+
* Tints the specular reflection at normal incidence for non-metals only.
|
|
173
|
+
*
|
|
174
|
+
* @default (1,1,1)
|
|
188
175
|
*/
|
|
189
176
|
specularColor: Color;
|
|
190
|
-
|
|
191
177
|
/**
|
|
178
|
+
* The RGB channels of this texture are multiplied against `specularColor`,
|
|
179
|
+
* for per-pixel control over specular color.
|
|
180
|
+
*
|
|
192
181
|
* @default null
|
|
193
182
|
*/
|
|
194
183
|
specularColorMap: Texture | null;
|
|
195
|
-
|
|
184
|
+
set anisotropy(value: number);
|
|
196
185
|
/**
|
|
186
|
+
* The anisotropy strength.
|
|
187
|
+
*
|
|
197
188
|
* @default 0
|
|
198
189
|
*/
|
|
199
190
|
get anisotropy(): number;
|
|
200
|
-
set
|
|
201
|
-
|
|
191
|
+
set clearcoat(value: number);
|
|
202
192
|
/**
|
|
193
|
+
* Represents the intensity of the clear coat layer, from `0.0` to `1.0`. Use
|
|
194
|
+
* clear coat related properties to enable multilayer materials that have a
|
|
195
|
+
* thin translucent layer over the base layer.
|
|
196
|
+
*
|
|
203
197
|
* @default 0
|
|
204
198
|
*/
|
|
205
199
|
get clearcoat(): number;
|
|
206
|
-
set
|
|
207
|
-
|
|
200
|
+
set iridescence(value: number);
|
|
208
201
|
/**
|
|
202
|
+
* The intensity of the iridescence layer, simulating RGB color shift based on the angle between
|
|
203
|
+
* the surface and the viewer, from `0.0` to `1.0`.
|
|
204
|
+
*
|
|
209
205
|
* @default 0
|
|
210
206
|
*/
|
|
211
207
|
get iridescence(): number;
|
|
212
|
-
set
|
|
213
|
-
|
|
208
|
+
set dispersion(value: number);
|
|
214
209
|
/**
|
|
210
|
+
* Defines the strength of the angular separation of colors (chromatic aberration) transmitting
|
|
211
|
+
* through a relatively clear volume. Any value zero or larger is valid, the typical range of
|
|
212
|
+
* realistic values is `[0, 1]`. This property can be only be used with transmissive objects.
|
|
213
|
+
*
|
|
215
214
|
* @default 0
|
|
216
215
|
*/
|
|
217
216
|
get dispersion(): number;
|
|
218
|
-
set
|
|
219
|
-
|
|
217
|
+
set sheen(value: number);
|
|
220
218
|
/**
|
|
221
|
-
*
|
|
219
|
+
* The intensity of the sheen layer, from `0.0` to `1.0`.
|
|
220
|
+
*
|
|
221
|
+
* @default 0
|
|
222
222
|
*/
|
|
223
223
|
get sheen(): number;
|
|
224
|
-
set
|
|
225
|
-
|
|
224
|
+
set transmission(value: number);
|
|
226
225
|
/**
|
|
226
|
+
* Degree of transmission (or optical transparency), from `0.0` to `1.0`.
|
|
227
|
+
*
|
|
228
|
+
* Thin, transparent or semitransparent, plastic or glass materials remain
|
|
229
|
+
* largely reflective even if they are fully transmissive. The transmission
|
|
230
|
+
* property can be used to model these materials.
|
|
231
|
+
*
|
|
232
|
+
* When transmission is non-zero, `opacity` should be set to `1`.
|
|
233
|
+
*
|
|
227
234
|
* @default 0
|
|
228
235
|
*/
|
|
229
236
|
get transmission(): number;
|
|
230
|
-
set transmission(value: number);
|
|
231
237
|
}
|
|
238
|
+
|
|
239
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
240
|
+
export interface MeshPhysicalMaterialParameters
|
|
241
|
+
extends Partial<MapColorPropertiesToColorRepresentations<MeshPhysicalMaterialProperties>>
|
|
242
|
+
{}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* An extension of the {@link MeshStandardMaterial}, providing more advanced
|
|
246
|
+
* physically-based rendering properties:
|
|
247
|
+
*
|
|
248
|
+
* - Anisotropy: Ability to represent the anisotropic property of materials
|
|
249
|
+
* as observable with brushed metals.
|
|
250
|
+
* - Clearcoat: Some materials — like car paints, carbon fiber, and wet surfaces — require
|
|
251
|
+
* a clear, reflective layer on top of another layer that may be irregular or rough.
|
|
252
|
+
* Clearcoat approximates this effect, without the need for a separate transparent surface.
|
|
253
|
+
* - Iridescence: Allows to render the effect where hue varies depending on the viewing
|
|
254
|
+
* angle and illumination angle. This can be seen on soap bubbles, oil films, or on the
|
|
255
|
+
* wings of many insects.
|
|
256
|
+
* - Physically-based transparency: One limitation of {@link Material#opacity} is that highly
|
|
257
|
+
* transparent materials are less reflective. Physically-based transmission provides a more
|
|
258
|
+
* realistic option for thin, transparent surfaces like glass.
|
|
259
|
+
* - Advanced reflectivity: More flexible reflectivity for non-metallic materials.
|
|
260
|
+
* - Sheen: Can be used for representing cloth and fabric materials.
|
|
261
|
+
*
|
|
262
|
+
* As a result of these complex shading features, `MeshPhysicalMaterial` has a
|
|
263
|
+
* higher performance cost, per pixel, than other three.js materials. Most
|
|
264
|
+
* effects are disabled by default, and add cost as they are enabled. For
|
|
265
|
+
* best results, always specify an environment map when using this material.
|
|
266
|
+
*/
|
|
267
|
+
export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
268
|
+
constructor(parameters?: MeshPhysicalMaterialParameters);
|
|
269
|
+
/**
|
|
270
|
+
* This flag can be used for type testing.
|
|
271
|
+
*
|
|
272
|
+
* @default true
|
|
273
|
+
*/
|
|
274
|
+
readonly isMeshPhysicalMaterial: boolean;
|
|
275
|
+
setValues(values?: MeshPhysicalMaterialParameters): void;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
279
|
+
export interface MeshPhysicalMaterial extends MeshPhysicalMaterialProperties {}
|