@types/three 0.158.3 → 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.
Files changed (230) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +2 -1
  3. three/examples/jsm/cameras/CinematicCamera.d.ts +1 -1
  4. three/examples/jsm/helpers/TextureHelper.d.ts +10 -0
  5. three/examples/jsm/lines/LineMaterial.d.ts +2 -2
  6. three/examples/jsm/loaders/ColladaLoader.d.ts +1 -3
  7. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
  8. three/examples/jsm/loaders/KTX2Loader.d.ts +2 -8
  9. three/examples/jsm/loaders/MaterialXLoader.d.ts +6 -0
  10. three/examples/jsm/loaders/SVGLoader.d.ts +1 -5
  11. three/examples/jsm/math/Octree.d.ts +7 -3
  12. three/examples/jsm/misc/ProgressiveLightMap.d.ts +1 -1
  13. three/examples/jsm/misc/Timer.d.ts +80 -0
  14. three/examples/jsm/nodes/Nodes.d.ts +238 -60
  15. three/examples/jsm/nodes/accessors/BitangentNode.d.ts +9 -0
  16. three/examples/jsm/nodes/accessors/BufferNode.d.ts +4 -1
  17. three/examples/jsm/nodes/accessors/CameraNode.d.ts +7 -0
  18. three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +9 -2
  19. three/examples/jsm/nodes/accessors/InstanceNode.d.ts +3 -0
  20. three/examples/jsm/nodes/accessors/MaterialNode.d.ts +12 -0
  21. three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +7 -0
  22. three/examples/jsm/nodes/accessors/ModelNode.d.ts +7 -1
  23. three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +3 -0
  24. three/examples/jsm/nodes/accessors/NormalNode.d.ts +8 -0
  25. three/examples/jsm/nodes/accessors/PointUVNode.d.ts +3 -0
  26. three/examples/jsm/nodes/accessors/PositionNode.d.ts +8 -0
  27. three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +4 -1
  28. three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +3 -0
  29. three/examples/jsm/nodes/accessors/SkinningNode.d.ts +3 -0
  30. three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +8 -1
  31. three/examples/jsm/nodes/accessors/TangentNode.d.ts +9 -0
  32. three/examples/jsm/nodes/accessors/TextureNode.d.ts +10 -2
  33. three/examples/jsm/nodes/accessors/UVNode.d.ts +3 -0
  34. three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
  35. three/examples/jsm/nodes/code/CodeNode.d.ts +4 -0
  36. three/examples/jsm/nodes/code/ExpressionNode.d.ts +3 -0
  37. three/examples/jsm/nodes/code/FunctionCallNode.d.ts +7 -1
  38. three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
  39. three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +1 -1
  40. three/examples/jsm/nodes/core/AttributeNode.d.ts +3 -0
  41. three/examples/jsm/nodes/core/BypassNode.d.ts +3 -0
  42. three/examples/jsm/nodes/core/CacheNode.d.ts +3 -0
  43. three/examples/jsm/nodes/core/ConstNode.d.ts +3 -3
  44. three/examples/jsm/nodes/core/ContextNode.d.ts +3 -0
  45. three/examples/jsm/nodes/core/InputNode.d.ts +4 -4
  46. three/examples/jsm/nodes/core/NodeBuilder.d.ts +6 -3
  47. three/examples/jsm/nodes/core/NodeUniform.d.ts +12 -8
  48. three/examples/jsm/nodes/core/NodeUtils.d.ts +6 -3
  49. three/examples/jsm/nodes/core/PropertyNode.d.ts +9 -0
  50. three/examples/jsm/nodes/core/UniformNode.d.ts +12 -4
  51. three/examples/jsm/nodes/core/VarNode.d.ts +4 -0
  52. three/examples/jsm/nodes/core/VaryingNode.d.ts +3 -0
  53. three/examples/jsm/nodes/core/constants.d.ts +10 -8
  54. three/examples/jsm/nodes/display/BlendModeNode.d.ts +7 -2
  55. three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +18 -1
  56. three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +4 -0
  57. three/examples/jsm/nodes/display/FrontFacingNode.d.ts +4 -0
  58. three/examples/jsm/nodes/display/NormalMapNode.d.ts +7 -1
  59. three/examples/jsm/nodes/display/PosterizeNode.d.ts +6 -0
  60. three/examples/jsm/nodes/display/ToneMappingNode.d.ts +8 -1
  61. three/examples/jsm/nodes/display/ViewportNode.d.ts +8 -0
  62. three/examples/jsm/nodes/fog/FogExp2Node.d.ts +3 -0
  63. three/examples/jsm/nodes/fog/FogNode.d.ts +3 -0
  64. three/examples/jsm/nodes/fog/FogRangeNode.d.ts +3 -0
  65. three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +1 -1
  66. three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -1
  67. three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +1 -1
  68. three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +1 -1
  69. three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +1 -1
  70. three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -1
  71. three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +1 -1
  72. three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +1 -1
  73. three/examples/jsm/nodes/functions/material/getRoughness.d.ts +1 -1
  74. three/examples/jsm/nodes/geometry/RangeNode.d.ts +3 -0
  75. three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +7 -0
  76. three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +6 -1
  77. three/examples/jsm/nodes/lighting/LightsNode.d.ts +3 -0
  78. three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +18 -5
  79. three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +0 -3
  80. three/examples/jsm/nodes/materials/NodeMaterial.d.ts +25 -2
  81. three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +43 -34
  82. three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +5 -3
  83. three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +7 -5
  84. three/examples/jsm/nodes/math/CondNode.d.ts +7 -0
  85. three/examples/jsm/nodes/math/MathNode.d.ts +134 -1
  86. three/examples/jsm/nodes/math/OperatorNode.d.ts +51 -0
  87. three/examples/jsm/nodes/procedural/CheckerNode.d.ts +3 -0
  88. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +75 -33
  89. three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +4 -2
  90. three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +3 -0
  91. three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +6 -3
  92. three/examples/jsm/nodes/utils/OscNode.d.ts +6 -0
  93. three/examples/jsm/nodes/utils/RemapNode.d.ts +4 -0
  94. three/examples/jsm/nodes/utils/RotateUVNode.d.ts +3 -0
  95. three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +5 -1
  96. three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +7 -0
  97. three/examples/jsm/nodes/utils/TimerNode.d.ts +7 -1
  98. three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -7
  99. three/examples/jsm/objects/QuadMesh.d.ts +13 -0
  100. three/examples/jsm/postprocessing/GTAOPass.d.ts +118 -0
  101. three/examples/jsm/renderers/common/Info.d.ts +7 -2
  102. three/examples/jsm/renderers/common/Renderer.d.ts +2 -2
  103. three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +3 -0
  104. three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +1 -0
  105. three/examples/jsm/shaders/GTAOShader.d.ts +59 -0
  106. three/examples/jsm/shaders/PoissonDenoiseShader.d.ts +28 -0
  107. three/examples/jsm/utils/SortUtils.d.ts +7 -0
  108. three/package.json +3 -3
  109. three/src/Three.d.ts +2 -0
  110. three/src/animation/AnimationClip.d.ts +2 -2
  111. three/src/animation/AnimationMixer.d.ts +1 -1
  112. three/src/animation/KeyframeTrack.d.ts +3 -3
  113. three/src/animation/tracks/BooleanKeyframeTrack.d.ts +1 -1
  114. three/src/animation/tracks/ColorKeyframeTrack.d.ts +1 -1
  115. three/src/animation/tracks/NumberKeyframeTrack.d.ts +1 -1
  116. three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +1 -1
  117. three/src/animation/tracks/StringKeyframeTrack.d.ts +1 -1
  118. three/src/animation/tracks/VectorKeyframeTrack.d.ts +1 -1
  119. three/src/audio/Audio.d.ts +1 -1
  120. three/src/audio/AudioListener.d.ts +1 -1
  121. three/src/constants.d.ts +3 -1
  122. three/src/core/BufferAttribute.d.ts +27 -0
  123. three/src/core/BufferGeometry.d.ts +1 -1
  124. three/src/core/InterleavedBuffer.d.ts +27 -0
  125. three/src/core/InterleavedBufferAttribute.d.ts +2 -2
  126. three/src/core/Object3D.d.ts +48 -14
  127. three/src/core/Raycaster.d.ts +1 -0
  128. three/src/core/UniformsGroup.d.ts +3 -3
  129. three/src/extras/core/Curve.d.ts +2 -2
  130. three/src/extras/core/Path.d.ts +1 -1
  131. three/src/extras/core/Shape.d.ts +1 -1
  132. three/src/extras/core/ShapePath.d.ts +1 -1
  133. three/src/extras/curves/CatmullRomCurve3.d.ts +2 -2
  134. three/src/extras/curves/CubicBezierCurve.d.ts +2 -2
  135. three/src/extras/curves/CubicBezierCurve3.d.ts +2 -2
  136. three/src/extras/curves/EllipseCurve.d.ts +1 -1
  137. three/src/extras/curves/LineCurve.d.ts +2 -2
  138. three/src/extras/curves/LineCurve3.d.ts +2 -2
  139. three/src/extras/curves/QuadraticBezierCurve.d.ts +2 -2
  140. three/src/extras/curves/QuadraticBezierCurve3.d.ts +2 -2
  141. three/src/extras/curves/SplineCurve.d.ts +2 -2
  142. three/src/geometries/ExtrudeGeometry.d.ts +5 -5
  143. three/src/geometries/LatheGeometry.d.ts +2 -2
  144. three/src/geometries/PlaneGeometry.d.ts +1 -1
  145. three/src/geometries/PolyhedronGeometry.d.ts +1 -1
  146. three/src/geometries/RingGeometry.d.ts +1 -1
  147. three/src/geometries/ShapeGeometry.d.ts +2 -2
  148. three/src/geometries/SphereGeometry.d.ts +1 -1
  149. three/src/geometries/TorusGeometry.d.ts +1 -1
  150. three/src/geometries/TorusKnotGeometry.d.ts +1 -1
  151. three/src/geometries/TubeGeometry.d.ts +3 -3
  152. three/src/geometries/WireframeGeometry.d.ts +1 -1
  153. three/src/helpers/ArrowHelper.d.ts +4 -4
  154. three/src/helpers/AxesHelper.d.ts +1 -1
  155. three/src/helpers/Box3Helper.d.ts +3 -3
  156. three/src/helpers/CameraHelper.d.ts +2 -2
  157. three/src/helpers/DirectionalLightHelper.d.ts +6 -4
  158. three/src/helpers/GridHelper.d.ts +1 -1
  159. three/src/helpers/HemisphereLightHelper.d.ts +4 -4
  160. three/src/helpers/PlaneHelper.d.ts +2 -2
  161. three/src/helpers/PointLightHelper.d.ts +3 -3
  162. three/src/helpers/SkeletonHelper.d.ts +4 -4
  163. three/src/helpers/SpotLightHelper.d.ts +3 -3
  164. three/src/lights/DirectionalLight.d.ts +1 -1
  165. three/src/lights/DirectionalLightShadow.d.ts +1 -1
  166. three/src/lights/HemisphereLight.d.ts +1 -1
  167. three/src/lights/LightProbe.d.ts +1 -1
  168. three/src/lights/LightShadow.d.ts +5 -5
  169. three/src/lights/PointLight.d.ts +7 -0
  170. three/src/lights/PointLightShadow.d.ts +1 -1
  171. three/src/lights/SpotLight.d.ts +1 -1
  172. three/src/lights/SpotLightShadow.d.ts +1 -1
  173. three/src/loaders/MaterialLoader.d.ts +6 -3
  174. three/src/materials/LineBasicMaterial.d.ts +7 -0
  175. three/src/materials/LineDashedMaterial.d.ts +7 -1
  176. three/src/materials/Material.d.ts +16 -16
  177. three/src/materials/MeshBasicMaterial.d.ts +9 -2
  178. three/src/materials/MeshDepthMaterial.d.ts +7 -1
  179. three/src/materials/MeshDistanceMaterial.d.ts +9 -2
  180. three/src/materials/MeshLambertMaterial.d.ts +9 -2
  181. three/src/materials/MeshMatcapMaterial.d.ts +10 -3
  182. three/src/materials/MeshNormalMaterial.d.ts +9 -2
  183. three/src/materials/MeshPhongMaterial.d.ts +10 -3
  184. three/src/materials/MeshPhysicalMaterial.d.ts +6 -1
  185. three/src/materials/MeshStandardMaterial.d.ts +10 -5
  186. three/src/materials/MeshToonMaterial.d.ts +10 -3
  187. three/src/materials/PointsMaterial.d.ts +9 -2
  188. three/src/materials/RawShaderMaterial.d.ts +9 -0
  189. three/src/materials/ShaderMaterial.d.ts +9 -3
  190. three/src/materials/ShadowMaterial.d.ts +8 -1
  191. three/src/materials/SpriteMaterial.d.ts +9 -4
  192. three/src/math/Box3.d.ts +2 -2
  193. three/src/math/Frustum.d.ts +2 -2
  194. three/src/math/Matrix4.d.ts +30 -30
  195. three/src/math/Sphere.d.ts +5 -0
  196. three/src/math/Triangle.d.ts +8 -8
  197. three/src/math/Vector2.d.ts +1 -1
  198. three/src/math/Vector4.d.ts +1 -1
  199. three/src/objects/BatchedMesh.d.ts +169 -0
  200. three/src/objects/Bone.d.ts +1 -1
  201. three/src/objects/LOD.d.ts +2 -4
  202. three/src/objects/Line.d.ts +2 -4
  203. three/src/objects/LineLoop.d.ts +1 -1
  204. three/src/objects/LineSegments.d.ts +1 -1
  205. three/src/objects/Skeleton.d.ts +2 -8
  206. three/src/objects/SkinnedMesh.d.ts +1 -2
  207. three/src/renderers/WebGL3DRenderTarget.d.ts +7 -5
  208. three/src/renderers/WebGLArrayRenderTarget.d.ts +7 -5
  209. three/src/renderers/WebGLCubeRenderTarget.d.ts +2 -2
  210. three/src/renderers/WebGLRenderTarget.d.ts +1 -1
  211. three/src/renderers/shaders/ShaderChunk.d.ts +1 -0
  212. three/src/renderers/shaders/ShaderLib.d.ts +18 -18
  213. three/src/renderers/shaders/UniformsUtils.d.ts +3 -2
  214. three/src/renderers/webgl/WebGLAttributes.d.ts +1 -0
  215. three/src/renderers/webgl/WebGLBindingStates.d.ts +4 -4
  216. three/src/renderers/webgl/WebGLBufferRenderer.d.ts +4 -3
  217. three/src/renderers/webgl/WebGLClipping.d.ts +2 -2
  218. three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +5 -4
  219. three/src/renderers/webgl/WebGLLights.d.ts +39 -37
  220. three/src/renderers/webgl/WebGLPrograms.d.ts +225 -10
  221. three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -5
  222. three/src/renderers/webgl/WebGLShadowMap.d.ts +2 -2
  223. three/src/scenes/Fog.d.ts +1 -1
  224. three/src/scenes/FogExp2.d.ts +1 -1
  225. three/src/textures/CompressedCubeTexture.d.ts +13 -0
  226. three/src/textures/Texture.d.ts +1 -1
  227. three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +0 -310
  228. three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +0 -166
  229. three/examples/jsm/objects/BatchedMesh.d.ts +0 -57
  230. three/examples/jsm/renderers/common/Animation.d.ts +0 -16
@@ -1,5 +1,5 @@
1
- import { Color, ColorRepresentation } from './../math/Color.js';
2
- import { Texture } from './../textures/Texture.js';
1
+ import { Color, ColorRepresentation } from '../math/Color.js';
2
+ import { Texture } from '../textures/Texture.js';
3
3
  import { MaterialParameters, Material } from './Material.js';
4
4
  import { Combine, NormalMapTypes } from '../constants.js';
5
5
  import { Vector2 } from '../Three.js';
@@ -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
  */
@@ -1,6 +1,6 @@
1
- import { Color, ColorRepresentation } from './../math/Color.js';
2
- import { Texture } from './../textures/Texture.js';
3
- import { Vector2 } from './../math/Vector2.js';
1
+ import { Color, ColorRepresentation } from '../math/Color.js';
2
+ import { Texture } from '../textures/Texture.js';
3
+ import { Vector2 } from '../math/Vector2.js';
4
4
  import { MaterialParameters, Material } from './Material.js';
5
5
  import { NormalMapTypes } from '../constants.js';
6
6
 
@@ -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
  */
@@ -1,6 +1,6 @@
1
1
  import { MaterialParameters, Material } from './Material.js';
2
- import { Texture } from './../textures/Texture.js';
3
- import { Vector2 } from './../math/Vector2.js';
2
+ import { Texture } from '../textures/Texture.js';
3
+ import { Vector2 } from '../math/Vector2.js';
4
4
  import { NormalMapTypes } from '../constants.js';
5
5
 
6
6
  export interface MeshNormalMaterialParameters extends MaterialParameters {
@@ -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
  */
@@ -1,6 +1,6 @@
1
- import { Color, ColorRepresentation } from './../math/Color.js';
2
- import { Texture } from './../textures/Texture.js';
3
- import { Vector2 } from './../math/Vector2.js';
1
+ import { Color, ColorRepresentation } from '../math/Color.js';
2
+ import { Texture } from '../textures/Texture.js';
3
+ import { Vector2 } from '../math/Vector2.js';
4
4
  import { MaterialParameters, Material } from './Material.js';
5
5
  import { Combine, NormalMapTypes } from '../constants.js';
6
6
 
@@ -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
- isMeshPhysicalMaterial: boolean;
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'
@@ -1,6 +1,6 @@
1
- import { Color, ColorRepresentation } from './../math/Color.js';
2
- import { Texture } from './../textures/Texture.js';
3
- import { Vector2 } from './../math/Vector2.js';
1
+ import { Color, ColorRepresentation } from '../math/Color.js';
2
+ import { Texture } from '../textures/Texture.js';
3
+ import { Vector2 } from '../math/Vector2.js';
4
4
  import { MaterialParameters, Material } from './Material.js';
5
5
  import { NormalMapTypes } from '../constants.js';
6
6
 
@@ -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
  }
@@ -1,6 +1,6 @@
1
- import { Color, ColorRepresentation } from './../math/Color.js';
2
- import { Texture } from './../textures/Texture.js';
3
- import { Vector2 } from './../math/Vector2.js';
1
+ import { Color, ColorRepresentation } from '../math/Color.js';
2
+ import { Texture } from '../textures/Texture.js';
3
+ import { Vector2 } from '../math/Vector2.js';
4
4
  import { MaterialParameters, Material } from './Material.js';
5
5
  import { NormalMapTypes } from '../constants.js';
6
6
 
@@ -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
  */
@@ -1,6 +1,6 @@
1
1
  import { Material, MaterialParameters } from './Material.js';
2
- import { Color, ColorRepresentation } from './../math/Color.js';
3
- import { Texture } from './../textures/Texture.js';
2
+ import { Color, ColorRepresentation } from '../math/Color.js';
3
+ import { Texture } from '../textures/Texture.js';
4
4
 
5
5
  export interface PointsMaterialParameters extends MaterialParameters {
6
6
  color?: ColorRepresentation | undefined;
@@ -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
  }
@@ -1,4 +1,4 @@
1
- import { Color, ColorRepresentation } from './../math/Color.js';
1
+ import { Color, ColorRepresentation } from '../math/Color.js';
2
2
  import { MaterialParameters, Material } from './Material.js';
3
3
 
4
4
  export interface ShadowMaterialParameters extends MaterialParameters {
@@ -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
  */
@@ -1,5 +1,5 @@
1
- import { Color, ColorRepresentation } from './../math/Color.js';
2
- import { Texture } from './../textures/Texture.js';
1
+ import { Color, ColorRepresentation } from '../math/Color.js';
2
+ import { Texture } from '../textures/Texture.js';
3
3
  import { MaterialParameters, Material } from './Material.js';
4
4
 
5
5
  export interface SpriteMaterialParameters extends MaterialParameters {
@@ -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/Box3.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { BufferAttribute } from './../core/BufferAttribute.js';
1
+ import { BufferAttribute } from '../core/BufferAttribute.js';
2
2
  import { Vector3 } from './Vector3.js';
3
- import { Object3D } from './../core/Object3D.js';
3
+ import { Object3D } from '../core/Object3D.js';
4
4
  import { Sphere } from './Sphere.js';
5
5
  import { Plane } from './Plane.js';
6
6
  import { Matrix4 } from './Matrix4.js';
@@ -1,7 +1,7 @@
1
1
  import { Plane } from './Plane.js';
2
2
  import { Matrix4 } from './Matrix4.js';
3
- import { Object3D } from './../core/Object3D.js';
4
- import { Sprite } from './../objects/Sprite.js';
3
+ import { Object3D } from '../core/Object3D.js';
4
+ import { Sprite } from '../objects/Sprite.js';
5
5
  import { Sphere } from './Sphere.js';
6
6
  import { Box3 } from './Box3.js';
7
7
  import { Vector3 } from './Vector3.js';
@@ -94,40 +94,40 @@ export class Matrix4 implements Matrix {
94
94
  n42: number,
95
95
  n43: number,
96
96
  n44: number,
97
- ): Matrix4;
97
+ ): this;
98
98
 
99
99
  /**
100
100
  * Resets this matrix to identity.
101
101
  */
102
- identity(): Matrix4;
102
+ identity(): this;
103
103
  clone(): Matrix4;
104
104
  copy(m: Matrix4): this;
105
- copyPosition(m: Matrix4): Matrix4;
106
- extractBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix4;
107
- makeBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix4;
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): Matrix4;
113
- makeRotationFromEuler(euler: Euler): Matrix4;
114
- makeRotationFromQuaternion(q: Quaternion): Matrix4;
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): Matrix4;
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): Matrix4;
123
+ multiply(m: Matrix4): this;
124
124
 
125
- premultiply(m: Matrix4): 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): 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): Matrix4;
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(): Matrix4;
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): Matrix4;
160
- setPosition(x: number, y: number, z: number): Matrix4;
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(): Matrix4;
165
+ invert(): this;
166
166
 
167
167
  /**
168
168
  * Multiplies the columns of this matrix by vector v.
169
169
  */
170
- scale(v: Vector3): Matrix4;
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): Matrix4;
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): Matrix4;
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): Matrix4;
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): Matrix4;
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): Matrix4;
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): Matrix4;
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): Matrix4;
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): Matrix4;
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
- ): Matrix4;
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
- ): Matrix4;
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): Matrix4;
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): Matrix4;
283
+ setFromMatrix3(m: Matrix3): this;
284
284
 
285
285
  /**
286
286
  * @deprecated Use {@link Matrix4#copyPosition .copyPosition()} instead.
@@ -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
  */
@@ -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
  }
@@ -1,5 +1,5 @@
1
1
  import { Matrix3 } from './Matrix3.js';
2
- import { BufferAttribute } from './../core/BufferAttribute.js';
2
+ import { BufferAttribute } from '../core/BufferAttribute.js';
3
3
 
4
4
  export type Vector2Tuple = [number, number];
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { Matrix4 } from './Matrix4.js';
2
2
  import { Quaternion } from './Quaternion.js';
3
- import { BufferAttribute } from './../core/BufferAttribute.js';
3
+ import { BufferAttribute } from '../core/BufferAttribute.js';
4
4
  import { Vector } from './Vector2.js';
5
5
 
6
6
  export type Vector4Tuple = [number, number, number, number];