@types/three 0.139.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 +2 -2
- 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 +4 -4
- three/examples/jsm/controls/TransformControls.d.ts +41 -1
- three/examples/jsm/curves/NURBSUtils.d.ts +18 -20
- three/examples/jsm/exporters/GLTFExporter.d.ts +102 -5
- three/examples/jsm/exporters/KTX2Exporter.d.ts +5 -0
- three/examples/jsm/geometries/LightningStrike.d.ts +3 -3
- three/examples/jsm/loaders/GLTFLoader.d.ts +7 -2
- three/examples/jsm/loaders/NRRDLoader.d.ts +2 -2
- three/examples/jsm/misc/MorphAnimMesh.d.ts +1 -1
- three/examples/jsm/objects/LightningStorm.d.ts +3 -3
- three/examples/jsm/objects/Reflector.d.ts +11 -1
- three/examples/jsm/objects/Refractor.d.ts +11 -1
- three/examples/jsm/postprocessing/SAOPass.d.ts +1 -1
- three/examples/jsm/postprocessing/SavePass.d.ts +1 -1
- three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +10 -0
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +7 -1
- 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 -18
- three/examples/jsm/webxr/ARButton.d.ts +5 -1
- three/examples/jsm/webxr/OculusHandModel.d.ts +3 -2
- three/examples/jsm/webxr/OculusHandPointerModel.d.ts +6 -2
- three/examples/jsm/webxr/XRControllerModelFactory.d.ts +2 -0
- three/examples/jsm/webxr/XREstimatedLight.d.ts +5 -5
- three/examples/jsm/webxr/XRHandModelFactory.d.ts +1 -1
- three/index.d.ts +6 -5
- three/package.json +6 -4
- three/src/Three.d.ts +1 -1
- three/src/audio/AudioContext.d.ts +1 -1
- three/src/constants.d.ts +0 -1
- three/src/extras/DataUtils.d.ts +2 -4
- three/src/extras/Earcut.d.ts +4 -0
- three/src/materials/Material.d.ts +0 -10
- three/src/materials/MeshBasicMaterial.d.ts +7 -0
- three/src/materials/MeshLambertMaterial.d.ts +7 -0
- three/src/materials/MeshMatcapMaterial.d.ts +7 -1
- three/src/materials/MeshPhongMaterial.d.ts +7 -1
- three/src/materials/MeshPhysicalMaterial.d.ts +20 -0
- three/src/materials/MeshStandardMaterial.d.ts +7 -1
- three/src/materials/MeshToonMaterial.d.ts +7 -0
- three/src/materials/PointsMaterial.d.ts +7 -0
- three/src/materials/ShadowMaterial.d.ts +7 -0
- three/src/materials/SpriteMaterial.d.ts +7 -0
- three/src/math/Color.d.ts +2 -0
- three/src/math/Euler.d.ts +2 -0
- three/src/math/Quaternion.d.ts +2 -0
- three/src/renderers/WebGLRenderTarget.d.ts +6 -0
- three/src/renderers/WebGLRenderer.d.ts +1 -7
- three/src/renderers/webxr/WebXRController.d.ts +31 -5
- three/src/renderers/webxr/WebXRManager.d.ts +23 -7
- three/examples/jsm/shaders/SSRrShader.d.ts +0 -48
- three/src/renderers/webxr/WebXR.d.ts +0 -328
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:
|
|
11
|
+
* Last updated: Tue, 19 Jul 2022 15:32:21 GMT
|
|
12
|
+
* Dependencies: [@types/webxr](https://npmjs.com/package/@types/webxr)
|
|
13
13
|
* Global values: `THREE`
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
@@ -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;
|
|
@@ -52,7 +52,7 @@ export class OrbitControls {
|
|
|
52
52
|
|
|
53
53
|
update(): boolean;
|
|
54
54
|
|
|
55
|
-
listenToKeyEvents(domElement: HTMLElement): void;
|
|
55
|
+
listenToKeyEvents(domElement: HTMLElement | Window): void;
|
|
56
56
|
|
|
57
57
|
saveState(): void;
|
|
58
58
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Object3D, Camera, MOUSE, Raycaster } from '../../../src/Three';
|
|
1
|
+
import { Object3D, Camera, MOUSE, Raycaster, Mesh, Vector3, Quaternion } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export class TransformControls extends Object3D {
|
|
4
4
|
constructor(object: Camera, domElement?: HTMLElement);
|
|
@@ -40,3 +40,43 @@ export class TransformControls extends Object3D {
|
|
|
40
40
|
reset(): void;
|
|
41
41
|
dispose(): void;
|
|
42
42
|
}
|
|
43
|
+
|
|
44
|
+
export class TransformControlsGizmo extends Object3D {
|
|
45
|
+
type: 'TransformControlsGizmo';
|
|
46
|
+
isTransformControlsGizmo: true;
|
|
47
|
+
|
|
48
|
+
gizmo: {
|
|
49
|
+
translate: Object3D;
|
|
50
|
+
rotate: Object3D;
|
|
51
|
+
scale: Object3D;
|
|
52
|
+
};
|
|
53
|
+
helper: {
|
|
54
|
+
translate: Object3D;
|
|
55
|
+
rotate: Object3D;
|
|
56
|
+
scale: Object3D;
|
|
57
|
+
};
|
|
58
|
+
picker: {
|
|
59
|
+
translate: Object3D;
|
|
60
|
+
rotate: Object3D;
|
|
61
|
+
scale: Object3D;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
constructor();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class TransformControlsPlane extends Mesh {
|
|
68
|
+
type: 'TransformControlsPlane';
|
|
69
|
+
isTransformControlsPlane: true;
|
|
70
|
+
|
|
71
|
+
constructor();
|
|
72
|
+
|
|
73
|
+
mode: 'translate' | 'scale' | 'rotate';
|
|
74
|
+
|
|
75
|
+
axis: 'X' | 'Y' | 'Z' | 'XY' | 'YZ' | 'XZ' | 'XYZ' | 'E';
|
|
76
|
+
|
|
77
|
+
space: 'local' | 'world';
|
|
78
|
+
|
|
79
|
+
eye: Vector3;
|
|
80
|
+
worldPosition: Vector3;
|
|
81
|
+
worldQuaternion: Quaternion;
|
|
82
|
+
}
|
|
@@ -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;
|
|
@@ -1,20 +1,117 @@
|
|
|
1
|
-
import { Object3D, AnimationClip } from '../../../src/Three';
|
|
1
|
+
import { Object3D, AnimationClip, Texture, Material, Mesh } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export interface GLTFExporterOptions {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Export position, rotation and scale instead of matrix per node. Default is false
|
|
6
|
+
*/
|
|
5
7
|
trs?: boolean;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Export only visible objects. Default is true.
|
|
11
|
+
*/
|
|
6
12
|
onlyVisible?: boolean;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Export just the attributes within the drawRange, if defined, instead of exporting the whole array. Default is true.
|
|
16
|
+
*/
|
|
7
17
|
truncateDrawRange?: boolean;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Export in binary (.glb) format, returning an ArrayBuffer. Default is false.
|
|
21
|
+
*/
|
|
22
|
+
binary?: boolean;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Export with images embedded into the glTF asset. Default is true.
|
|
26
|
+
*/
|
|
8
27
|
embedImages?: boolean;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Restricts the image maximum size (both width and height) to the given value. This option works only if embedImages is true. Default is Infinity.
|
|
31
|
+
*/
|
|
32
|
+
maxTextureSize?: number;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* List of animations to be included in the export.
|
|
36
|
+
*/
|
|
9
37
|
animations?: AnimationClip[];
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Generate indices for non-index geometry and export with them. Default is false.
|
|
41
|
+
*/
|
|
10
42
|
forceIndices?: boolean;
|
|
11
|
-
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Export custom glTF extensions defined on an object's userData.gltfExtensions property. Default is false.
|
|
46
|
+
*/
|
|
12
47
|
includeCustomExtensions?: boolean;
|
|
13
48
|
}
|
|
14
49
|
|
|
15
50
|
export class GLTFExporter {
|
|
16
51
|
constructor();
|
|
17
52
|
|
|
18
|
-
|
|
19
|
-
|
|
53
|
+
register(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
|
|
54
|
+
unregister(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects)
|
|
58
|
+
*
|
|
59
|
+
* @param input Scenes or objects to export. Valid options:
|
|
60
|
+
* - Export scenes
|
|
61
|
+
* ```js
|
|
62
|
+
* exporter.parse( scene1, ... )
|
|
63
|
+
* exporter.parse( [ scene1, scene2 ], ... )
|
|
64
|
+
* ```
|
|
65
|
+
* - Export objects (It will create a new Scene to hold all the objects)
|
|
66
|
+
* ```js
|
|
67
|
+
* exporter.parse( object1, ... )
|
|
68
|
+
* exporter.parse( [ object1, object2 ], ... )
|
|
69
|
+
* ```
|
|
70
|
+
* - Mix scenes and objects (It will export the scenes as usual but it will create a new scene to hold all the single objects).
|
|
71
|
+
* ```js
|
|
72
|
+
* exporter.parse( [ scene1, object1, object2, scene2 ], ... )
|
|
73
|
+
* ```
|
|
74
|
+
* @param onDone Will be called when the export completes. The argument will be the generated glTF JSON or binary ArrayBuffer.
|
|
75
|
+
* @param onError Will be called if there are any errors during the gltf generation.
|
|
76
|
+
* @param options Export options
|
|
77
|
+
*/
|
|
78
|
+
parse(
|
|
79
|
+
input: Object3D | Object3D[],
|
|
80
|
+
onDone: (gltf: ArrayBuffer | { [key: string]: any }) => void,
|
|
81
|
+
onError: (error: ErrorEvent) => void,
|
|
82
|
+
options?: GLTFExporterOptions,
|
|
83
|
+
): void;
|
|
84
|
+
|
|
85
|
+
parseAsync(
|
|
86
|
+
input: Object3D | Object3D[],
|
|
87
|
+
options?: GLTFExporterOptions,
|
|
88
|
+
): Promise<ArrayBuffer | { [key: string]: any }>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export class GLTFWriter {
|
|
92
|
+
constructor();
|
|
93
|
+
|
|
94
|
+
setPlugins(plugins: GLTFExporterPlugin[]): void;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Parse scenes and generate GLTF output
|
|
98
|
+
*
|
|
99
|
+
* @param input Scene or Array of THREE.Scenes
|
|
100
|
+
* @param onDone Callback on completed
|
|
101
|
+
* @param options options
|
|
102
|
+
*/
|
|
103
|
+
write(
|
|
104
|
+
input: Object3D | Object3D[],
|
|
105
|
+
onDone: (gltf: ArrayBuffer | { [key: string]: any }) => void,
|
|
106
|
+
options?: GLTFExporterOptions,
|
|
107
|
+
): Promise<void>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface GLTFExporterPlugin {
|
|
111
|
+
writeTexture?: (map: Texture, textureDef: { [key: string]: any }) => void;
|
|
112
|
+
writeMaterial?: (material: Material, materialDef: { [key: string]: any }) => void;
|
|
113
|
+
writeMesh?: (mesh: Mesh, meshDef: { [key: string]: any }) => void;
|
|
114
|
+
writeNode?: (object: Object3D, nodeDef: { [key: string]: any }) => void;
|
|
115
|
+
beforeParse?: (input: Object3D | Object3D[]) => void;
|
|
116
|
+
afterParse?: (input: Object3D | Object3D[]) => void;
|
|
20
117
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vector3 } from '../../../src/Three';
|
|
1
|
+
import { BufferGeometry, Vector3 } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export interface RandomGenerator {
|
|
4
4
|
random(): number;
|
|
@@ -87,7 +87,7 @@ export interface RayParameters {
|
|
|
87
87
|
) => void;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export class LightningStrike {
|
|
90
|
+
export class LightningStrike extends BufferGeometry {
|
|
91
91
|
constructor(rayParameters?: RayParameters);
|
|
92
92
|
copyParameters(dest?: RayParameters, source?: RayParameters): RayParameters;
|
|
93
93
|
|
|
@@ -103,6 +103,6 @@ export class LightningStrike {
|
|
|
103
103
|
|
|
104
104
|
update(time: number): void;
|
|
105
105
|
|
|
106
|
-
copy(source: LightningStrike):
|
|
106
|
+
copy(source: LightningStrike): this;
|
|
107
107
|
clone(): this;
|
|
108
108
|
}
|
|
@@ -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';
|
|
@@ -91,10 +91,15 @@ export class GLTFParser {
|
|
|
91
91
|
|
|
92
92
|
fileLoader: FileLoader;
|
|
93
93
|
textureLoader: TextureLoader | ImageBitmapLoader;
|
|
94
|
-
plugins: GLTFLoaderPlugin;
|
|
94
|
+
plugins: { [name: string]: GLTFLoaderPlugin };
|
|
95
95
|
extensions: { [name: string]: any };
|
|
96
96
|
associations: Map<Object3D | Material | Texture, GLTFReference>;
|
|
97
97
|
|
|
98
|
+
setExtensions(extensions: { [name: string]: any }): void;
|
|
99
|
+
setPlugins(plugins: { [name: string]: GLTFLoaderPlugin }): void;
|
|
100
|
+
|
|
101
|
+
parse(onLoad: (gltf: GLTF) => void, onError?: (event: ErrorEvent) => void): void;
|
|
102
|
+
|
|
98
103
|
getDependency: (type: string, index: number) => Promise<any>;
|
|
99
104
|
getDependencies: (type: string) => Promise<any[]>;
|
|
100
105
|
loadBuffer: (bufferIndex: number) => Promise<ArrayBuffer>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LoadingManager } from '../../../src/Three';
|
|
1
|
+
import { Loader, LoadingManager } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
import { Volume } from '../misc/Volume';
|
|
4
4
|
|
|
5
|
-
export class NRRDLoader {
|
|
5
|
+
export class NRRDLoader extends Loader {
|
|
6
6
|
constructor(manager?: LoadingManager);
|
|
7
7
|
manager: LoadingManager;
|
|
8
8
|
path: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Material, Vector3 } from '../../../src/Three';
|
|
1
|
+
import { Material, Object3D, Vector3 } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
import { LightningStrike, RayParameters } from '../geometries/LightningStrike';
|
|
4
4
|
|
|
@@ -24,9 +24,9 @@ export interface StormParams {
|
|
|
24
24
|
onLightningDown?: (lightning: LightningStrike) => void;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export class LightningStorm {
|
|
27
|
+
export class LightningStorm extends Object3D {
|
|
28
28
|
constructor(stormParams?: StormParams);
|
|
29
29
|
update(time: number): void;
|
|
30
|
-
copy(source: LightningStorm):
|
|
30
|
+
copy(source: LightningStorm, recursive?: boolean): this;
|
|
31
31
|
clone(): this;
|
|
32
32
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Mesh,
|
|
3
|
+
BufferGeometry,
|
|
4
|
+
ColorRepresentation,
|
|
5
|
+
TextureEncoding,
|
|
6
|
+
WebGLRenderTarget,
|
|
7
|
+
PerspectiveCamera,
|
|
8
|
+
} from '../../../src/Three';
|
|
2
9
|
|
|
3
10
|
export interface ReflectorOptions {
|
|
4
11
|
color?: ColorRepresentation;
|
|
@@ -11,6 +18,9 @@ export interface ReflectorOptions {
|
|
|
11
18
|
}
|
|
12
19
|
|
|
13
20
|
export class Reflector extends Mesh {
|
|
21
|
+
type: 'Reflector';
|
|
22
|
+
camera: PerspectiveCamera;
|
|
23
|
+
|
|
14
24
|
constructor(geometry?: BufferGeometry, options?: ReflectorOptions);
|
|
15
25
|
|
|
16
26
|
getRenderTarget(): WebGLRenderTarget;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Mesh,
|
|
3
|
+
BufferGeometry,
|
|
4
|
+
ColorRepresentation,
|
|
5
|
+
TextureEncoding,
|
|
6
|
+
WebGLRenderTarget,
|
|
7
|
+
PerspectiveCamera,
|
|
8
|
+
} from '../../../src/Three';
|
|
2
9
|
|
|
3
10
|
export interface RefractorOptions {
|
|
4
11
|
color?: ColorRepresentation;
|
|
@@ -11,6 +18,9 @@ export interface RefractorOptions {
|
|
|
11
18
|
}
|
|
12
19
|
|
|
13
20
|
export class Refractor extends Mesh {
|
|
21
|
+
type: 'Refractor';
|
|
22
|
+
camera: PerspectiveCamera;
|
|
23
|
+
|
|
14
24
|
constructor(geometry?: BufferGeometry, options?: RefractorOptions);
|
|
15
25
|
|
|
16
26
|
getRenderTarget(): WebGLRenderTarget;
|
|
@@ -3,7 +3,7 @@ import { ShaderMaterial, WebGLRenderTarget } from '../../../src/Three';
|
|
|
3
3
|
import { Pass } from './Pass';
|
|
4
4
|
|
|
5
5
|
export class SavePass extends Pass {
|
|
6
|
-
constructor(renderTarget
|
|
6
|
+
constructor(renderTarget?: WebGLRenderTarget);
|
|
7
7
|
textureID: string;
|
|
8
8
|
renderTarget: WebGLRenderTarget;
|
|
9
9
|
uniforms: object;
|
|
@@ -15,5 +15,11 @@ export function estimateBytesUsed(geometry: BufferGeometry): number;
|
|
|
15
15
|
export function mergeVertices(geometry: BufferGeometry, tolerance?: number): BufferGeometry;
|
|
16
16
|
export function toTrianglesDrawMode(geometry: BufferGeometry, drawMode: TrianglesDrawModes): BufferGeometry;
|
|
17
17
|
export function computeMorphedAttributes(object: Mesh | Line | Points): object;
|
|
18
|
-
export function
|
|
18
|
+
export function computeMikkTSpaceTangents(
|
|
19
|
+
geometry: BufferGeometry,
|
|
20
|
+
MikkTSpace: unknown,
|
|
21
|
+
negateSign?: boolean,
|
|
22
|
+
): BufferGeometry;
|
|
19
23
|
export function mergeGroups(geometry: BufferGeometry): BufferGeometry;
|
|
24
|
+
export function deinterleaveAttribute(geometry: BufferGeometry): void;
|
|
25
|
+
export function deinterleaveGeometry(geometry: BufferGeometry): void;
|
|
@@ -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,30 +1,28 @@
|
|
|
1
1
|
import { AnimationClip, Bone, Matrix4, Object3D, Skeleton, SkeletonHelper } from '../../../src/Three';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
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
|
-
|
|
14
|
+
export function getSkeletonOffsets(target: Object3D | Skeleton, source: Object3D | Skeleton, options: {}): Matrix4[];
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
export function renameBones(skeleton: Skeleton, names: {}): any;
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
export function getBones(skeleton: Skeleton | Bone[]): Bone[];
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
export function getBoneByName(name: string, skeleton: Skeleton): Bone;
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
export function getNearestBone(bone: Bone, names: {}): Bone;
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
export function findBoneTrackData(name: string, tracks: any[]): {};
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
export function getEqualsBonesNames(skeleton: Skeleton, targetSkeleton: Skeleton): string[];
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
}
|
|
28
|
+
export function clone(source: Object3D): Object3D;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { WebGLRenderer } from '../../../src/Three';
|
|
2
2
|
|
|
3
|
+
export interface ARButtonSessionInit extends XRSessionInit {
|
|
4
|
+
domOverlay: { root: HTMLElement };
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
export namespace ARButton {
|
|
4
|
-
function createButton(renderer: WebGLRenderer, sessionInit?:
|
|
8
|
+
function createButton(renderer: WebGLRenderer, sessionInit?: Partial<ARButtonSessionInit>): HTMLElement;
|
|
5
9
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mesh, Object3D, Texture, Vector3 } from '../../../src/Three';
|
|
2
|
+
import { XRHandMeshModel } from './XRHandMeshModel';
|
|
2
3
|
|
|
3
4
|
export class OculusHandModel extends Object3D {
|
|
4
5
|
controller: Object3D;
|
|
5
|
-
motionController:
|
|
6
|
+
motionController: XRHandMeshModel | null;
|
|
6
7
|
envMap: Texture | null;
|
|
7
8
|
|
|
8
9
|
mesh: Mesh | null;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import 'webxr';
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
4
|
BufferGeometry,
|
|
3
5
|
Intersection,
|
|
@@ -10,10 +12,12 @@ import {
|
|
|
10
12
|
Vector3,
|
|
11
13
|
} from '../../../src/Three';
|
|
12
14
|
|
|
15
|
+
import { XRHandMeshModel } from './XRHandMeshModel';
|
|
16
|
+
|
|
13
17
|
export class OculusHandPointerModel extends Object3D {
|
|
14
18
|
hand: Object3D;
|
|
15
19
|
controller: Object3D;
|
|
16
|
-
motionController:
|
|
20
|
+
motionController: XRHandMeshModel | null;
|
|
17
21
|
|
|
18
22
|
envMap: Texture | null;
|
|
19
23
|
|
|
@@ -31,7 +35,7 @@ export class OculusHandPointerModel extends Object3D {
|
|
|
31
35
|
raycaster: Raycaster;
|
|
32
36
|
|
|
33
37
|
visible: boolean;
|
|
34
|
-
xrInputSource:
|
|
38
|
+
xrInputSource: XRInputSource;
|
|
35
39
|
|
|
36
40
|
constructor(hand: Object3D, controller: Object3D);
|
|
37
41
|
|