@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,4 +1,4 @@
1
- import { Vector2 } from './../../math/Vector2.js';
1
+ import { Vector2 } from '../../math/Vector2.js';
2
2
  import { Path } from './Path.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Vector2 } from './../../math/Vector2.js';
1
+ import { Vector2 } from '../../math/Vector2.js';
2
2
  import { Shape } from './Shape.js';
3
3
  import { Color } from '../../math/Color.js';
4
4
  import { Path } from './Path.js';
@@ -1,5 +1,5 @@
1
- import { Vector3 } from './../../math/Vector3.js';
2
- import { Curve } from './../core/Curve.js';
1
+ import { Vector3 } from '../../math/Vector3.js';
2
+ import { Curve } from '../core/Curve.js';
3
3
 
4
4
  export type CurveType = 'centripetal' | 'chordal' | 'catmullrom';
5
5
 
@@ -1,5 +1,5 @@
1
- import { Vector2 } from './../../math/Vector2.js';
2
- import { Curve } from './../core/Curve.js';
1
+ import { Vector2 } from '../../math/Vector2.js';
2
+ import { Curve } from '../core/Curve.js';
3
3
 
4
4
  /**
5
5
  * Create a smooth **2D** {@link http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:Bezier_curve.svg | cubic bezier curve},
@@ -1,5 +1,5 @@
1
- import { Vector3 } from './../../math/Vector3.js';
2
- import { Curve } from './../core/Curve.js';
1
+ import { Vector3 } from '../../math/Vector3.js';
2
+ import { Curve } from '../core/Curve.js';
3
3
 
4
4
  /**
5
5
  * Create a smooth **3D** {@link http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:Bezier_curve.svg | cubic bezier curve},
@@ -1,4 +1,4 @@
1
- import { Curve } from './../core/Curve.js';
1
+ import { Curve } from '../core/Curve.js';
2
2
  import { Vector2 } from '../../math/Vector2.js';
3
3
 
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { Vector2 } from './../../math/Vector2.js';
2
- import { Curve } from './../core/Curve.js';
1
+ import { Vector2 } from '../../math/Vector2.js';
2
+ import { Curve } from '../core/Curve.js';
3
3
 
4
4
  /**
5
5
  * A curve representing a **2D** line segment.
@@ -1,5 +1,5 @@
1
- import { Vector3 } from './../../math/Vector3.js';
2
- import { Curve } from './../core/Curve.js';
1
+ import { Vector3 } from '../../math/Vector3.js';
2
+ import { Curve } from '../core/Curve.js';
3
3
 
4
4
  /**
5
5
  * A curve representing a **3D** line segment.
@@ -1,5 +1,5 @@
1
- import { Vector2 } from './../../math/Vector2.js';
2
- import { Curve } from './../core/Curve.js';
1
+ import { Vector2 } from '../../math/Vector2.js';
2
+ import { Curve } from '../core/Curve.js';
3
3
 
4
4
  /**
5
5
  * Create a smooth **2D** {@link http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:B%C3%A9zier_2_big.gif | quadratic bezier curve},
@@ -1,5 +1,5 @@
1
- import { Vector3 } from './../../math/Vector3.js';
2
- import { Curve } from './../core/Curve.js';
1
+ import { Vector3 } from '../../math/Vector3.js';
2
+ import { Curve } from '../core/Curve.js';
3
3
 
4
4
  /**
5
5
  * Create a smooth **3D** {@link http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:B%C3%A9zier_2_big.gif | quadratic bezier curve},
@@ -1,5 +1,5 @@
1
- import { Vector2 } from './../../math/Vector2.js';
2
- import { Curve } from './../core/Curve.js';
1
+ import { Vector2 } from '../../math/Vector2.js';
2
+ import { Curve } from '../core/Curve.js';
3
3
 
4
4
  /**
5
5
  * Create a smooth **2D** spline curve from a series of points.
@@ -1,8 +1,8 @@
1
- import { Curve } from './../extras/core/Curve.js';
2
- import { Vector2 } from './../math/Vector2.js';
3
- import { Vector3 } from './../math/Vector3.js';
4
- import { Shape } from './../extras/core/Shape.js';
5
- import { BufferGeometry } from './../core/BufferGeometry.js';
1
+ import { Curve } from '../extras/core/Curve.js';
2
+ import { Vector2 } from '../math/Vector2.js';
3
+ import { Vector3 } from '../math/Vector3.js';
4
+ import { Shape } from '../extras/core/Shape.js';
5
+ import { BufferGeometry } from '../core/BufferGeometry.js';
6
6
 
7
7
  export interface ExtrudeGeometryOptions {
8
8
  /**
@@ -1,5 +1,5 @@
1
- import { Vector2 } from './../math/Vector2.js';
2
- import { BufferGeometry } from './../core/BufferGeometry.js';
1
+ import { Vector2 } from '../math/Vector2.js';
2
+ import { BufferGeometry } from '../core/BufferGeometry.js';
3
3
 
4
4
  /**
5
5
  * Creates meshes with axial symmetry like vases
@@ -1,4 +1,4 @@
1
- import { BufferGeometry } from './../core/BufferGeometry.js';
1
+ import { BufferGeometry } from '../core/BufferGeometry.js';
2
2
 
3
3
  /**
4
4
  * A class for generating plane geometries.
@@ -1,4 +1,4 @@
1
- import { BufferGeometry } from './../core/BufferGeometry.js';
1
+ import { BufferGeometry } from '../core/BufferGeometry.js';
2
2
 
3
3
  /**
4
4
  * A polyhedron is a solid in three dimensions with flat faces
@@ -1,4 +1,4 @@
1
- import { BufferGeometry } from './../core/BufferGeometry.js';
1
+ import { BufferGeometry } from '../core/BufferGeometry.js';
2
2
 
3
3
  /**
4
4
  * A class for generating a two-dimensional ring geometry.
@@ -1,5 +1,5 @@
1
- import { Shape } from './../extras/core/Shape.js';
2
- import { BufferGeometry } from './../core/BufferGeometry.js';
1
+ import { Shape } from '../extras/core/Shape.js';
2
+ import { BufferGeometry } from '../core/BufferGeometry.js';
3
3
 
4
4
  /**
5
5
  * Creates an one-sided polygonal geometry from one or more path shapes.
@@ -1,4 +1,4 @@
1
- import { BufferGeometry } from './../core/BufferGeometry.js';
1
+ import { BufferGeometry } from '../core/BufferGeometry.js';
2
2
 
3
3
  /**
4
4
  * A class for generating sphere geometries.
@@ -1,4 +1,4 @@
1
- import { BufferGeometry } from './../core/BufferGeometry.js';
1
+ import { BufferGeometry } from '../core/BufferGeometry.js';
2
2
 
3
3
  /**
4
4
  * A class for generating torus geometries.
@@ -1,4 +1,4 @@
1
- import { BufferGeometry } from './../core/BufferGeometry.js';
1
+ import { BufferGeometry } from '../core/BufferGeometry.js';
2
2
 
3
3
  /**
4
4
  * Creates a torus knot, the particular shape of which is defined by a pair of coprime integers, p and q
@@ -1,6 +1,6 @@
1
- import { Curve } from './../extras/core/Curve.js';
2
- import { Vector3 } from './../math/Vector3.js';
3
- import { BufferGeometry } from './../core/BufferGeometry.js';
1
+ import { Curve } from '../extras/core/Curve.js';
2
+ import { Vector3 } from '../math/Vector3.js';
3
+ import { BufferGeometry } from '../core/BufferGeometry.js';
4
4
 
5
5
  /**
6
6
  * Creates a tube that extrudes along a 3d curve.
@@ -1,4 +1,4 @@
1
- import { BufferGeometry } from './../core/BufferGeometry.js';
1
+ import { BufferGeometry } from '../core/BufferGeometry.js';
2
2
 
3
3
  /**
4
4
  * This can be used as a helper object to view a {@link BufferGeometry | geometry} as a wireframe.
@@ -1,7 +1,7 @@
1
- import { Vector3 } from './../math/Vector3.js';
2
- import { Line } from './../objects/Line.js';
3
- import { Mesh } from './../objects/Mesh.js';
4
- import { Object3D } from './../core/Object3D.js';
1
+ import { Vector3 } from '../math/Vector3.js';
2
+ import { Line } from '../objects/Line.js';
3
+ import { Mesh } from '../objects/Mesh.js';
4
+ import { Object3D } from '../core/Object3D.js';
5
5
  import { ColorRepresentation } from '../math/Color.js';
6
6
 
7
7
  /**
@@ -1,5 +1,5 @@
1
1
  import { ColorRepresentation } from '../math/Color.js';
2
- import { LineSegments } from './../objects/LineSegments.js';
2
+ import { LineSegments } from '../objects/LineSegments.js';
3
3
 
4
4
  /**
5
5
  * An axis object to visualize the 3 axes in a simple way.
@@ -1,6 +1,6 @@
1
- import { Box3 } from './../math/Box3.js';
2
- import { ColorRepresentation } from './../math/Color.js';
3
- import { LineSegments } from './../objects/LineSegments.js';
1
+ import { Box3 } from '../math/Box3.js';
2
+ import { ColorRepresentation } from '../math/Color.js';
3
+ import { LineSegments } from '../objects/LineSegments.js';
4
4
 
5
5
  /**
6
6
  * Helper object to visualize a {@link THREE.Box3 | Box3}.
@@ -1,7 +1,7 @@
1
1
  import { Color } from '../math/Color.js';
2
2
  import { Matrix4 } from '../math/Matrix4.js';
3
- import { Camera } from './../cameras/Camera.js';
4
- import { LineSegments } from './../objects/LineSegments.js';
3
+ import { Camera } from '../cameras/Camera.js';
4
+ import { LineSegments } from '../objects/LineSegments.js';
5
5
 
6
6
  /**
7
7
  * This helps with visualizing what a camera contains in its frustum
@@ -1,7 +1,7 @@
1
- import { DirectionalLight } from './../lights/DirectionalLight.js';
2
- import { Line } from './../objects/Line.js';
3
- import { Matrix4 } from './../math/Matrix4.js';
4
- import { Object3D } from './../core/Object3D.js';
1
+ import { DirectionalLight } from '../lights/DirectionalLight.js';
2
+ import { Line } from '../objects/Line.js';
3
+ import { Matrix4 } from '../math/Matrix4.js';
4
+ import { Object3D } from '../core/Object3D.js';
5
5
  import { ColorRepresentation } from '../math/Color.js';
6
6
 
7
7
  /**
@@ -11,6 +11,8 @@ import { ColorRepresentation } from '../math/Color.js';
11
11
  * @example
12
12
  * ```typescript
13
13
  * const light = new THREE.DirectionalLight(0xFFFFFF);
14
+ * scene.add(light);
15
+ *
14
16
  * const helper = new THREE.DirectionalLightHelper(light, 5);
15
17
  * scene.add(helper);
16
18
  * ```
@@ -1,5 +1,5 @@
1
1
  import { ColorRepresentation } from '../math/Color.js';
2
- import { LineSegments } from './../objects/LineSegments.js';
2
+ import { LineSegments } from '../objects/LineSegments.js';
3
3
  import { BufferGeometry } from '../core/BufferGeometry.js';
4
4
  import { LineBasicMaterial } from '../materials/LineBasicMaterial.js';
5
5
 
@@ -1,7 +1,7 @@
1
- import { HemisphereLight } from './../lights/HemisphereLight.js';
2
- import { Matrix4 } from './../math/Matrix4.js';
3
- import { MeshBasicMaterial } from './../materials/MeshBasicMaterial.js';
4
- import { Object3D } from './../core/Object3D.js';
1
+ import { HemisphereLight } from '../lights/HemisphereLight.js';
2
+ import { Matrix4 } from '../math/Matrix4.js';
3
+ import { MeshBasicMaterial } from '../materials/MeshBasicMaterial.js';
4
+ import { Object3D } from '../core/Object3D.js';
5
5
  import { ColorRepresentation } from '../math/Color.js';
6
6
 
7
7
  /**
@@ -1,5 +1,5 @@
1
- import { Plane } from './../math/Plane.js';
2
- import { LineSegments } from './../objects/LineSegments.js';
1
+ import { Plane } from '../math/Plane.js';
2
+ import { LineSegments } from '../objects/LineSegments.js';
3
3
 
4
4
  /**
5
5
  * Helper object to visualize a {@link THREE.Plane | Plane}.
@@ -1,6 +1,6 @@
1
- import { PointLight } from './../lights/PointLight.js';
2
- import { Matrix4 } from './../math/Matrix4.js';
3
- import { Object3D } from './../core/Object3D.js';
1
+ import { PointLight } from '../lights/PointLight.js';
2
+ import { Matrix4 } from '../math/Matrix4.js';
3
+ import { Object3D } from '../core/Object3D.js';
4
4
  import { ColorRepresentation } from '../math/Color.js';
5
5
 
6
6
  /**
@@ -1,8 +1,8 @@
1
1
  import { SkinnedMesh } from '../Three.js';
2
- import { Object3D } from './../core/Object3D.js';
3
- import { Matrix4 } from './../math/Matrix4.js';
4
- import { Bone } from './../objects/Bone.js';
5
- import { LineSegments } from './../objects/LineSegments.js';
2
+ import { Object3D } from '../core/Object3D.js';
3
+ import { Matrix4 } from '../math/Matrix4.js';
4
+ import { Bone } from '../objects/Bone.js';
5
+ import { LineSegments } from '../objects/LineSegments.js';
6
6
 
7
7
  /**
8
8
  * A helper object to assist with visualizing a {@link Skeleton | Skeleton}
@@ -1,6 +1,6 @@
1
- import { Light } from './../lights/Light.js';
2
- import { Matrix4 } from './../math/Matrix4.js';
3
- import { Object3D } from './../core/Object3D.js';
1
+ import { Light } from '../lights/Light.js';
2
+ import { Matrix4 } from '../math/Matrix4.js';
3
+ import { Object3D } from '../core/Object3D.js';
4
4
  import { LineSegments } from '../objects/LineSegments.js';
5
5
  import { ColorRepresentation } from '../math/Color.js';
6
6
 
@@ -1,4 +1,4 @@
1
- import { Object3D } from './../core/Object3D.js';
1
+ import { Object3D } from '../core/Object3D.js';
2
2
  import { DirectionalLightShadow } from './DirectionalLightShadow.js';
3
3
  import { Light } from './Light.js';
4
4
  import { Vector3 } from '../math/Vector3.js';
@@ -1,4 +1,4 @@
1
- import { OrthographicCamera } from './../cameras/OrthographicCamera.js';
1
+ import { OrthographicCamera } from '../cameras/OrthographicCamera.js';
2
2
  import { LightShadow } from './LightShadow.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Color, ColorRepresentation } from './../math/Color.js';
1
+ import { Color, ColorRepresentation } from '../math/Color.js';
2
2
  import { Vector3 } from '../math/Vector3.js';
3
3
  import { Light } from './Light.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { SphericalHarmonics3 } from './../math/SphericalHarmonics3.js';
1
+ import { SphericalHarmonics3 } from '../math/SphericalHarmonics3.js';
2
2
  import { Light } from './Light.js';
3
3
 
4
4
  /**
@@ -1,8 +1,8 @@
1
- import { Camera } from './../cameras/Camera.js';
2
- import { Light } from './../lights/Light.js';
3
- import { Vector2 } from './../math/Vector2.js';
4
- import { Vector4 } from './../math/Vector4.js';
5
- import { Matrix4 } from './../math/Matrix4.js';
1
+ import { Camera } from '../cameras/Camera.js';
2
+ import { Light } from '../lights/Light.js';
3
+ import { Vector2 } from '../math/Vector2.js';
4
+ import { Vector4 } from '../math/Vector4.js';
5
+ import { Matrix4 } from '../math/Matrix4.js';
6
6
  import { WebGLRenderTarget } from '../renderers/WebGLRenderTarget.js';
7
7
  import { Frustum } from '../Three.js';
8
8
 
@@ -29,6 +29,13 @@ export class PointLight extends Light<PointLightShadow> {
29
29
  */
30
30
  constructor(color?: ColorRepresentation, intensity?: number, distance?: number, decay?: number);
31
31
 
32
+ /**
33
+ * Read-only flag to check if a given object is of type {@link PointLight}.
34
+ * @remarks This is a _constant_ value
35
+ * @defaultValue `true`
36
+ */
37
+ readonly isPointLight: true;
38
+
32
39
  /**
33
40
  * @default 'PointLight'
34
41
  */
@@ -1,4 +1,4 @@
1
- import { PerspectiveCamera } from './../cameras/PerspectiveCamera.js';
1
+ import { PerspectiveCamera } from '../cameras/PerspectiveCamera.js';
2
2
  import { Light } from './Light.js';
3
3
  import { LightShadow } from './LightShadow.js';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { Vector3 } from '../math/Vector3.js';
2
- import { Object3D } from './../core/Object3D.js';
2
+ import { Object3D } from '../core/Object3D.js';
3
3
  import { SpotLightShadow } from './SpotLightShadow.js';
4
4
  import { Light } from './Light.js';
5
5
  import { ColorRepresentation } from '../math/Color.js';
@@ -1,4 +1,4 @@
1
- import { PerspectiveCamera } from './../cameras/PerspectiveCamera.js';
1
+ import { PerspectiveCamera } from '../cameras/PerspectiveCamera.js';
2
2
  import { LightShadow } from './LightShadow.js';
3
3
 
4
4
  /**
@@ -4,13 +4,16 @@ import { Texture } from '../textures/Texture.js';
4
4
  import { Material } from '../materials/Material.js';
5
5
 
6
6
  export class MaterialLoader extends Loader<Material> {
7
- constructor(manager?: LoadingManager);
8
-
9
7
  /**
10
8
  * @default {}
11
9
  */
12
10
  textures: { [key: string]: Texture };
13
11
 
14
- setTextures(textures: { [key: string]: Texture }): this;
12
+ constructor(manager?: LoadingManager);
13
+
15
14
  parse(json: unknown): Material;
15
+
16
+ setTextures(textures: { [key: string]: Texture }): this;
17
+
18
+ static createMaterialFromType(type: string): Material;
16
19
  }
@@ -13,6 +13,13 @@ export interface LineBasicMaterialParameters extends MaterialParameters {
13
13
  export class LineBasicMaterial extends Material {
14
14
  constructor(parameters?: LineBasicMaterialParameters);
15
15
 
16
+ /**
17
+ * Read-only flag to check if a given object is of type {@link LineBasicMaterial}.
18
+ * @remarks This is a _constant_ value
19
+ * @defaultValue `true`
20
+ */
21
+ readonly isLineBasicMaterial: true;
22
+
16
23
  /**
17
24
  * @default 'LineBasicMaterial'
18
25
  */
@@ -9,6 +9,13 @@ export interface LineDashedMaterialParameters extends LineBasicMaterialParameter
9
9
  export class LineDashedMaterial extends LineBasicMaterial {
10
10
  constructor(parameters?: LineDashedMaterialParameters);
11
11
 
12
+ /**
13
+ * Read-only flag to check if a given object is of type {@link LineDashedMaterial}.
14
+ * @remarks This is a _constant_ value
15
+ * @defaultValue `true`
16
+ */
17
+ readonly isLineDashedMaterial: true;
18
+
12
19
  /**
13
20
  * @default 'LineDashedMaterial'
14
21
  */
@@ -28,7 +35,6 @@ export class LineDashedMaterial extends LineBasicMaterial {
28
35
  * @default 1
29
36
  */
30
37
  gapSize: number;
31
- readonly isLineDashedMaterial: true;
32
38
 
33
39
  setValues(parameters: LineDashedMaterialParameters): void;
34
40
  }
@@ -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,
@@ -60,7 +60,7 @@ export interface MaterialParameters {
60
60
  stencilFail?: StencilOp | undefined;
61
61
  stencilZFail?: StencilOp | undefined;
62
62
  stencilZPass?: StencilOp | undefined;
63
- userData?: any;
63
+ userData?: Record<string, any> | undefined;
64
64
  }
65
65
 
66
66
  /**
@@ -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 toneMapping setting.
342
- * Default is true.
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;
@@ -379,7 +379,7 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
379
379
  * An object that can be used to store custom data about the Material. It should not hold references to functions as these will not be cloned.
380
380
  * @default {}
381
381
  */
382
- userData: any;
382
+ userData: Record<string, any>;
383
383
 
384
384
  /**
385
385
  * This starts at 0 and counts how many times .needsUpdate is set to true.
@@ -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 shader source code as a parameter.
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 shader Source code of the shader
411
- * @param renderer WebGLRenderer Context that is initializing the material
410
+ * @param parameters WebGL program parameters
411
+ * @param renderer WebGLRenderer context that is initializing the material
412
412
  */
413
- onBeforeCompile(shader: Shader, renderer: WebGLRenderer): void;
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.
@@ -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 } from '../constants.js';
5
5
  /**
@@ -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
  */
@@ -1,6 +1,6 @@
1
1
  import { DepthPackingStrategies } from '../constants.js';
2
2
  import { MaterialParameters, Material } from './Material.js';
3
- import { Texture } from './../textures/Texture.js';
3
+ import { Texture } from '../textures/Texture.js';
4
4
 
5
5
  export interface MeshDepthMaterialParameters extends MaterialParameters {
6
6
  map?: Texture | null | undefined;
@@ -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'
@@ -1,6 +1,6 @@
1
1
  import { MaterialParameters, Material } from './Material.js';
2
- import { Vector3 } from './../math/Vector3.js';
3
- import { Texture } from './../textures/Texture.js';
2
+ import { Vector3 } from '../math/Vector3.js';
3
+ import { Texture } from '../textures/Texture.js';
4
4
 
5
5
  export interface MeshDistanceMaterialParameters extends MaterialParameters {
6
6
  map?: Texture | null | undefined;
@@ -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
  */