@types/three 0.149.0 → 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.
- three/README.md +2 -2
- three/build/three.d.cts +2 -0
- three/build/three.d.ts +2 -0
- three/build/three.module.d.ts +2 -0
- three/examples/jsm/controls/OrbitControls.d.ts +8 -3
- three/examples/jsm/controls/TrackballControls.d.ts +2 -2
- three/examples/jsm/controls/TransformControls.d.ts +4 -4
- three/examples/jsm/helpers/OctreeHelper.d.ts +1 -1
- three/examples/jsm/libs/fflate.module.d.ts +1 -0
- three/examples/jsm/libs/lil-gui.module.min.d.ts +1 -0
- three/examples/jsm/libs/stats.module.d.ts +2 -23
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +3 -4
- three/examples/jsm/objects/MarchingCubes.d.ts +1 -0
- three/examples/jsm/shaders/VelocityShader.d.ts +2 -2
- three/index.d.ts +1 -1
- three/package.json +19 -4
- three/src/Three.d.ts +0 -1
- three/src/constants.d.ts +394 -254
- three/src/core/BufferAttribute.d.ts +456 -85
- three/src/core/BufferGeometry.d.ts +235 -67
- three/src/core/Clock.d.ts +28 -20
- three/src/core/EventDispatcher.d.ts +20 -4
- three/src/core/GLBufferAttribute.d.ts +102 -8
- three/src/core/InstancedBufferAttribute.d.ts +13 -24
- three/src/core/InstancedBufferGeometry.d.ts +22 -4
- three/src/core/InstancedInterleavedBuffer.d.ts +10 -2
- three/src/core/InterleavedBuffer.d.ts +98 -14
- three/src/core/InterleavedBufferAttribute.d.ts +146 -7
- three/src/core/Layers.d.ts +61 -6
- three/src/core/Object3D.d.ts +236 -119
- three/src/core/Raycaster.d.ts +103 -27
- three/src/core/Uniform.d.ts +28 -11
- three/src/core/UniformsGroup.d.ts +10 -4
- three/src/extras/Earcut.d.ts +3 -4
- three/src/materials/MeshPhysicalMaterial.d.ts +13 -1
- three/src/math/Color.d.ts +157 -3
- three/src/math/ColorManagement.d.ts +13 -7
- three/src/renderers/WebGLRenderer.d.ts +2 -2
- three/src/utils.d.ts +5 -2
- three/examples/jsm/libs/fflate.module.min.d.ts +0 -1185
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: Mon,
|
|
12
|
-
* Dependencies: [@types/webxr](https://npmjs.com/package/@types/webxr)
|
|
11
|
+
* Last updated: Mon, 27 Mar 2023 18:33:59 GMT
|
|
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/webxr](https://npmjs.com/package/@types/webxr)
|
|
13
13
|
* Global values: `THREE`
|
|
14
14
|
|
|
15
15
|
# Credits
|
three/build/three.d.cts
ADDED
three/build/three.d.ts
ADDED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Camera, MOUSE, TOUCH, Vector3 } from '../../../src/Three';
|
|
1
|
+
import { Camera, MOUSE, MouseButton, TOUCH, TouchCount, Vector3 } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Orbit controls allow the camera to orbit around a target.
|
|
@@ -193,13 +193,13 @@ export class OrbitControls {
|
|
|
193
193
|
* This object contains references to the mouse actions used
|
|
194
194
|
* by the controls.
|
|
195
195
|
*/
|
|
196
|
-
mouseButtons: Partial<{ LEFT:
|
|
196
|
+
mouseButtons: Partial<{ LEFT: MouseButton; MIDDLE: MouseButton; RIGHT: MouseButton }>;
|
|
197
197
|
|
|
198
198
|
/**
|
|
199
199
|
* This object contains references to the touch actions used by
|
|
200
200
|
* the controls.
|
|
201
201
|
*/
|
|
202
|
-
touches: Partial<{ ONE:
|
|
202
|
+
touches: Partial<{ ONE: TouchCount; TWO: TouchCount }>;
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
205
|
* Used internally by the .saveState and .reset methods.
|
|
@@ -230,6 +230,11 @@ export class OrbitControls {
|
|
|
230
230
|
*/
|
|
231
231
|
listenToKeyEvents(domElement: HTMLElement | Window): void;
|
|
232
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Removes the key event listener previously defined with {@link listenToKeyEvents}.
|
|
235
|
+
*/
|
|
236
|
+
stopListenToKeyEvents(): void;
|
|
237
|
+
|
|
233
238
|
/**
|
|
234
239
|
* Save the current state of the controls. This can later be
|
|
235
240
|
* recovered with .reset.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Camera, EventDispatcher, MOUSE, Vector3 } from '../../../src/Three';
|
|
1
|
+
import { Camera, EventDispatcher, MOUSE, MouseButton, Vector3 } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export class TrackballControls extends EventDispatcher {
|
|
4
4
|
constructor(object: Camera, domElement?: HTMLElement);
|
|
@@ -21,7 +21,7 @@ export class TrackballControls extends EventDispatcher {
|
|
|
21
21
|
minDistance: number;
|
|
22
22
|
maxDistance: number;
|
|
23
23
|
keys: string[];
|
|
24
|
-
mouseButtons: { LEFT:
|
|
24
|
+
mouseButtons: { LEFT: MouseButton; MIDDLE: MouseButton; RIGHT: MouseButton };
|
|
25
25
|
|
|
26
26
|
target: Vector3;
|
|
27
27
|
position0: Vector3;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Object3D, Camera, MOUSE, Raycaster, Mesh, Vector3, Quaternion } from '../../../src/Three';
|
|
1
|
+
import { Object3D, Camera, MOUSE, Raycaster, Mesh, Vector3, Quaternion, MouseButton } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export class TransformControls extends Object3D {
|
|
4
4
|
constructor(object: Camera, domElement?: HTMLElement);
|
|
@@ -22,9 +22,9 @@ export class TransformControls extends Object3D {
|
|
|
22
22
|
showZ: boolean;
|
|
23
23
|
readonly isTransformControls: true;
|
|
24
24
|
mouseButtons: {
|
|
25
|
-
LEFT:
|
|
26
|
-
MIDDLE:
|
|
27
|
-
RIGHT:
|
|
25
|
+
LEFT: MouseButton;
|
|
26
|
+
MIDDLE: MouseButton;
|
|
27
|
+
RIGHT: MouseButton;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
attach(object: Object3D): this;
|
|
@@ -2,7 +2,7 @@ import { ColorRepresentation, LineSegments } from '../../../src/Three';
|
|
|
2
2
|
import { Octree } from '../math/Octree';
|
|
3
3
|
|
|
4
4
|
export class OctreeHelper extends LineSegments {
|
|
5
|
-
constructor(octree: Octree, color
|
|
5
|
+
constructor(octree: Octree, color?: ColorRepresentation);
|
|
6
6
|
|
|
7
7
|
octree: Octree;
|
|
8
8
|
color: ColorRepresentation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'fflate';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'lil-gui';
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
REVISION: number;
|
|
3
|
-
dom: HTMLDivElement;
|
|
4
|
-
addPanel(panel: Stats.Panel): Stats.Panel;
|
|
5
|
-
showPanel(id: number): void;
|
|
6
|
-
begin(): void;
|
|
7
|
-
end(): number;
|
|
8
|
-
update(): void;
|
|
9
|
-
domElement: HTMLDivElement;
|
|
10
|
-
setMode(id: number): void;
|
|
11
|
-
}
|
|
1
|
+
import Stats = require('stats.js');
|
|
12
2
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
declare namespace Stats {
|
|
16
|
-
interface Panel {
|
|
17
|
-
dom: HTMLCanvasElement;
|
|
18
|
-
update(value: number, maxValue: number): void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function Panel(name?: string, fg?: string, bg?: string): Panel;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Stats;
|
|
3
|
+
export = Stats;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ConstNode, Node, NodeBuilder, NodeTypeOption, SwizzleOption } from '../Nodes';
|
|
2
2
|
// lot of private typescript magic here
|
|
3
3
|
export {};
|
|
4
|
-
export type Swizzable<T extends Node = Node> = T &
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
4
|
+
export type Swizzable<T extends Node = Node> = T & {
|
|
5
|
+
[key in SwizzleOption | number]: Swizzable;
|
|
6
|
+
};
|
|
8
7
|
|
|
9
8
|
/** anything that can be passed to {@link nodeObject} and returns a proxy */
|
|
10
9
|
export type NodeRepresentation<T extends Node = Node> = number | boolean | Node | Swizzable<T>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IUniform, UniformsLib } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export const VelocityShader: {
|
|
4
|
-
uniforms: typeof UniformsLib['common'] &
|
|
5
|
-
typeof UniformsLib['displacementmap'] & {
|
|
4
|
+
uniforms: (typeof UniformsLib)['common'] &
|
|
5
|
+
(typeof UniformsLib)['displacementmap'] & {
|
|
6
6
|
modelMatrixPrev: IUniform;
|
|
7
7
|
currentProjectionViewMatrix: IUniform;
|
|
8
8
|
previousProjectionViewMatrix: IUniform;
|
three/index.d.ts
CHANGED
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.150.0",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,8 +25,23 @@
|
|
|
25
25
|
},
|
|
26
26
|
"scripts": {},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@types/
|
|
28
|
+
"@types/stats.js": "*",
|
|
29
|
+
"@types/webxr": "*",
|
|
30
|
+
"fflate": "~0.6.9",
|
|
31
|
+
"lil-gui": "~0.17.0"
|
|
29
32
|
},
|
|
30
|
-
"typesPublisherContentHash": "
|
|
31
|
-
"typeScriptVersion": "4.4"
|
|
33
|
+
"typesPublisherContentHash": "05e4984f22e82431c725369b78c3643e5b4e94508994b1904e74a77e269b9617",
|
|
34
|
+
"typeScriptVersion": "4.4",
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"import": "./build/three.module.js",
|
|
38
|
+
"require": "./build/three.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./examples/fonts/*": "./examples/fonts/*",
|
|
41
|
+
"./examples/jsm/*": "./examples/jsm/*",
|
|
42
|
+
"./addons/*": "./examples/jsm/*",
|
|
43
|
+
"./src/*": "./src/*",
|
|
44
|
+
"./nodes": "./examples/jsm/nodes/Nodes.js",
|
|
45
|
+
"./package.json": "./package.json"
|
|
46
|
+
}
|
|
32
47
|
}
|
three/src/Three.d.ts
CHANGED
|
@@ -67,7 +67,6 @@ export * from './extras/core/ShapePath';
|
|
|
67
67
|
export * from './extras/core/CurvePath';
|
|
68
68
|
export * from './extras/core/Curve';
|
|
69
69
|
export * as DataUtils from './extras/DataUtils';
|
|
70
|
-
export * from './extras/Earcut';
|
|
71
70
|
export * from './extras/ImageUtils';
|
|
72
71
|
export * from './extras/ShapeUtils';
|
|
73
72
|
export * from './extras/PMREMGenerator';
|