@types/three 0.141.0 → 0.142.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 +1 -1
- three/examples/jsm/controls/FirstPersonControls.d.ts +1 -1
- three/examples/jsm/controls/FlyControls.d.ts +1 -1
- three/examples/jsm/controls/OrbitControls.d.ts +3 -3
- three/examples/jsm/curves/NURBSUtils.d.ts +18 -20
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
- three/examples/jsm/postprocessing/SAOPass.d.ts +1 -1
- three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +10 -0
- three/examples/jsm/utils/CameraUtils.d.ts +7 -9
- three/examples/jsm/utils/GeometryCompressionUtils.d.ts +3 -5
- three/examples/jsm/utils/GeometryUtils.d.ts +23 -25
- three/examples/jsm/utils/SkeletonUtils.d.ts +16 -22
- three/index.d.ts +1 -1
- three/package.json +3 -3
- three/src/audio/AudioContext.d.ts +1 -1
- three/src/extras/DataUtils.d.ts +2 -4
- three/src/renderers/WebGLRenderer.d.ts +0 -5
- three/examples/jsm/shaders/SSRrShader.d.ts +0 -48
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: Tue,
|
|
11
|
+
* Last updated: Tue, 19 Jul 2022 15:32:21 GMT
|
|
12
12
|
* Dependencies: [@types/webxr](https://npmjs.com/package/@types/webxr)
|
|
13
13
|
* Global values: `THREE`
|
|
14
14
|
|
|
@@ -4,7 +4,7 @@ export class OrbitControls {
|
|
|
4
4
|
constructor(object: Camera, domElement?: HTMLElement);
|
|
5
5
|
|
|
6
6
|
object: Camera;
|
|
7
|
-
domElement: HTMLElement |
|
|
7
|
+
domElement: HTMLElement | Document;
|
|
8
8
|
|
|
9
9
|
// API
|
|
10
10
|
enabled: boolean;
|
|
@@ -43,8 +43,8 @@ export class OrbitControls {
|
|
|
43
43
|
autoRotateSpeed: number;
|
|
44
44
|
|
|
45
45
|
keys: { LEFT: string; UP: string; RIGHT: string; BOTTOM: string };
|
|
46
|
-
mouseButtons: { LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE }
|
|
47
|
-
touches: { ONE: TOUCH; TWO: TOUCH }
|
|
46
|
+
mouseButtons: Partial<{ LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE }>;
|
|
47
|
+
touches: Partial<{ ONE: TOUCH; TWO: TOUCH }>;
|
|
48
48
|
|
|
49
49
|
target0: Vector3;
|
|
50
50
|
position0: Vector3;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { Vector3, Vector4 } from '../../../src/Three';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
): Vector3;
|
|
22
|
-
}
|
|
3
|
+
export function findSpan(p: number, u: number, U: number[]): number;
|
|
4
|
+
export function calcBasisFunctions(span: number, u: number, p: number, U: number[]): number[];
|
|
5
|
+
export function calcBSplinePoint(p: number, U: number[], P: Vector4[], u: number): Vector4;
|
|
6
|
+
export function calcBasisFunctionDerivatives(span: number, u: number, p: number, n: number, U: number[]): number[][];
|
|
7
|
+
export function calcBSplineDerivatives(p: number, U: number[], P: Vector4[], u: number, nd: number): Vector4[];
|
|
8
|
+
export function calcKoverI(k: number, i: number): number;
|
|
9
|
+
export function calcRationalCurveDerivatives(Pders: Vector4[]): Vector3[];
|
|
10
|
+
export function calcNURBSDerivatives(p: number, U: number[], P: Vector4[], u: number, nd: number): Vector3[];
|
|
11
|
+
export function calcSurfacePoint(
|
|
12
|
+
p: number,
|
|
13
|
+
q: number,
|
|
14
|
+
U: number[],
|
|
15
|
+
V: number[],
|
|
16
|
+
P: Vector4[],
|
|
17
|
+
u: number,
|
|
18
|
+
v: number,
|
|
19
|
+
target: Vector3,
|
|
20
|
+
): Vector3;
|
|
@@ -65,7 +65,7 @@ export class GLTFLoader extends Loader {
|
|
|
65
65
|
onError?: (event: ErrorEvent) => void,
|
|
66
66
|
): void;
|
|
67
67
|
|
|
68
|
-
parseAsync(data: ArrayBuffer | string, path: string): Promise<
|
|
68
|
+
parseAsync(data: ArrayBuffer | string, path: string): Promise<GLTF>;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export type GLTFReferenceType = 'materials' | 'nodes' | 'textures' | 'meshes';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { PerspectiveCamera, Vector3 } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
): void;
|
|
11
|
-
}
|
|
3
|
+
export function frameCorners(
|
|
4
|
+
camera: PerspectiveCamera,
|
|
5
|
+
bottomLeftCorner: Vector3,
|
|
6
|
+
bottomRightCorner: Vector3,
|
|
7
|
+
topLeftCorner: Vector3,
|
|
8
|
+
estimateViewFrustum?: boolean,
|
|
9
|
+
): void;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Mesh } from '../../../src/Three';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function compressUvs(mesh: Mesh): void;
|
|
7
|
-
}
|
|
3
|
+
export function compressNormals(mesh: Mesh, encodeMethod: string): void;
|
|
4
|
+
export function compressPositions(mesh: Mesh): void;
|
|
5
|
+
export function compressUvs(mesh: Mesh): void;
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
import { Vector3 } from '../../../src/Three';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function gosper(size?: number): number[];
|
|
27
|
-
}
|
|
3
|
+
export function hilbert2D(
|
|
4
|
+
center?: Vector3,
|
|
5
|
+
size?: number,
|
|
6
|
+
iterations?: number,
|
|
7
|
+
v0?: number,
|
|
8
|
+
v1?: number,
|
|
9
|
+
v2?: number,
|
|
10
|
+
v3?: number,
|
|
11
|
+
): Vector3[];
|
|
12
|
+
export function hilbert3D(
|
|
13
|
+
center?: Vector3,
|
|
14
|
+
size?: number,
|
|
15
|
+
iterations?: number,
|
|
16
|
+
v0?: number,
|
|
17
|
+
v1?: number,
|
|
18
|
+
v2?: number,
|
|
19
|
+
v3?: number,
|
|
20
|
+
v4?: number,
|
|
21
|
+
v5?: number,
|
|
22
|
+
v6?: number,
|
|
23
|
+
v7?: number,
|
|
24
|
+
): Vector3[];
|
|
25
|
+
export function gosper(size?: number): number[];
|
|
@@ -1,34 +1,28 @@
|
|
|
1
1
|
import { AnimationClip, Bone, Matrix4, Object3D, Skeleton, SkeletonHelper } from '../../../src/Three';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
export function retarget(target: Object3D | Skeleton, source: Object3D | Skeleton, options: {}): void;
|
|
3
|
+
export function retarget(target: Object3D | Skeleton, source: Object3D | Skeleton, options: {}): void;
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
export function retargetClip(
|
|
6
|
+
target: Skeleton | Object3D,
|
|
7
|
+
source: Skeleton | Object3D,
|
|
8
|
+
clip: AnimationClip,
|
|
9
|
+
options: {},
|
|
10
|
+
): AnimationClip;
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
export function getHelperFromSkeleton(skeleton: Skeleton): SkeletonHelper;
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
target: Object3D | Skeleton,
|
|
17
|
-
source: Object3D | Skeleton,
|
|
18
|
-
options: {},
|
|
19
|
-
): Matrix4[];
|
|
14
|
+
export function getSkeletonOffsets(target: Object3D | Skeleton, source: Object3D | Skeleton, options: {}): Matrix4[];
|
|
20
15
|
|
|
21
|
-
|
|
16
|
+
export function renameBones(skeleton: Skeleton, names: {}): any;
|
|
22
17
|
|
|
23
|
-
|
|
18
|
+
export function getBones(skeleton: Skeleton | Bone[]): Bone[];
|
|
24
19
|
|
|
25
|
-
|
|
20
|
+
export function getBoneByName(name: string, skeleton: Skeleton): Bone;
|
|
26
21
|
|
|
27
|
-
|
|
22
|
+
export function getNearestBone(bone: Bone, names: {}): Bone;
|
|
28
23
|
|
|
29
|
-
|
|
24
|
+
export function findBoneTrackData(name: string, tracks: any[]): {};
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
export function getEqualsBonesNames(skeleton: Skeleton, targetSkeleton: Skeleton): string[];
|
|
32
27
|
|
|
33
|
-
|
|
34
|
-
}
|
|
28
|
+
export function clone(source: Object3D): Object3D;
|
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.142.0",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@types/webxr": "*"
|
|
29
29
|
},
|
|
30
|
-
"typesPublisherContentHash": "
|
|
31
|
-
"typeScriptVersion": "
|
|
30
|
+
"typesPublisherContentHash": "d187945f6b769add03311f684cc4c99011ebd1d56bd6d32f2636d9dac50f5052",
|
|
31
|
+
"typeScriptVersion": "4.0"
|
|
32
32
|
}
|
three/src/extras/DataUtils.d.ts
CHANGED
|
@@ -127,11 +127,6 @@ export class WebGLRenderer implements Renderer {
|
|
|
127
127
|
*/
|
|
128
128
|
domElement: HTMLCanvasElement;
|
|
129
129
|
|
|
130
|
-
/**
|
|
131
|
-
* The HTML5 Canvas's 'webgl' context obtained from the canvas where the renderer will draw.
|
|
132
|
-
*/
|
|
133
|
-
context: WebGLRenderingContext;
|
|
134
|
-
|
|
135
130
|
/**
|
|
136
131
|
* Defines whether the renderer should automatically clear its output before rendering.
|
|
137
132
|
* @default true
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Matrix4, Vector2, IUniform, Texture } from '../../../src/Three';
|
|
2
|
-
|
|
3
|
-
export interface SSRrShader {
|
|
4
|
-
defines: {
|
|
5
|
-
MAX_STEP: number;
|
|
6
|
-
PERSPECTIVE_CAMERA: boolean;
|
|
7
|
-
SPECULAR: boolean;
|
|
8
|
-
FILL_HOLE: boolean;
|
|
9
|
-
INFINITE_THICK: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
uniforms: {
|
|
13
|
-
tDiffuse: IUniform<Texture | null>;
|
|
14
|
-
tSpecular: IUniform<Texture | null>;
|
|
15
|
-
tNormalSelects: IUniform<Texture | null>;
|
|
16
|
-
tRefractive: IUniform<Texture | null>;
|
|
17
|
-
tDepthSelects: IUniform<Texture | null>;
|
|
18
|
-
cameraNear: IUniform<number | null>;
|
|
19
|
-
cameraFar: IUniform<number | null>;
|
|
20
|
-
resolution: IUniform<Vector2>;
|
|
21
|
-
cameraProjectionMatrix: IUniform<Matrix4>;
|
|
22
|
-
cameraInverseProjectionMatrix: IUniform<Matrix4>;
|
|
23
|
-
ior: IUniform<number>;
|
|
24
|
-
cameraRange: IUniform<number>;
|
|
25
|
-
maxDistance: IUniform<number>;
|
|
26
|
-
surfDist: IUniform<number>;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
vertexShader: string;
|
|
30
|
-
|
|
31
|
-
fragmentShader: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface SSRrDepthShader {
|
|
35
|
-
defines: {
|
|
36
|
-
PERSPECTIVE_CAMERA: number;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
uniforms: {
|
|
40
|
-
tDepth: IUniform<Texture | null>;
|
|
41
|
-
cameraNear: IUniform<number | null>;
|
|
42
|
-
cameraFar: IUniform<number | null>;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
vertexShader: string;
|
|
46
|
-
|
|
47
|
-
fragmentShader: string;
|
|
48
|
-
}
|