@types/three 0.158.3 → 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 (122) 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/SVGLoader.d.ts +1 -5
  9. three/examples/jsm/math/Octree.d.ts +7 -3
  10. three/examples/jsm/misc/ProgressiveLightMap.d.ts +1 -1
  11. three/examples/jsm/nodes/core/constants.d.ts +1 -3
  12. three/examples/jsm/postprocessing/HBAOPass.d.ts +106 -0
  13. three/examples/jsm/renderers/common/Info.d.ts +7 -2
  14. three/examples/jsm/renderers/common/Renderer.d.ts +2 -2
  15. three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +1 -0
  16. three/examples/jsm/shaders/HBAOShader.d.ts +44 -0
  17. three/examples/jsm/shaders/PoissonDenoiseShader.d.ts +28 -0
  18. three/examples/jsm/utils/SortUtils.d.ts +7 -0
  19. three/package.json +3 -3
  20. three/src/Three.d.ts +1 -0
  21. three/src/animation/AnimationClip.d.ts +2 -2
  22. three/src/animation/AnimationMixer.d.ts +1 -1
  23. three/src/animation/KeyframeTrack.d.ts +3 -3
  24. three/src/animation/tracks/BooleanKeyframeTrack.d.ts +1 -1
  25. three/src/animation/tracks/ColorKeyframeTrack.d.ts +1 -1
  26. three/src/animation/tracks/NumberKeyframeTrack.d.ts +1 -1
  27. three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +1 -1
  28. three/src/animation/tracks/StringKeyframeTrack.d.ts +1 -1
  29. three/src/animation/tracks/VectorKeyframeTrack.d.ts +1 -1
  30. three/src/audio/Audio.d.ts +1 -1
  31. three/src/audio/AudioListener.d.ts +1 -1
  32. three/src/core/BufferAttribute.d.ts +27 -0
  33. three/src/core/BufferGeometry.d.ts +1 -1
  34. three/src/core/InterleavedBuffer.d.ts +27 -0
  35. three/src/core/InterleavedBufferAttribute.d.ts +2 -2
  36. three/src/core/Object3D.d.ts +48 -14
  37. three/src/core/Raycaster.d.ts +1 -0
  38. three/src/extras/core/Curve.d.ts +2 -2
  39. three/src/extras/core/Path.d.ts +1 -1
  40. three/src/extras/core/Shape.d.ts +1 -1
  41. three/src/extras/core/ShapePath.d.ts +1 -1
  42. three/src/extras/curves/CatmullRomCurve3.d.ts +2 -2
  43. three/src/extras/curves/CubicBezierCurve.d.ts +2 -2
  44. three/src/extras/curves/CubicBezierCurve3.d.ts +2 -2
  45. three/src/extras/curves/EllipseCurve.d.ts +1 -1
  46. three/src/extras/curves/LineCurve.d.ts +2 -2
  47. three/src/extras/curves/LineCurve3.d.ts +2 -2
  48. three/src/extras/curves/QuadraticBezierCurve.d.ts +2 -2
  49. three/src/extras/curves/QuadraticBezierCurve3.d.ts +2 -2
  50. three/src/extras/curves/SplineCurve.d.ts +2 -2
  51. three/src/geometries/ExtrudeGeometry.d.ts +5 -5
  52. three/src/geometries/LatheGeometry.d.ts +2 -2
  53. three/src/geometries/PlaneGeometry.d.ts +1 -1
  54. three/src/geometries/PolyhedronGeometry.d.ts +1 -1
  55. three/src/geometries/RingGeometry.d.ts +1 -1
  56. three/src/geometries/ShapeGeometry.d.ts +2 -2
  57. three/src/geometries/SphereGeometry.d.ts +1 -1
  58. three/src/geometries/TorusGeometry.d.ts +1 -1
  59. three/src/geometries/TorusKnotGeometry.d.ts +1 -1
  60. three/src/geometries/TubeGeometry.d.ts +3 -3
  61. three/src/geometries/WireframeGeometry.d.ts +1 -1
  62. three/src/helpers/ArrowHelper.d.ts +4 -4
  63. three/src/helpers/AxesHelper.d.ts +1 -1
  64. three/src/helpers/Box3Helper.d.ts +3 -3
  65. three/src/helpers/CameraHelper.d.ts +2 -2
  66. three/src/helpers/DirectionalLightHelper.d.ts +6 -4
  67. three/src/helpers/GridHelper.d.ts +1 -1
  68. three/src/helpers/HemisphereLightHelper.d.ts +4 -4
  69. three/src/helpers/PlaneHelper.d.ts +2 -2
  70. three/src/helpers/PointLightHelper.d.ts +3 -3
  71. three/src/helpers/SkeletonHelper.d.ts +4 -4
  72. three/src/helpers/SpotLightHelper.d.ts +3 -3
  73. three/src/lights/DirectionalLight.d.ts +1 -1
  74. three/src/lights/DirectionalLightShadow.d.ts +1 -1
  75. three/src/lights/HemisphereLight.d.ts +1 -1
  76. three/src/lights/LightProbe.d.ts +1 -1
  77. three/src/lights/LightShadow.d.ts +5 -5
  78. three/src/lights/PointLightShadow.d.ts +1 -1
  79. three/src/lights/SpotLight.d.ts +1 -1
  80. three/src/lights/SpotLightShadow.d.ts +1 -1
  81. three/src/materials/Material.d.ts +2 -2
  82. three/src/materials/MeshBasicMaterial.d.ts +2 -2
  83. three/src/materials/MeshDepthMaterial.d.ts +1 -1
  84. three/src/materials/MeshDistanceMaterial.d.ts +2 -2
  85. three/src/materials/MeshLambertMaterial.d.ts +2 -2
  86. three/src/materials/MeshMatcapMaterial.d.ts +3 -3
  87. three/src/materials/MeshNormalMaterial.d.ts +2 -2
  88. three/src/materials/MeshPhongMaterial.d.ts +3 -3
  89. three/src/materials/MeshStandardMaterial.d.ts +3 -3
  90. three/src/materials/MeshToonMaterial.d.ts +3 -3
  91. three/src/materials/PointsMaterial.d.ts +2 -2
  92. three/src/materials/ShadowMaterial.d.ts +1 -1
  93. three/src/materials/SpriteMaterial.d.ts +2 -2
  94. three/src/math/Box3.d.ts +2 -2
  95. three/src/math/Frustum.d.ts +2 -2
  96. three/src/math/Vector2.d.ts +1 -1
  97. three/src/math/Vector4.d.ts +1 -1
  98. three/src/objects/BatchedMesh.d.ts +169 -0
  99. three/src/objects/Bone.d.ts +1 -1
  100. three/src/objects/LOD.d.ts +2 -4
  101. three/src/objects/Line.d.ts +2 -4
  102. three/src/objects/LineLoop.d.ts +1 -1
  103. three/src/objects/LineSegments.d.ts +1 -1
  104. three/src/objects/Skeleton.d.ts +2 -8
  105. three/src/renderers/WebGL3DRenderTarget.d.ts +7 -5
  106. three/src/renderers/WebGLArrayRenderTarget.d.ts +7 -5
  107. three/src/renderers/WebGLCubeRenderTarget.d.ts +2 -2
  108. three/src/renderers/WebGLRenderTarget.d.ts +1 -1
  109. three/src/renderers/shaders/ShaderChunk.d.ts +1 -0
  110. three/src/renderers/webgl/WebGLAttributes.d.ts +1 -0
  111. three/src/renderers/webgl/WebGLBindingStates.d.ts +4 -4
  112. three/src/renderers/webgl/WebGLBufferRenderer.d.ts +4 -3
  113. three/src/renderers/webgl/WebGLClipping.d.ts +2 -2
  114. three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +5 -4
  115. three/src/renderers/webgl/WebGLPrograms.d.ts +3 -3
  116. three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -5
  117. three/src/renderers/webgl/WebGLShadowMap.d.ts +2 -2
  118. three/src/scenes/Fog.d.ts +1 -1
  119. three/src/scenes/FogExp2.d.ts +1 -1
  120. three/src/textures/Texture.d.ts +1 -1
  121. three/examples/jsm/objects/BatchedMesh.d.ts +0 -57
  122. three/examples/jsm/renderers/common/Animation.d.ts +0 -16
@@ -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 { 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;
@@ -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 {
@@ -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 {
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';
@@ -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];
@@ -0,0 +1,169 @@
1
+ import { Mesh } from './Mesh.js';
2
+ import { BufferGeometry } from '../core/BufferGeometry.js';
3
+ import { Material } from '../materials/Material.js';
4
+ import { Box3 } from '../math/Box3.js';
5
+ import { Sphere } from '../math/Sphere.js';
6
+ import { Matrix4 } from '../math/Matrix4.js';
7
+ import { Camera } from '../cameras/Camera.js';
8
+
9
+ /**
10
+ * A special version of {@link Mesh} with multi draw batch rendering support. Use {@link BatchedMesh} if you have to
11
+ * render a large number of objects with the same material but with different world transformations and geometry. The
12
+ * usage of {@link BatchedMesh} will help you to reduce the number of draw calls and thus improve the overall rendering
13
+ * performance in your application.
14
+ *
15
+ * If the {@link https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_multi_draw WEBGL_multi_draw extension} is not
16
+ * supported then a less performant callback is used.
17
+ *
18
+ * @example
19
+ * const box = new THREE.BoxGeometry( 1, 1, 1 );
20
+ * const sphere = new THREE.BoxGeometry( 1, 1, 1 );
21
+ * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
22
+ *
23
+ * // initialize and add geometries into the batched mesh
24
+ * const batchedMesh = new BatchedMesh( 10, 5000, 10000, material );
25
+ * const boxId = batchedMesh.addGeometry( box );
26
+ * const sphereId = batchedMesh.addGeometry( sphere );
27
+ *
28
+ * // position the geometries
29
+ * batchedMesh.setMatrixAt( boxId, boxMatrix );
30
+ * batchedMesh.setMatrixAt( sphereId, sphereMatrix );
31
+ *
32
+ * scene.add( batchedMesh );
33
+ *
34
+ * @also Example: {@link https://threejs.org/examples/#webgl_mesh_batch WebGL / mesh / batch}
35
+ */
36
+ declare class BatchedMesh extends Mesh<BufferGeometry, Material> {
37
+ /**
38
+ * This bounding box encloses all instances of the {@link BatchedMesh}. Can be calculated with
39
+ * {@link .computeBoundingBox()}.
40
+ * @default null
41
+ */
42
+ boundingBox: Box3 | null;
43
+
44
+ /**
45
+ * This bounding sphere encloses all instances of the {@link BatchedMesh}. Can be calculated with
46
+ * {@link .computeBoundingSphere()}.
47
+ * @default null
48
+ */
49
+ boundingSphere: Sphere | null;
50
+
51
+ customSort: ((this: this, list: Array<{ start: number; count: number; z: number }>, camera: Camera) => void) | null;
52
+
53
+ /**
54
+ * If true then the individual objects within the {@link BatchedMesh} are frustum culled.
55
+ * @default true
56
+ */
57
+ perObjectFrustumCulled: boolean;
58
+
59
+ /**
60
+ * If true then the individual objects within the {@link BatchedMesh} are sorted to improve overdraw-related
61
+ * artifacts. If the material is marked as "transparent" objects are rendered back to front and if not then they are
62
+ * rendered front to back.
63
+ * @default true
64
+ */
65
+ sortObjects: boolean;
66
+
67
+ /**
68
+ * The maximum number of individual geometries that can be stored in the {@link BatchedMesh}. Read only.
69
+ */
70
+ get maxGeometryCount(): number;
71
+
72
+ /**
73
+ * Read-only flag to check if a given object is of type {@link BatchedMesh}.
74
+ */
75
+ isBatchedMesh: true;
76
+
77
+ /**
78
+ *
79
+ * @param maxGeometryCount the max number of individual geometries planned to be added.
80
+ * @param maxVertexCount the max number of vertices to be used by all geometries.
81
+ * @param maxIndexCount the max number of indices to be used by all geometries.
82
+ * @param material an instance of [page:Material]. Default is a new {@link MeshBasicMaterial}.
83
+ */
84
+ constructor(maxGeometryCount: number, maxVertexCount: number, maxIndexCount?: number, material?: Material);
85
+
86
+ /**
87
+ * Computes the bounding box, updating {@link .boundingBox} attribute.
88
+ * Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are `null`.
89
+ */
90
+ computeBoundingBox(): void;
91
+
92
+ /**
93
+ * Computes the bounding sphere, updating {@link .boundingSphere} attribute.
94
+ * Bounding spheres aren't computed by default. They need to be explicitly computed, otherwise they are `null`.
95
+ */
96
+ computeBoundingSphere(): void;
97
+
98
+ /**
99
+ * Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer
100
+ * used in your app.
101
+ */
102
+ dispose(): this;
103
+
104
+ /**
105
+ * Takes a sort a function that is run before render. The function takes a list of items to sort and a camera. The
106
+ * objects in the list include a "z" field to perform a depth-ordered sort with.
107
+ */
108
+ setCustomSort(
109
+ func: ((this: this, list: Array<{ start: number; count: number; z: number }>, camera: Camera) => void) | null,
110
+ ): this;
111
+
112
+ /**
113
+ * Get the local transformation matrix of the defined instance.
114
+ * @param index The index of an instance. Values have to be in the range [0, count].
115
+ * @param matrix This 4x4 matrix will be set to the local transformation matrix of the defined instance.
116
+ */
117
+ getMatrixAt(index: number, matrix: Matrix4): Matrix4;
118
+
119
+ /**
120
+ * Get whether the given instance is marked as "visible" or not.
121
+ * @param index The index of an instance. Values have to be in the range [0, count].
122
+ */
123
+ getVisibleAt(index: number): boolean;
124
+
125
+ /**
126
+ * Sets the given local transformation matrix to the defined instance. Make sure you set {@link .instanceMatrix}
127
+ * {@link BufferAttribute.needsUpdate} to true after updating all the matrices.
128
+ * @param index The index of an instance. Values have to be in the range [0, count].
129
+ * @param matrix A 4x4 matrix representing the local transformation of a single instance.
130
+ */
131
+ setMatrixAt(index: number, matrix: Matrix4): this;
132
+
133
+ /**
134
+ * Sets the visibility of the object at the given index.
135
+ * @param index The index of an instance. Values have to be in the range [0, count].
136
+ * @param visible A boolean value indicating the visibility state.
137
+ */
138
+ setVisibleAt(index: number, visible: boolean): this;
139
+
140
+ /**
141
+ * Adds the given geometry to the {@link BatchedMesh} and returns the associated index referring to it.
142
+ * @param geometry The geometry to add into the {@link BatchedMesh}.
143
+ * @param reservedVertexRange Optional parameter specifying the amount of vertex buffer space to reserve for the
144
+ * added geometry. This is necessary if it is planned to set a new geometry at this index at a later time that is
145
+ * larger than the original geometry. Defaults to the length of the given geometry vertex buffer.
146
+ * @param reservedIndexRange Optional parameter specifying the amount of index buffer space to reserve for the added
147
+ * geometry. This is necessary if it is planned to set a new geometry at this index at a later time that is larger
148
+ * than the original geometry. Defaults to the length of the given geometry index buffer.
149
+ */
150
+ addGeometry(geometry: BufferGeometry, reservedVertexRange?: number, reservedIndexRange?: number): number;
151
+
152
+ /**
153
+ * Replaces the geometry at `index` with the provided geometry. Throws an error if there is not enough space
154
+ * reserved for geometry at the index.
155
+ * @param index Which geometry index to replace with this geometry.
156
+ * @param geometry The geometry to substitute at the given geometry index.
157
+ */
158
+ setGeometryAt(index: number, geometry: BufferGeometry): number;
159
+
160
+ /**
161
+ * Marks the geometry at the given index as deleted and to not be rendered anymore.
162
+ */
163
+ deleteGeometry(index: number): this;
164
+
165
+ getBoundingBoxAt(index: number, target: Box3): Box3;
166
+ getBoundingSphereAt(index: number, target: Sphere): Sphere;
167
+ }
168
+
169
+ export { BatchedMesh };
@@ -1,4 +1,4 @@
1
- import { Object3D } from './../core/Object3D.js';
1
+ import { Object3D } from '../core/Object3D.js';
2
2
 
3
3
  /**
4
4
  * A {@link Bone} which is part of a {@link THREE.Skeleton | Skeleton}
@@ -1,7 +1,5 @@
1
- import { Object3D } from './../core/Object3D.js';
2
- import { Raycaster } from './../core/Raycaster.js';
3
- import { Camera } from './../cameras/Camera.js';
4
- import { Intersection } from '../core/Raycaster.js';
1
+ import { Object3D } from '../core/Object3D.js';
2
+ import { Camera } from '../cameras/Camera.js';
5
3
 
6
4
  /**
7
5
  * Every level is associated with an object, and rendering can be switched between them at the distances specified
@@ -1,8 +1,6 @@
1
- import { Material } from './../materials/Material.js';
2
- import { Raycaster } from './../core/Raycaster.js';
3
- import { Object3D } from './../core/Object3D.js';
1
+ import { Material } from '../materials/Material.js';
2
+ import { Object3D } from '../core/Object3D.js';
4
3
  import { BufferGeometry } from '../core/BufferGeometry.js';
5
- import { Intersection } from '../core/Raycaster.js';
6
4
 
7
5
  /**
8
6
  * A continuous line.
@@ -1,5 +1,5 @@
1
1
  import { Line } from './Line.js';
2
- import { Material } from './../materials/Material.js';
2
+ import { Material } from '../materials/Material.js';
3
3
  import { BufferGeometry } from '../core/BufferGeometry.js';
4
4
 
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { Material } from './../materials/Material.js';
1
+ import { Material } from '../materials/Material.js';
2
2
  import { Line } from './Line.js';
3
3
  import { BufferGeometry } from '../core/BufferGeometry.js';
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { Bone } from './Bone.js';
2
- import { Matrix4 } from './../math/Matrix4.js';
3
- import { DataTexture } from './../textures/DataTexture.js';
2
+ import { Matrix4 } from '../math/Matrix4.js';
3
+ import { DataTexture } from '../textures/DataTexture.js';
4
4
 
5
5
  /**
6
6
  * Use an array of {@link Bone | bones} to create a {@link Skeleton} that can be used by a {@link THREE.SkinnedMesh | SkinnedMesh}.
@@ -61,12 +61,6 @@ export class Skeleton {
61
61
  */
62
62
  boneTexture: null | DataTexture;
63
63
 
64
- /**
65
- * The size of the {@link boneTexture | .boneTexture}.
66
- * @remarks Expects a `Integer`
67
- */
68
- boneTextureSize: number;
69
-
70
64
  frame: number;
71
65
 
72
66
  init(): void;
@@ -1,5 +1,5 @@
1
1
  import { Data3DTexture } from '../textures/Data3DTexture.js';
2
- import { WebGLRenderTarget } from './WebGLRenderTarget.js';
2
+ import { WebGLRenderTarget, WebGLRenderTargetOptions } from './WebGLRenderTarget.js';
3
3
 
4
4
  /**
5
5
  * Represents a three-dimensional render target.
@@ -8,11 +8,13 @@ export class WebGL3DRenderTarget extends WebGLRenderTarget {
8
8
  /**
9
9
  * Creates a new WebGL3DRenderTarget.
10
10
  *
11
- * @param width the width of the render target, in pixels.
12
- * @param height the height of the render target, in pixels.
13
- * @param depth the depth of the render target.
11
+ * @param width the width of the render target, in pixels. Default is `1`.
12
+ * @param height the height of the render target, in pixels. Default is `1`.
13
+ * @param depth the depth of the render target. Default is `1`.
14
+ * @param options optional object that holds texture parameters for an auto-generated target texture and
15
+ * depthBuffer/stencilBuffer booleans. See {@link WebGLRenderTarget} for details.
14
16
  */
15
- constructor(width?: number, height?: number, depth?: number);
17
+ constructor(width?: number, height?: number, depth?: number, options?: WebGLRenderTargetOptions);
16
18
 
17
19
  /**
18
20
  * The depth of the render target.
@@ -1,5 +1,5 @@
1
1
  import { DataArrayTexture } from '../textures/DataArrayTexture.js';
2
- import { WebGLRenderTarget } from './WebGLRenderTarget.js';
2
+ import { WebGLRenderTarget, WebGLRenderTargetOptions } from './WebGLRenderTarget.js';
3
3
 
4
4
  /**
5
5
  * This type of render target represents an array of textures.
@@ -8,11 +8,13 @@ export class WebGLArrayRenderTarget extends WebGLRenderTarget {
8
8
  /**
9
9
  * Creates a new WebGLArrayRenderTarget.
10
10
  *
11
- * @param width the width of the render target, in pixels.
12
- * @param height the height of the render target, in pixels.
13
- * @param depth the depth/layer count of the render target.
11
+ * @param width the width of the render target, in pixels. Default is `1`.
12
+ * @param height the height of the render target, in pixels. Default is `1`.
13
+ * @param depth the depth/layer count of the render target. Default is `1`.
14
+ * @param options optional object that holds texture parameters for an auto-generated target texture and
15
+ * depthBuffer/stencilBuffer booleans. See {@link WebGLRenderTarget} for details.
14
16
  */
15
- constructor(width?: number, height?: number, depth?: number);
17
+ constructor(width?: number, height?: number, depth?: number, options?: WebGLRenderTargetOptions);
16
18
 
17
19
  /**
18
20
  * The depth of the render target.
@@ -1,7 +1,7 @@
1
1
  import { WebGLRenderTargetOptions, WebGLRenderTarget } from './WebGLRenderTarget.js';
2
2
  import { WebGLRenderer } from './WebGLRenderer.js';
3
- import { Texture } from './../textures/Texture.js';
4
- import { CubeTexture } from './../textures/CubeTexture.js';
3
+ import { Texture } from '../textures/Texture.js';
4
+ import { CubeTexture } from '../textures/CubeTexture.js';
5
5
 
6
6
  export class WebGLCubeRenderTarget extends WebGLRenderTarget {
7
7
  constructor(size?: number, options?: WebGLRenderTargetOptions);
@@ -5,7 +5,7 @@ import { RenderTarget, RenderTargetOptions } from '../core/RenderTarget.js';
5
5
  export interface WebGLRenderTargetOptions extends RenderTargetOptions {}
6
6
 
7
7
  export class WebGLRenderTarget<TTexture extends Texture | Texture[] = Texture> extends RenderTarget<TTexture> {
8
- constructor(width?: number, height?: number, options?: RenderTargetOptions);
8
+ constructor(width?: number, height?: number, options?: WebGLRenderTargetOptions);
9
9
 
10
10
  readonly isWebGLRenderTarget: true;
11
11
  }
@@ -8,6 +8,7 @@ export const ShaderChunk: {
8
8
  alphatest_pars_fragment: string;
9
9
  aomap_fragment: string;
10
10
  aomap_pars_fragment: string;
11
+ batching_pars_vertex: string;
11
12
  begin_vertex: string;
12
13
  beginnormal_vertex: string;
13
14
  bsdfs: string;
@@ -12,6 +12,7 @@ export class WebGLAttributes {
12
12
  type: number;
13
13
  bytesPerElement: number;
14
14
  version: number;
15
+ size: number;
15
16
  }
16
17
  | undefined;
17
18
 
@@ -2,10 +2,10 @@ import { WebGLExtensions } from './WebGLExtensions.js';
2
2
  import { WebGLAttributes } from './WebGLAttributes.js';
3
3
  import { WebGLProgram } from './WebGLProgram.js';
4
4
  import { WebGLCapabilities } from './WebGLCapabilities.js';
5
- import { Object3D } from './../../core/Object3D.js';
6
- import { BufferGeometry } from './../../core/BufferGeometry.js';
7
- import { BufferAttribute } from './../../core/BufferAttribute.js';
8
- import { Material } from './../../materials/Material.js';
5
+ import { Object3D } from '../../core/Object3D.js';
6
+ import { BufferGeometry } from '../../core/BufferGeometry.js';
7
+ import { BufferAttribute } from '../../core/BufferAttribute.js';
8
+ import { Material } from '../../materials/Material.js';
9
9
 
10
10
  export class WebGLBindingStates {
11
11
  constructor(
@@ -11,7 +11,8 @@ export class WebGLBufferRenderer {
11
11
  capabilities: WebGLCapabilities,
12
12
  );
13
13
 
14
- setMode(value: any): void;
15
- render(start: any, count: number): void;
16
- renderInstances(start: any, count: number, primcount: number): void;
14
+ setMode: (value: any) => void;
15
+ render: (start: any, count: number) => void;
16
+ renderInstances: (start: any, count: number, primcount: number) => void;
17
+ renderMultiDraw: (starts: Int32Array, counts: Int32Array, drawCount: number) => void;
17
18
  }
@@ -1,5 +1,5 @@
1
- import { Camera } from './../../cameras/Camera.js';
2
- import { Material } from './../../materials/Material.js';
1
+ import { Camera } from '../../cameras/Camera.js';
2
+ import { Material } from '../../materials/Material.js';
3
3
  import { Plane } from '../../math/Plane.js';
4
4
  import { WebGLProperties } from './WebGLProperties.js';
5
5
 
@@ -1,8 +1,9 @@
1
1
  export class WebGLIndexedBufferRenderer {
2
2
  constructor(gl: WebGLRenderingContext, extensions: any, info: any, capabilities: any);
3
3
 
4
- setMode(value: any): void;
5
- setIndex(index: any): void;
6
- render(start: any, count: number): void;
7
- renderInstances(start: any, count: number, primcount: number): void;
4
+ setMode: (value: any) => void;
5
+ setIndex: (index: any) => void;
6
+ render: (start: any, count: number) => void;
7
+ renderInstances: (start: any, count: number, primcount: number) => void;
8
+ renderMultiDraw: (starts: Int32Array, counts: Int32Array, drawCount: number) => void;
8
9
  }
@@ -1,12 +1,12 @@
1
- import { WebGLRenderer } from './../WebGLRenderer.js';
1
+ import { WebGLRenderer } from '../WebGLRenderer.js';
2
2
  import { WebGLProgram } from './WebGLProgram.js';
3
3
  import { WebGLCapabilities } from './WebGLCapabilities.js';
4
4
  import { WebGLCubeMaps } from './WebGLCubeMaps.js';
5
5
  import { WebGLExtensions } from './WebGLExtensions.js';
6
6
  import { WebGLClipping } from './WebGLClipping.js';
7
7
  import { WebGLBindingStates } from './WebGLBindingStates.js';
8
- import { Material } from './../../materials/Material.js';
9
- import { Scene } from './../../scenes/Scene.js';
8
+ import { Material } from '../../materials/Material.js';
9
+ import { Scene } from '../../scenes/Scene.js';
10
10
 
11
11
  export class WebGLPrograms {
12
12
  constructor(
@@ -1,9 +1,9 @@
1
- import { Object3D } from './../../core/Object3D.js';
2
- import { Material } from './../../materials/Material.js';
1
+ import { Object3D } from '../../core/Object3D.js';
2
+ import { Material } from '../../materials/Material.js';
3
3
  import { WebGLProgram } from './WebGLProgram.js';
4
- import { Group } from './../../objects/Group.js';
5
- import { Scene } from './../../scenes/Scene.js';
6
- import { Camera } from './../../cameras/Camera.js';
4
+ import { Group } from '../../objects/Group.js';
5
+ import { Scene } from '../../scenes/Scene.js';
6
+ import { Camera } from '../../cameras/Camera.js';
7
7
  import { BufferGeometry } from '../../core/BufferGeometry.js';
8
8
  import { WebGLProperties } from './WebGLProperties.js';
9
9
 
@@ -1,6 +1,6 @@
1
1
  import { WebGLCapabilities } from './WebGLCapabilities.js';
2
- import { Scene } from './../../scenes/Scene.js';
3
- import { Camera } from './../../cameras/Camera.js';
2
+ import { Scene } from '../../scenes/Scene.js';
3
+ import { Camera } from '../../cameras/Camera.js';
4
4
  import { WebGLRenderer } from '../WebGLRenderer.js';
5
5
  import { ShadowMapType } from '../../constants.js';
6
6
  import { WebGLObjects } from './WebGLObjects.js';
three/src/scenes/Fog.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Color, ColorRepresentation } from './../math/Color.js';
1
+ import { Color, ColorRepresentation } from '../math/Color.js';
2
2
 
3
3
  export interface FogBase {
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 { FogBase } from './Fog.js';
3
3
 
4
4
  /**
@@ -366,7 +366,7 @@ export class Texture extends EventDispatcher<{ dispose: {} }> {
366
366
  * @remarks It should not hold references to functions as these will not be cloned.
367
367
  * @defaultValue `{}`
368
368
  */
369
- userData: any;
369
+ userData: Record<string, any>;
370
370
 
371
371
  /**
372
372
  * This starts at `0` and counts how many times {@link needsUpdate | .needsUpdate} is set to `true`.
@@ -1,57 +0,0 @@
1
- import { Matrix4, Mesh, BufferGeometry, Material, DataTexture, IUniform } from '../../../src/Three.js';
2
-
3
- declare class BatchedMesh extends Mesh<BufferGeometry, Material> {
4
- _vertexStarts: number[];
5
- _vertexCounts: number[];
6
- _indexStarts: number[];
7
- _indexCounts: number[];
8
-
9
- _visible: boolean[];
10
- _active: boolean[];
11
-
12
- _maxGeometryCount: number;
13
- _maxVertexCount: number;
14
- _maxIndexCount: number;
15
-
16
- _geometryInitialized: boolean;
17
- _geometryCount: number;
18
- _vertexCount: number;
19
- _indexCount: number;
20
-
21
- _matrices: Matrix4[];
22
- _matricesTexture: DataTexture | null;
23
-
24
- _customUniforms: Record<string, IUniform>;
25
-
26
- constructor(maxGeometryCount: number, maxVertexCount: number, maxIndexCount?: number, material?: Material);
27
-
28
- _initMatricesTexture(): void;
29
-
30
- _initShader(): void;
31
-
32
- _initializeGeometry(reference: BufferGeometry): void;
33
-
34
- getGeometryCount(): number;
35
-
36
- getVertexCount(): number;
37
-
38
- getIndexCount(): number;
39
-
40
- applyGeometry(geometry: BufferGeometry): number;
41
-
42
- deleteGeometry(geometryId: number): this;
43
-
44
- optimize(): never;
45
-
46
- setMatrixAt(geometryId: number, matrix: Matrix4): this;
47
-
48
- getMatrixAt(geometryId: number, matrix: Matrix4): Matrix4;
49
-
50
- setVisibleAt(geometryId: number, value: boolean): this;
51
-
52
- getVisibleAt(geometryId: number): boolean;
53
-
54
- dispose(): this;
55
- }
56
-
57
- export { BatchedMesh };
@@ -1,16 +0,0 @@
1
- export default class Animation {
2
- animationLoop: ((time: DOMHighResTimeStamp) => void) | null;
3
- requestId: number | null;
4
-
5
- isAnimating: boolean;
6
-
7
- context: Window;
8
-
9
- constructor();
10
-
11
- start(): void;
12
-
13
- stop(): void;
14
-
15
- setAnimationLoop(callback: ((time: DOMHighResTimeStamp) => void) | null): void;
16
- }