@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.
- three/README.md +2 -2
- three/examples/jsm/animation/CCDIKSolver.d.ts +7 -7
- three/examples/jsm/controls/ArcballControls.d.ts +7 -1
- three/examples/jsm/controls/DragControls.d.ts +9 -1
- three/examples/jsm/controls/FlyControls.d.ts +5 -1
- three/examples/jsm/controls/OrbitControls.d.ts +15 -17
- three/examples/jsm/controls/TrackballControls.d.ts +7 -1
- three/examples/jsm/controls/TransformControls.d.ts +35 -2
- three/examples/jsm/curves/NURBSCurve.d.ts +8 -2
- three/examples/jsm/environments/DebugEnvironment.d.ts +5 -0
- three/examples/jsm/interactive/InteractiveGroup.d.ts +14 -1
- three/examples/jsm/interactive/SelectionHelper.d.ts +1 -0
- three/examples/jsm/libs/lil-gui.module.min.d.ts +609 -1
- three/examples/jsm/libs/tween.module.d.ts +219 -2
- three/examples/jsm/loaders/3DMLoader.d.ts +1 -8
- three/examples/jsm/loaders/3MFLoader.d.ts +1 -8
- three/examples/jsm/loaders/AMFLoader.d.ts +1 -8
- three/examples/jsm/loaders/BVHLoader.d.ts +1 -8
- three/examples/jsm/loaders/ColladaLoader.d.ts +1 -8
- three/examples/jsm/loaders/DRACOLoader.d.ts +1 -8
- three/examples/jsm/loaders/FBXLoader.d.ts +1 -8
- three/examples/jsm/loaders/FontLoader.d.ts +1 -8
- three/examples/jsm/loaders/GCodeLoader.d.ts +1 -8
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -9
- three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +5 -5
- three/examples/jsm/loaders/KMZLoader.d.ts +1 -8
- three/examples/jsm/loaders/LDrawLoader.d.ts +1 -8
- three/examples/jsm/loaders/LUT3dlLoader.d.ts +1 -8
- three/examples/jsm/loaders/LUTCubeLoader.d.ts +1 -8
- three/examples/jsm/loaders/LWOLoader.d.ts +1 -8
- three/examples/jsm/loaders/LottieLoader.d.ts +4 -5
- three/examples/jsm/loaders/MD2Loader.d.ts +1 -8
- three/examples/jsm/loaders/MDDLoader.d.ts +1 -8
- three/examples/jsm/loaders/MMDLoader.d.ts +1 -8
- three/examples/jsm/loaders/MTLLoader.d.ts +1 -9
- three/examples/jsm/loaders/NRRDLoader.d.ts +1 -7
- three/examples/jsm/loaders/OBJLoader.d.ts +1 -8
- three/examples/jsm/loaders/PCDLoader.d.ts +1 -8
- three/examples/jsm/loaders/PDBLoader.d.ts +1 -8
- three/examples/jsm/loaders/PLYLoader.d.ts +1 -8
- three/examples/jsm/loaders/STLLoader.d.ts +1 -8
- three/examples/jsm/loaders/SVGLoader.d.ts +1 -8
- three/examples/jsm/loaders/TDSLoader.d.ts +1 -8
- three/examples/jsm/loaders/TGALoader.d.ts +0 -7
- three/examples/jsm/loaders/TTFLoader.d.ts +1 -8
- three/examples/jsm/loaders/TiltLoader.d.ts +1 -8
- three/examples/jsm/loaders/USDZLoader.d.ts +1 -9
- three/examples/jsm/loaders/VOXLoader.d.ts +1 -8
- three/examples/jsm/loaders/VRMLLoader.d.ts +1 -8
- three/examples/jsm/loaders/VTKLoader.d.ts +1 -8
- three/examples/jsm/loaders/XYZLoader.d.ts +1 -8
- three/examples/jsm/nodes/loaders/NodeLoader.d.ts +1 -9
- three/examples/jsm/postprocessing/FilmPass.d.ts +1 -1
- three/examples/jsm/postprocessing/RenderPass.d.ts +15 -5
- three/examples/jsm/postprocessing/SAOPass.d.ts +1 -10
- three/examples/jsm/postprocessing/SSAOPass.d.ts +2 -5
- three/examples/jsm/shaders/FilmShader.d.ts +1 -3
- three/examples/jsm/shaders/SAOShader.d.ts +0 -2
- three/examples/jsm/shaders/SSAOShader.d.ts +0 -1
- three/examples/jsm/webxr/XREstimatedLight.d.ts +7 -2
- three/index.d.ts +1 -2
- three/package.json +4 -6
- three/src/Three.d.ts +4 -0
- three/src/animation/AnimationMixer.d.ts +6 -1
- three/src/constants.d.ts +7 -1
- three/src/core/BufferGeometry.d.ts +1 -1
- three/src/core/EventDispatcher.d.ts +30 -12
- three/src/core/Object3D.d.ts +17 -12
- three/src/core/RenderTarget.d.ts +1 -1
- three/src/core/UniformsGroup.d.ts +1 -1
- three/src/extras/core/Path.d.ts +1 -1
- three/src/loaders/AnimationLoader.d.ts +3 -10
- three/src/loaders/AudioLoader.d.ts +1 -10
- three/src/loaders/BufferGeometryLoader.d.ts +3 -13
- three/src/loaders/CompressedTextureLoader.d.ts +4 -6
- three/src/loaders/CubeTextureLoader.d.ts +5 -7
- three/src/loaders/DataTextureLoader.d.ts +4 -6
- three/src/loaders/FileLoader.d.ts +1 -8
- three/src/loaders/ImageBitmapLoader.d.ts +1 -9
- three/src/loaders/ImageLoader.d.ts +3 -5
- three/src/loaders/Loader.d.ts +8 -6
- three/src/loaders/MaterialLoader.d.ts +4 -11
- three/src/loaders/ObjectLoader.d.ts +15 -29
- three/src/loaders/TextureLoader.d.ts +4 -6
- three/src/materials/Material.d.ts +1 -1
- three/src/objects/Group.d.ts +2 -2
- three/src/objects/InstancedMesh.d.ts +11 -6
- three/src/objects/Mesh.d.ts +4 -5
- three/src/renderers/webxr/WebXRController.d.ts +21 -3
- three/src/renderers/webxr/WebXRManager.d.ts +10 -1
- three/src/textures/Texture.d.ts +4 -4
- three/src/utils.d.ts +1 -0
- three/examples/jsm/loaders/BasisTextureLoader.d.ts +0 -32
- three/examples/jsm/loaders/IFCLoader.d.ts +0 -675
three/README.md
CHANGED
|
@@ -8,8 +8,8 @@ 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:
|
|
12
|
-
* Dependencies: [@types/fflate](https://npmjs.com/package/@types/fflate), [@types/
|
|
11
|
+
* Last updated: Fri, 08 Sep 2023 18:03:16 GMT
|
|
12
|
+
* Dependencies: [@types/fflate](https://npmjs.com/package/@types/fflate), [@types/meshoptimizer](https://npmjs.com/package/@types/meshoptimizer), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr)
|
|
13
13
|
* Global values: `THREE`
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
@@ -3,16 +3,16 @@ import { Object3D, SkinnedMesh, Vector3 } from '../../../src/Three.js';
|
|
|
3
3
|
// tslint:disable-next-line:interface-name
|
|
4
4
|
export interface IKS {
|
|
5
5
|
effector: number;
|
|
6
|
-
iteration
|
|
6
|
+
iteration?: number | undefined;
|
|
7
7
|
links: Array<{
|
|
8
|
-
enabled
|
|
8
|
+
enabled?: boolean | undefined;
|
|
9
9
|
index: number;
|
|
10
|
-
limitation?: Vector3;
|
|
11
|
-
rotationMin?: Vector3;
|
|
12
|
-
rotationMax?: Vector3;
|
|
10
|
+
limitation?: Vector3 | undefined;
|
|
11
|
+
rotationMin?: Vector3 | undefined;
|
|
12
|
+
rotationMax?: Vector3 | undefined;
|
|
13
13
|
}>;
|
|
14
|
-
minAngle
|
|
15
|
-
maxAngle
|
|
14
|
+
minAngle?: number | undefined;
|
|
15
|
+
maxAngle?: number | undefined;
|
|
16
16
|
target: number;
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -14,7 +14,13 @@ export enum ArcballControlsMouseActionKeys {
|
|
|
14
14
|
CTRL = 'CTRL',
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export
|
|
17
|
+
export interface ArcballControlsEventMap {
|
|
18
|
+
change: {};
|
|
19
|
+
start: {};
|
|
20
|
+
end: {};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export class ArcballControls extends EventDispatcher<ArcballControlsEventMap> {
|
|
18
24
|
camera: Camera | null;
|
|
19
25
|
domElement: HTMLElement;
|
|
20
26
|
scene?: Scene | null | undefined;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { Camera, EventDispatcher, Object3D, Raycaster } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export interface DragControlsEventMap {
|
|
4
|
+
hoveron: { object: Object3D };
|
|
5
|
+
hoveroff: { object: Object3D };
|
|
6
|
+
dragstart: { object: Object3D };
|
|
7
|
+
drag: { object: Object3D };
|
|
8
|
+
dragend: { object: Object3D };
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class DragControls extends EventDispatcher<DragControlsEventMap> {
|
|
4
12
|
constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement);
|
|
5
13
|
|
|
6
14
|
object: Camera;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Camera, EventDispatcher } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export interface FlyControlsEventMap {
|
|
4
|
+
change: {};
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export class FlyControls extends EventDispatcher<FlyControlsEventMap> {
|
|
4
8
|
constructor(object: Camera, domElement?: HTMLElement);
|
|
5
9
|
|
|
6
10
|
autoForward: boolean;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import { Camera, MOUSE, TOUCH, Vector3 } from '../../../src/Three.js';
|
|
1
|
+
import { Camera, EventDispatcher, MOUSE, TOUCH, Vector3 } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export interface OrbitControlsEventMap {
|
|
4
|
+
change: {};
|
|
5
|
+
start: {};
|
|
6
|
+
end: {};
|
|
7
|
+
}
|
|
2
8
|
|
|
3
9
|
/**
|
|
4
10
|
* Orbit controls allow the camera to orbit around a target.
|
|
@@ -7,7 +13,7 @@ import { Camera, MOUSE, TOUCH, Vector3 } from '../../../src/Three.js';
|
|
|
7
13
|
* @param domElement - The HTML element used for
|
|
8
14
|
* event listeners.
|
|
9
15
|
*/
|
|
10
|
-
export class OrbitControls {
|
|
16
|
+
export class OrbitControls extends EventDispatcher<OrbitControlsEventMap> {
|
|
11
17
|
constructor(object: Camera, domElement?: HTMLElement);
|
|
12
18
|
|
|
13
19
|
/**
|
|
@@ -175,8 +181,9 @@ export class OrbitControls {
|
|
|
175
181
|
|
|
176
182
|
/**
|
|
177
183
|
* Set to true to automatically rotate around the target.
|
|
178
|
-
* Note that if this is enabled, you must call
|
|
179
|
-
*
|
|
184
|
+
* Note that if this is enabled, you must call .update() in your animation loop. If you want the auto-rotate speed
|
|
185
|
+
* to be independent of the frame rate (the refresh rate of the display), you must pass the time `deltaTime`, in
|
|
186
|
+
* seconds, to .update().
|
|
180
187
|
*/
|
|
181
188
|
autoRotate: boolean;
|
|
182
189
|
|
|
@@ -223,11 +230,11 @@ export class OrbitControls {
|
|
|
223
230
|
zoom0: number;
|
|
224
231
|
|
|
225
232
|
/**
|
|
226
|
-
* Update the controls. Must be called after any manual changes
|
|
227
|
-
*
|
|
228
|
-
*
|
|
233
|
+
* Update the controls. Must be called after any manual changes to the camera's transform, or in the update loop if
|
|
234
|
+
* .autoRotate or .enableDamping are set. `deltaTime`, in seconds, is optional, and is only required if you want the
|
|
235
|
+
* auto-rotate speed to be independent of the frame rate (the refresh rate of the display).
|
|
229
236
|
*/
|
|
230
|
-
update(): boolean;
|
|
237
|
+
update(deltaTime?: number): boolean;
|
|
231
238
|
|
|
232
239
|
/**
|
|
233
240
|
* Adds key event listeners to the given DOM element. `window`
|
|
@@ -272,13 +279,4 @@ export class OrbitControls {
|
|
|
272
279
|
* Returns the distance from the camera to the target.
|
|
273
280
|
*/
|
|
274
281
|
getDistance(): number;
|
|
275
|
-
|
|
276
|
-
// EventDispatcher mixins
|
|
277
|
-
addEventListener(type: string, listener: (event: any) => void): void;
|
|
278
|
-
|
|
279
|
-
hasEventListener(type: string, listener: (event: any) => void): boolean;
|
|
280
|
-
|
|
281
|
-
removeEventListener(type: string, listener: (event: any) => void): void;
|
|
282
|
-
|
|
283
|
-
dispatchEvent(event: { type: string; target: any }): void;
|
|
284
282
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Camera, EventDispatcher, MOUSE, Vector3 } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export interface TrackballControlsEventMap {
|
|
4
|
+
change: {};
|
|
5
|
+
start: {};
|
|
6
|
+
end: {};
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class TrackballControls extends EventDispatcher<TrackballControlsEventMap> {
|
|
4
10
|
constructor(object: Camera, domElement?: HTMLElement);
|
|
5
11
|
|
|
6
12
|
object: Camera;
|
|
@@ -1,6 +1,38 @@
|
|
|
1
|
-
import { Object3D, Camera, MOUSE, Raycaster, Mesh, Vector3, Quaternion } from '../../../src/Three.js';
|
|
1
|
+
import { Object3D, Camera, MOUSE, Raycaster, Mesh, Vector3, Quaternion, Object3DEventMap } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export interface TransformControlsEventMap extends Object3DEventMap {
|
|
4
|
+
change: {};
|
|
5
|
+
mouseDown: {};
|
|
6
|
+
mouseUp: {};
|
|
7
|
+
objectChange: {};
|
|
8
|
+
'camera-changed': { value: unknown };
|
|
9
|
+
'object-changed': { value: unknown };
|
|
10
|
+
'enabled-changed': { value: unknown };
|
|
11
|
+
'axis-changed': { value: unknown };
|
|
12
|
+
'mode-changed': { value: unknown };
|
|
13
|
+
'translationSnap-changed': { value: unknown };
|
|
14
|
+
'rotationSnap-changed': { value: unknown };
|
|
15
|
+
'scaleSnap-changed': { value: unknown };
|
|
16
|
+
'space-changed': { value: unknown };
|
|
17
|
+
'size-changed': { value: unknown };
|
|
18
|
+
'dragging-changed': { value: unknown };
|
|
19
|
+
'showX-changed': { value: unknown };
|
|
20
|
+
'showY-changed': { value: unknown };
|
|
21
|
+
'showZ-changed': { value: unknown };
|
|
22
|
+
'worldPosition-changed': { value: unknown };
|
|
23
|
+
'worldPositionStart-changed': { value: unknown };
|
|
24
|
+
'worldQuaternion-changed': { value: unknown };
|
|
25
|
+
'worldQuaternionStart-changed': { value: unknown };
|
|
26
|
+
'cameraPosition-changed': { value: unknown };
|
|
27
|
+
'cameraQuaternion-changed': { value: unknown };
|
|
28
|
+
'pointStart-changed': { value: unknown };
|
|
29
|
+
'pointEnd-changed': { value: unknown };
|
|
30
|
+
'rotationAxis-changed': { value: unknown };
|
|
31
|
+
'rotationAngle-changed': { value: unknown };
|
|
32
|
+
'eye-changed': { value: unknown };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export class TransformControls extends Object3D<TransformControlsEventMap> {
|
|
4
36
|
constructor(object: Camera, domElement?: HTMLElement);
|
|
5
37
|
|
|
6
38
|
domElement: HTMLElement;
|
|
@@ -20,6 +52,7 @@ export class TransformControls extends Object3D {
|
|
|
20
52
|
showX: boolean;
|
|
21
53
|
showY: boolean;
|
|
22
54
|
showZ: boolean;
|
|
55
|
+
|
|
23
56
|
readonly isTransformControls: true;
|
|
24
57
|
mouseButtons: { LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE };
|
|
25
58
|
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Curve, Vector2, Vector3, Vector4 } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
3
|
export class NURBSCurve extends Curve<Vector3> {
|
|
4
|
+
degree: number;
|
|
5
|
+
knots: number[];
|
|
6
|
+
controlPoints: Vector2[] | Vector3[] | Vector4[];
|
|
7
|
+
startKnot: number;
|
|
8
|
+
endKnot: number;
|
|
9
|
+
|
|
4
10
|
constructor(
|
|
5
11
|
degree: number,
|
|
6
12
|
knots: number[],
|
|
7
13
|
controlPoints: Vector2[] | Vector3[] | Vector4[],
|
|
8
|
-
startKnot
|
|
9
|
-
endKnot
|
|
14
|
+
startKnot?: number,
|
|
15
|
+
endKnot?: number,
|
|
10
16
|
);
|
|
11
17
|
}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Camera, Group, Object3D, Object3DEventMap, Vector2, WebGLRenderer } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export interface InteractiveObject3DEventMap extends Object3DEventMap {
|
|
4
|
+
hoveron: { data: Vector2 };
|
|
5
|
+
pointerdown: { data: Vector2 };
|
|
6
|
+
pointerup: { data: Vector2 };
|
|
7
|
+
pointermove: { data: Vector2 };
|
|
8
|
+
mousedown: { data: Vector2 };
|
|
9
|
+
mouseup: { data: Vector2 };
|
|
10
|
+
mousemove: { data: Vector2 };
|
|
11
|
+
click: { data: Vector2 };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class InteractiveObject3D extends Object3D<InteractiveObject3DEventMap> {}
|
|
2
15
|
|
|
3
16
|
export class InteractiveGroup extends Group {
|
|
4
17
|
constructor(renderer: WebGLRenderer, camera: Camera);
|