@types/three 0.148.1 → 0.150.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 (62) hide show
  1. three/README.md +2 -2
  2. three/build/three.d.cts +2 -0
  3. three/build/three.d.ts +2 -0
  4. three/build/three.module.d.ts +2 -0
  5. three/examples/jsm/controls/OrbitControls.d.ts +8 -3
  6. three/examples/jsm/controls/TrackballControls.d.ts +2 -2
  7. three/examples/jsm/controls/TransformControls.d.ts +4 -4
  8. three/examples/jsm/helpers/OctreeHelper.d.ts +1 -1
  9. three/examples/jsm/helpers/ViewHelper.d.ts +16 -0
  10. three/examples/jsm/libs/fflate.module.d.ts +1 -0
  11. three/examples/jsm/libs/lil-gui.module.min.d.ts +1 -0
  12. three/examples/jsm/libs/stats.module.d.ts +2 -23
  13. three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +1 -1
  14. three/examples/jsm/loaders/IFCLoader.d.ts +1 -0
  15. three/examples/jsm/loaders/USDZLoader.d.ts +1 -0
  16. three/examples/jsm/loaders/VOXLoader.d.ts +1 -1
  17. three/examples/jsm/nodes/loaders/NodeLoader.d.ts +1 -0
  18. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +3 -4
  19. three/examples/jsm/objects/MarchingCubes.d.ts +1 -0
  20. three/examples/jsm/shaders/VelocityShader.d.ts +2 -2
  21. three/index.d.ts +1 -1
  22. three/package.json +19 -4
  23. three/src/Three.d.ts +1 -5
  24. three/src/constants.d.ts +395 -253
  25. three/src/core/BufferAttribute.d.ts +456 -85
  26. three/src/core/BufferGeometry.d.ts +241 -70
  27. three/src/core/Clock.d.ts +28 -20
  28. three/src/core/EventDispatcher.d.ts +20 -4
  29. three/src/core/GLBufferAttribute.d.ts +105 -7
  30. three/src/core/InstancedBufferAttribute.d.ts +13 -24
  31. three/src/core/InstancedBufferGeometry.d.ts +22 -4
  32. three/src/core/InstancedInterleavedBuffer.d.ts +10 -2
  33. three/src/core/InterleavedBuffer.d.ts +98 -14
  34. three/src/core/InterleavedBufferAttribute.d.ts +146 -7
  35. three/src/core/Layers.d.ts +61 -6
  36. three/src/core/Object3D.d.ts +252 -119
  37. three/src/core/Raycaster.d.ts +103 -27
  38. three/src/core/Uniform.d.ts +30 -13
  39. three/src/core/UniformsGroup.d.ts +10 -4
  40. three/src/extras/Earcut.d.ts +3 -4
  41. three/src/helpers/CameraHelper.d.ts +43 -0
  42. three/src/lights/DirectionalLight.d.ts +3 -1
  43. three/src/lights/HemisphereLight.d.ts +3 -1
  44. three/src/lights/SpotLight.d.ts +3 -1
  45. three/src/loaders/CubeTextureLoader.d.ts +1 -1
  46. three/src/loaders/Loader.d.ts +1 -2
  47. three/src/materials/Material.d.ts +9 -2
  48. three/src/materials/MeshPhysicalMaterial.d.ts +13 -1
  49. three/src/math/Color.d.ts +157 -3
  50. three/src/math/ColorManagement.d.ts +13 -7
  51. three/src/math/Euler.d.ts +2 -3
  52. three/src/objects/Mesh.d.ts +2 -2
  53. three/src/renderers/WebGLRenderer.d.ts +2 -2
  54. three/src/renderers/webgl/WebGLAttributes.d.ts +4 -3
  55. three/src/renderers/webgl/WebGLClipping.d.ts +3 -1
  56. three/src/renderers/webxr/WebXRManager.d.ts +2 -2
  57. three/src/textures/Data3DTexture.d.ts +2 -2
  58. three/src/utils.d.ts +5 -2
  59. three/examples/jsm/libs/fflate.module.min.d.ts +0 -1185
  60. three/src/renderers/WebGLMultisampleRenderTarget.d.ts +0 -6
  61. three/src/textures/DataTexture2DArray.d.ts +0 -6
  62. three/src/textures/DataTexture3D.d.ts +0 -6
@@ -3,88 +3,283 @@ import { Matrix3 } from './../math/Matrix3';
3
3
  import { Matrix4 } from './../math/Matrix4';
4
4
 
5
5
  /**
6
- * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js|src/core/BufferAttribute.js}
6
+ * This class stores data for an attribute (such as vertex positions, face indices, normals, colors, UVs, and any custom attributes )
7
+ * associated with a {@link THREE.BufferGeometry | BufferGeometry}, which allows for more efficient passing of data to the GPU
8
+ * @remarks
9
+ * When working with _vector-like_ data, the _`.fromBufferAttribute( attribute, index )`_ helper methods on
10
+ * {@link THREE.Vector2.fromBufferAttribute | Vector2},
11
+ * {@link THREE.Vector3.fromBufferAttribute | Vector3},
12
+ * {@link THREE.Vector4.fromBufferAttribute | Vector4}, and
13
+ * {@link THREE.Color.fromBufferAttribute | Color} classes may be helpful.
14
+ * @see {@link THREE.BufferGeometry | BufferGeometry} for details and a usage examples.
15
+ * @see Example: {@link https://threejs.org/examples/#webgl_buffergeometry | WebGL / BufferGeometry - Clean up Memory}
16
+ * @see {@link https://threejs.org/docs/index.html#api/en/core/BufferAttribute | Official Documentation}
17
+ * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
7
18
  */
8
19
  export class BufferAttribute {
9
20
  /**
10
- * @param array - Must be a TypedArray. Used to instantiate the buffer.
11
- * This array should have
12
- * ```
13
- * itemSize * numVertices
14
- * ```
15
- * elements, where numVertices is the number of vertices in the associated BufferGeometry.
16
- * @param itemSize - the number of values of the array that should be associated with a particular vertex.
17
- * For instance, if this attribute is storing a 3-component vector (such as a position, normal, or color),
18
- * then itemSize should be 3.
19
- * @param normalized - (optional) Applies to integer data only.
21
+ * This creates a new {@link THREE.GLBufferAttribute | GLBufferAttribute} object.
22
+ * @param array Must be a `TypedArray`. Used to instantiate the buffer.
23
+ * This array should have `itemSize * numVertices` elements, where numVertices is the number of vertices in the associated {@link THREE.BufferGeometry | BufferGeometry}.
24
+ * @param itemSize the number of values of the {@link array} that should be associated with a particular vertex.
25
+ * For instance, if this attribute is storing a 3-component vector (such as a _position_, _normal_, or _color_),
26
+ * then itemSize should be `3`.
27
+ * @param normalized Applies to integer data only.
20
28
  * Indicates how the underlying data in the buffer maps to the values in the GLSL code.
21
- * For instance, if array is an instance of UInt16Array, and normalized is true,
22
- * the values 0 - +65535 in the array data will be mapped to 0.0f - +1.0f in the GLSL attribute.
23
- * An Int16Array (signed) would map from -32768 - +32767 to -1.0f - +1.0f.
29
+ * For instance, if {@link array} is an instance of `UInt16Array`, and {@link normalized} is true,
30
+ * the values `0` - `+65535` in the array data will be mapped to `0.0f` - `+1.0f` in the GLSL attribute.
31
+ * An `Int16Array` (signed) would map from `-32768` - `+32767` to `-1.0f` - `+1.0f`.
24
32
  * If normalized is false, the values will be converted to floats unmodified,
25
- * i.e. 32767 becomes 32767.0f.
33
+ * i.e. `32767` becomes `32767.0f`.
34
+ * Default `false`.
35
+ * @throws `TypeError` When the {@link array} is not a `TypedArray`;
26
36
  */
27
- constructor(array: ArrayLike<number>, itemSize: number, normalized?: boolean); // array parameter should be TypedArray.
37
+ constructor(array: ArrayLike<number>, itemSize: number, normalized?: boolean); // array parameter should be `TypedArray`.
28
38
 
29
39
  /**
30
- * @default ''
40
+ * Optional name for this attribute instance.
41
+ * @defaultValue ''
31
42
  */
32
43
  name: string;
44
+
45
+ /**
46
+ * The {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray | TypedArray} holding data stored in the buffer.
47
+ * @returns `TypedArray`
48
+ */
33
49
  array: ArrayLike<number>;
50
+
51
+ /**
52
+ * The length of vectors that are being stored in the {@link BufferAttribute.array | array}.
53
+ * @remarks Expects a `Integer`
54
+ */
34
55
  itemSize: number;
35
56
 
36
57
  /**
37
- * @default THREE.StaticDrawUsage
58
+ * Defines the intended usage pattern of the data store for optimization purposes.
59
+ * Corresponds to the {@link BufferAttribute.usage | usage} parameter of
60
+ * {@link https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData | WebGLRenderingContext.bufferData}.
61
+ * @remarks
62
+ * After the initial use of a buffer, its usage cannot be changed. Instead, instantiate a new one and set the desired usage before the next render.
63
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/BufferAttributeUsage | Buffer Attribute Usage Constants} for all possible values.
64
+ * @see {@link BufferAttribute.setUsage | setUsage}
65
+ * @defaultValue {@link THREE.StaticDrawUsage | THREE.StaticDrawUsage}.
38
66
  */
39
67
  usage: Usage;
40
68
 
41
69
  /**
42
- * @default { offset: number; count: number }
70
+ * This can be used to only update some components of stored vectors (for example, just the component related to color).
71
+ * @defaultValue `{ offset: number = 0; count: number = -1 }`
43
72
  */
44
- updateRange: { offset: number; count: number };
73
+ updateRange: {
74
+ /**
75
+ * Position at which to start update.
76
+ * @defaultValue `0`
77
+ */
78
+ offset: number;
79
+ /** @defaultValue `-1`, which means don't use update ranges. */
80
+ count: number;
81
+ };
45
82
 
46
83
  /**
47
- * @default 0
84
+ * A version number, incremented every time the {@link BufferAttribute.needsUpdate | needsUpdate} property is set to true.
85
+ * @remarks Expects a `Integer`
86
+ * @defaultValue `0`
48
87
  */
49
88
  version: number;
50
89
 
51
90
  /**
52
- * @default false
91
+ * Indicates how the underlying data in the buffer maps to the values in the GLSL shader code.
92
+ * @see `constructor` above for details.
93
+ * @defaultValue `false`
53
94
  */
54
95
  normalized: boolean;
55
96
 
56
97
  /**
57
- * @default 0
98
+ * Stores the {@link BufferAttribute.array | array}'s length divided by the {@link BufferAttribute.itemSize | itemSize}.
99
+ * @remarks If the buffer is storing a 3-component vector (such as a position, normal, or color), then this will count the number of such vectors stored.
100
+ * @remarks Expects a `Integer`
58
101
  */
59
102
  count: number;
60
103
 
104
+ /**
105
+ * Flag to indicate that this attribute has changed and should be re-sent to the GPU.
106
+ * Set this to true when you modify the value of the array.
107
+ * @remarks Setting this to true also increments the {@link BufferAttribute.version | version}.
108
+ * @remarks _set-only property_.
109
+ */
61
110
  set needsUpdate(value: boolean);
62
111
 
112
+ /**
113
+ * Read-only flag to check if a given object is of type {@link BufferAttribute}.
114
+ * @remarks This is a _constant_ value
115
+ * @defaultValue `true`
116
+ */
63
117
  readonly isBufferAttribute: true;
64
118
 
119
+ /**
120
+ * A callback function that is executed after the Renderer has transferred the attribute array data to the GPU.
121
+ */
65
122
  onUploadCallback: () => void;
123
+
124
+ /**
125
+ * Sets the value of the {@link onUploadCallback} property.
126
+ * @see Example: {@link https://threejs.org/examples/#webgl_buffergeometry | WebGL / BufferGeometry} this is used to free memory after the buffer has been transferred to the GPU.
127
+ * @see {@link onUploadCallback}
128
+ * @param callback function that is executed after the Renderer has transferred the attribute array data to the GPU.
129
+ */
66
130
  onUpload(callback: () => void): this;
131
+
132
+ /**
133
+ * Set {@link BufferAttribute.usage | usage}
134
+ * @remarks
135
+ * After the initial use of a buffer, its usage cannot be changed. Instead, instantiate a new one and set the desired usage before the next render.
136
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/BufferAttributeUsage | Buffer Attribute Usage Constants} for all possible values.
137
+ * @see {@link BufferAttribute.usage | usage}
138
+ * @param value Corresponds to the {@link BufferAttribute.usage | usage} parameter of
139
+ * {@link https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData | WebGLRenderingContext.bufferData}.
140
+ */
67
141
  setUsage(usage: Usage): this;
68
- clone(): this;
142
+
143
+ /**
144
+ * @returns a copy of this {@link BufferAttribute}.
145
+ */
146
+ clone(): BufferAttribute;
147
+
148
+ /**
149
+ * Copies another {@link BufferAttribute} to this {@link BufferAttribute}.
150
+ * @param bufferAttribute
151
+ */
69
152
  copy(source: BufferAttribute): this;
153
+
154
+ /**
155
+ * Copy a vector from bufferAttribute[index2] to {@link BufferAttribute.array | array}[index1].
156
+ * @param index1
157
+ * @param bufferAttribute
158
+ * @param index2
159
+ */
70
160
  copyAt(index1: number, attribute: BufferAttribute, index2: number): this;
161
+
162
+ /**
163
+ * Copy the array given here (which can be a normal array or `TypedArray`) into {@link BufferAttribute.array | array}.
164
+ * @See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set | TypedArray.set} for notes on requirements if copying a `TypedArray`.
165
+ */
71
166
  copyArray(array: ArrayLike<number>): this;
167
+
168
+ /**
169
+ * Applies matrix {@link Matrix3 | m} to every Vector3 element of this {@link BufferAttribute}.
170
+ * @param m
171
+ */
72
172
  applyMatrix3(m: Matrix3): this;
173
+
174
+ /**
175
+ * Applies matrix {@link Matrix4 | m} to every Vector3 element of this {@link BufferAttribute}.
176
+ * @param m
177
+ */
73
178
  applyMatrix4(m: Matrix4): this;
179
+
180
+ /**
181
+ * Applies normal matrix {@link Matrix3 | m} to every Vector3 element of this {@link BufferAttribute}.
182
+ * @param m
183
+ */
74
184
  applyNormalMatrix(m: Matrix3): this;
185
+
186
+ /**
187
+ * Applies matrix {@link Matrix4 | m} to every Vector3 element of this {@link BufferAttribute}, interpreting the elements as a direction vectors.
188
+ * @param m
189
+ */
75
190
  transformDirection(m: Matrix4): this;
191
+
192
+ /**
193
+ * Calls {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set | TypedArray.set}( {@link value}, {@link offset} )
194
+ * on the {@link BufferAttribute.array | array}.
195
+ * @param value {@link Array | Array} or `TypedArray` from which to copy values.
196
+ * @param offset index of the {@link BufferAttribute.array | array} at which to start copying. Expects a `Integer`. Default `0`.
197
+ * @throws `RangeError` When {@link offset} is negative or is too large.
198
+ */
76
199
  set(value: ArrayLike<number> | ArrayBufferView, offset?: number): this;
200
+
201
+ /**
202
+ * Returns the x component of the vector at the given index.
203
+ * @param index Expects a `Integer`
204
+ */
77
205
  getX(index: number): number;
206
+
207
+ /**
208
+ * Sets the x component of the vector at the given index.
209
+ * @param index Expects a `Integer`
210
+ * @param x
211
+ */
78
212
  setX(index: number, x: number): this;
213
+
214
+ /**
215
+ * Returns the y component of the vector at the given index.
216
+ * @param index Expects a `Integer`
217
+ */
79
218
  getY(index: number): number;
219
+
220
+ /**
221
+ * Sets the y component of the vector at the given index.
222
+ * @param index Expects a `Integer`
223
+ * @param y
224
+ */
80
225
  setY(index: number, y: number): this;
226
+
227
+ /**
228
+ * Returns the z component of the vector at the given index.
229
+ * @param index Expects a `Integer`
230
+ */
81
231
  getZ(index: number): number;
232
+
233
+ /**
234
+ * Sets the z component of the vector at the given index.
235
+ * @param index Expects a `Integer`
236
+ * @param z
237
+ */
82
238
  setZ(index: number, z: number): this;
239
+
240
+ /**
241
+ * Returns the w component of the vector at the given index.
242
+ * @param index Expects a `Integer`
243
+ */
83
244
  getW(index: number): number;
245
+
246
+ /**
247
+ * Sets the w component of the vector at the given index.
248
+ * @param index Expects a `Integer`
249
+ * @param w
250
+ */
84
251
  setW(index: number, z: number): this;
252
+
253
+ /**
254
+ * Sets the x and y components of the vector at the given index.
255
+ * @param index Expects a `Integer`
256
+ * @param x
257
+ * @param y
258
+ */
85
259
  setXY(index: number, x: number, y: number): this;
260
+
261
+ /**
262
+ * Sets the x, y and z components of the vector at the given index.
263
+ * @param index Expects a `Integer`
264
+ * @param x
265
+ * @param y
266
+ * @param z
267
+ */
86
268
  setXYZ(index: number, x: number, y: number, z: number): this;
269
+
270
+ /**
271
+ * Sets the x, y, z and w components of the vector at the given index.
272
+ * @param index Expects a `Integer`
273
+ * @param x
274
+ * @param y
275
+ * @param z
276
+ * @param w
277
+ */
87
278
  setXYZW(index: number, x: number, y: number, z: number, w: number): this;
279
+
280
+ /**
281
+ * Convert this object to three.js to the `data.attributes` part of {@link https://github.com/mrdoob/three.js/wiki/JSON-Geometry-format-4 | JSON Geometry format v4},
282
+ */
88
283
  toJSON(): {
89
284
  itemSize: number;
90
285
  type: string;
@@ -94,69 +289,29 @@ export class BufferAttribute {
94
289
  }
95
290
 
96
291
  /**
97
- * @deprecated THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.
98
- */
99
- export class Int8Attribute extends BufferAttribute {
100
- constructor(array: any, itemSize: number);
101
- }
102
-
103
- /**
104
- * @deprecated THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.
105
- */
106
- export class Uint8Attribute extends BufferAttribute {
107
- constructor(array: any, itemSize: number);
108
- }
109
-
110
- /**
111
- * @deprecated THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.
112
- */
113
- export class Uint8ClampedAttribute extends BufferAttribute {
114
- constructor(array: any, itemSize: number);
115
- }
116
-
117
- /**
118
- * @deprecated THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.
119
- */
120
- export class Int16Attribute extends BufferAttribute {
121
- constructor(array: any, itemSize: number);
122
- }
123
-
124
- /**
125
- * @deprecated THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.
126
- */
127
- export class Uint16Attribute extends BufferAttribute {
128
- constructor(array: any, itemSize: number);
129
- }
130
-
131
- /**
132
- * @deprecated THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.
133
- */
134
- export class Int32Attribute extends BufferAttribute {
135
- constructor(array: any, itemSize: number);
136
- }
137
-
138
- /**
139
- * @deprecated THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.
140
- */
141
- export class Uint32Attribute extends BufferAttribute {
142
- constructor(array: any, itemSize: number);
143
- }
144
-
145
- /**
146
- * @deprecated THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.
147
- */
148
- export class Float32Attribute extends BufferAttribute {
149
- constructor(array: any, itemSize: number);
150
- }
151
-
152
- /**
153
- * @deprecated THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.
292
+ * A {@link THREE.BufferAttribute | BufferAttribute} for {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array: Int8Array}
293
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects | TypedArray}
294
+ * @see {@link THREE.BufferAttribute | BufferAttribute} for details and for inherited methods and properties.
295
+ * @see {@link https://threejs.org/docs/index.html#api/en/core/bufferAttributeTypes/BufferAttributeTypes | Official Documentation}
296
+ * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
154
297
  */
155
- export class Float64Attribute extends BufferAttribute {
156
- constructor(array: any, itemSize: number);
157
- }
158
-
159
298
  export class Int8BufferAttribute extends BufferAttribute {
299
+ /**
300
+ * This creates a new {@link THREE.Int8BufferAttribute | Int8BufferAttribute} object.
301
+ * @param array This can be a typed or untyped (normal) array or an integer length. An array value will be converted to `Int8Array`.
302
+ * If a length is given a new `TypedArray` will created, initialized with all elements set to zero.
303
+ * @param itemSize the number of values of the {@link array} that should be associated with a particular vertex.
304
+ * For instance, if this attribute is storing a 3-component vector (such as a _position_, _normal_, or _color_),
305
+ * then itemSize should be `3`.
306
+ * @param normalized Applies to integer data only.
307
+ * Indicates how the underlying data in the buffer maps to the values in the GLSL code.
308
+ * For instance, if {@link array} is an instance of `UInt16Array`, and {@link normalized} is true,
309
+ * the values `0` - `+65535` in the array data will be mapped to `0.0f` - `+1.0f` in the GLSL attribute.
310
+ * An `Int16Array` (signed) would map from `-32768` - `+32767` to `-1.0f` - `+1.0f`.
311
+ * If normalized is false, the values will be converted to floats unmodified,
312
+ * i.e. `32767` becomes `32767.0f`.
313
+ * Default `false`.
314
+ */
160
315
  constructor(
161
316
  array: Iterable<number> | ArrayLike<number> | ArrayBuffer | number,
162
317
  itemSize: number,
@@ -164,7 +319,31 @@ export class Int8BufferAttribute extends BufferAttribute {
164
319
  );
165
320
  }
166
321
 
322
+ /**
323
+ * A {@link THREE.BufferAttribute | BufferAttribute} for {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array: Uint8Array}
324
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects | TypedArray}
325
+ * @see {@link THREE.BufferAttribute | BufferAttribute} for details and for inherited methods and properties.
326
+ * @see {@link https://threejs.org/docs/index.html#api/en/core/bufferAttributeTypes/BufferAttributeTypes | Official Documentation}
327
+ * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
328
+ */
167
329
  export class Uint8BufferAttribute extends BufferAttribute {
330
+ /**
331
+ * This creates a new {@link THREE.Uint8BufferAttribute | Uint8BufferAttribute} object.
332
+ * @param array This can be a typed or untyped (normal) array or an integer length. An array value will be converted to `Uint8Array`.
333
+ * If a length is given a new `TypedArray` will created, initialized with all elements set to zero.
334
+ * @param itemSize the number of values of the {@link array} that should be associated with a particular vertex.
335
+ * For instance, if this attribute is storing a 3-component vector (such as a _position_, _normal_, or _color_),
336
+ * then itemSize should be `3`.
337
+ * @param normalized Applies to integer data only.
338
+ * Indicates how the underlying data in the buffer maps to the values in the GLSL code.
339
+ * For instance, if {@link array} is an instance of `UInt16Array`, and {@link normalized} is true,
340
+ * the values `0` - `+65535` in the array data will be mapped to `0.0f` - `+1.0f` in the GLSL attribute.
341
+ * An `Int16Array` (signed) would map from `-32768` - `+32767` to `-1.0f` - `+1.0f`.
342
+ * If normalized is false, the values will be converted to floats unmodified,
343
+ * i.e. `32767` becomes `32767.0f`.
344
+ * Default `false`.
345
+ * @see {@link THREE.BufferAttribute | BufferAttribute}
346
+ */
168
347
  constructor(
169
348
  array: Iterable<number> | ArrayLike<number> | ArrayBuffer | number,
170
349
  itemSize: number,
@@ -172,7 +351,31 @@ export class Uint8BufferAttribute extends BufferAttribute {
172
351
  );
173
352
  }
174
353
 
354
+ /**
355
+ * A {@link THREE.BufferAttribute | BufferAttribute} for {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray: Uint8ClampedArray}
356
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects | TypedArray}
357
+ * @see {@link THREE.BufferAttribute | BufferAttribute} for details and for inherited methods and properties.
358
+ * @see {@link https://threejs.org/docs/index.html#api/en/core/bufferAttributeTypes/BufferAttributeTypes | Official Documentation}
359
+ * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
360
+ */
175
361
  export class Uint8ClampedBufferAttribute extends BufferAttribute {
362
+ /**
363
+ * This creates a new {@link THREE.Uint8ClampedBufferAttribute | Uint8ClampedBufferAttribute} object.
364
+ * @param array This can be a typed or untyped (normal) array or an integer length. An array value will be converted to `Uint8ClampedArray`.
365
+ * If a length is given a new `TypedArray` will created, initialized with all elements set to zero.
366
+ * @param itemSize the number of values of the {@link array} that should be associated with a particular vertex.
367
+ * For instance, if this attribute is storing a 3-component vector (such as a _position_, _normal_, or _color_),
368
+ * then itemSize should be `3`.
369
+ * @param normalized Applies to integer data only.
370
+ * Indicates how the underlying data in the buffer maps to the values in the GLSL code.
371
+ * For instance, if {@link array} is an instance of `UInt16Array`, and {@link normalized} is true,
372
+ * the values `0` - `+65535` in the array data will be mapped to `0.0f` - `+1.0f` in the GLSL attribute.
373
+ * An `Int16Array` (signed) would map from `-32768` - `+32767` to `-1.0f` - `+1.0f`.
374
+ * If normalized is false, the values will be converted to floats unmodified,
375
+ * i.e. `32767` becomes `32767.0f`.
376
+ * Default `false`.
377
+ * @see {@link THREE.BufferAttribute | BufferAttribute}
378
+ */
176
379
  constructor(
177
380
  array: Iterable<number> | ArrayLike<number> | ArrayBuffer | number,
178
381
  itemSize: number,
@@ -180,7 +383,31 @@ export class Uint8ClampedBufferAttribute extends BufferAttribute {
180
383
  );
181
384
  }
182
385
 
386
+ /**
387
+ * A {@link THREE.BufferAttribute | BufferAttribute} for {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array: Int16Array}
388
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects | TypedArray}
389
+ * @see {@link THREE.BufferAttribute | BufferAttribute} for details and for inherited methods and properties.
390
+ * @see {@link https://threejs.org/docs/index.html#api/en/core/bufferAttributeTypes/BufferAttributeTypes | Official Documentation}
391
+ * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
392
+ */
183
393
  export class Int16BufferAttribute extends BufferAttribute {
394
+ /**
395
+ * This creates a new {@link THREE.Int16BufferAttribute | Int16BufferAttribute} object.
396
+ * @param array This can be a typed or untyped (normal) array or an integer length. An array value will be converted to `Int16Array`.
397
+ * If a length is given a new `TypedArray` will created, initialized with all elements set to zero.
398
+ * @param itemSize the number of values of the {@link array} that should be associated with a particular vertex.
399
+ * For instance, if this attribute is storing a 3-component vector (such as a _position_, _normal_, or _color_),
400
+ * then itemSize should be `3`.
401
+ * @param normalized Applies to integer data only.
402
+ * Indicates how the underlying data in the buffer maps to the values in the GLSL code.
403
+ * For instance, if {@link array} is an instance of `UInt16Array`, and {@link normalized} is true,
404
+ * the values `0` - `+65535` in the array data will be mapped to `0.0f` - `+1.0f` in the GLSL attribute.
405
+ * An `Int16Array` (signed) would map from `-32768` - `+32767` to `-1.0f` - `+1.0f`.
406
+ * If normalized is false, the values will be converted to floats unmodified,
407
+ * i.e. `32767` becomes `32767.0f`.
408
+ * Default `false`.
409
+ * @see {@link THREE.BufferAttribute | BufferAttribute}
410
+ */
184
411
  constructor(
185
412
  array: Iterable<number> | ArrayLike<number> | ArrayBuffer | number,
186
413
  itemSize: number,
@@ -188,7 +415,31 @@ export class Int16BufferAttribute extends BufferAttribute {
188
415
  );
189
416
  }
190
417
 
418
+ /**
419
+ * A {@link THREE.BufferAttribute | BufferAttribute} for {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array: Uint16Array}
420
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects | TypedArray}
421
+ * @see {@link THREE.BufferAttribute | BufferAttribute} for details and for inherited methods and properties.
422
+ * @see {@link https://threejs.org/docs/index.html#api/en/core/bufferAttributeTypes/BufferAttributeTypes | Official Documentation}
423
+ * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
424
+ */
191
425
  export class Uint16BufferAttribute extends BufferAttribute {
426
+ /**
427
+ * This creates a new {@link THREE.Uint16BufferAttribute | Uint16BufferAttribute} object.
428
+ * @param array This can be a typed or untyped (normal) array or an integer length. An array value will be converted to `Uint16Array`.
429
+ * If a length is given a new `TypedArray` will created, initialized with all elements set to zero.
430
+ * @param itemSize the number of values of the {@link array} that should be associated with a particular vertex.
431
+ * For instance, if this attribute is storing a 3-component vector (such as a _position_, _normal_, or _color_),
432
+ * then itemSize should be `3`.
433
+ * @param normalized Applies to integer data only.
434
+ * Indicates how the underlying data in the buffer maps to the values in the GLSL code.
435
+ * For instance, if {@link array} is an instance of `UInt16Array`, and {@link normalized} is true,
436
+ * the values `0` - `+65535` in the array data will be mapped to `0.0f` - `+1.0f` in the GLSL attribute.
437
+ * An `Int16Array` (signed) would map from `-32768` - `+32767` to `-1.0f` - `+1.0f`.
438
+ * If normalized is false, the values will be converted to floats unmodified,
439
+ * i.e. `32767` becomes `32767.0f`.
440
+ * Default `false`.
441
+ * @see {@link THREE.BufferAttribute | BufferAttribute}
442
+ */
192
443
  constructor(
193
444
  array: Iterable<number> | ArrayLike<number> | ArrayBuffer | number,
194
445
  itemSize: number,
@@ -196,7 +447,31 @@ export class Uint16BufferAttribute extends BufferAttribute {
196
447
  );
197
448
  }
198
449
 
450
+ /**
451
+ * A {@link THREE.BufferAttribute | BufferAttribute} for {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array: Int32Array}
452
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects | TypedArray}
453
+ * @see {@link THREE.BufferAttribute | BufferAttribute} for details and for inherited methods and properties.
454
+ * @see {@link https://threejs.org/docs/index.html#api/en/core/bufferAttributeTypes/BufferAttributeTypes | Official Documentation}
455
+ * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
456
+ */
199
457
  export class Int32BufferAttribute extends BufferAttribute {
458
+ /**
459
+ * This creates a new {@link THREE.Int32BufferAttribute | Int32BufferAttribute} object.
460
+ * @param array This can be a typed or untyped (normal) array or an integer length. An array value will be converted to `Int32Array`.
461
+ * If a length is given a new `TypedArray` will created, initialized with all elements set to zero.
462
+ * @param itemSize the number of values of the {@link array} that should be associated with a particular vertex.
463
+ * For instance, if this attribute is storing a 3-component vector (such as a _position_, _normal_, or _color_),
464
+ * then itemSize should be `3`.
465
+ * @param normalized Applies to integer data only.
466
+ * Indicates how the underlying data in the buffer maps to the values in the GLSL code.
467
+ * For instance, if {@link array} is an instance of `UInt16Array`, and {@link normalized} is true,
468
+ * the values `0` - `+65535` in the array data will be mapped to `0.0f` - `+1.0f` in the GLSL attribute.
469
+ * An `Int16Array` (signed) would map from `-32768` - `+32767` to `-1.0f` - `+1.0f`.
470
+ * If normalized is false, the values will be converted to floats unmodified,
471
+ * i.e. `32767` becomes `32767.0f`.
472
+ * Default `false`.
473
+ * @see {@link THREE.BufferAttribute | BufferAttribute}
474
+ */
200
475
  constructor(
201
476
  array: Iterable<number> | ArrayLike<number> | ArrayBuffer | number,
202
477
  itemSize: number,
@@ -204,7 +479,31 @@ export class Int32BufferAttribute extends BufferAttribute {
204
479
  );
205
480
  }
206
481
 
482
+ /**
483
+ * A {@link THREE.BufferAttribute | BufferAttribute} for {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array: Uint32Array}
484
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects | TypedArray}
485
+ * @see {@link THREE.BufferAttribute | BufferAttribute} for details and for inherited methods and properties.
486
+ * @see {@link https://threejs.org/docs/index.html#api/en/core/bufferAttributeTypes/BufferAttributeTypes | Official Documentation}
487
+ * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
488
+ */
207
489
  export class Uint32BufferAttribute extends BufferAttribute {
490
+ /**
491
+ * This creates a new {@link THREE.Uint32BufferAttribute | Uint32BufferAttribute} object.
492
+ * @param array This can be a typed or untyped (normal) array or an integer length. An array value will be converted to `Uint32Array`.
493
+ * If a length is given a new `TypedArray` will created, initialized with all elements set to zero.
494
+ * @param itemSize the number of values of the {@link array} that should be associated with a particular vertex.
495
+ * For instance, if this attribute is storing a 3-component vector (such as a _position_, _normal_, or _color_),
496
+ * then itemSize should be `3`.
497
+ * @param normalized Applies to integer data only.
498
+ * Indicates how the underlying data in the buffer maps to the values in the GLSL code.
499
+ * For instance, if {@link array} is an instance of `UInt16Array`, and {@link normalized} is true,
500
+ * the values `0` - `+65535` in the array data will be mapped to `0.0f` - `+1.0f` in the GLSL attribute.
501
+ * An `Int16Array` (signed) would map from `-32768` - `+32767` to `-1.0f` - `+1.0f`.
502
+ * If normalized is false, the values will be converted to floats unmodified,
503
+ * i.e. `32767` becomes `32767.0f`.
504
+ * Default `false`.
505
+ * @see {@link THREE.BufferAttribute | BufferAttribute}
506
+ */
208
507
  constructor(
209
508
  array: Iterable<number> | ArrayLike<number> | ArrayBuffer | number,
210
509
  itemSize: number,
@@ -212,7 +511,31 @@ export class Uint32BufferAttribute extends BufferAttribute {
212
511
  );
213
512
  }
214
513
 
514
+ /**
515
+ * A {@link THREE.BufferAttribute | BufferAttribute} for {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array: Uint16Array}
516
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects | TypedArray}
517
+ * @see {@link THREE.BufferAttribute | BufferAttribute} for details and for inherited methods and properties.
518
+ * @see {@link https://threejs.org/docs/index.html#api/en/core/bufferAttributeTypes/BufferAttributeTypes | Official Documentation}
519
+ * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
520
+ */
215
521
  export class Float16BufferAttribute extends BufferAttribute {
522
+ /**
523
+ * This creates a new {@link THREE.Float16BufferAttribute | Float16BufferAttribute} object.
524
+ * @param array This can be a typed or untyped (normal) array or an integer length. An array value will be converted to `Uint16Array`.
525
+ * If a length is given a new `TypedArray` will created, initialized with all elements set to zero.
526
+ * @param itemSize the number of values of the {@link array} that should be associated with a particular vertex.
527
+ * For instance, if this attribute is storing a 3-component vector (such as a _position_, _normal_, or _color_),
528
+ * then itemSize should be `3`.
529
+ * @param normalized Applies to integer data only.
530
+ * Indicates how the underlying data in the buffer maps to the values in the GLSL code.
531
+ * For instance, if {@link array} is an instance of `UInt16Array`, and {@link normalized} is true,
532
+ * the values `0` - `+65535` in the array data will be mapped to `0.0f` - `+1.0f` in the GLSL attribute.
533
+ * An `Int16Array` (signed) would map from `-32768` - `+32767` to `-1.0f` - `+1.0f`.
534
+ * If normalized is false, the values will be converted to floats unmodified,
535
+ * i.e. `32767` becomes `32767.0f`.
536
+ * Default `false`.
537
+ * @see {@link THREE.BufferAttribute | BufferAttribute}
538
+ */
216
539
  constructor(
217
540
  array: Iterable<number> | ArrayLike<number> | ArrayBuffer | number,
218
541
  itemSize: number,
@@ -220,7 +543,31 @@ export class Float16BufferAttribute extends BufferAttribute {
220
543
  );
221
544
  }
222
545
 
546
+ /**
547
+ * A {@link THREE.BufferAttribute | BufferAttribute} for {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array: Float32Array}
548
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects | TypedArray}
549
+ * @see {@link THREE.BufferAttribute | BufferAttribute} for details and for inherited methods and properties.
550
+ * @see {@link https://threejs.org/docs/index.html#api/en/core/bufferAttributeTypes/BufferAttributeTypes | Official Documentation}
551
+ * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
552
+ */
223
553
  export class Float32BufferAttribute extends BufferAttribute {
554
+ /**
555
+ * This creates a new {@link THREE.Float32BufferAttribute | Float32BufferAttribute} object.
556
+ * @param array This can be a typed or untyped (normal) array or an integer length. An array value will be converted to `Float32Array`.
557
+ * If a length is given a new `TypedArray` will created, initialized with all elements set to zero.
558
+ * @param itemSize the number of values of the {@link array} that should be associated with a particular vertex.
559
+ * For instance, if this attribute is storing a 3-component vector (such as a _position_, _normal_, or _color_),
560
+ * then itemSize should be `3`.
561
+ * @param normalized Applies to integer data only.
562
+ * Indicates how the underlying data in the buffer maps to the values in the GLSL code.
563
+ * For instance, if {@link array} is an instance of `UInt16Array`, and {@link normalized} is true,
564
+ * the values `0` - `+65535` in the array data will be mapped to `0.0f` - `+1.0f` in the GLSL attribute.
565
+ * An `Int16Array` (signed) would map from `-32768` - `+32767` to `-1.0f` - `+1.0f`.
566
+ * If normalized is false, the values will be converted to floats unmodified,
567
+ * i.e. `32767` becomes `32767.0f`.
568
+ * Default `false`.
569
+ * @see {@link THREE.BufferAttribute | BufferAttribute}
570
+ */
224
571
  constructor(
225
572
  array: Iterable<number> | ArrayLike<number> | ArrayBuffer | number,
226
573
  itemSize: number,
@@ -228,7 +575,31 @@ export class Float32BufferAttribute extends BufferAttribute {
228
575
  );
229
576
  }
230
577
 
578
+ /**
579
+ * A {@link THREE.BufferAttribute | BufferAttribute} for {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array: Float64Array}
580
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects | TypedArray}
581
+ * @see {@link THREE.BufferAttribute | BufferAttribute} for details and for inherited methods and properties.
582
+ * @see {@link https://threejs.org/docs/index.html#api/en/core/bufferAttributeTypes/BufferAttributeTypes | Official Documentation}
583
+ * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
584
+ */
231
585
  export class Float64BufferAttribute extends BufferAttribute {
586
+ /**
587
+ * This creates a new {@link THREE.Float64BufferAttribute | Float64BufferAttribute} object.
588
+ * @param array This can be a typed or untyped (normal) array or an integer length. An array value will be converted to `Float64Array`.
589
+ * If a length is given a new `TypedArray` will created, initialized with all elements set to zero.
590
+ * @param itemSize the number of values of the {@link array} that should be associated with a particular vertex.
591
+ * For instance, if this attribute is storing a 3-component vector (such as a _position_, _normal_, or _color_),
592
+ * then itemSize should be `3`.
593
+ * @param normalized Applies to integer data only.
594
+ * Indicates how the underlying data in the buffer maps to the values in the GLSL code.
595
+ * For instance, if {@link array} is an instance of `UInt16Array`, and {@link normalized} is true,
596
+ * the values `0` - `+65535` in the array data will be mapped to `0.0f` - `+1.0f` in the GLSL attribute.
597
+ * An `Int16Array` (signed) would map from `-32768` - `+32767` to `-1.0f` - `+1.0f`.
598
+ * If normalized is false, the values will be converted to floats unmodified,
599
+ * i.e. `32767` becomes `32767.0f`.
600
+ * Default `false`.
601
+ * @see {@link THREE.BufferAttribute | BufferAttribute}
602
+ */
232
603
  constructor(
233
604
  array: Iterable<number> | ArrayLike<number> | ArrayBuffer | number,
234
605
  itemSize: number,