@types/three 0.133.0 → 0.136.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/ArcballControls.d.ts +54 -2
- three/examples/jsm/controls/DragControls.d.ts +2 -1
- three/examples/jsm/controls/TransformControls.d.ts +1 -0
- three/examples/jsm/csm/CSM.d.ts +47 -22
- three/examples/jsm/csm/CSMFrustum.d.ts +19 -0
- three/examples/jsm/csm/CSMHelper.d.ts +20 -7
- three/examples/jsm/csm/CSMShader.d.ts +4 -0
- three/examples/jsm/exporters/GLTFExporter.d.ts +1 -0
- three/examples/jsm/loaders/GLTFLoader.d.ts +19 -0
- three/examples/jsm/loaders/LogLuvLoader.d.ts +19 -0
- three/examples/jsm/loaders/RGBMLoader.d.ts +10 -10
- three/examples/jsm/misc/GPUComputationRenderer.d.ts +8 -6
- three/examples/jsm/nodes/inputs/ColorNode.d.ts +1 -1
- three/examples/jsm/nodes/materials/StandardNodeMaterial.d.ts +1 -1
- three/examples/jsm/nodes/materials/nodes/StandardNode.d.ts +1 -1
- three/examples/jsm/objects/MarchingCubes.d.ts +11 -5
- three/examples/jsm/objects/Reflector.d.ts +2 -0
- three/examples/jsm/objects/Refractor.d.ts +2 -0
- three/examples/jsm/renderers/CSS2DRenderer.d.ts +5 -1
- three/examples/jsm/renderers/CSS3DRenderer.d.ts +5 -1
- three/examples/jsm/webxr/OculusHandPointerModel.d.ts +3 -3
- three/index.d.ts +1 -1
- three/package.json +3 -3
- three/src/Three.d.ts +1 -1
- three/src/cameras/OrthographicCamera.d.ts +1 -1
- three/src/constants.d.ts +0 -4
- three/src/core/Layers.d.ts +1 -0
- three/src/core/Object3D.d.ts +41 -9
- three/src/core/Raycaster.d.ts +1 -1
- three/src/lights/LightShadow.d.ts +3 -3
- three/src/loaders/LoaderUtils.d.ts +1 -0
- three/src/materials/MeshPhysicalMaterial.d.ts +18 -8
- three/src/math/Color.d.ts +0 -22
- three/src/objects/LOD.d.ts +1 -1
- three/src/objects/Line.d.ts +1 -1
- three/src/objects/Mesh.d.ts +1 -1
- three/src/objects/Points.d.ts +1 -1
- three/src/objects/Sprite.d.ts +1 -1
- three/src/renderers/WebGLRenderer.d.ts +11 -12
- three/src/renderers/webgl/WebGLRenderLists.d.ts +0 -3
- three/src/textures/FramebufferTexture.d.ts +8 -0
- three/src/textures/Texture.d.ts +6 -0
- three/examples/jsm/controls/DeviceOrientationControls.d.ts +0 -19
- three/examples/jsm/csm/Frustum.d.ts +0 -16
- three/examples/jsm/csm/Shader.d.ts +0 -6
- three/src/extras/objects/ImmediateRenderObject.d.ts +0 -59
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:
|
|
11
|
+
* Last updated: Mon, 03 Jan 2022 15:01:28 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `THREE`
|
|
14
14
|
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventDispatcher, Camera, Scene, Vector3, Raycaster } from '../../../src/Three';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export enum ArcballControlsMouseActionOperations {
|
|
4
|
+
PAN = 'PAN',
|
|
5
|
+
ROTATE = 'ROTATE',
|
|
6
|
+
ZOOM = 'ZOOM',
|
|
7
|
+
FOV = 'FOV',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type ArcballControlsMouseActionMouse = 0 | 1 | 2 | 'WHEEL';
|
|
11
|
+
|
|
12
|
+
export enum ArcballControlsMouseActionKeys {
|
|
13
|
+
SHIFT = 'SHIFT',
|
|
14
|
+
CTRL = 'CTRL',
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class ArcballControls extends EventDispatcher {
|
|
4
18
|
camera: Camera | null;
|
|
5
19
|
domElement: HTMLElement;
|
|
6
20
|
scene?: Scene | null | undefined;
|
|
@@ -100,7 +114,45 @@ export class ArcballControls extends Object3D {
|
|
|
100
114
|
*/
|
|
101
115
|
maxZoom: number;
|
|
102
116
|
|
|
117
|
+
/**
|
|
118
|
+
* @default Vector3(0,0,0)
|
|
119
|
+
*/
|
|
120
|
+
target: Vector3;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @default 0.67
|
|
124
|
+
*/
|
|
125
|
+
radiusFactor: number;
|
|
126
|
+
|
|
103
127
|
constructor(camera: Camera, domElement: HTMLElement, scene?: Scene | null);
|
|
104
128
|
|
|
129
|
+
getRaycaster(): Raycaster;
|
|
130
|
+
|
|
131
|
+
activateGizmos(isActive: boolean): void;
|
|
132
|
+
|
|
133
|
+
copyState(): void;
|
|
134
|
+
|
|
135
|
+
pasteState(): void;
|
|
136
|
+
|
|
137
|
+
saveState(): void;
|
|
138
|
+
|
|
139
|
+
reset(): void;
|
|
140
|
+
|
|
141
|
+
setCamera(camera: Camera): void;
|
|
142
|
+
|
|
143
|
+
setGizmosVisible(value: boolean): void;
|
|
144
|
+
|
|
145
|
+
setTbRadius(value: number): void;
|
|
146
|
+
|
|
147
|
+
setMouseAction(
|
|
148
|
+
operation: ArcballControlsMouseActionOperations,
|
|
149
|
+
mouse: ArcballControlsMouseActionMouse,
|
|
150
|
+
key?: ArcballControlsMouseActionKeys,
|
|
151
|
+
): boolean;
|
|
152
|
+
|
|
153
|
+
unsetMouseAction(mouse: ArcballControlsMouseActionMouse, key?: ArcballControlsMouseActionKeys): boolean;
|
|
154
|
+
|
|
155
|
+
update(): void;
|
|
156
|
+
|
|
105
157
|
dispose(): void;
|
|
106
158
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Camera, EventDispatcher, Object3D } from '../../../src/Three';
|
|
1
|
+
import { Camera, EventDispatcher, Object3D, Raycaster } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export class DragControls extends EventDispatcher {
|
|
4
4
|
constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement);
|
|
@@ -14,4 +14,5 @@ export class DragControls extends EventDispatcher {
|
|
|
14
14
|
deactivate(): void;
|
|
15
15
|
dispose(): void;
|
|
16
16
|
getObjects(): Object3D[];
|
|
17
|
+
getRaycaster(): Raycaster;
|
|
17
18
|
}
|
three/examples/jsm/csm/CSM.d.ts
CHANGED
|
@@ -1,36 +1,61 @@
|
|
|
1
|
+
import { Camera, Vector3, DirectionalLight, Material, Vector2, Object3D } from '../../../src/Three';
|
|
2
|
+
|
|
3
|
+
export enum CMSMode {
|
|
4
|
+
practical = 'practical',
|
|
5
|
+
uniform = 'uniform',
|
|
6
|
+
logarithmic = 'logarithmic',
|
|
7
|
+
custom = 'custom',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface CMSParameters {
|
|
11
|
+
camera?: Camera;
|
|
12
|
+
parent?: Object3D;
|
|
13
|
+
cascades?: number;
|
|
14
|
+
maxFar?: number;
|
|
15
|
+
mode?: CMSMode;
|
|
16
|
+
shadowMapSize?: number;
|
|
17
|
+
shadowBias?: number;
|
|
18
|
+
lightDirection?: Vector3;
|
|
19
|
+
lightIntensity?: number;
|
|
20
|
+
lightNear?: number;
|
|
21
|
+
lightFar?: number;
|
|
22
|
+
lightMargin?: number;
|
|
23
|
+
customSplitsCallback?: (cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
1
26
|
export class CSM {
|
|
2
|
-
constructor(data
|
|
3
|
-
camera:
|
|
4
|
-
parent:
|
|
5
|
-
cascades:
|
|
6
|
-
maxFar:
|
|
7
|
-
mode:
|
|
8
|
-
shadowMapSize:
|
|
9
|
-
shadowBias:
|
|
10
|
-
lightDirection:
|
|
11
|
-
lightIntensity:
|
|
12
|
-
lightNear:
|
|
13
|
-
lightFar:
|
|
14
|
-
lightMargin:
|
|
15
|
-
customSplitsCallback:
|
|
27
|
+
constructor(data?: CMSParameters);
|
|
28
|
+
camera: Camera;
|
|
29
|
+
parent: Object3D;
|
|
30
|
+
cascades: number;
|
|
31
|
+
maxFar: number;
|
|
32
|
+
mode: CMSMode;
|
|
33
|
+
shadowMapSize: number;
|
|
34
|
+
shadowBias: number;
|
|
35
|
+
lightDirection: Vector3;
|
|
36
|
+
lightIntensity: number;
|
|
37
|
+
lightNear: number;
|
|
38
|
+
lightFar: number;
|
|
39
|
+
lightMargin: number;
|
|
40
|
+
customSplitsCallback: (cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void;
|
|
16
41
|
fade: boolean;
|
|
17
|
-
mainFrustum:
|
|
18
|
-
frustums:
|
|
19
|
-
breaks:
|
|
20
|
-
lights:
|
|
21
|
-
shaders: Map<
|
|
42
|
+
mainFrustum: CSMFrustrum;
|
|
43
|
+
frustums: CSMFrustrum[];
|
|
44
|
+
breaks: number[];
|
|
45
|
+
lights: DirectionalLight[];
|
|
46
|
+
shaders: Map<unknown, string>;
|
|
22
47
|
createLights(): void;
|
|
23
48
|
initCascades(): void;
|
|
24
49
|
updateShadowBounds(): void;
|
|
25
50
|
getBreaks(): void;
|
|
26
51
|
update(): void;
|
|
27
52
|
injectInclude(): void;
|
|
28
|
-
setupMaterial(material:
|
|
53
|
+
setupMaterial(material: Material): void;
|
|
29
54
|
updateUniforms(): void;
|
|
30
|
-
getExtendedBreaks(target:
|
|
55
|
+
getExtendedBreaks(target: Vector2[]): void;
|
|
31
56
|
updateFrustums(): void;
|
|
32
57
|
remove(): void;
|
|
33
58
|
dispose(): void;
|
|
34
59
|
}
|
|
35
60
|
|
|
36
|
-
import
|
|
61
|
+
import CSMFrustrum from './CSMFrustum.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Matrix4, Vector3 } from '../../../src/Three';
|
|
2
|
+
|
|
3
|
+
export interface CSMFrustumVerticies {
|
|
4
|
+
near: Vector3[];
|
|
5
|
+
far: Vector3[];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface CSMFrustumParameters {
|
|
9
|
+
projectionMatrix?: Matrix4;
|
|
10
|
+
maxFar?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default class CSMFrustum {
|
|
14
|
+
constructor(data?: CSMFrustumParameters);
|
|
15
|
+
vertices: CSMFrustumVerticies;
|
|
16
|
+
setFromProjectionMatrix(projectionMatrix: Matrix4, maxFar: number): CSMFrustumVerticies;
|
|
17
|
+
split(breaks: number[], target: CSMFrustum[]): void;
|
|
18
|
+
toSpace(cameraMatrix: Matrix4, target: CSMFrustum): void;
|
|
19
|
+
}
|
|
@@ -1,13 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
Box3Helper,
|
|
3
|
+
BufferGeometry,
|
|
4
|
+
Group,
|
|
5
|
+
LineBasicMaterial,
|
|
6
|
+
LineSegments,
|
|
7
|
+
Mesh,
|
|
8
|
+
MeshBasicMaterial,
|
|
9
|
+
PlaneGeometry,
|
|
10
|
+
} from '../../../src/Three';
|
|
11
|
+
|
|
12
|
+
import { CSM } from './CSM';
|
|
13
|
+
|
|
14
|
+
export class CSMHelper<TCSM extends CSM = CSM> extends Group {
|
|
15
|
+
constructor(csm: TCSM);
|
|
16
|
+
csm: TCSM;
|
|
4
17
|
displayFrustum: boolean;
|
|
5
18
|
displayPlanes: boolean;
|
|
6
19
|
displayShadowBounds: boolean;
|
|
7
|
-
frustumLines:
|
|
8
|
-
cascadeLines:
|
|
9
|
-
cascadePlanes:
|
|
10
|
-
shadowLines:
|
|
20
|
+
frustumLines: LineSegments<BufferGeometry, LineBasicMaterial>;
|
|
21
|
+
cascadeLines: Box3Helper[];
|
|
22
|
+
cascadePlanes: Array<Mesh<PlaneGeometry, MeshBasicMaterial>>;
|
|
23
|
+
shadowLines: Box3Helper[];
|
|
11
24
|
updateVisibility(): void;
|
|
12
25
|
update(): void;
|
|
13
26
|
}
|
|
@@ -13,6 +13,9 @@ import {
|
|
|
13
13
|
Material,
|
|
14
14
|
SkinnedMesh,
|
|
15
15
|
Texture,
|
|
16
|
+
TextureLoader,
|
|
17
|
+
FileLoader,
|
|
18
|
+
ImageBitmapLoader,
|
|
16
19
|
} from '../../../src/Three';
|
|
17
20
|
|
|
18
21
|
import { DRACOLoader } from './DRACOLoader';
|
|
@@ -61,6 +64,8 @@ export class GLTFLoader extends Loader {
|
|
|
61
64
|
onLoad: (gltf: GLTF) => void,
|
|
62
65
|
onError?: (event: ErrorEvent) => void,
|
|
63
66
|
): void;
|
|
67
|
+
|
|
68
|
+
parseAsync(data: ArrayBuffer | string, path: string): Promise<void>;
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
export type GLTFReferenceType = 'materials' | 'nodes' | 'textures' | 'meshes';
|
|
@@ -75,6 +80,19 @@ export interface GLTFReference {
|
|
|
75
80
|
export class GLTFParser {
|
|
76
81
|
json: any;
|
|
77
82
|
|
|
83
|
+
options: {
|
|
84
|
+
path: string;
|
|
85
|
+
manager: LoadingManager;
|
|
86
|
+
ktx2Loader: KTX2Loader;
|
|
87
|
+
meshoptDecoder: /* MeshoptDecoder */ any;
|
|
88
|
+
crossOrigin: string;
|
|
89
|
+
requestHeader: { [header: string]: string };
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
fileLoader: FileLoader;
|
|
93
|
+
textureLoader: TextureLoader | ImageBitmapLoader;
|
|
94
|
+
plugins: GLTFLoaderPlugin;
|
|
95
|
+
extensions: { [name: string]: any };
|
|
78
96
|
associations: Map<Object3D | Material | Texture, GLTFReference>;
|
|
79
97
|
|
|
80
98
|
getDependency: (type: string, index: number) => Promise<any>;
|
|
@@ -135,5 +153,6 @@ export interface GLTFLoaderPlugin {
|
|
|
135
153
|
extendMaterialParams?:
|
|
136
154
|
| ((materialIndex: number, materialParams: { [key: string]: any }) => Promise<any> | null)
|
|
137
155
|
| undefined;
|
|
156
|
+
createNodeMesh?: ((nodeIndex: number) => Promise<Group | Mesh | SkinnedMesh> | null) | undefined;
|
|
138
157
|
createNodeAttachment?: ((nodeIndex: number) => Promise<Object3D> | null) | undefined;
|
|
139
158
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DataTextureLoader, TextureDataType, LoadingManager, PixelFormat } from '../../../src/Three';
|
|
2
|
+
|
|
3
|
+
export interface LogLuv {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
data: Uint16Array | Float32Array;
|
|
7
|
+
format: PixelFormat;
|
|
8
|
+
type: TextureDataType;
|
|
9
|
+
flipY: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class LogLuvLoader extends DataTextureLoader {
|
|
13
|
+
type: TextureDataType;
|
|
14
|
+
constructor(manager: LoadingManager);
|
|
15
|
+
|
|
16
|
+
parse(buffer: Iterable<number>): LogLuv;
|
|
17
|
+
|
|
18
|
+
setDataType(value: TextureDataType): this;
|
|
19
|
+
}
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CubeTexture,
|
|
3
|
-
LoadingManager,
|
|
4
|
-
DataTextureLoader,
|
|
5
|
-
PixelFormat,
|
|
6
|
-
TextureDataType,
|
|
7
|
-
TextureEncoding,
|
|
8
|
-
} from '../../../src/Three';
|
|
1
|
+
import { CubeTexture, LoadingManager, DataTextureLoader, PixelFormat, TextureDataType } from '../../../src/Three';
|
|
9
2
|
|
|
10
3
|
export interface RGBM {
|
|
11
4
|
width: number;
|
|
12
5
|
height: number;
|
|
13
|
-
data:
|
|
6
|
+
data: Uint16Array | Float32Array;
|
|
14
7
|
header: string;
|
|
15
8
|
format: PixelFormat;
|
|
16
9
|
type: TextureDataType;
|
|
17
10
|
flipY: boolean;
|
|
18
|
-
encoding: TextureEncoding;
|
|
19
11
|
}
|
|
20
12
|
|
|
21
13
|
export class RGBMLoader extends DataTextureLoader {
|
|
14
|
+
type: TextureDataType;
|
|
15
|
+
|
|
16
|
+
maxRange: number;
|
|
17
|
+
|
|
22
18
|
constructor(manager?: LoadingManager);
|
|
23
19
|
|
|
24
20
|
loadCubemap(
|
|
@@ -29,4 +25,8 @@ export class RGBMLoader extends DataTextureLoader {
|
|
|
29
25
|
): CubeTexture;
|
|
30
26
|
|
|
31
27
|
parse(buffer: ArrayBuffer): RGBM;
|
|
28
|
+
|
|
29
|
+
setDataType(dataType: TextureDataType): this;
|
|
30
|
+
|
|
31
|
+
setMaxRange(value: number): this;
|
|
32
32
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WebGLRenderer,
|
|
3
|
-
|
|
3
|
+
WebGLRenderTarget,
|
|
4
4
|
Texture,
|
|
5
5
|
DataTexture,
|
|
6
6
|
Material,
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
Wrapping,
|
|
9
9
|
TextureFilter,
|
|
10
10
|
TextureDataType,
|
|
11
|
+
IUniform,
|
|
11
12
|
} from '../../../src/Three';
|
|
12
13
|
|
|
13
14
|
export interface Variable {
|
|
@@ -15,7 +16,7 @@ export interface Variable {
|
|
|
15
16
|
initialValueTexture: Texture;
|
|
16
17
|
material: ShaderMaterial;
|
|
17
18
|
dependencies: Variable[];
|
|
18
|
-
renderTargets:
|
|
19
|
+
renderTargets: WebGLRenderTarget[];
|
|
19
20
|
wrapS: number;
|
|
20
21
|
wrapT: number;
|
|
21
22
|
minFilter: number;
|
|
@@ -33,9 +34,10 @@ export class GPUComputationRenderer {
|
|
|
33
34
|
init(): string | null;
|
|
34
35
|
compute(): void;
|
|
35
36
|
|
|
36
|
-
getCurrentRenderTarget(variable: Variable):
|
|
37
|
-
getAlternateRenderTarget(variable: Variable):
|
|
37
|
+
getCurrentRenderTarget(variable: Variable): WebGLRenderTarget;
|
|
38
|
+
getAlternateRenderTarget(variable: Variable): WebGLRenderTarget;
|
|
38
39
|
addResolutionDefine(materialShader: ShaderMaterial): void;
|
|
40
|
+
createShaderMaterial(computeFragmentShader: string, uniforms?: { [uniform: string]: IUniform }): ShaderMaterial;
|
|
39
41
|
createRenderTarget(
|
|
40
42
|
sizeXTexture: number,
|
|
41
43
|
sizeYTexture: number,
|
|
@@ -43,8 +45,8 @@ export class GPUComputationRenderer {
|
|
|
43
45
|
wrapT: number,
|
|
44
46
|
minFilter: TextureFilter,
|
|
45
47
|
magFilter: TextureFilter,
|
|
46
|
-
):
|
|
48
|
+
): WebGLRenderTarget;
|
|
47
49
|
createTexture(): DataTexture;
|
|
48
50
|
renderTexture(input: Texture, output: Texture): void;
|
|
49
|
-
doRenderTarget(material: Material, output:
|
|
51
|
+
doRenderTarget(material: Material, output: WebGLRenderTarget): void;
|
|
50
52
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { BufferGeometry, Material,
|
|
1
|
+
import { BufferGeometry, Material, Mesh, Color } from '../../../src/Three';
|
|
2
2
|
|
|
3
|
-
export class MarchingCubes extends
|
|
4
|
-
constructor(
|
|
3
|
+
export class MarchingCubes extends Mesh {
|
|
4
|
+
constructor(
|
|
5
|
+
resolution: number,
|
|
6
|
+
material: Material,
|
|
7
|
+
enableUvs?: boolean,
|
|
8
|
+
enableColors?: boolean,
|
|
9
|
+
maxPolyCount?: number,
|
|
10
|
+
);
|
|
5
11
|
|
|
6
12
|
enableUvs: boolean;
|
|
7
13
|
enableColors: boolean;
|
|
@@ -46,9 +52,9 @@ export class MarchingCubes extends ImmediateRenderObject {
|
|
|
46
52
|
begin(): void;
|
|
47
53
|
end(): void;
|
|
48
54
|
|
|
49
|
-
init(resolution:
|
|
55
|
+
init(resolution: number): void;
|
|
50
56
|
|
|
51
|
-
addBall(ballx: number, bally: number, ballz: number, strength: number, subtract: number, colors
|
|
57
|
+
addBall(ballx: number, bally: number, ballz: number, strength: number, subtract: number, colors?: Color): void;
|
|
52
58
|
|
|
53
59
|
addPlaneX(strength: number, subtract: number): void;
|
|
54
60
|
addPlaneY(strength: number, subtract: number): void;
|
|
@@ -8,8 +8,12 @@ export class CSS2DObject extends Object3D {
|
|
|
8
8
|
onAfterRender: (renderer: unknown, scene: Scene, camera: Camera) => void;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
export type CSS2DParameters = {
|
|
12
|
+
element?: HTMLElement;
|
|
13
|
+
};
|
|
14
|
+
|
|
11
15
|
export class CSS2DRenderer {
|
|
12
|
-
constructor();
|
|
16
|
+
constructor(parameters?: CSS2DParameters);
|
|
13
17
|
domElement: HTMLElement;
|
|
14
18
|
|
|
15
19
|
getSize(): { width: number; height: number };
|
|
@@ -12,8 +12,12 @@ export class CSS3DSprite extends CSS3DObject {
|
|
|
12
12
|
constructor(element: HTMLElement);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
export type CSS3DParameters = {
|
|
16
|
+
element?: HTMLElement;
|
|
17
|
+
};
|
|
18
|
+
|
|
15
19
|
export class CSS3DRenderer {
|
|
16
|
-
constructor();
|
|
20
|
+
constructor(parameters?: CSS3DParameters);
|
|
17
21
|
domElement: HTMLElement;
|
|
18
22
|
|
|
19
23
|
getSize(): { width: number; height: number };
|
|
@@ -53,11 +53,11 @@ export class OculusHandPointerModel extends Object3D {
|
|
|
53
53
|
|
|
54
54
|
public isAttached(): boolean;
|
|
55
55
|
|
|
56
|
-
public intersectObject(object: Object3D):
|
|
56
|
+
public intersectObject(object: Object3D, recursive?: boolean): Intersection[] | void;
|
|
57
57
|
|
|
58
|
-
public intersectObjects(objects: Object3D[]):
|
|
58
|
+
public intersectObjects(objects: Object3D[], recursive?: boolean): Intersection[] | void;
|
|
59
59
|
|
|
60
|
-
public checkIntersections(objects: Object3D[]): void;
|
|
60
|
+
public checkIntersections(objects: Object3D[], recursive?: boolean): void;
|
|
61
61
|
|
|
62
62
|
public setCursor(distance: number): void;
|
|
63
63
|
}
|
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.136.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,6 +25,6 @@
|
|
|
25
25
|
},
|
|
26
26
|
"scripts": {},
|
|
27
27
|
"dependencies": {},
|
|
28
|
-
"typesPublisherContentHash": "
|
|
29
|
-
"typeScriptVersion": "3.
|
|
28
|
+
"typesPublisherContentHash": "fc646ca261a81275f767c4d73525a7edd6d769ac837d7a54015dad64f2d216e1",
|
|
29
|
+
"typeScriptVersion": "3.8"
|
|
30
30
|
}
|
three/src/Three.d.ts
CHANGED
|
@@ -58,7 +58,6 @@ export * from './core/Clock';
|
|
|
58
58
|
/**
|
|
59
59
|
* Extras
|
|
60
60
|
*/
|
|
61
|
-
export * from './extras/objects/ImmediateRenderObject';
|
|
62
61
|
export * from './extras/curves/Curves';
|
|
63
62
|
export * from './extras/core/Shape';
|
|
64
63
|
export * from './extras/core/Path';
|
|
@@ -225,4 +224,5 @@ export * from './textures/CompressedTexture';
|
|
|
225
224
|
export * from './textures/CubeTexture';
|
|
226
225
|
export * from './textures/CanvasTexture';
|
|
227
226
|
export * from './textures/DepthTexture';
|
|
227
|
+
export * from './textures/FramebufferTexture';
|
|
228
228
|
export * from './textures/Texture';
|
|
@@ -18,7 +18,7 @@ export class OrthographicCamera extends Camera {
|
|
|
18
18
|
* @param [near=0.1] Camera frustum near plane.
|
|
19
19
|
* @param [far=2000] Camera frustum far plane.
|
|
20
20
|
*/
|
|
21
|
-
constructor(left
|
|
21
|
+
constructor(left?: number, right?: number, top?: number, bottom?: number, near?: number, far?: number);
|
|
22
22
|
|
|
23
23
|
type: 'OrthographicCamera';
|
|
24
24
|
|
three/src/constants.d.ts
CHANGED
|
@@ -157,7 +157,6 @@ export const RGBFormat: PixelFormat;
|
|
|
157
157
|
export const RGBAFormat: PixelFormat;
|
|
158
158
|
export const LuminanceFormat: PixelFormat;
|
|
159
159
|
export const LuminanceAlphaFormat: PixelFormat;
|
|
160
|
-
export const RGBEFormat: PixelFormat;
|
|
161
160
|
export const DepthFormat: PixelFormat;
|
|
162
161
|
export const DepthStencilFormat: PixelFormat;
|
|
163
162
|
export const RedFormat: PixelFormat;
|
|
@@ -315,12 +314,9 @@ export const TriangleFanDrawMode: TrianglesDrawModes;
|
|
|
315
314
|
export enum TextureEncoding {}
|
|
316
315
|
export const LinearEncoding: TextureEncoding;
|
|
317
316
|
export const sRGBEncoding: TextureEncoding;
|
|
318
|
-
export const GammaEncoding: TextureEncoding;
|
|
319
|
-
export const RGBEEncoding: TextureEncoding;
|
|
320
317
|
export const LogLuvEncoding: TextureEncoding;
|
|
321
318
|
export const RGBM7Encoding: TextureEncoding;
|
|
322
319
|
export const RGBM16Encoding: TextureEncoding;
|
|
323
|
-
export const RGBDEncoding: TextureEncoding;
|
|
324
320
|
|
|
325
321
|
// Depth packing strategies
|
|
326
322
|
export enum DepthPackingStrategies {}
|
three/src/core/Layers.d.ts
CHANGED
three/src/core/Object3D.d.ts
CHANGED
|
@@ -119,6 +119,7 @@ export class Object3D<E extends BaseEvent = Event> extends EventDispatcher<E> {
|
|
|
119
119
|
* @default new THREE.Layers()
|
|
120
120
|
*/
|
|
121
121
|
layers: Layers;
|
|
122
|
+
|
|
122
123
|
/**
|
|
123
124
|
* Object gets rendered if true.
|
|
124
125
|
* @default true
|
|
@@ -211,18 +212,41 @@ export class Object3D<E extends BaseEvent = Event> extends EventDispatcher<E> {
|
|
|
211
212
|
static DefaultMatrixAutoUpdate: boolean;
|
|
212
213
|
|
|
213
214
|
/**
|
|
214
|
-
*
|
|
215
|
+
* Applies the matrix transform to the object and updates the object's position, rotation and scale.
|
|
215
216
|
*/
|
|
216
217
|
applyMatrix4(matrix: Matrix4): void;
|
|
217
218
|
|
|
219
|
+
/**
|
|
220
|
+
* Applies the rotation represented by the quaternion to the object.
|
|
221
|
+
*/
|
|
218
222
|
applyQuaternion(quaternion: Quaternion): this;
|
|
219
223
|
|
|
224
|
+
/**
|
|
225
|
+
* axis -- A normalized vector in object space.
|
|
226
|
+
* angle -- angle in radians
|
|
227
|
+
* @param axis A normalized vector in object space.
|
|
228
|
+
* @param angle angle in radians
|
|
229
|
+
*/
|
|
220
230
|
setRotationFromAxisAngle(axis: Vector3, angle: number): void;
|
|
221
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Calls setRotationFromEuler(euler) on the .quaternion.
|
|
234
|
+
* @param euler Euler angle specifying rotation amount.
|
|
235
|
+
*/
|
|
222
236
|
setRotationFromEuler(euler: Euler): void;
|
|
223
237
|
|
|
238
|
+
/**
|
|
239
|
+
* Calls setFromRotationMatrix(m) on the .quaternion.
|
|
240
|
+
*
|
|
241
|
+
* Note that this assumes that the upper 3x3 of m is a pure rotation matrix (i.e, unscaled).
|
|
242
|
+
* @param m rotate the quaternion by the rotation component of the matrix.
|
|
243
|
+
*/
|
|
224
244
|
setRotationFromMatrix(m: Matrix4): void;
|
|
225
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Copy the given quaternion into .quaternion.
|
|
248
|
+
* @param q normalized Quaternion
|
|
249
|
+
*/
|
|
226
250
|
setRotationFromQuaternion(q: Quaternion): void;
|
|
227
251
|
|
|
228
252
|
/**
|
|
@@ -240,24 +264,25 @@ export class Object3D<E extends BaseEvent = Event> extends EventDispatcher<E> {
|
|
|
240
264
|
rotateOnWorldAxis(axis: Vector3, angle: number): this;
|
|
241
265
|
|
|
242
266
|
/**
|
|
243
|
-
*
|
|
244
|
-
* @param angle
|
|
267
|
+
* Rotates the object around x axis in local space.
|
|
268
|
+
* @param angle the angle to rotate in radians.
|
|
245
269
|
*/
|
|
246
270
|
rotateX(angle: number): this;
|
|
247
271
|
|
|
248
272
|
/**
|
|
249
|
-
*
|
|
250
|
-
* @param angle
|
|
273
|
+
* Rotates the object around y axis in local space.
|
|
274
|
+
* @param angle the angle to rotate in radians.
|
|
251
275
|
*/
|
|
252
276
|
rotateY(angle: number): this;
|
|
253
277
|
|
|
254
278
|
/**
|
|
255
|
-
*
|
|
256
|
-
* @param angle
|
|
279
|
+
* Rotates the object around z axis in local space.
|
|
280
|
+
* @param angle the angle to rotate in radians.
|
|
257
281
|
*/
|
|
258
282
|
rotateZ(angle: number): this;
|
|
259
283
|
|
|
260
284
|
/**
|
|
285
|
+
* Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
|
|
261
286
|
* @param axis A normalized vector in object space.
|
|
262
287
|
* @param distance The distance to translate.
|
|
263
288
|
*/
|
|
@@ -294,7 +319,9 @@ export class Object3D<E extends BaseEvent = Event> extends EventDispatcher<E> {
|
|
|
294
319
|
worldToLocal(vector: Vector3): Vector3;
|
|
295
320
|
|
|
296
321
|
/**
|
|
297
|
-
*
|
|
322
|
+
* Optionally, the x, y and z components of the world space position.
|
|
323
|
+
* Rotates the object to face a point in world space.
|
|
324
|
+
* This method does not support objects having non-uniformly-scaled parent(s).
|
|
298
325
|
* @param vector A world vector to look at.
|
|
299
326
|
*/
|
|
300
327
|
lookAt(vector: Vector3 | number, y?: number, z?: number): void;
|
|
@@ -343,7 +370,7 @@ export class Object3D<E extends BaseEvent = Event> extends EventDispatcher<E> {
|
|
|
343
370
|
getWorldScale(target: Vector3): Vector3;
|
|
344
371
|
getWorldDirection(target: Vector3): Vector3;
|
|
345
372
|
|
|
346
|
-
raycast(raycaster: Raycaster, intersects:
|
|
373
|
+
raycast(raycaster: Raycaster, intersects: Intersection[]): void;
|
|
347
374
|
|
|
348
375
|
traverse(callback: (object: Object3D) => any): void;
|
|
349
376
|
|
|
@@ -361,6 +388,11 @@ export class Object3D<E extends BaseEvent = Event> extends EventDispatcher<E> {
|
|
|
361
388
|
*/
|
|
362
389
|
updateMatrixWorld(force?: boolean): void;
|
|
363
390
|
|
|
391
|
+
/**
|
|
392
|
+
* Updates the global transform of the object.
|
|
393
|
+
* @param updateParents recursively updates global transform of ancestors.
|
|
394
|
+
* @param updateChildren recursively updates global transform of descendants.
|
|
395
|
+
*/
|
|
364
396
|
updateWorldMatrix(updateParents: boolean, updateChildren: boolean): void;
|
|
365
397
|
|
|
366
398
|
toJSON(meta?: { geometries: any; materials: any; textures: any; images: any }): any;
|
three/src/core/Raycaster.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface Face {
|
|
|
13
13
|
materialIndex: number;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export interface Intersection<TIntersected extends Object3D> {
|
|
16
|
+
export interface Intersection<TIntersected extends Object3D = Object3D> {
|
|
17
17
|
distance: number;
|
|
18
18
|
distanceToRay?: number | undefined;
|
|
19
19
|
point: Vector3;
|
|
@@ -3,7 +3,7 @@ import { Light } from './../lights/Light';
|
|
|
3
3
|
import { Vector2 } from './../math/Vector2';
|
|
4
4
|
import { Vector4 } from './../math/Vector4';
|
|
5
5
|
import { Matrix4 } from './../math/Matrix4';
|
|
6
|
-
import {
|
|
6
|
+
import { WebGLRenderTarget } from '../renderers/WebGLRenderTarget';
|
|
7
7
|
|
|
8
8
|
export class LightShadow {
|
|
9
9
|
constructor(camera: Camera);
|
|
@@ -38,12 +38,12 @@ export class LightShadow {
|
|
|
38
38
|
/**
|
|
39
39
|
* @default null
|
|
40
40
|
*/
|
|
41
|
-
map:
|
|
41
|
+
map: WebGLRenderTarget;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* @default null
|
|
45
45
|
*/
|
|
46
|
-
mapPass:
|
|
46
|
+
mapPass: WebGLRenderTarget;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* @default new THREE.Matrix4()
|
|
@@ -15,18 +15,18 @@ export interface MeshPhysicalMaterialParameters extends MeshStandardMaterialPara
|
|
|
15
15
|
ior?: number | undefined;
|
|
16
16
|
|
|
17
17
|
sheen?: number | undefined;
|
|
18
|
-
|
|
18
|
+
sheenColor?: Color | undefined;
|
|
19
19
|
sheenRoughness?: number | undefined;
|
|
20
20
|
|
|
21
21
|
transmission?: number | undefined;
|
|
22
22
|
transmissionMap?: Texture | null | undefined;
|
|
23
23
|
attenuationDistance?: number | undefined;
|
|
24
|
-
|
|
24
|
+
attenuationColor?: Color | undefined;
|
|
25
25
|
|
|
26
26
|
specularIntensity?: number | undefined;
|
|
27
|
-
|
|
27
|
+
specularColor?: Color | undefined;
|
|
28
28
|
specularIntensityMap?: Texture | null | undefined;
|
|
29
|
-
|
|
29
|
+
specularColorMap?: Texture | null | undefined;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
@@ -90,13 +90,23 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
90
90
|
/**
|
|
91
91
|
* @default Color( 0x000000 )
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
sheenColor: Color;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @default null
|
|
97
|
+
*/
|
|
98
|
+
sheenColorMap: Texture | null;
|
|
94
99
|
|
|
95
100
|
/**
|
|
96
101
|
* @default 1.0
|
|
97
102
|
*/
|
|
98
103
|
sheenRoughness: number;
|
|
99
104
|
|
|
105
|
+
/**
|
|
106
|
+
* @default null
|
|
107
|
+
*/
|
|
108
|
+
sheenRoughnessMap: Texture | null;
|
|
109
|
+
|
|
100
110
|
/**
|
|
101
111
|
* @default 0
|
|
102
112
|
*/
|
|
@@ -125,7 +135,7 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
125
135
|
/**
|
|
126
136
|
* @default Color( 1, 1, 1 )
|
|
127
137
|
*/
|
|
128
|
-
|
|
138
|
+
attenuationColor: Color;
|
|
129
139
|
|
|
130
140
|
/**
|
|
131
141
|
* @default 1.0
|
|
@@ -135,7 +145,7 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
135
145
|
/**
|
|
136
146
|
* @default Color(1, 1, 1)
|
|
137
147
|
*/
|
|
138
|
-
|
|
148
|
+
specularColor: Color;
|
|
139
149
|
|
|
140
150
|
/**
|
|
141
151
|
* @default null
|
|
@@ -145,5 +155,5 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
145
155
|
/**
|
|
146
156
|
* @default null
|
|
147
157
|
*/
|
|
148
|
-
|
|
158
|
+
specularColorMap: Texture | null;
|
|
149
159
|
}
|
three/src/math/Color.d.ts
CHANGED
|
@@ -85,28 +85,6 @@ export class Color {
|
|
|
85
85
|
*/
|
|
86
86
|
copy(color: Color): this;
|
|
87
87
|
|
|
88
|
-
/**
|
|
89
|
-
* Copies given color making conversion from gamma to linear space.
|
|
90
|
-
* @param color Color to copy.
|
|
91
|
-
*/
|
|
92
|
-
copyGammaToLinear(color: Color, gammaFactor?: number): Color;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Copies given color making conversion from linear to gamma space.
|
|
96
|
-
* @param color Color to copy.
|
|
97
|
-
*/
|
|
98
|
-
copyLinearToGamma(color: Color, gammaFactor?: number): Color;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Converts this color from gamma to linear space.
|
|
102
|
-
*/
|
|
103
|
-
convertGammaToLinear(gammaFactor?: number): Color;
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Converts this color from linear to gamma space.
|
|
107
|
-
*/
|
|
108
|
-
convertLinearToGamma(gammaFactor?: number): Color;
|
|
109
|
-
|
|
110
88
|
/**
|
|
111
89
|
* Copies given color making conversion from sRGB to linear space.
|
|
112
90
|
* @param color Color to copy.
|
three/src/objects/LOD.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export class LOD extends Object3D {
|
|
|
15
15
|
addLevel(object: Object3D, distance?: number): this;
|
|
16
16
|
getCurrentLevel(): number;
|
|
17
17
|
getObjectForDistance(distance: number): Object3D | null;
|
|
18
|
-
raycast(raycaster: Raycaster, intersects:
|
|
18
|
+
raycast(raycaster: Raycaster, intersects: Intersection[]): void;
|
|
19
19
|
update(camera: Camera): void;
|
|
20
20
|
toJSON(meta: any): any;
|
|
21
21
|
|
three/src/objects/Line.d.ts
CHANGED
|
@@ -20,6 +20,6 @@ export class Line<
|
|
|
20
20
|
morphTargetDictionary?: { [key: string]: number } | undefined;
|
|
21
21
|
|
|
22
22
|
computeLineDistances(): this;
|
|
23
|
-
raycast(raycaster: Raycaster, intersects:
|
|
23
|
+
raycast(raycaster: Raycaster, intersects: Intersection[]): void;
|
|
24
24
|
updateMorphTargets(): void;
|
|
25
25
|
}
|
three/src/objects/Mesh.d.ts
CHANGED
three/src/objects/Points.d.ts
CHANGED
three/src/objects/Sprite.d.ts
CHANGED
|
@@ -15,6 +15,6 @@ export class Sprite extends Object3D {
|
|
|
15
15
|
material: SpriteMaterial;
|
|
16
16
|
center: Vector2;
|
|
17
17
|
|
|
18
|
-
raycast(raycaster: Raycaster, intersects:
|
|
18
|
+
raycast(raycaster: Raycaster, intersects: Intersection[]): void;
|
|
19
19
|
copy(source: this): this;
|
|
20
20
|
}
|
|
@@ -6,12 +6,13 @@ import { WebGLShadowMap } from './webgl/WebGLShadowMap';
|
|
|
6
6
|
import { WebGLCapabilities } from './webgl/WebGLCapabilities';
|
|
7
7
|
import { WebGLProperties } from './webgl/WebGLProperties';
|
|
8
8
|
import { WebGLProgram } from './webgl/WebGLProgram';
|
|
9
|
-
import {
|
|
9
|
+
import { WebGLRenderLists } from './webgl/WebGLRenderLists';
|
|
10
10
|
import { WebGLState } from './webgl/WebGLState';
|
|
11
11
|
import { Vector2 } from './../math/Vector2';
|
|
12
12
|
import { Vector4 } from './../math/Vector4';
|
|
13
13
|
import { Color } from './../math/Color';
|
|
14
14
|
import { WebGLRenderTarget } from './WebGLRenderTarget';
|
|
15
|
+
import { WebGLMultipleRenderTargets } from './WebGLMultipleRenderTargets';
|
|
15
16
|
import { Object3D } from './../core/Object3D';
|
|
16
17
|
import { Material } from './../materials/Material';
|
|
17
18
|
import { ToneMapping, ShadowMapType, CullFace, TextureEncoding } from '../constants';
|
|
@@ -221,6 +222,7 @@ export class WebGLRenderer implements Renderer {
|
|
|
221
222
|
getContext(): WebGLRenderingContext;
|
|
222
223
|
getContextAttributes(): any;
|
|
223
224
|
forceContextLoss(): void;
|
|
225
|
+
forceContextRestore(): void;
|
|
224
226
|
|
|
225
227
|
/**
|
|
226
228
|
* @deprecated Use {@link WebGLCapabilities#getMaxAnisotropy .capabilities.getMaxAnisotropy()} instead.
|
|
@@ -322,8 +324,6 @@ export class WebGLRenderer implements Renderer {
|
|
|
322
324
|
resetGLState(): void;
|
|
323
325
|
dispose(): void;
|
|
324
326
|
|
|
325
|
-
renderBufferImmediate(object: Object3D, program: WebGLProgram): void;
|
|
326
|
-
|
|
327
327
|
renderBufferDirect(
|
|
328
328
|
camera: Camera,
|
|
329
329
|
scene: Scene,
|
|
@@ -375,12 +375,12 @@ export class WebGLRenderer implements Renderer {
|
|
|
375
375
|
/**
|
|
376
376
|
* Returns the current render target. If no render target is set, null is returned.
|
|
377
377
|
*/
|
|
378
|
-
getRenderTarget():
|
|
378
|
+
getRenderTarget(): WebGLRenderTarget | null;
|
|
379
379
|
|
|
380
380
|
/**
|
|
381
381
|
* @deprecated Use {@link WebGLRenderer#getRenderTarget .getRenderTarget()} instead.
|
|
382
382
|
*/
|
|
383
|
-
getCurrentRenderTarget():
|
|
383
|
+
getCurrentRenderTarget(): WebGLRenderTarget | null;
|
|
384
384
|
|
|
385
385
|
/**
|
|
386
386
|
* Sets the active render target.
|
|
@@ -389,10 +389,14 @@ export class WebGLRenderer implements Renderer {
|
|
|
389
389
|
* @param activeCubeFace Specifies the active cube side (PX 0, NX 1, PY 2, NY 3, PZ 4, NZ 5) of {@link WebGLCubeRenderTarget}.
|
|
390
390
|
* @param activeMipmapLevel Specifies the active mipmap level.
|
|
391
391
|
*/
|
|
392
|
-
setRenderTarget(
|
|
392
|
+
setRenderTarget(
|
|
393
|
+
renderTarget: WebGLRenderTarget | WebGLMultipleRenderTargets | null,
|
|
394
|
+
activeCubeFace?: number,
|
|
395
|
+
activeMipmapLevel?: number,
|
|
396
|
+
): void;
|
|
393
397
|
|
|
394
398
|
readRenderTargetPixels(
|
|
395
|
-
renderTarget:
|
|
399
|
+
renderTarget: WebGLRenderTarget | WebGLMultipleRenderTargets,
|
|
396
400
|
x: number,
|
|
397
401
|
y: number,
|
|
398
402
|
width: number,
|
|
@@ -449,11 +453,6 @@ export class WebGLRenderer implements Renderer {
|
|
|
449
453
|
*/
|
|
450
454
|
resetState(): void;
|
|
451
455
|
|
|
452
|
-
/**
|
|
453
|
-
* @deprecated
|
|
454
|
-
*/
|
|
455
|
-
gammaFactor: number;
|
|
456
|
-
|
|
457
456
|
/**
|
|
458
457
|
* @deprecated Use {@link WebGLRenderer#xr .xr} instead.
|
|
459
458
|
*/
|
|
@@ -7,9 +7,6 @@ import { Camera } from './../../cameras/Camera';
|
|
|
7
7
|
import { BufferGeometry } from '../../core/BufferGeometry';
|
|
8
8
|
import { WebGLProperties } from './WebGLProperties';
|
|
9
9
|
|
|
10
|
-
// tslint:disable-next-line:no-empty-interface
|
|
11
|
-
export interface RenderTarget {} // not defined in the code, used in LightShadow and WebGRenderer classes
|
|
12
|
-
|
|
13
10
|
export interface RenderItem {
|
|
14
11
|
id: number;
|
|
15
12
|
object: Object3D;
|
three/src/textures/Texture.d.ts
CHANGED
|
@@ -158,6 +158,12 @@ export class Texture extends EventDispatcher {
|
|
|
158
158
|
*/
|
|
159
159
|
isRenderTargetTexture: boolean;
|
|
160
160
|
|
|
161
|
+
/**
|
|
162
|
+
* An object that can be used to store custom data about the Material. It should not hold references to functions as these will not be cloned.
|
|
163
|
+
* @default {}
|
|
164
|
+
*/
|
|
165
|
+
userData: any;
|
|
166
|
+
|
|
161
167
|
/**
|
|
162
168
|
* @default 0
|
|
163
169
|
*/
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Camera, EventDispatcher } from '../../../src/Three';
|
|
2
|
-
|
|
3
|
-
export class DeviceOrientationControls extends EventDispatcher {
|
|
4
|
-
constructor(object: Camera);
|
|
5
|
-
|
|
6
|
-
object: Camera;
|
|
7
|
-
|
|
8
|
-
// API
|
|
9
|
-
|
|
10
|
-
alphaOffset: number;
|
|
11
|
-
deviceOrientation: any;
|
|
12
|
-
enabled: boolean;
|
|
13
|
-
screenOrientation: number;
|
|
14
|
-
|
|
15
|
-
connect(): void;
|
|
16
|
-
disconnect(): void;
|
|
17
|
-
dispose(): void;
|
|
18
|
-
update(): void;
|
|
19
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export default class Frustum {
|
|
2
|
-
constructor(data: any);
|
|
3
|
-
vertices: {
|
|
4
|
-
near: any[];
|
|
5
|
-
far: any[];
|
|
6
|
-
};
|
|
7
|
-
setFromProjectionMatrix(
|
|
8
|
-
projectionMatrix: any,
|
|
9
|
-
maxFar: any,
|
|
10
|
-
): {
|
|
11
|
-
near: any[];
|
|
12
|
-
far: any[];
|
|
13
|
-
};
|
|
14
|
-
split(breaks: any, target: any): void;
|
|
15
|
-
toSpace(cameraMatrix: any, target: any): void;
|
|
16
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Object3D } from './../../core/Object3D';
|
|
2
|
-
import { Material } from './../../materials/Material';
|
|
3
|
-
|
|
4
|
-
// Extras / Objects /////////////////////////////////////////////////////////////////////
|
|
5
|
-
|
|
6
|
-
export class ImmediateRenderObject extends Object3D {
|
|
7
|
-
constructor(material: Material);
|
|
8
|
-
|
|
9
|
-
readonly isImmediateRenderObject: true;
|
|
10
|
-
|
|
11
|
-
material: Material;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @default false
|
|
15
|
-
*/
|
|
16
|
-
hasPositions: boolean;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
|
-
hasNormals: boolean;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @default false
|
|
25
|
-
*/
|
|
26
|
-
hasColors: boolean;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
hasUvs: boolean;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @default null
|
|
35
|
-
*/
|
|
36
|
-
positionArray: null | Float32Array;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @default null
|
|
40
|
-
*/
|
|
41
|
-
normalArray: null | Float32Array;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @default null
|
|
45
|
-
*/
|
|
46
|
-
colorArray: null | Float32Array;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @default null
|
|
50
|
-
*/
|
|
51
|
-
uvArray: null | Float32Array;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @default 0
|
|
55
|
-
*/
|
|
56
|
-
count: number;
|
|
57
|
-
|
|
58
|
-
render(renderCallback: () => void): void;
|
|
59
|
-
}
|