@types/three 0.158.2 → 0.159.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 (125) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +2 -1
  3. three/examples/jsm/animation/CCDIKSolver.d.ts +1 -1
  4. three/examples/jsm/cameras/CinematicCamera.d.ts +1 -1
  5. three/examples/jsm/helpers/TextureHelper.d.ts +10 -0
  6. three/examples/jsm/lines/LineMaterial.d.ts +2 -2
  7. three/examples/jsm/loaders/ColladaLoader.d.ts +1 -3
  8. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
  9. three/examples/jsm/loaders/SVGLoader.d.ts +1 -5
  10. three/examples/jsm/math/Octree.d.ts +7 -3
  11. three/examples/jsm/misc/ProgressiveLightMap.d.ts +1 -1
  12. three/examples/jsm/nodes/core/constants.d.ts +1 -3
  13. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +1 -1
  14. three/examples/jsm/postprocessing/HBAOPass.d.ts +106 -0
  15. three/examples/jsm/renderers/common/Info.d.ts +7 -2
  16. three/examples/jsm/renderers/common/Renderer.d.ts +2 -2
  17. three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +1 -0
  18. three/examples/jsm/shaders/HBAOShader.d.ts +44 -0
  19. three/examples/jsm/shaders/PoissonDenoiseShader.d.ts +28 -0
  20. three/examples/jsm/utils/SortUtils.d.ts +7 -0
  21. three/package.json +3 -3
  22. three/src/Three.d.ts +1 -0
  23. three/src/animation/AnimationClip.d.ts +2 -2
  24. three/src/animation/AnimationMixer.d.ts +1 -1
  25. three/src/animation/KeyframeTrack.d.ts +3 -3
  26. three/src/animation/tracks/BooleanKeyframeTrack.d.ts +1 -1
  27. three/src/animation/tracks/ColorKeyframeTrack.d.ts +1 -1
  28. three/src/animation/tracks/NumberKeyframeTrack.d.ts +1 -1
  29. three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +1 -1
  30. three/src/animation/tracks/StringKeyframeTrack.d.ts +1 -1
  31. three/src/animation/tracks/VectorKeyframeTrack.d.ts +1 -1
  32. three/src/audio/Audio.d.ts +1 -1
  33. three/src/audio/AudioListener.d.ts +1 -1
  34. three/src/core/BufferAttribute.d.ts +27 -0
  35. three/src/core/BufferGeometry.d.ts +1 -1
  36. three/src/core/InterleavedBuffer.d.ts +27 -0
  37. three/src/core/InterleavedBufferAttribute.d.ts +2 -2
  38. three/src/core/Object3D.d.ts +48 -14
  39. three/src/core/Raycaster.d.ts +1 -0
  40. three/src/extras/core/Curve.d.ts +2 -2
  41. three/src/extras/core/Path.d.ts +1 -1
  42. three/src/extras/core/Shape.d.ts +1 -1
  43. three/src/extras/core/ShapePath.d.ts +1 -1
  44. three/src/extras/curves/CatmullRomCurve3.d.ts +2 -2
  45. three/src/extras/curves/CubicBezierCurve.d.ts +2 -2
  46. three/src/extras/curves/CubicBezierCurve3.d.ts +2 -2
  47. three/src/extras/curves/EllipseCurve.d.ts +1 -1
  48. three/src/extras/curves/LineCurve.d.ts +2 -2
  49. three/src/extras/curves/LineCurve3.d.ts +2 -2
  50. three/src/extras/curves/QuadraticBezierCurve.d.ts +2 -2
  51. three/src/extras/curves/QuadraticBezierCurve3.d.ts +2 -2
  52. three/src/extras/curves/SplineCurve.d.ts +2 -2
  53. three/src/geometries/ExtrudeGeometry.d.ts +5 -5
  54. three/src/geometries/LatheGeometry.d.ts +2 -2
  55. three/src/geometries/PlaneGeometry.d.ts +1 -1
  56. three/src/geometries/PolyhedronGeometry.d.ts +1 -1
  57. three/src/geometries/RingGeometry.d.ts +1 -1
  58. three/src/geometries/ShapeGeometry.d.ts +2 -2
  59. three/src/geometries/SphereGeometry.d.ts +1 -1
  60. three/src/geometries/TorusGeometry.d.ts +1 -1
  61. three/src/geometries/TorusKnotGeometry.d.ts +1 -1
  62. three/src/geometries/TubeGeometry.d.ts +3 -3
  63. three/src/geometries/WireframeGeometry.d.ts +1 -1
  64. three/src/helpers/ArrowHelper.d.ts +4 -4
  65. three/src/helpers/AxesHelper.d.ts +1 -1
  66. three/src/helpers/Box3Helper.d.ts +3 -3
  67. three/src/helpers/CameraHelper.d.ts +2 -2
  68. three/src/helpers/DirectionalLightHelper.d.ts +6 -4
  69. three/src/helpers/GridHelper.d.ts +1 -1
  70. three/src/helpers/HemisphereLightHelper.d.ts +4 -4
  71. three/src/helpers/PlaneHelper.d.ts +2 -2
  72. three/src/helpers/PointLightHelper.d.ts +3 -3
  73. three/src/helpers/SkeletonHelper.d.ts +4 -4
  74. three/src/helpers/SpotLightHelper.d.ts +3 -3
  75. three/src/lights/DirectionalLight.d.ts +1 -1
  76. three/src/lights/DirectionalLightShadow.d.ts +1 -1
  77. three/src/lights/HemisphereLight.d.ts +1 -1
  78. three/src/lights/LightProbe.d.ts +1 -1
  79. three/src/lights/LightShadow.d.ts +5 -5
  80. three/src/lights/PointLightShadow.d.ts +1 -1
  81. three/src/lights/SpotLight.d.ts +1 -1
  82. three/src/lights/SpotLightShadow.d.ts +1 -1
  83. three/src/materials/Material.d.ts +2 -2
  84. three/src/materials/MeshBasicMaterial.d.ts +2 -2
  85. three/src/materials/MeshDepthMaterial.d.ts +1 -1
  86. three/src/materials/MeshDistanceMaterial.d.ts +2 -2
  87. three/src/materials/MeshLambertMaterial.d.ts +2 -2
  88. three/src/materials/MeshMatcapMaterial.d.ts +3 -3
  89. three/src/materials/MeshNormalMaterial.d.ts +2 -2
  90. three/src/materials/MeshPhongMaterial.d.ts +3 -3
  91. three/src/materials/MeshStandardMaterial.d.ts +3 -3
  92. three/src/materials/MeshToonMaterial.d.ts +3 -3
  93. three/src/materials/PointsMaterial.d.ts +2 -2
  94. three/src/materials/ShadowMaterial.d.ts +1 -1
  95. three/src/materials/SpriteMaterial.d.ts +2 -2
  96. three/src/math/Box3.d.ts +2 -2
  97. three/src/math/Frustum.d.ts +2 -2
  98. three/src/math/Vector2.d.ts +1 -1
  99. three/src/math/Vector4.d.ts +1 -1
  100. three/src/objects/BatchedMesh.d.ts +169 -0
  101. three/src/objects/Bone.d.ts +1 -1
  102. three/src/objects/LOD.d.ts +2 -4
  103. three/src/objects/Line.d.ts +2 -4
  104. three/src/objects/LineLoop.d.ts +1 -1
  105. three/src/objects/LineSegments.d.ts +1 -1
  106. three/src/objects/Skeleton.d.ts +2 -8
  107. three/src/renderers/WebGL3DRenderTarget.d.ts +7 -5
  108. three/src/renderers/WebGLArrayRenderTarget.d.ts +7 -5
  109. three/src/renderers/WebGLCubeRenderTarget.d.ts +2 -2
  110. three/src/renderers/WebGLRenderTarget.d.ts +2 -2
  111. three/src/renderers/shaders/ShaderChunk.d.ts +1 -0
  112. three/src/renderers/shaders/UniformsLib.d.ts +1 -1
  113. three/src/renderers/webgl/WebGLAttributes.d.ts +1 -0
  114. three/src/renderers/webgl/WebGLBindingStates.d.ts +4 -4
  115. three/src/renderers/webgl/WebGLBufferRenderer.d.ts +4 -3
  116. three/src/renderers/webgl/WebGLClipping.d.ts +2 -2
  117. three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +5 -4
  118. three/src/renderers/webgl/WebGLPrograms.d.ts +3 -3
  119. three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -5
  120. three/src/renderers/webgl/WebGLShadowMap.d.ts +2 -2
  121. three/src/scenes/Fog.d.ts +1 -1
  122. three/src/scenes/FogExp2.d.ts +1 -1
  123. three/src/textures/Texture.d.ts +2 -2
  124. three/examples/jsm/objects/BatchedMesh.d.ts +0 -57
  125. three/examples/jsm/renderers/common/Animation.d.ts +0 -16
@@ -208,7 +208,7 @@ export class Object3D<TEventMap extends Object3DEventMap = Object3DEventMap> ext
208
208
  * @remarks It should not hold references to _functions_ as these **will not** be cloned.
209
209
  * @default `{}`
210
210
  */
211
- userData: { [key: string]: any }; // TODO Replace this to a Record?
211
+ userData: Record<string, any>;
212
212
 
213
213
  /**
214
214
  * Custom depth material to be used when rendering to the depth map.
@@ -225,15 +225,49 @@ export class Object3D<TEventMap extends Object3DEventMap = Object3DEventMap> ext
225
225
  */
226
226
  customDistanceMaterial?: Material | undefined;
227
227
 
228
+ /**
229
+ * An optional callback that is executed immediately before a 3D object is rendered to a shadow map.
230
+ * @remarks This function is called with the following parameters: renderer, scene, camera, shadowCamera, geometry,
231
+ * depthMaterial, group.
232
+ * @remarks Please notice that this callback is only executed for `renderable` 3D objects. Meaning 3D objects which
233
+ * define their visual appearance with geometries and materials like instances of {@link Mesh}, {@link Line},
234
+ * {@link Points} or {@link Sprite}. Instances of {@link Object3D}, {@link Group} or {@link Bone} are not renderable
235
+ * and thus this callback is not executed for such objects.
236
+ */
237
+ onBeforeShadow(
238
+ renderer: WebGLRenderer,
239
+ scene: Scene,
240
+ shadowCamera: Camera,
241
+ geometry: BufferGeometry,
242
+ depthMaterial: Material,
243
+ group: Group,
244
+ ): void;
245
+
246
+ /**
247
+ * An optional callback that is executed immediately after a 3D object is rendered to a shadow map.
248
+ * @remarks This function is called with the following parameters: renderer, scene, camera, shadowCamera, geometry,
249
+ * depthMaterial, group.
250
+ * @remarks Please notice that this callback is only executed for `renderable` 3D objects. Meaning 3D objects which
251
+ * define their visual appearance with geometries and materials like instances of {@link Mesh}, {@link Line},
252
+ * {@link Points} or {@link Sprite}. Instances of {@link Object3D}, {@link Group} or {@link Bone} are not renderable
253
+ * and thus this callback is not executed for such objects.
254
+ */
255
+ onAfterShadow(
256
+ renderer: WebGLRenderer,
257
+ scene: Scene,
258
+ shadowCamera: Camera,
259
+ geometry: BufferGeometry,
260
+ depthMaterial: Material,
261
+ group: Group,
262
+ ): void;
263
+
228
264
  /**
229
265
  * An optional callback that is executed immediately before a 3D object is rendered.
230
266
  * @remarks This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
231
- * @remarks Please notice that this callback is only executed for `renderable` 3D objects.
232
- * Meaning 3D objects which define their visual appearance with geometries and materials like
233
- * instances of {@link THREE.Object3DMesh | Mesh}, {@link THREE.Object3DLine | Line}, {@link THREE.Object3DPoints | Points} or {@link THREE.Object3DSprite | Sprite}.
234
- * Instances of {@link THREE.Object3DObject3D | Object3D}, {@link THREE.Object3DGroup | Group} or {@link THREE.Object3DBone | Bone}
235
- * are not renderable and thus this callback is not executed for such objects.
236
- * @defaultValue `() => {}`
267
+ * @remarks Please notice that this callback is only executed for `renderable` 3D objects. Meaning 3D objects which
268
+ * define their visual appearance with geometries and materials like instances of {@link Mesh}, {@link Line},
269
+ * {@link Points} or {@link Sprite}. Instances of {@link Object3D}, {@link Group} or {@link Bone} are not renderable
270
+ * and thus this callback is not executed for such objects.
237
271
  */
238
272
  onBeforeRender(
239
273
  renderer: WebGLRenderer,
@@ -247,12 +281,10 @@ export class Object3D<TEventMap extends Object3DEventMap = Object3DEventMap> ext
247
281
  /**
248
282
  * An optional callback that is executed immediately after a 3D object is rendered.
249
283
  * @remarks This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
250
- * @remarks Please notice that this callback is only executed for `renderable` 3D objects.
251
- * Meaning 3D objects which define their visual appearance with geometries and materials like
252
- * instances of {@link THREE.Object3DMesh | Mesh}, {@link THREE.Object3DLine | Line}, {@link THREE.Object3DPoints | Points} or {@link THREE.Object3DSprite | Sprite}.
253
- * Instances of {@link THREE.Object3DObject3D | Object3D}, {@link THREE.Object3DGroup | Group} or {@link THREE.Object3DBone | Bone}
254
- * are not renderable and thus this callback is not executed for such objects.
255
- * @defaultValue `() => {}`
284
+ * @remarks Please notice that this callback is only executed for `renderable` 3D objects. Meaning 3D objects which
285
+ * define their visual appearance with geometries and materials like instances of {@link Mesh}, {@link Line},
286
+ * {@link Points} or {@link Sprite}. Instances of {@link Object3D}, {@link Group} or {@link Bone} are not renderable
287
+ * and thus this callback is not executed for such objects.
256
288
  */
257
289
  onAfterRender(
258
290
  renderer: WebGLRenderer,
@@ -474,8 +506,10 @@ export class Object3D<TEventMap extends Object3DEventMap = Object3DEventMap> ext
474
506
  * and returns the first with a property that matches the value given.
475
507
  * @param name The property name to search for.
476
508
  * @param value Value of the given property.
509
+ * @param optionalTarget target to set the result. Otherwise a new Array is instantiated. If set, you must clear
510
+ * this array prior to each call (i.e., array.length = 0;).
477
511
  */
478
- getObjectsByProperty(name: string, value: any): Object3D[];
512
+ getObjectsByProperty(name: string, value: any, optionalTarget?: Object3D[]): Object3D[];
479
513
 
480
514
  /**
481
515
  * Returns a vector representing the position of the object in world space.
@@ -32,6 +32,7 @@ export interface Intersection<TIntersected extends Object3D = Object3D> {
32
32
  /** The index number of the instance where the ray intersects the {@link THREE.InstancedMesh | InstancedMesh } */
33
33
  instanceId?: number | undefined;
34
34
  pointOnLine?: Vector3;
35
+ batchId?: number;
35
36
  }
36
37
 
37
38
  export interface RaycasterParameters {
@@ -1,5 +1,5 @@
1
- import { Vector } from './../../math/Vector2.js';
2
- import { Vector3 } from './../../math/Vector3.js';
1
+ import { Vector } from '../../math/Vector2.js';
2
+ import { Vector3 } from '../../math/Vector3.js';
3
3
 
4
4
  /**
5
5
  * An abstract base class for creating a {@link Curve} object that contains methods for interpolation
@@ -1,4 +1,4 @@
1
- import { Vector2 } from './../../math/Vector2.js';
1
+ import { Vector2 } from '../../math/Vector2.js';
2
2
  import { CurvePath } from './CurvePath.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 { 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
 
@@ -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
  /**
@@ -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
  /**
@@ -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.
@@ -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
  /**
@@ -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;
@@ -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;
@@ -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';
@@ -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
 
@@ -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 {
@@ -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
 
@@ -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