@types/three 0.155.1 → 0.156.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 (94) hide show
  1. three/README.md +2 -2
  2. three/examples/jsm/animation/CCDIKSolver.d.ts +7 -7
  3. three/examples/jsm/controls/ArcballControls.d.ts +7 -1
  4. three/examples/jsm/controls/DragControls.d.ts +9 -1
  5. three/examples/jsm/controls/FlyControls.d.ts +5 -1
  6. three/examples/jsm/controls/OrbitControls.d.ts +15 -17
  7. three/examples/jsm/controls/TrackballControls.d.ts +7 -1
  8. three/examples/jsm/controls/TransformControls.d.ts +35 -2
  9. three/examples/jsm/curves/NURBSCurve.d.ts +8 -2
  10. three/examples/jsm/environments/DebugEnvironment.d.ts +5 -0
  11. three/examples/jsm/interactive/InteractiveGroup.d.ts +14 -1
  12. three/examples/jsm/interactive/SelectionHelper.d.ts +1 -0
  13. three/examples/jsm/libs/lil-gui.module.min.d.ts +609 -1
  14. three/examples/jsm/libs/tween.module.d.ts +219 -2
  15. three/examples/jsm/loaders/3DMLoader.d.ts +1 -8
  16. three/examples/jsm/loaders/3MFLoader.d.ts +1 -8
  17. three/examples/jsm/loaders/AMFLoader.d.ts +1 -8
  18. three/examples/jsm/loaders/BVHLoader.d.ts +1 -8
  19. three/examples/jsm/loaders/ColladaLoader.d.ts +1 -8
  20. three/examples/jsm/loaders/DRACOLoader.d.ts +1 -8
  21. three/examples/jsm/loaders/FBXLoader.d.ts +1 -8
  22. three/examples/jsm/loaders/FontLoader.d.ts +1 -8
  23. three/examples/jsm/loaders/GCodeLoader.d.ts +1 -8
  24. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -9
  25. three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +5 -5
  26. three/examples/jsm/loaders/KMZLoader.d.ts +1 -8
  27. three/examples/jsm/loaders/LDrawLoader.d.ts +1 -8
  28. three/examples/jsm/loaders/LUT3dlLoader.d.ts +1 -8
  29. three/examples/jsm/loaders/LUTCubeLoader.d.ts +1 -8
  30. three/examples/jsm/loaders/LWOLoader.d.ts +1 -8
  31. three/examples/jsm/loaders/LottieLoader.d.ts +4 -5
  32. three/examples/jsm/loaders/MD2Loader.d.ts +1 -8
  33. three/examples/jsm/loaders/MDDLoader.d.ts +1 -8
  34. three/examples/jsm/loaders/MMDLoader.d.ts +1 -8
  35. three/examples/jsm/loaders/MTLLoader.d.ts +1 -9
  36. three/examples/jsm/loaders/NRRDLoader.d.ts +1 -7
  37. three/examples/jsm/loaders/OBJLoader.d.ts +1 -8
  38. three/examples/jsm/loaders/PCDLoader.d.ts +1 -8
  39. three/examples/jsm/loaders/PDBLoader.d.ts +1 -8
  40. three/examples/jsm/loaders/PLYLoader.d.ts +1 -8
  41. three/examples/jsm/loaders/STLLoader.d.ts +1 -8
  42. three/examples/jsm/loaders/SVGLoader.d.ts +1 -8
  43. three/examples/jsm/loaders/TDSLoader.d.ts +1 -8
  44. three/examples/jsm/loaders/TGALoader.d.ts +0 -7
  45. three/examples/jsm/loaders/TTFLoader.d.ts +1 -8
  46. three/examples/jsm/loaders/TiltLoader.d.ts +1 -8
  47. three/examples/jsm/loaders/USDZLoader.d.ts +1 -9
  48. three/examples/jsm/loaders/VOXLoader.d.ts +1 -8
  49. three/examples/jsm/loaders/VRMLLoader.d.ts +1 -8
  50. three/examples/jsm/loaders/VTKLoader.d.ts +1 -8
  51. three/examples/jsm/loaders/XYZLoader.d.ts +1 -8
  52. three/examples/jsm/nodes/loaders/NodeLoader.d.ts +1 -9
  53. three/examples/jsm/postprocessing/FilmPass.d.ts +1 -1
  54. three/examples/jsm/postprocessing/RenderPass.d.ts +15 -5
  55. three/examples/jsm/postprocessing/SAOPass.d.ts +1 -10
  56. three/examples/jsm/postprocessing/SSAOPass.d.ts +2 -5
  57. three/examples/jsm/shaders/FilmShader.d.ts +1 -3
  58. three/examples/jsm/shaders/SAOShader.d.ts +0 -2
  59. three/examples/jsm/shaders/SSAOShader.d.ts +0 -1
  60. three/examples/jsm/webxr/XREstimatedLight.d.ts +7 -2
  61. three/index.d.ts +1 -2
  62. three/package.json +4 -6
  63. three/src/Three.d.ts +4 -0
  64. three/src/animation/AnimationMixer.d.ts +6 -1
  65. three/src/constants.d.ts +7 -1
  66. three/src/core/BufferGeometry.d.ts +1 -1
  67. three/src/core/EventDispatcher.d.ts +30 -12
  68. three/src/core/Object3D.d.ts +17 -12
  69. three/src/core/RenderTarget.d.ts +1 -1
  70. three/src/core/UniformsGroup.d.ts +1 -1
  71. three/src/extras/core/Path.d.ts +1 -1
  72. three/src/loaders/AnimationLoader.d.ts +3 -10
  73. three/src/loaders/AudioLoader.d.ts +1 -10
  74. three/src/loaders/BufferGeometryLoader.d.ts +3 -13
  75. three/src/loaders/CompressedTextureLoader.d.ts +4 -6
  76. three/src/loaders/CubeTextureLoader.d.ts +5 -7
  77. three/src/loaders/DataTextureLoader.d.ts +4 -6
  78. three/src/loaders/FileLoader.d.ts +1 -8
  79. three/src/loaders/ImageBitmapLoader.d.ts +1 -9
  80. three/src/loaders/ImageLoader.d.ts +3 -5
  81. three/src/loaders/Loader.d.ts +8 -6
  82. three/src/loaders/MaterialLoader.d.ts +4 -11
  83. three/src/loaders/ObjectLoader.d.ts +15 -29
  84. three/src/loaders/TextureLoader.d.ts +4 -6
  85. three/src/materials/Material.d.ts +1 -1
  86. three/src/objects/Group.d.ts +2 -2
  87. three/src/objects/InstancedMesh.d.ts +11 -6
  88. three/src/objects/Mesh.d.ts +4 -5
  89. three/src/renderers/webxr/WebXRController.d.ts +21 -3
  90. three/src/renderers/webxr/WebXRManager.d.ts +10 -1
  91. three/src/textures/Texture.d.ts +4 -4
  92. three/src/utils.d.ts +1 -0
  93. three/examples/jsm/loaders/BasisTextureLoader.d.ts +0 -32
  94. three/examples/jsm/loaders/IFCLoader.d.ts +0 -675
@@ -1,2 +1,219 @@
1
- export * from '@tweenjs/tween.js';
2
- export { default } from '@tweenjs/tween.js';
1
+ type EasingFunction = (amount: number) => number;
2
+ interface EasingFunctionGroup {
3
+ In: EasingFunction;
4
+ Out: EasingFunction;
5
+ InOut: EasingFunction;
6
+ }
7
+ /**
8
+ * The Ease class provides a collection of easing functions for use with tween.js.
9
+ */
10
+ declare const Easing: Readonly<{
11
+ Linear: Readonly<
12
+ EasingFunctionGroup & {
13
+ None: EasingFunction;
14
+ }
15
+ >;
16
+ Quadratic: Readonly<EasingFunctionGroup>;
17
+ Cubic: Readonly<EasingFunctionGroup>;
18
+ Quartic: Readonly<EasingFunctionGroup>;
19
+ Quintic: Readonly<EasingFunctionGroup>;
20
+ Sinusoidal: Readonly<EasingFunctionGroup>;
21
+ Exponential: Readonly<EasingFunctionGroup>;
22
+ Circular: Readonly<EasingFunctionGroup>;
23
+ Elastic: Readonly<EasingFunctionGroup>;
24
+ Back: Readonly<EasingFunctionGroup>;
25
+ Bounce: Readonly<EasingFunctionGroup>;
26
+ generatePow(power?: number): EasingFunctionGroup;
27
+ }>;
28
+
29
+ type InterpolationFunction = (v: number[], k: number) => number;
30
+ declare const Interpolation: {
31
+ Linear: (v: number[], k: number) => number;
32
+ Bezier: (v: number[], k: number) => number;
33
+ CatmullRom: (v: number[], k: number) => number;
34
+ Utils: {
35
+ Linear: (p0: number, p1: number, t: number) => number;
36
+ Bernstein: (n: number, i: number) => number;
37
+ Factorial: (n: number) => number;
38
+ CatmullRom: (p0: number, p1: number, p2: number, p3: number, t: number) => number;
39
+ };
40
+ };
41
+
42
+ /**
43
+ * Controlling groups of tweens
44
+ *
45
+ * Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components.
46
+ * In these cases, you may want to create your own smaller groups of tween
47
+ */
48
+ declare class Group {
49
+ private _tweens;
50
+ private _tweensAddedDuringUpdate;
51
+ getAll(): Array<Tween<UnknownProps>>;
52
+ removeAll(): void;
53
+ add(tween: Tween<UnknownProps>): void;
54
+ remove(tween: Tween<UnknownProps>): void;
55
+ update(time?: number, preserve?: boolean): boolean;
56
+ }
57
+
58
+ /**
59
+ * Tween.js - Licensed under the MIT license
60
+ * https://github.com/tweenjs/tween.js
61
+ * ----------------------------------------------
62
+ *
63
+ * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.
64
+ * Thank you all, you're awesome!
65
+ */
66
+
67
+ declare class Tween<T extends UnknownProps> {
68
+ private _object;
69
+ private _group;
70
+ private _isPaused;
71
+ private _pauseStart;
72
+ private _valuesStart;
73
+ private _valuesEnd;
74
+ private _valuesStartRepeat;
75
+ private _duration;
76
+ private _isDynamic;
77
+ private _initialRepeat;
78
+ private _repeat;
79
+ private _repeatDelayTime?;
80
+ private _yoyo;
81
+ private _isPlaying;
82
+ private _reversed;
83
+ private _delayTime;
84
+ private _startTime;
85
+ private _easingFunction;
86
+ private _interpolationFunction;
87
+ private _chainedTweens;
88
+ private _onStartCallback?;
89
+ private _onStartCallbackFired;
90
+ private _onEveryStartCallback?;
91
+ private _onEveryStartCallbackFired;
92
+ private _onUpdateCallback?;
93
+ private _onRepeatCallback?;
94
+ private _onCompleteCallback?;
95
+ private _onStopCallback?;
96
+ private _id;
97
+ private _isChainStopped;
98
+ private _propertiesAreSetUp;
99
+ constructor(_object: T, _group?: Group | false);
100
+ getId(): number;
101
+ isPlaying(): boolean;
102
+ isPaused(): boolean;
103
+ to(target: UnknownProps, duration?: number): this;
104
+ duration(duration?: number): this;
105
+ dynamic(dynamic?: boolean): this;
106
+ start(time?: number, overrideStartingValues?: boolean): this;
107
+ startFromCurrentValues(time?: number): this;
108
+ private _setupProperties;
109
+ stop(): this;
110
+ end(): this;
111
+ pause(time?: number): this;
112
+ resume(time?: number): this;
113
+ stopChainedTweens(): this;
114
+ group(group?: Group): this;
115
+ delay(amount?: number): this;
116
+ repeat(times?: number): this;
117
+ repeatDelay(amount?: number): this;
118
+ yoyo(yoyo?: boolean): this;
119
+ easing(easingFunction?: EasingFunction): this;
120
+ interpolation(interpolationFunction?: InterpolationFunction): this;
121
+ chain(...tweens: Array<Tween<any>>): this;
122
+ onStart(callback?: (object: T) => void): this;
123
+ onEveryStart(callback?: (object: T) => void): this;
124
+ onUpdate(callback?: (object: T, elapsed: number) => void): this;
125
+ onRepeat(callback?: (object: T) => void): this;
126
+ onComplete(callback?: (object: T) => void): this;
127
+ onStop(callback?: (object: T) => void): this;
128
+ private _goToEnd;
129
+ /**
130
+ * @returns true if the tween is still playing after the update, false
131
+ * otherwise (calling update on a paused tween still returns true because
132
+ * it is still playing, just paused).
133
+ */
134
+ update(time?: number, autoStart?: boolean): boolean;
135
+ private _updateProperties;
136
+ private _handleRelativeValue;
137
+ private _swapEndStartRepeatValues;
138
+ }
139
+ type UnknownProps = Record<string, any>;
140
+
141
+ declare function now(): number;
142
+
143
+ /**
144
+ * Utils
145
+ */
146
+ // tslint:disable-next-line:no-unnecessary-class
147
+ declare class Sequence {
148
+ private static _nextId;
149
+ static nextId(): number;
150
+ }
151
+
152
+ declare const VERSION = '21.0.0';
153
+
154
+ declare const nextId: typeof Sequence.nextId;
155
+ declare function getAll(): Array<Tween<UnknownProps>>;
156
+ declare function removeAll(): void;
157
+ declare function add(tween: Tween<UnknownProps>): void;
158
+ declare function remove(tween: Tween<UnknownProps>): void;
159
+ declare function update(time?: number, preserve?: boolean): boolean;
160
+
161
+ declare const exports: {
162
+ Easing: Readonly<{
163
+ Linear: Readonly<
164
+ EasingFunctionGroup & {
165
+ None: EasingFunction;
166
+ }
167
+ >;
168
+ Quadratic: Readonly<EasingFunctionGroup>;
169
+ Cubic: Readonly<EasingFunctionGroup>;
170
+ Quartic: Readonly<EasingFunctionGroup>;
171
+ Quintic: Readonly<EasingFunctionGroup>;
172
+ Sinusoidal: Readonly<EasingFunctionGroup>;
173
+ Exponential: Readonly<EasingFunctionGroup>;
174
+ Circular: Readonly<EasingFunctionGroup>;
175
+ Elastic: Readonly<EasingFunctionGroup>;
176
+ Back: Readonly<EasingFunctionGroup>;
177
+ Bounce: Readonly<EasingFunctionGroup>;
178
+ generatePow(power?: number): EasingFunctionGroup;
179
+ }>;
180
+ Group: typeof Group;
181
+ Interpolation: {
182
+ Linear: (v: number[], k: number) => number;
183
+ Bezier: (v: number[], k: number) => number;
184
+ CatmullRom: (v: number[], k: number) => number;
185
+ Utils: {
186
+ Linear: (p0: number, p1: number, t: number) => number;
187
+ Bernstein: (n: number, i: number) => number;
188
+ Factorial: (n: number) => number;
189
+ CatmullRom: (p0: number, p1: number, p2: number, p3: number, t: number) => number;
190
+ };
191
+ };
192
+ now: () => number;
193
+ Sequence: typeof Sequence;
194
+ nextId: typeof Sequence.nextId;
195
+ Tween: typeof Tween;
196
+ VERSION: string;
197
+ getAll: () => Array<Tween<UnknownProps>>;
198
+ removeAll: () => void;
199
+ add: (tween: Tween<UnknownProps>) => void;
200
+ remove: (tween: Tween<UnknownProps>) => void;
201
+ update: (time?: number, preserve?: boolean) => boolean;
202
+ };
203
+
204
+ export {
205
+ Easing,
206
+ Group,
207
+ Interpolation,
208
+ Sequence,
209
+ Tween,
210
+ VERSION,
211
+ add,
212
+ exports as default,
213
+ getAll,
214
+ nextId,
215
+ now,
216
+ remove,
217
+ removeAll,
218
+ update,
219
+ };
@@ -1,15 +1,8 @@
1
1
  import { Loader, LoadingManager, Object3D } from '../../../src/Three.js';
2
2
 
3
- export class Rhino3dmLoader extends Loader {
3
+ export class Rhino3dmLoader extends Loader<Object3D> {
4
4
  constructor(manager?: LoadingManager);
5
5
 
6
- load(
7
- url: string,
8
- onLoad: (object: Object3D) => void,
9
- onProgress?: (event: ProgressEvent) => void,
10
- onError?: (event: ErrorEvent) => void,
11
- ): void;
12
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Object3D>;
13
6
  parse(data: ArrayBufferLike, onLoad: (object: Object3D) => void, onError?: (event: ErrorEvent) => void): void;
14
7
  setLibraryPath(path: string): Rhino3dmLoader;
15
8
  setWorkerLimit(workerLimit: number): Rhino3dmLoader;
@@ -1,16 +1,9 @@
1
1
  import { Loader, LoadingManager, Group } from '../../../src/Three.js';
2
2
 
3
- export class ThreeMFLoader extends Loader {
3
+ export class ThreeMFLoader extends Loader<Group> {
4
4
  constructor(manager?: LoadingManager);
5
5
  availableExtensions: object[];
6
6
 
7
- load(
8
- url: string,
9
- onLoad: (object: Group) => void,
10
- onProgress?: (event: ProgressEvent) => void,
11
- onError?: (event: ErrorEvent) => void,
12
- ): void;
13
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Group>;
14
7
  parse(data: ArrayBuffer): Group;
15
8
  addExtension(extension: object): void;
16
9
  }
@@ -1,14 +1,7 @@
1
1
  import { Loader, LoadingManager, Group } from '../../../src/Three.js';
2
2
 
3
- export class AMFLoader extends Loader {
3
+ export class AMFLoader extends Loader<Group> {
4
4
  constructor(manager?: LoadingManager);
5
5
 
6
- load(
7
- url: string,
8
- onLoad: (object: Group) => void,
9
- onProgress?: (event: ProgressEvent) => void,
10
- onError?: (event: ErrorEvent) => void,
11
- ): void;
12
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Group>;
13
6
  parse(data: ArrayBuffer): Group;
14
7
  }
@@ -5,17 +5,10 @@ export interface BVH {
5
5
  skeleton: Skeleton;
6
6
  }
7
7
 
8
- export class BVHLoader extends Loader {
8
+ export class BVHLoader extends Loader<BVH> {
9
9
  constructor(manager?: LoadingManager);
10
10
  animateBonePositions: boolean;
11
11
  animateBoneRotations: boolean;
12
12
 
13
- load(
14
- url: string,
15
- onLoad: (bvh: BVH) => void,
16
- onProgress?: (event: ProgressEvent) => void,
17
- onError?: (event: ErrorEvent) => void,
18
- ): void;
19
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<BVH>;
20
13
  parse(text: string): BVH;
21
14
  }
@@ -6,15 +6,8 @@ export interface Collada {
6
6
  scene: Scene;
7
7
  }
8
8
 
9
- export class ColladaLoader extends Loader {
9
+ export class ColladaLoader extends Loader<Collada> {
10
10
  constructor(manager?: LoadingManager);
11
11
 
12
- load(
13
- url: string,
14
- onLoad: (collada: Collada) => void,
15
- onProgress?: (event: ProgressEvent) => void,
16
- onError?: (event: ErrorEvent) => void,
17
- ): void;
18
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Collada>;
19
12
  parse(text: string, path: string): Collada;
20
13
  }
@@ -1,15 +1,8 @@
1
1
  import { Loader, LoadingManager, BufferGeometry } from '../../../src/Three.js';
2
2
 
3
- export class DRACOLoader extends Loader {
3
+ export class DRACOLoader extends Loader<BufferGeometry> {
4
4
  constructor(manager?: LoadingManager);
5
5
 
6
- load(
7
- url: string,
8
- onLoad: (geometry: BufferGeometry) => void,
9
- onProgress?: (event: ProgressEvent) => void,
10
- onError?: (event: ErrorEvent) => void,
11
- ): void;
12
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<BufferGeometry>;
13
6
  setDecoderPath(path: string): DRACOLoader;
14
7
  setDecoderConfig(config: object): DRACOLoader;
15
8
  setWorkerLimit(workerLimit: number): DRACOLoader;
@@ -1,14 +1,7 @@
1
1
  import { Group, Loader, LoadingManager } from '../../../src/Three.js';
2
2
 
3
- export class FBXLoader extends Loader {
3
+ export class FBXLoader extends Loader<Group> {
4
4
  constructor(manager?: LoadingManager);
5
5
 
6
- load(
7
- url: string,
8
- onLoad: (object: Group) => void,
9
- onProgress?: (event: ProgressEvent) => void,
10
- onError?: (event: ErrorEvent) => void,
11
- ): void;
12
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Group>;
13
6
  parse(FBXBuffer: ArrayBuffer | string, path: string): Group;
14
7
  }
@@ -1,15 +1,8 @@
1
1
  import { Shape, Loader, LoadingManager } from '../../../src/Three.js';
2
2
 
3
- export class FontLoader extends Loader {
3
+ export class FontLoader extends Loader<Font> {
4
4
  constructor(manager?: LoadingManager);
5
5
 
6
- load(
7
- url: string,
8
- onLoad?: (responseFont: Font) => void,
9
- onProgress?: (event: ProgressEvent) => void,
10
- onError?: (event: ErrorEvent) => void,
11
- ): void;
12
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Font>;
13
6
  parse(json: any): Font;
14
7
  }
15
8
 
@@ -1,15 +1,8 @@
1
1
  import { Group, Loader, LoadingManager } from '../../../src/Three.js';
2
2
 
3
- export class GCodeLoader extends Loader {
3
+ export class GCodeLoader extends Loader<Group> {
4
4
  constructor(manager?: LoadingManager);
5
5
  splitLayer: boolean;
6
6
 
7
- load(
8
- url: string,
9
- onLoad: (object: Group) => void,
10
- onProgress?: (event: ProgressEvent) => void,
11
- onError?: (event: ErrorEvent) => void,
12
- ): void;
13
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Group>;
14
7
  parse(data: string): Group;
15
8
  }
@@ -39,18 +39,10 @@ export interface GLTF {
39
39
  userData: any;
40
40
  }
41
41
 
42
- export class GLTFLoader extends Loader {
42
+ export class GLTFLoader extends Loader<GLTF> {
43
43
  constructor(manager?: LoadingManager);
44
44
  dracoLoader: DRACOLoader | null;
45
45
 
46
- load(
47
- url: string,
48
- onLoad: (gltf: GLTF) => void,
49
- onProgress?: (event: ProgressEvent) => void,
50
- onError?: (event: ErrorEvent) => void,
51
- ): void;
52
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<GLTF>;
53
-
54
46
  setDRACOLoader(dracoLoader: DRACOLoader): GLTFLoader;
55
47
 
56
48
  register(callback: (parser: GLTFParser) => GLTFLoaderPlugin): GLTFLoader;
@@ -2,17 +2,17 @@ import { CubeTexture, Loader, LoadingManager, TextureDataType } from '../../../s
2
2
 
3
3
  import { RGBELoader } from './RGBELoader.js';
4
4
 
5
- export class HDRCubeTextureLoader extends Loader {
5
+ export class HDRCubeTextureLoader extends Loader<CubeTexture, readonly string[]> {
6
6
  constructor(manager?: LoadingManager);
7
7
  hdrLoader: RGBELoader;
8
8
  type: TextureDataType;
9
9
 
10
10
  load(
11
- urls: string[],
12
- onLoad: (texture: CubeTexture) => void,
11
+ url: readonly string[],
12
+ onLoad?: (data: CubeTexture) => void,
13
13
  onProgress?: (event: ProgressEvent) => void,
14
- onError?: (event: ErrorEvent) => void,
14
+ onError?: (err: unknown) => void,
15
15
  ): CubeTexture;
16
- loadAsync(urls: string[], onProgress?: (event: ProgressEvent) => void): Promise<CubeTexture>;
16
+
17
17
  setDataType(type: TextureDataType): this;
18
18
  }
@@ -2,15 +2,8 @@ import { Loader, LoadingManager } from '../../../src/Three.js';
2
2
 
3
3
  import { Collada } from './ColladaLoader.js';
4
4
 
5
- export class KMZLoader extends Loader {
5
+ export class KMZLoader extends Loader<Collada> {
6
6
  constructor(manager?: LoadingManager);
7
7
 
8
- load(
9
- url: string,
10
- onLoad: (kmz: Collada) => void,
11
- onProgress?: (event: ProgressEvent) => void,
12
- onError?: (event: ErrorEvent) => void,
13
- ): void;
14
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Collada>;
15
8
  parse(data: ArrayBuffer): Collada;
16
9
  }
@@ -1,6 +1,6 @@
1
1
  import { Loader, LoadingManager, Group, Material } from '../../../src/Three.js';
2
2
 
3
- export class LDrawLoader extends Loader {
3
+ export class LDrawLoader extends Loader<Group> {
4
4
  materials: Material[];
5
5
  materialsLibrary: Record<string, Material>;
6
6
  fileMap: Record<string, string>;
@@ -8,13 +8,6 @@ export class LDrawLoader extends Loader {
8
8
 
9
9
  constructor(manager?: LoadingManager);
10
10
 
11
- load(
12
- url: string,
13
- onLoad: (data: Group) => void,
14
- onProgress?: (event: ProgressEvent) => void,
15
- onError?: (event: ErrorEvent) => void,
16
- ): void;
17
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Group>;
18
11
  preloadMaterials(url: string): Promise<void>;
19
12
  setFileMap(fileMap: Record<string, string>): void;
20
13
  setMaterials(materials: Material[]): void;
@@ -6,15 +6,8 @@ export interface LUT3dlResult {
6
6
  texture3D: Data3DTexture;
7
7
  }
8
8
 
9
- export class LUT3dlLoader extends Loader {
9
+ export class LUT3dlLoader extends Loader<LUT3dlResult> {
10
10
  constructor(manager?: LoadingManager);
11
11
 
12
- load(
13
- url: string,
14
- onLoad: (result: LUT3dlResult) => void,
15
- onProgress?: (event: ProgressEvent) => void,
16
- onError?: (event: Error) => void,
17
- ): any;
18
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<LUT3dlResult>;
19
12
  parse(data: string): LUT3dlResult;
20
13
  }
@@ -9,15 +9,8 @@ export interface LUTCubeResult {
9
9
  texture3D: Data3DTexture;
10
10
  }
11
11
 
12
- export class LUTCubeLoader extends Loader {
12
+ export class LUTCubeLoader extends Loader<LUTCubeResult> {
13
13
  constructor(manager?: LoadingManager);
14
14
 
15
- load(
16
- url: string,
17
- onLoad: (result: LUTCubeResult) => void,
18
- onProgress?: (event: ProgressEvent) => void,
19
- onError?: (event: Error) => void,
20
- ): any;
21
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<LUTCubeResult>;
22
15
  parse(data: string): LUTCubeResult;
23
16
  }
@@ -12,15 +12,8 @@ export interface LWOLoaderParameters {
12
12
  resourcePath?: string;
13
13
  }
14
14
 
15
- export class LWOLoader extends Loader {
15
+ export class LWOLoader extends Loader<LWO> {
16
16
  constructor(manager?: LoadingManager, parameters?: LWOLoaderParameters);
17
17
 
18
- load(
19
- url: string,
20
- onLoad: (lwo: LWO) => void,
21
- onProgress?: (event: ProgressEvent) => void,
22
- onError?: (event: ErrorEvent) => void,
23
- ): void;
24
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<LWO>;
25
18
  parse(data: ArrayBuffer, path: string, modelName: string): LWO;
26
19
  }
@@ -1,15 +1,14 @@
1
1
  import { CanvasTexture, Loader, LoadingManager } from '../../../src/Three.js';
2
2
 
3
- export class LottieLoader extends Loader {
3
+ export class LottieLoader extends Loader<CanvasTexture> {
4
4
  constructor(manager?: LoadingManager);
5
5
 
6
6
  load(
7
7
  url: string,
8
- onLoad: (texture: CanvasTexture) => void,
8
+ onLoad?: (data: CanvasTexture) => void,
9
9
  onProgress?: (event: ProgressEvent) => void,
10
- onError?: (event: ErrorEvent) => void,
11
- ): void;
12
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<CanvasTexture>;
10
+ onError?: (err: unknown) => void,
11
+ ): CanvasTexture;
13
12
 
14
13
  setQuality(value: number): void;
15
14
  }
@@ -1,14 +1,7 @@
1
1
  import { BufferGeometry, Loader, LoadingManager } from '../../../src/Three.js';
2
2
 
3
- export class MD2Loader extends Loader {
3
+ export class MD2Loader extends Loader<BufferGeometry> {
4
4
  constructor(manager?: LoadingManager);
5
5
 
6
- load(
7
- url: string,
8
- onLoad: (geometry: BufferGeometry) => void,
9
- onProgress?: (event: ProgressEvent) => void,
10
- onError?: (event: ErrorEvent) => void,
11
- ): void;
12
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<BufferGeometry>;
13
6
  parse(data: ArrayBuffer): BufferGeometry;
14
7
  }
@@ -5,15 +5,8 @@ export interface MDD {
5
5
  clip: AnimationClip;
6
6
  }
7
7
 
8
- export class MDDLoader extends Loader {
8
+ export class MDDLoader extends Loader<MDD> {
9
9
  constructor(manager?: LoadingManager);
10
10
 
11
- load(
12
- url: string,
13
- onLoad: (result: MDD) => void,
14
- onProgress?: (event: ProgressEvent) => void,
15
- onError?: (event: ErrorEvent) => void,
16
- ): void;
17
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<MDD>;
18
11
  parse(data: ArrayBuffer): MDD;
19
12
  }
@@ -5,7 +5,7 @@ export interface MMDLoaderAnimationObject {
5
5
  mesh: SkinnedMesh;
6
6
  }
7
7
 
8
- export class MMDLoader extends Loader {
8
+ export class MMDLoader extends Loader<SkinnedMesh> {
9
9
  constructor(manager?: LoadingManager);
10
10
  animationBuilder: object;
11
11
  animationPath: string;
@@ -13,13 +13,6 @@ export class MMDLoader extends Loader {
13
13
  meshBuilder: object;
14
14
  parser: object | null;
15
15
 
16
- load(
17
- url: string,
18
- onLoad: (mesh: SkinnedMesh) => void,
19
- onProgress?: (event: ProgressEvent) => void,
20
- onError?: (event: ErrorEvent) => void,
21
- ): void;
22
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<SkinnedMesh>;
23
16
  loadAnimation(
24
17
  url: string,
25
18
  object: SkinnedMesh | Camera,
@@ -39,20 +39,12 @@ export interface MaterialCreatorOptions {
39
39
  invertTrProperty?: boolean | undefined;
40
40
  }
41
41
 
42
- export class MTLLoader extends Loader {
42
+ export class MTLLoader extends Loader<MTLLoader.MaterialCreator> {
43
43
  constructor(manager?: LoadingManager);
44
44
  materialOptions: MaterialCreatorOptions;
45
45
 
46
- load(
47
- url: string,
48
- onLoad: (materialCreator: MTLLoader.MaterialCreator) => void,
49
- onProgress?: (event: ProgressEvent) => void,
50
- onError?: (event: ErrorEvent) => void,
51
- ): void;
52
46
  parse(text: string, path: string): MTLLoader.MaterialCreator;
53
47
  setMaterialOptions(value: MaterialCreatorOptions): void;
54
-
55
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<MTLLoader.MaterialCreator>;
56
48
  }
57
49
 
58
50
  export interface MaterialInfo {
@@ -2,19 +2,13 @@ import { Loader, LoadingManager } from '../../../src/Three.js';
2
2
 
3
3
  import { Volume } from '../misc/Volume.js';
4
4
 
5
- export class NRRDLoader extends Loader {
5
+ export class NRRDLoader extends Loader<Volume> {
6
6
  constructor(manager?: LoadingManager);
7
7
  manager: LoadingManager;
8
8
  path: string;
9
9
 
10
10
  fieldFunctions: object;
11
11
 
12
- load(
13
- url: string,
14
- onLoad: (group: Volume) => void,
15
- onProgress?: (event: ProgressEvent) => void,
16
- onError?: (event: ErrorEvent) => void,
17
- ): void;
18
12
  parse(data: string): Volume;
19
13
  parseChars(array: number[], start?: number, end?: number): string;
20
14
  setPath(value: string): this;
@@ -1,17 +1,10 @@
1
1
  import { Loader, LoadingManager, Group } from '../../../src/Three.js';
2
2
  import { MTLLoader } from './MTLLoader.js';
3
3
 
4
- export class OBJLoader extends Loader {
4
+ export class OBJLoader extends Loader<Group> {
5
5
  constructor(manager?: LoadingManager);
6
6
  materials: MTLLoader.MaterialCreator;
7
7
 
8
- load(
9
- url: string,
10
- onLoad: (group: Group) => void,
11
- onProgress?: (event: ProgressEvent) => void,
12
- onError?: (event: ErrorEvent) => void,
13
- ): void;
14
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Group>;
15
8
  parse(data: string): Group;
16
9
  setMaterials(materials: MTLLoader.MaterialCreator): this;
17
10
  }