@types/three 0.152.0 → 0.153.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 (46) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/animation/MMDAnimationHelper.d.ts +2 -0
  3. three/examples/jsm/csm/CSM.d.ts +1 -1
  4. three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
  5. three/examples/jsm/exporters/PLYExporter.d.ts +20 -3
  6. three/examples/jsm/exporters/STLExporter.d.ts +11 -1
  7. three/examples/jsm/geometries/TeapotGeometry.d.ts +1 -1
  8. three/examples/jsm/loaders/IFCLoader.d.ts +68 -68
  9. three/examples/jsm/misc/GPUComputationRenderer.d.ts +1 -1
  10. three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +1 -1
  11. three/examples/jsm/nodes/core/NodeBuilder.d.ts +1 -1
  12. three/examples/jsm/postprocessing/FilmPass.d.ts +1 -1
  13. three/examples/jsm/utils/UVsDebug.d.ts +1 -1
  14. three/index.d.ts +1 -1
  15. three/package.json +2 -2
  16. three/src/cameras/Camera.d.ts +7 -4
  17. three/src/cameras/CubeCamera.d.ts +5 -0
  18. three/src/constants.d.ts +26 -2
  19. three/src/core/BufferAttribute.d.ts +10 -2
  20. three/src/helpers/GridHelper.d.ts +3 -1
  21. three/src/lights/DirectionalLight.d.ts +1 -1
  22. three/src/lights/Light.d.ts +1 -1
  23. three/src/lights/PointLight.d.ts +4 -4
  24. three/src/lights/RectAreaLight.d.ts +2 -2
  25. three/src/lights/SpotLight.d.ts +5 -5
  26. three/src/loaders/Loader.d.ts +1 -1
  27. three/src/materials/MeshPhysicalMaterial.d.ts +19 -0
  28. three/src/math/Color.d.ts +2 -1
  29. three/src/math/Frustum.d.ts +2 -1
  30. three/src/math/MathUtils.d.ts +65 -44
  31. three/src/math/Matrix3.d.ts +16 -1
  32. three/src/math/Matrix4.d.ts +45 -8
  33. three/src/math/Vector2.d.ts +5 -0
  34. three/src/math/Vector3.d.ts +5 -0
  35. three/src/math/Vector4.d.ts +5 -0
  36. three/src/renderers/WebGLRenderer.d.ts +3 -1
  37. three/src/renderers/webxr/WebXRManager.d.ts +23 -6
  38. three/src/textures/DepthTexture.d.ts +9 -0
  39. three/src/textures/FramebufferTexture.d.ts +2 -3
  40. three/src/textures/Source.d.ts +2 -0
  41. three/examples/jsm/exporters/ColladaExporter.d.ts +0 -22
  42. three/examples/jsm/geometries/LightningStrike.d.ts +0 -108
  43. three/examples/jsm/loaders/PRWMLoader.d.ts +0 -16
  44. three/examples/jsm/objects/LightningStorm.d.ts +0 -32
  45. three/examples/jsm/postprocessing/AdaptiveToneMappingPass.d.ts +0 -29
  46. three/examples/jsm/shaders/ToneMapShader.d.ts +0 -14
three/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for three (https://threejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 04 May 2023 00:02:50 GMT
11
+ * Last updated: Thu, 06 Jul 2023 18:35:25 GMT
12
12
  * Dependencies: [@types/fflate](https://npmjs.com/package/@types/fflate), [@types/lil-gui](https://npmjs.com/package/@types/lil-gui), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/tweenjs__tween.js](https://npmjs.com/package/@types/tweenjs__tween.js), [@types/webxr](https://npmjs.com/package/@types/webxr)
13
13
  * Global values: `THREE`
14
14
 
@@ -17,6 +17,7 @@ export interface MMDAnimationHelperParameter {
17
17
  sync?: boolean | undefined;
18
18
  afterglow?: number | undefined;
19
19
  resetPhysicsOnLoop?: boolean | undefined;
20
+ pmxAnimation?: boolean | undefined;
20
21
  }
21
22
 
22
23
  export interface MMDAnimationHelperAddParameter {
@@ -55,6 +56,7 @@ export class MMDAnimationHelper {
55
56
  sync: boolean;
56
57
  afterglow: number;
57
58
  resetPhysicsOnLoop: boolean;
59
+ pmxAnimation: boolean;
58
60
  };
59
61
  enabled: {
60
62
  animation: boolean;
@@ -24,7 +24,7 @@ export interface CMSParameters {
24
24
  }
25
25
 
26
26
  export class CSM {
27
- constructor(data?: CMSParameters);
27
+ constructor(data: CMSParameters);
28
28
  camera: Camera;
29
29
  parent: Object3D;
30
30
  cascades: number;
@@ -13,5 +13,5 @@ export interface DRACOExporterOptions {
13
13
  export class DRACOExporter {
14
14
  constructor();
15
15
 
16
- parse(object: Mesh | Points, options: DRACOExporterOptions): Int8Array;
16
+ parse(object: Mesh | Points, options?: DRACOExporterOptions): Int8Array;
17
17
  }
@@ -1,13 +1,30 @@
1
1
  import { Object3D } from '../../../src/Three';
2
2
 
3
- export interface PLYExporterOptions {
4
- binary?: boolean;
3
+ export interface PLYExporterOptionsBase {
5
4
  excludeAttributes?: string[];
6
5
  littleEndian?: boolean;
7
6
  }
8
7
 
8
+ export interface PLYExporterOptionsBinary extends PLYExporterOptionsBase {
9
+ binary: true;
10
+ }
11
+
12
+ export interface PLYExporterOptionsString extends PLYExporterOptionsBase {
13
+ binary?: false;
14
+ }
15
+
16
+ export interface PLYExporterOptions extends PLYExporterOptionsBase {
17
+ binary?: boolean;
18
+ }
19
+
9
20
  export class PLYExporter {
10
21
  constructor();
11
22
 
12
- parse(object: Object3D, onDone: (res: string) => void, options: PLYExporterOptions): string | null;
23
+ parse(object: Object3D, onDone: (res: ArrayBuffer) => void, options: PLYExporterOptionsBinary): ArrayBuffer | null;
24
+ parse(object: Object3D, onDone: (res: string) => void, options?: PLYExporterOptionsString): string | null;
25
+ parse(
26
+ object: Object3D,
27
+ onDone: (res: string | ArrayBuffer) => void,
28
+ options?: PLYExporterOptions,
29
+ ): string | ArrayBuffer | null;
13
30
  }
@@ -1,5 +1,13 @@
1
1
  import { Object3D } from '../../../src/Three';
2
2
 
3
+ export interface STLExporterOptionsBinary {
4
+ binary: true;
5
+ }
6
+
7
+ export interface STLExporterOptionsString {
8
+ binary?: false;
9
+ }
10
+
3
11
  export interface STLExporterOptions {
4
12
  binary?: boolean;
5
13
  }
@@ -7,5 +15,7 @@ export interface STLExporterOptions {
7
15
  export class STLExporter {
8
16
  constructor();
9
17
 
10
- parse(scene: Object3D, options?: STLExporterOptions): string;
18
+ parse(scene: Object3D, options: STLExporterOptionsBinary): DataView;
19
+ parse(scene: Object3D, options?: STLExporterOptionsString): string;
20
+ parse(scene: Object3D, options?: STLExporterOptions): string | DataView;
11
21
  }
@@ -8,6 +8,6 @@ export class TeapotGeometry extends BufferGeometry {
8
8
  lid?: boolean,
9
9
  body?: boolean,
10
10
  fitLid?: boolean,
11
- blinn?: number,
11
+ blinn?: boolean,
12
12
  );
13
13
  }
@@ -56,7 +56,7 @@ export class IFCManager {
56
56
  * Example if web-ifc.wasm is in dist/wasmDir:
57
57
  * `ifcLoader.setWasmPath("dist/wasmDir/");`
58
58
  *
59
- * @path Relative path to web-ifc.wasm.
59
+ * @param path Relative path to web-ifc.wasm.
60
60
  */
61
61
  setWasmPath(path: string): void;
62
62
 
@@ -75,8 +75,8 @@ export class IFCManager {
75
75
 
76
76
  /**
77
77
  * Adds the properties of a model as JSON data.
78
- * @modelID ID of the IFC model.
79
- * @data: data as an object where the keys are the expressIDs and the values the properties.
78
+ * @param modelID ID of the IFC model.
79
+ * @param data data as an object where the keys are the expressIDs and the values the properties.
80
80
  */
81
81
  addModelJSONData(
82
82
  modelID: number,
@@ -102,16 +102,16 @@ export class IFCManager {
102
102
 
103
103
  /**
104
104
  * Closes the specified model and deletes it from the [scene](https://threejs.org/docs/#api/en/scenes/Scene).
105
- * @modelID ID of the IFC model.
106
- * @scene Scene where the model is (if it's located in a scene).
105
+ * @param modelID ID of the IFC model.
106
+ * @param scene Scene where the model is (if it's located in a scene).
107
107
  */
108
108
  close(modelID: number, scene?: Scene): void;
109
109
 
110
110
  /**
111
111
  * Gets the **Express ID** to which the given face belongs.
112
112
  * This ID uniquely identifies this entity within this IFC file.
113
- * @geometry The geometry of the IFC model.
114
- * @faceIndex The index of the face of a geometry.You can easily get this index using the [Raycaster](https://threejs.org/docs/#api/en/core/Raycaster).
113
+ * @param geometry The geometry of the IFC model.
114
+ * @param faceIndex The index of the face of a geometry.You can easily get this index using the [Raycaster](https://threejs.org/docs/#api/en/core/Raycaster).
115
115
  */
116
116
  getExpressId(geometry: BufferGeometry, faceIndex: number): number | undefined;
117
117
 
@@ -124,26 +124,26 @@ export class IFCManager {
124
124
  * import { IFCWALLSTANDARDCASE } from 'web-ifc';
125
125
  * const walls = ifcLoader.getAllItemsOfType(IFCWALLSTANDARDCASE);
126
126
  * ```
127
- * @modelID ID of the IFC model.
128
- * @ifcType type of IFC items to get.
129
- * @verbose If false (default), this only gets IDs. If true, this also gets the native properties of all the fetched items.
127
+ * @param modelID ID of the IFC model.
128
+ * @param ifcType type of IFC items to get.
129
+ * @param verbose If false (default), this only gets IDs. If true, this also gets the native properties of all the fetched items.
130
130
  */
131
131
  getAllItemsOfType(modelID: number, type: number, verbose: boolean): any[];
132
132
 
133
133
  /**
134
134
  * Gets the native properties of the given element.
135
- * @modelID ID of the IFC model.
136
- * @id Express ID of the element.
137
- * @recursive Wether you want to get the information of the referenced elements recursively.
135
+ * @param modelID ID of the IFC model.
136
+ * @param id Express ID of the element.
137
+ * @param recursive Wether you want to get the information of the referenced elements recursively.
138
138
  */
139
139
  getItemProperties(modelID: number, id: number, recursive?: boolean): any;
140
140
 
141
141
  /**
142
142
  * Gets the [property sets](https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/schema/ifckernel/lexical/ifcpropertyset.htm)
143
143
  * assigned to the given element.
144
- * @modelID ID of the IFC model.
145
- * @id Express ID of the element.
146
- * @recursive If true, this gets the native properties of the referenced elements recursively.
144
+ * @param modelID ID of the IFC model.
145
+ * @param id Express ID of the element.
146
+ * @param recursive If true, this gets the native properties of the referenced elements recursively.
147
147
  */
148
148
  getPropertySets(modelID: number, id: number, recursive?: boolean): any[];
149
149
 
@@ -151,24 +151,24 @@ export class IFCManager {
151
151
  * Gets the properties of the type assigned to the element.
152
152
  * For example, if applied to a wall (IfcWall), this would get back the information
153
153
  * contained in the IfcWallType assigned to it, if any.
154
- * @modelID ID of the IFC model.
155
- * @id Express ID of the element.
156
- * @recursive If true, this gets the native properties of the referenced elements recursively.
154
+ * @param modelID ID of the IFC model.
155
+ * @param id Express ID of the element.
156
+ * @param recursive If true, this gets the native properties of the referenced elements recursively.
157
157
  */
158
158
  getTypeProperties(modelID: number, id: number, recursive?: boolean): any[];
159
159
 
160
160
  /**
161
161
  * Gets the materials assigned to the given element.
162
- * @modelID ID of the IFC model.
163
- * @id Express ID of the element.
164
- * @recursive If true, this gets the native properties of the referenced elements recursively.
162
+ * @param modelID ID of the IFC model.
163
+ * @param id Express ID of the element.
164
+ * @param recursive If true, this gets the native properties of the referenced elements recursively.
165
165
  */
166
166
  getMaterialsProperties(modelID: number, id: number, recursive?: boolean): any[];
167
167
 
168
168
  /**
169
169
  * Gets the ifc type of the specified item.
170
- * @modelID ID of the IFC model.
171
- * @id Express ID of the element.
170
+ * @param modelID ID of the IFC model.
171
+ * @param id Express ID of the element.
172
172
  */
173
173
  getIfcType(modelID: number, id: number): string;
174
174
 
@@ -180,7 +180,7 @@ export class IFCManager {
180
180
  * one IfcProject that contains one or more IfcSites, that contain one or more
181
181
  * IfcBuildings, that contain one or more IfcBuildingStoreys, that contain
182
182
  * one or more IfcSpaces.
183
- * @modelID ID of the IFC model.
183
+ * @param modelID ID of the IFC model.
184
184
  */
185
185
  getSpatialStructure(modelID: number): {
186
186
  expressID: number;
@@ -191,22 +191,22 @@ export class IFCManager {
191
191
  /**
192
192
  * Gets the mesh of the subset with the specified [material](https://threejs.org/docs/#api/en/materials/Material).
193
193
  * If no material is given, this returns the subset with the original materials.
194
- * @modelID ID of the IFC model.
195
- * @material Material assigned to the subset (if any).
194
+ * @param modelID ID of the IFC model.
195
+ * @param material Material assigned to the subset (if any).
196
196
  */
197
197
  getSubset(modelID: number, material?: Material): Mesh | null;
198
198
 
199
199
  /**
200
200
  * Removes the specified subset.
201
- * @modelID ID of the IFC model.
202
- * @parent The parent where the subset is (can be any `THREE.Object3D`).
203
- * @material Material assigned to the subset, if any.
201
+ * @param modelID ID of the IFC model.
202
+ * @param parent The parent where the subset is (can be any `THREE.Object3D`).
203
+ * @param material Material assigned to the subset, if any.
204
204
  */
205
205
  removeSubset(modelID: number, parent?: Object3D, material?: Material): void;
206
206
 
207
207
  /**
208
208
  * Creates a new geometric subset.
209
- * @config A configuration object with the following options:
209
+ * @param config A configuration object with the following options:
210
210
  * - **scene**: `THREE.Object3D` where the model is located.
211
211
  * - **modelID**: ID of the model.
212
212
  * - **ids**: Express IDs of the items of the model that will conform the subset.
@@ -217,36 +217,36 @@ export class IFCManager {
217
217
 
218
218
  /**
219
219
  * Hides the selected items in the specified model
220
- * @modelID ID of the IFC model.
221
- * @ids Express ID of the elements.
220
+ * @param modelID ID of the IFC model.
221
+ * @param ids Express ID of the elements.
222
222
  */
223
223
  hideItems(modelID: number, ids: number[]): void;
224
224
 
225
225
  /**
226
226
  * Hides all the items of the specified model
227
- * @modelID ID of the IFC model.
227
+ * @param modelID ID of the IFC model.
228
228
  */
229
229
  hideAllItems(modelID: number): void;
230
230
 
231
231
  /**
232
232
  * Shows all the items of the specified model
233
- * @modelID ID of the IFC model.
234
- * @ids Express ID of the elements.
233
+ * @param modelID ID of the IFC model.
234
+ * @param ids Express ID of the elements.
235
235
  */
236
236
  showItems(modelID: number, ids: number[]): void;
237
237
 
238
238
  /**
239
239
  * Shows all the items of the specified model
240
- * @modelID ID of the IFC model.
240
+ * @param modelID ID of the IFC model.
241
241
  */
242
242
  showAllItems(modelID: number): void;
243
243
  }
244
244
 
245
245
  /**
246
246
  * Represents an IFC model. This object is returned by the `IFCLoader` after loading an IFC.
247
- * @geometry `THREE.Buffergeometry`, see Three.js documentation.
248
- * @materials `THREE.Material[]`, see Three.js documentation.
249
- * @manager contains all the logic to work with IFC.
247
+ * @param geometry `THREE.Buffergeometry`, see Three.js documentation.
248
+ * @param materials `THREE.Material[]`, see Three.js documentation.
249
+ * @param manager contains all the logic to work with IFC.
250
250
  */
251
251
  export class IFCModel extends Mesh {
252
252
  modelID: number;
@@ -272,7 +272,7 @@ export class IFCModel extends Mesh {
272
272
  * Example if web-ifc.wasm is in dist/wasmDir:
273
273
  * `ifcLoader.setWasmPath("dist/wasmDir/");`
274
274
  *
275
- * @path Relative path to web-ifc.wasm.
275
+ * @param path Relative path to web-ifc.wasm.
276
276
  */
277
277
  setWasmPath(path: string): void;
278
278
 
@@ -280,7 +280,7 @@ export class IFCModel extends Mesh {
280
280
  * @deprecated Use `IfcModel.ifcManager.close` instead.
281
281
  *
282
282
  * Closes the specified model and deletes it from the [scene](https://threejs.org/docs/#api/en/scenes/Scene).
283
- * @scene Scene where the model is (if it's located in a scene).
283
+ * @param scene Scene where the model is (if it's located in a scene).
284
284
  */
285
285
  close(scene?: Scene): void;
286
286
 
@@ -289,8 +289,8 @@ export class IFCModel extends Mesh {
289
289
  *
290
290
  * Gets the **Express ID** to which the given face belongs.
291
291
  * This ID uniquely identifies this entity within this IFC file.
292
- * @geometry The geometry of the IFC model.
293
- * @faceIndex The index of the face of a geometry.You can easily get this index using the [Raycaster](https://threejs.org/docs/#api/en/core/Raycaster).
292
+ * @param geometry The geometry of the IFC model.
293
+ * @param faceIndex The index of the face of a geometry.You can easily get this index using the [Raycaster](https://threejs.org/docs/#api/en/core/Raycaster).
294
294
  */
295
295
  getExpressId(geometry: BufferGeometry, faceIndex: number): number | undefined;
296
296
 
@@ -305,8 +305,8 @@ export class IFCModel extends Mesh {
305
305
  * import { IFCWALLSTANDARDCASE } from 'web-ifc';
306
306
  * const walls = ifcLoader.getAllItemsOfType(IFCWALLSTANDARDCASE);
307
307
  * ```
308
- * @ifcType The type of IFC items to get.
309
- * @verbose If false (default), this only gets IDs. If true, this also gets the native properties of all the fetched items.
308
+ * @param ifcType The type of IFC items to get.
309
+ * @param verbose If false (default), this only gets IDs. If true, this also gets the native properties of all the fetched items.
310
310
  */
311
311
  getAllItemsOfType(type: number, verbose: boolean): any[];
312
312
 
@@ -314,8 +314,8 @@ export class IFCModel extends Mesh {
314
314
  * @deprecated Use `IfcModel.ifcManager.getItemProperties` instead.
315
315
  *
316
316
  * Gets the native properties of the given element.
317
- * @id Express ID of the element.
318
- * @recursive Wether you want to get the information of the referenced elements recursively.
317
+ * @param id Express ID of the element.
318
+ * @param recursive Wether you want to get the information of the referenced elements recursively.
319
319
  */
320
320
  getItemProperties(id: number, recursive?: boolean): any;
321
321
 
@@ -324,8 +324,8 @@ export class IFCModel extends Mesh {
324
324
  *
325
325
  * Gets the [property sets](https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/schema/ifckernel/lexical/ifcpropertyset.htm)
326
326
  * assigned to the given element.
327
- * @id Express ID of the element.
328
- * @recursive If true, this gets the native properties of the referenced elements recursively.
327
+ * @param id Express ID of the element.
328
+ * @param recursive If true, this gets the native properties of the referenced elements recursively.
329
329
  */
330
330
  getPropertySets(id: number, recursive?: boolean): any[];
331
331
 
@@ -335,8 +335,8 @@ export class IFCModel extends Mesh {
335
335
  * Gets the properties of the type assigned to the element.
336
336
  * For example, if applied to a wall (IfcWall), this would get back the information
337
337
  * contained in the IfcWallType assigned to it, if any.
338
- * @id Express ID of the element.
339
- * @recursive If true, this gets the native properties of the referenced elements recursively.
338
+ * @param id Express ID of the element.
339
+ * @param recursive If true, this gets the native properties of the referenced elements recursively.
340
340
  */
341
341
  getTypeProperties(id: number, recursive?: boolean): any[];
342
342
 
@@ -344,7 +344,7 @@ export class IFCModel extends Mesh {
344
344
  * @deprecated Use `IfcModel.ifcManager.getIfcType` instead.
345
345
  *
346
346
  * Gets the ifc type of the specified item.
347
- * @id Express ID of the element.
347
+ * @param id Express ID of the element.
348
348
  */
349
349
  getIfcType(id: number): string;
350
350
 
@@ -370,7 +370,7 @@ export class IFCModel extends Mesh {
370
370
  *
371
371
  * Gets the mesh of the subset with the specified [material](https://threejs.org/docs/#api/en/materials/Material).
372
372
  * If no material is given, this returns the subset with the original materials.
373
- * @material Material assigned to the subset, if any.
373
+ * @param material Material assigned to the subset, if any.
374
374
  */
375
375
  getSubset(material?: Material): Mesh | null;
376
376
 
@@ -378,8 +378,8 @@ export class IFCModel extends Mesh {
378
378
  * @deprecated Use `IfcModel.ifcManager.removeSubset` instead.
379
379
  *
380
380
  * Removes the specified subset.
381
- * @parent The parent where the subset is (can be any `THREE.Object3D`).
382
- * @material Material assigned to the subset, if any.
381
+ * @param parent The parent where the subset is (can be any `THREE.Object3D`).
382
+ * @param material Material assigned to the subset, if any.
383
383
  */
384
384
  removeSubset(parent?: Object3D, material?: Material): void;
385
385
 
@@ -387,7 +387,7 @@ export class IFCModel extends Mesh {
387
387
  * @deprecated Use `IfcModel.ifcManager.createSubset` instead.
388
388
  *
389
389
  * Creates a new geometric subset.
390
- * @config A configuration object with the following options:
390
+ * @param config A configuration object with the following options:
391
391
  * - **scene**: `THREE.Object3D` where the model is located.
392
392
  * - **ids**: Express IDs of the items of the model that will conform the subset.
393
393
  * - **removePrevious**: Wether to remove the previous subset of this model with this material.
@@ -399,7 +399,7 @@ export class IFCModel extends Mesh {
399
399
  * @deprecated Use `IfcModel.ifcManager.hideItems` instead.
400
400
  *
401
401
  * Hides the selected items in the specified model
402
- * @ids Express ID of the elements.
402
+ * @param ids Express ID of the elements.
403
403
  */
404
404
  hideItems(ids: number[]): void;
405
405
 
@@ -414,7 +414,7 @@ export class IFCModel extends Mesh {
414
414
  * @deprecated Use `IfcModel.ifcManager.showItems` instead.
415
415
  *
416
416
  * Hides all the items of the specified model
417
- * @ids Express ID of the elements.
417
+ * @param ids Express ID of the elements.
418
418
  */
419
419
  showItems(ids: number[]): void;
420
420
 
@@ -601,14 +601,14 @@ export class IfcAPI {
601
601
 
602
602
  /**
603
603
  * Opens a model and returns a modelID number
604
- * @data Buffer containing IFC data (bytes)
605
- * @data Settings settings for loading the model
604
+ * @param data Buffer containing IFC data (bytes)
605
+ * @param settings Settings for loading the model
606
606
  */
607
607
  OpenModel(data: string | Uint8Array, settings?: LoaderSettings): number;
608
608
 
609
609
  /**
610
610
  * Creates a new model and returns a modelID number
611
- * @data Settings settings for generating data the model
611
+ * @param settings Settings for generating data the model
612
612
  */
613
613
  CreateModel(settings?: LoaderSettings): number;
614
614
 
@@ -616,8 +616,8 @@ export class IfcAPI {
616
616
 
617
617
  /**
618
618
  * Opens a model and returns a modelID number
619
- * @modelID Model handle retrieved by OpenModel, model must not be closed
620
- * @data Buffer containing IFC data (bytes)
619
+ * @param modelID Model handle retrieved by OpenModel, model must not be closed
620
+ * @param data Buffer containing IFC data (bytes)
621
621
  */
622
622
  GetGeometry(modelID: number, geometryExpressID: number): IfcGeometry;
623
623
 
@@ -645,7 +645,7 @@ export class IfcAPI {
645
645
 
646
646
  /**
647
647
  * Closes a model and frees all related memory
648
- * @modelID Model handle retrieved by OpenModel, model must not be closed
648
+ * @param modelID Model handle retrieved by OpenModel, model must not be closed
649
649
  */
650
650
  CloseModel(modelID: number): void;
651
651
 
@@ -653,19 +653,19 @@ export class IfcAPI {
653
653
 
654
654
  /**
655
655
  * Checks if a specific model ID is open or closed
656
- * @modelID Model handle retrieved by OpenModel
656
+ * @param modelID Model handle retrieved by OpenModel
657
657
  */
658
658
  IsModelOpen(modelID: number): boolean;
659
659
 
660
660
  /**
661
661
  * Load all geometry in a model
662
- * @modelID Model handle retrieved by OpenModel
662
+ * @param modelID Model handle retrieved by OpenModel
663
663
  */
664
664
  LoadAllGeometry(modelID: number): Vector<FlatMesh>;
665
665
 
666
666
  /**
667
667
  * Load geometry for a single element
668
- * @modelID Model handle retrieved by OpenModel
668
+ * @param modelID Model handle retrieved by OpenModel
669
669
  */
670
670
  GetFlatMesh(modelID: number, expressID: number): FlatMesh;
671
671
 
@@ -49,7 +49,7 @@ export class GPUComputationRenderer {
49
49
  magFilter: MagnificationTextureFilter,
50
50
  ): WebGLRenderTarget;
51
51
  createTexture(): DataTexture;
52
- renderTexture(input: Texture, output: Texture): void;
52
+ renderTexture(input: Texture, output: WebGLRenderTarget): void;
53
53
  doRenderTarget(material: Material, output: WebGLRenderTarget): void;
54
54
  dispose(): void;
55
55
  }
@@ -2,5 +2,5 @@ import Node from '../core/Node';
2
2
  import PositionNode from './PositionNode';
3
3
 
4
4
  export default class ModelViewProjectionNode extends Node {
5
- constructor(position?: PositionNode);
5
+ constructor(positionNode?: PositionNode);
6
6
  }
@@ -106,7 +106,7 @@ export default abstract class NodeBuilder {
106
106
  getVectorFromMatrix(type: NodeTypeOption): NodeTypeOption;
107
107
  getDataFromNode(node: Node, shaderStage?: NodeShaderStageOption): NodeData;
108
108
  getNodeProperties(node: Node, shaderStage?: NodeShaderStageOption): AnyObject;
109
- getUniformFromNode(node: Node, shaderStage: NodeShaderStageOption, type: NodeTypeOption): NodeUniform;
109
+ getUniformFromNode(node: Node, type: NodeTypeOption, shaderStage?: NodeShaderStageOption): NodeUniform;
110
110
  getVarFromNode(node: Node, type: NodeTypeOption, shaderStage?: NodeShaderStageOption): NodeVar;
111
111
  getVaryFromNode(node: Node, type: NodeTypeOption): NodeVarying;
112
112
  getCodeFromNode(node: Node, type: NodeTypeOption, shaderStage?: NodeShaderStageOption): string;
@@ -3,7 +3,7 @@ import { ShaderMaterial } from '../../../src/Three';
3
3
  import { Pass, FullScreenQuad } from './Pass';
4
4
 
5
5
  export class FilmPass extends Pass {
6
- constructor(noiseIntensity?: number, scanlinesIntensity?: number, scanlinesCount?: number, grayscale?: number);
6
+ constructor(noiseIntensity?: number, scanlinesIntensity?: number, scanlinesCount?: number, grayscale?: boolean);
7
7
  uniforms: object;
8
8
  material: ShaderMaterial;
9
9
  fsQuad: FullScreenQuad;
@@ -1,3 +1,3 @@
1
1
  import { BufferGeometry } from '../../../src/Three';
2
2
 
3
- export function UVsDebug(geometry: BufferGeometry, size: number): HTMLCanvasElement;
3
+ export function UVsDebug(geometry: BufferGeometry, size?: number): HTMLCanvasElement;
three/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for three 0.152
1
+ // Type definitions for three 0.153
2
2
  // Project: https://threejs.org/
3
3
  // Definitions by: Josh Ellis <https://github.com/joshuaellis>
4
4
  // Nathan Bierema <https://github.com/Methuselah96>
three/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/three",
3
- "version": "0.152.0",
3
+ "version": "0.153.0",
4
4
  "description": "TypeScript definitions for three",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "fflate": "~0.6.9",
32
32
  "lil-gui": "~0.17.0"
33
33
  },
34
- "typesPublisherContentHash": "c206b6e9fcb60fc53d60b9c172bf339b663fa61d521aa358641f9b16d55913ed",
34
+ "typesPublisherContentHash": "776e445e303f817fc78a39d4f0acdac279c33b7cc46a10995a77955c8386f84d",
35
35
  "typeScriptVersion": "4.4",
36
36
  "exports": {
37
37
  ".": {
@@ -1,7 +1,8 @@
1
- import { Matrix4 } from './../math/Matrix4';
2
- import { Vector3 } from './../math/Vector3';
3
- import { Object3D } from './../core/Object3D';
4
- import { Layers } from '../Three';
1
+ import { Matrix4 } from '../math/Matrix4';
2
+ import { Vector3 } from '../math/Vector3';
3
+ import { Object3D } from '../core/Object3D';
4
+ import { Layers } from '../core/Layers';
5
+ import { CoordinateSystem } from '../constants';
5
6
 
6
7
  /**
7
8
  * Abstract base class for cameras
@@ -59,6 +60,8 @@ export abstract class Camera extends Object3D {
59
60
  */
60
61
  projectionMatrixInverse: Matrix4;
61
62
 
63
+ coordinateSystem: CoordinateSystem;
64
+
62
65
  /**
63
66
  * Returns a {@link THREE.Vector3 | Vector3} representing the world space direction in which the {@link Camera} is looking.
64
67
  * @remarks Note: A {@link Camera} looks down its local, negative z-axis.
@@ -2,6 +2,7 @@ import { WebGLCubeRenderTarget } from './../renderers/WebGLCubeRenderTarget';
2
2
  import { Scene } from './../scenes/Scene';
3
3
  import { WebGLRenderer } from './../renderers/WebGLRenderer';
4
4
  import { Object3D } from './../core/Object3D';
5
+ import { CoordinateSystem } from '../constants';
5
6
 
6
7
  /**
7
8
  * Creates **6** {@link THREE.PerspectiveCamera | cameras} that render to a {@link THREE.WebGLCubeRenderTarget | WebGLCubeRenderTarget}.
@@ -53,6 +54,10 @@ export class CubeCamera extends Object3D {
53
54
  */
54
55
  renderTarget: WebGLCubeRenderTarget;
55
56
 
57
+ coordinateSystem: CoordinateSystem;
58
+
59
+ updateCoordinateSystem(): void;
60
+
56
61
  /**
57
62
  * Call this to update the {@link CubeCamera.renderTarget | renderTarget}.
58
63
  * @param renderer The current WebGL renderer
three/src/constants.d.ts CHANGED
@@ -323,6 +323,8 @@ export const UnsignedShort4444Type: 1017;
323
323
  export const UnsignedShort5551Type: 1018;
324
324
  export const UnsignedInt248Type: 1020;
325
325
 
326
+ export type AttributeGPUType = typeof FloatType | typeof IntType;
327
+
326
328
  /**
327
329
  * Texture Types.
328
330
  * @remarks Must correspond to the correct {@link PixelFormat | format}.
@@ -409,7 +411,7 @@ export const RGIntegerFormat: 1031;
409
411
  */
410
412
  export const RGBAIntegerFormat: 1033;
411
413
 
412
- export const _SRGBAFormat = 1035; // fallback for WebGL 1
414
+ export const _SRGBAFormat: 1035; // fallback for WebGL 1
413
415
 
414
416
  /**
415
417
  * Texture Pixel Formats Modes. Compatible only with {@link WebGLRenderingContext | WebGL 1 Rendering Context}.
@@ -709,7 +711,7 @@ export type NormalMapTypes = typeof TangentSpaceNormalMap | typeof ObjectSpaceNo
709
711
  export const NoColorSpace: '';
710
712
  export const SRGBColorSpace: 'srgb';
711
713
  export const LinearSRGBColorSpace: 'srgb-linear';
712
- export const DisplayP3ColorSpace = 'display-p3';
714
+ export const DisplayP3ColorSpace: 'display-p3';
713
715
  export type ColorSpace =
714
716
  | typeof NoColorSpace
715
717
  | typeof SRGBColorSpace
@@ -754,6 +756,24 @@ export type StencilFunc =
754
756
  | typeof GreaterEqualStencilFunc
755
757
  | typeof AlwaysStencilFunc;
756
758
 
759
+ export const NeverCompare: 512;
760
+ export const LessCompare: 513;
761
+ export const EqualCompare: 514;
762
+ export const LessEqualCompare: 515;
763
+ export const GreaterCompare: 516;
764
+ export const NotEqualCompare: 517;
765
+ export const GreaterEqualCompare: 518;
766
+ export const AlwaysCompare: 519;
767
+ export type TextureComparisonFunction =
768
+ | typeof NeverCompare
769
+ | typeof LessCompare
770
+ | typeof EqualCompare
771
+ | typeof LessEqualCompare
772
+ | typeof GreaterCompare
773
+ | typeof NotEqualCompare
774
+ | typeof GreaterEqualCompare
775
+ | typeof AlwaysCompare;
776
+
757
777
  // usage types
758
778
  export const StaticDrawUsage: 35044;
759
779
  export const DynamicDrawUsage: 35048;
@@ -779,6 +799,10 @@ export const GLSL1: '100';
779
799
  export const GLSL3: '300 es';
780
800
  export type GLSLVersion = typeof GLSL1 | typeof GLSL3;
781
801
 
802
+ export const WebGLCoordinateSystem: 2000;
803
+ export const WebGPUCoordinateSystem: 2001;
804
+ export type CoordinateSystem = typeof WebGLCoordinateSystem | typeof WebGPUCoordinateSystem;
805
+
782
806
  ///////////////////////////////////////////////////////////////////////////////
783
807
  // Texture - Internal Pixel Formats
784
808