@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.
Files changed (214) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +0 -1
  3. three/examples/jsm/capabilities/WebGL.d.ts +0 -11
  4. three/examples/jsm/controls/TransformControls.d.ts +16 -1
  5. three/examples/jsm/helpers/TextureHelper.d.ts +2 -2
  6. three/examples/jsm/helpers/TextureHelperGPU.d.ts +2 -2
  7. three/examples/jsm/loaders/LDrawLoader.d.ts +8 -3
  8. three/examples/jsm/loaders/SVGLoader.d.ts +1 -1
  9. three/examples/jsm/math/Octree.d.ts +3 -0
  10. three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
  11. three/examples/jsm/postprocessing/AfterimagePass.d.ts +13 -10
  12. three/examples/jsm/postprocessing/FXAAPass.d.ts +7 -0
  13. three/examples/jsm/transpiler/AST.d.ts +77 -26
  14. three/examples/jsm/transpiler/TSLEncoder.d.ts +9 -3
  15. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +4 -4
  16. three/examples/jsm/tsl/display/BleachBypass.d.ts +2 -2
  17. three/examples/jsm/tsl/display/BloomNode.d.ts +2 -2
  18. three/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +20 -0
  19. three/examples/jsm/tsl/display/DenoiseNode.d.ts +4 -4
  20. three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +6 -6
  21. three/examples/jsm/tsl/display/DotScreenNode.d.ts +2 -2
  22. three/examples/jsm/tsl/display/FXAANode.d.ts +3 -3
  23. three/examples/jsm/tsl/display/FilmNode.d.ts +4 -4
  24. three/examples/jsm/tsl/display/GTAONode.d.ts +3 -3
  25. three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +5 -5
  26. three/examples/jsm/tsl/display/LensflareNode.d.ts +8 -8
  27. three/examples/jsm/tsl/display/Lut3DNode.d.ts +4 -4
  28. three/examples/jsm/tsl/display/MotionBlur.d.ts +4 -4
  29. three/examples/jsm/tsl/display/OutlineNode.d.ts +3 -3
  30. three/examples/jsm/tsl/display/RGBShiftNode.d.ts +3 -3
  31. three/examples/jsm/tsl/display/SMAANode.d.ts +3 -3
  32. three/examples/jsm/tsl/display/SSRNode.d.ts +5 -5
  33. three/examples/jsm/tsl/display/Sepia.d.ts +2 -2
  34. three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +3 -3
  35. three/examples/jsm/tsl/display/TransitionNode.d.ts +4 -4
  36. three/examples/jsm/tsl/display/hashBlur.d.ts +10 -4
  37. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +5 -5
  38. three/package.json +3 -3
  39. three/src/Three.Core.d.ts +0 -2
  40. three/src/Three.TSL.d.ts +11 -18
  41. three/src/Three.WebGPU.Nodes.d.ts +1 -0
  42. three/src/Three.WebGPU.d.ts +3 -0
  43. three/src/animation/tracks/NumberKeyframeTrack.d.ts +1 -1
  44. three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +1 -1
  45. three/src/animation/tracks/StringKeyframeTrack.d.ts +1 -1
  46. three/src/animation/tracks/VectorKeyframeTrack.d.ts +1 -1
  47. three/src/constants.d.ts +13 -5
  48. three/src/core/BufferGeometry.d.ts +11 -2
  49. three/src/core/GLBufferAttribute.d.ts +18 -1
  50. three/src/core/RenderTarget.d.ts +3 -20
  51. three/src/extras/DataUtils.d.ts +4 -4
  52. three/src/geometries/CapsuleGeometry.d.ts +1 -0
  53. three/src/helpers/AxesHelper.d.ts +3 -1
  54. three/src/lights/SpotLightShadow.d.ts +2 -0
  55. three/src/lights/webgpu/ProjectorLight.d.ts +17 -0
  56. three/src/materials/LineBasicMaterial.d.ts +66 -34
  57. three/src/materials/LineDashedMaterial.d.ts +41 -21
  58. three/src/materials/Material.d.ts +408 -398
  59. three/src/materials/MeshBasicMaterial.d.ts +101 -62
  60. three/src/materials/MeshDepthMaterial.d.ts +71 -32
  61. three/src/materials/MeshDistanceMaterial.d.ts +65 -29
  62. three/src/materials/MeshLambertMaterial.d.ts +179 -103
  63. three/src/materials/MeshMatcapMaterial.d.ts +97 -55
  64. three/src/materials/MeshNormalMaterial.d.ts +76 -41
  65. three/src/materials/MeshPhongMaterial.d.ts +164 -100
  66. three/src/materials/MeshPhysicalMaterial.d.ts +164 -116
  67. three/src/materials/MeshStandardMaterial.d.ts +178 -91
  68. three/src/materials/MeshToonMaterial.d.ts +130 -81
  69. three/src/materials/PointsMaterial.d.ts +77 -30
  70. three/src/materials/RawShaderMaterial.d.ts +12 -7
  71. three/src/materials/ShaderMaterial.d.ts +186 -98
  72. three/src/materials/ShadowMaterial.d.ts +49 -23
  73. three/src/materials/SpriteMaterial.d.ts +62 -33
  74. three/src/materials/nodes/Line2NodeMaterial.d.ts +87 -40
  75. three/src/materials/nodes/LineBasicNodeMaterial.d.ts +35 -16
  76. three/src/materials/nodes/LineDashedNodeMaterial.d.ts +75 -20
  77. three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +49 -30
  78. three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +49 -42
  79. three/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +38 -26
  80. three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +36 -22
  81. three/src/materials/nodes/MeshPhongNodeMaterial.d.ts +68 -48
  82. three/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +240 -65
  83. three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +99 -3
  84. three/src/materials/nodes/MeshStandardNodeMaterial.d.ts +83 -47
  85. three/src/materials/nodes/MeshToonNodeMaterial.d.ts +42 -36
  86. three/src/materials/nodes/NodeMaterial.d.ts +418 -55
  87. three/src/materials/nodes/NodeMaterials.d.ts +3 -2
  88. three/src/materials/nodes/PointsNodeMaterial.d.ts +31 -7
  89. three/src/materials/nodes/ShadowNodeMaterial.d.ts +38 -11
  90. three/src/materials/nodes/SpriteNodeMaterial.d.ts +68 -18
  91. three/src/materials/nodes/VolumeNodeMaterial.d.ts +50 -14
  92. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +4 -0
  93. three/src/math/Box3.d.ts +8 -0
  94. three/src/math/Color.d.ts +1 -1
  95. three/src/math/ColorManagement.d.ts +12 -2
  96. three/src/math/Sphere.d.ts +8 -0
  97. three/src/math/Triangle.d.ts +3 -3
  98. three/src/nodes/Nodes.d.ts +2 -3
  99. three/src/nodes/TSL.d.ts +4 -3
  100. three/src/nodes/accessors/AccessorsUtils.d.ts +3 -3
  101. three/src/nodes/accessors/Bitangent.d.ts +0 -2
  102. three/src/nodes/accessors/CubeTextureNode.d.ts +16 -5
  103. three/src/nodes/accessors/Normal.d.ts +19 -5
  104. three/src/nodes/accessors/ReferenceBaseNode.d.ts +1 -1
  105. three/src/nodes/accessors/StorageBufferNode.d.ts +3 -2
  106. three/src/nodes/accessors/StorageTextureNode.d.ts +5 -5
  107. three/src/nodes/accessors/Tangent.d.ts +0 -2
  108. three/src/nodes/accessors/TangentUtils.d.ts +22 -0
  109. three/src/nodes/accessors/Texture3DNode.d.ts +5 -4
  110. three/src/nodes/accessors/TextureBicubic.d.ts +4 -2
  111. three/src/nodes/accessors/TextureNode.d.ts +24 -19
  112. three/src/nodes/accessors/TextureSizeNode.d.ts +3 -3
  113. three/src/nodes/accessors/UniformArrayNode.d.ts +2 -7
  114. three/src/nodes/code/FunctionCallNode.d.ts +3 -1
  115. three/src/nodes/code/FunctionNode.d.ts +2 -2
  116. three/src/nodes/code/ScriptableNode.d.ts +2 -2
  117. three/src/nodes/core/AssignNode.d.ts +7 -3
  118. three/src/nodes/core/AttributeNode.d.ts +1 -1
  119. three/src/nodes/core/BypassNode.d.ts +2 -2
  120. three/src/nodes/core/CacheNode.d.ts +1 -0
  121. three/src/nodes/core/ContextNode.d.ts +3 -3
  122. three/src/nodes/core/Node.d.ts +5 -4
  123. three/src/nodes/core/NodeUtils.d.ts +4 -0
  124. three/src/nodes/core/StackNode.d.ts +3 -13
  125. three/src/nodes/core/SubBuildNode.d.ts +15 -0
  126. three/src/nodes/core/VarNode.d.ts +4 -4
  127. three/src/nodes/core/VaryingNode.d.ts +3 -3
  128. three/src/nodes/display/BlendModes.d.ts +14 -10
  129. three/src/nodes/display/BumpMapNode.d.ts +4 -3
  130. three/src/nodes/display/ColorAdjustment.d.ts +17 -17
  131. three/src/nodes/display/ColorSpaceFunctions.d.ts +3 -3
  132. three/src/nodes/display/ColorSpaceNode.d.ts +6 -16
  133. three/src/nodes/display/FrontFacingNode.d.ts +1 -0
  134. three/src/nodes/display/PosterizeNode.d.ts +3 -3
  135. three/src/nodes/display/RenderOutputNode.d.ts +2 -2
  136. three/src/nodes/display/ScreenNode.d.ts +0 -10
  137. three/src/nodes/display/ToneMappingFunctions.d.ts +7 -7
  138. three/src/nodes/display/ToneMappingNode.d.ts +6 -6
  139. three/src/nodes/display/ViewportDepthTextureNode.d.ts +3 -3
  140. three/src/nodes/fog/Fog.d.ts +10 -10
  141. three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +4 -4
  142. three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +2 -2
  143. three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +4 -4
  144. three/src/nodes/geometry/RangeNode.d.ts +9 -2
  145. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +20 -20
  146. three/src/nodes/gpgpu/ComputeNode.d.ts +2 -2
  147. three/src/nodes/lighting/PointShadowNode.d.ts +11 -11
  148. three/src/nodes/lighting/ProjectorLightNode.d.ts +5 -0
  149. three/src/nodes/lighting/ShadowFilterNode.d.ts +11 -11
  150. three/src/nodes/lighting/SpotLightNode.d.ts +15 -1
  151. three/src/nodes/materialx/MaterialXNodes.d.ts +59 -59
  152. three/src/nodes/materialx/lib/mx_hsv.d.ts +3 -3
  153. three/src/nodes/materialx/lib/mx_noise.d.ts +206 -206
  154. three/src/nodes/materialx/lib/mx_transform_color.d.ts +2 -2
  155. three/src/nodes/math/ConditionalNode.d.ts +4 -19
  156. three/src/nodes/math/Hash.d.ts +2 -2
  157. three/src/nodes/math/MathNode.d.ts +21 -17
  158. three/src/nodes/math/OperatorNode.d.ts +41 -52
  159. three/src/nodes/math/TriNoise3D.d.ts +6 -6
  160. three/src/nodes/pmrem/PMREMNode.d.ts +3 -3
  161. three/src/nodes/pmrem/PMREMUtils.d.ts +20 -20
  162. three/src/nodes/procedural/Checker.d.ts +2 -2
  163. three/src/nodes/shapes/Shapes.d.ts +2 -2
  164. three/src/nodes/tsl/TSLBase.d.ts +1 -0
  165. three/src/nodes/tsl/TSLCore.d.ts +186 -81
  166. three/src/nodes/utils/CubeMapNode.d.ts +2 -2
  167. three/src/nodes/utils/DebugNode.d.ts +2 -2
  168. three/src/nodes/utils/Discard.d.ts +2 -2
  169. three/src/nodes/utils/EquirectUV.d.ts +4 -0
  170. three/src/nodes/utils/LoopNode.d.ts +2 -7
  171. three/src/nodes/utils/MatcapUV.d.ts +4 -0
  172. three/src/nodes/utils/Oscillators.d.ts +5 -5
  173. three/src/nodes/utils/Packing.d.ts +3 -3
  174. three/src/nodes/utils/PostProcessingUtils.d.ts +9 -9
  175. three/src/nodes/utils/RTTNode.d.ts +3 -3
  176. three/src/nodes/utils/ReflectorNode.d.ts +1 -0
  177. three/src/nodes/utils/RemapNode.d.ts +9 -9
  178. three/src/nodes/utils/RotateNode.d.ts +3 -3
  179. three/src/nodes/utils/SampleNode.d.ts +16 -0
  180. three/src/nodes/utils/SpriteSheetUVNode.d.ts +4 -4
  181. three/src/nodes/utils/SpriteUtils.d.ts +2 -2
  182. three/src/nodes/utils/StorageArrayElementNode.d.ts +4 -3
  183. three/src/nodes/utils/TriplanarTextures.d.ts +20 -0
  184. three/src/nodes/utils/UVUtils.d.ts +8 -7
  185. three/src/nodes/utils/ViewportUtils.d.ts +2 -2
  186. three/src/objects/LOD.d.ts +1 -1
  187. three/src/objects/Mesh.d.ts +8 -0
  188. three/src/objects/Sprite.d.ts +8 -0
  189. three/src/renderers/WebGLRenderer.d.ts +3 -3
  190. three/src/renderers/common/Backend.d.ts +3 -3
  191. three/src/renderers/common/RenderObject.d.ts +10 -2
  192. three/src/renderers/common/Renderer.d.ts +10 -5
  193. three/src/renderers/common/Storage3DTexture.d.ts +40 -0
  194. three/src/renderers/common/StorageArrayTexture.d.ts +29 -0
  195. three/src/renderers/common/Textures.d.ts +2 -2
  196. three/src/renderers/common/XRManager.d.ts +45 -0
  197. three/src/renderers/common/XRRenderTarget.d.ts +3 -2
  198. three/src/renderers/common/nodes/NodeLibrary.d.ts +4 -9
  199. three/src/renderers/common/nodes/NodeSampledTexture.d.ts +1 -1
  200. three/src/renderers/common/nodes/Nodes.d.ts +1 -1
  201. three/src/renderers/webgpu/WebGPURenderer.d.ts +3 -0
  202. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +65 -0
  203. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +1 -0
  204. three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +10 -1
  205. three/src/textures/DepthTexture.d.ts +4 -2
  206. three/src/textures/Source.d.ts +20 -16
  207. three/src/textures/Texture.d.ts +69 -2
  208. three/examples/jsm/effects/PeppersGhostEffect.d.ts +0 -10
  209. three/src/core/RenderTargetArray.d.ts +0 -9
  210. three/src/nodes/utils/EquirectUVNode.d.ts +0 -8
  211. three/src/nodes/utils/MatcapUVNode.d.ts +0 -8
  212. three/src/nodes/utils/TriplanarTexturesNode.d.ts +0 -36
  213. three/src/renderers/common/nodes/StandardNodeLibrary.d.ts +0 -5
  214. three/src/textures/DepthArrayTexture.d.ts +0 -14
@@ -1,231 +1,279 @@
1
- import { Color, ColorRepresentation } from "../math/Color.js";
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 { MeshStandardMaterial, MeshStandardMaterialParameters } from "./MeshStandardMaterial.js";
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
- * @default 0
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?: number;
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?: Texture | null;
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
- * @default new THREE.Vector2( 1, 1 )
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
- * @default [100, 400]
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
- * @default Color( 0x000000 )
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
- * @default 1.0
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
- * @default 0.01
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
- * @default 0.0
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
- * @default Color( 1, 1, 1 )
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
- * @default 1.0
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
- * @default Color(1, 1, 1)
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 anisotropy(value: number);
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 clearcoat(value: number);
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 iridescence(value: number);
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 dispersion(value: number);
219
-
217
+ set sheen(value: number);
220
218
  /**
221
- * @default 0.0
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 sheen(value: number);
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 {}