@types/three 0.136.1 → 0.139.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/{WebGL.d.ts → capabilities/WebGL.d.ts} +3 -1
- three/examples/jsm/controls/OrbitControls.d.ts +4 -1
- three/examples/jsm/curves/CurveExtras.d.ts +52 -54
- three/examples/jsm/exporters/EXRExporter.d.ts +21 -0
- three/examples/jsm/geometries/ConvexGeometry.d.ts +1 -1
- three/examples/jsm/helpers/OctreeHelper.d.ts +14 -0
- three/examples/jsm/interactive/HTMLMesh.d.ts +1 -0
- three/examples/jsm/loaders/GLTFLoader.d.ts +2 -9
- three/examples/jsm/loaders/LDrawLoader.d.ts +6 -0
- three/examples/jsm/loaders/LUT3dlLoader.d.ts +2 -2
- three/examples/jsm/loaders/LUTCubeLoader.d.ts +2 -2
- three/examples/jsm/loaders/VOXLoader.d.ts +2 -2
- three/examples/jsm/objects/Reflector.d.ts +1 -0
- three/examples/jsm/objects/Refractor.d.ts +1 -0
- three/examples/jsm/postprocessing/LUTPass.d.ts +3 -3
- three/examples/jsm/postprocessing/SSAARenderPass.d.ts +1 -1
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +2 -0
- three/examples/jsm/utils/LDrawUtils.d.ts +5 -0
- three/examples/jsm/utils/PackedPhongMaterial.d.ts +10 -0
- three/examples/jsm/utils/SceneUtils.d.ts +13 -13
- three/index.d.ts +1 -1
- three/package.json +3 -3
- three/src/Three.d.ts +6 -0
- three/src/animation/AnimationUtils.d.ts +1 -1
- three/src/constants.d.ts +9 -19
- three/src/core/BufferGeometry.d.ts +0 -2
- three/src/core/InstancedBufferGeometry.d.ts +0 -4
- three/src/core/Raycaster.d.ts +3 -2
- three/src/core/Uniform.d.ts +0 -1
- three/src/extras/DataUtils.d.ts +1 -0
- three/src/extras/ImageUtils.d.ts +2 -0
- three/src/extras/PMREMGenerator.d.ts +2 -2
- three/src/geometries/CapsuleGeometry.d.ts +27 -0
- three/src/geometries/Geometries.d.ts +1 -0
- three/src/materials/Material.d.ts +0 -6
- three/src/materials/MeshStandardMaterial.d.ts +0 -6
- three/src/math/Box3.d.ts +2 -2
- three/src/math/Color.d.ts +21 -9
- three/src/math/ColorManagement.d.ts +18 -0
- three/src/math/Euler.d.ts +0 -1
- three/src/math/Plane.d.ts +0 -1
- three/src/math/Vector3.d.ts +5 -0
- three/src/renderers/WebGL3DRenderTarget.d.ts +28 -0
- three/src/renderers/WebGLArrayRenderTarget.d.ts +28 -0
- three/src/renderers/WebGLMultipleRenderTargets.d.ts +9 -1
- three/src/renderers/WebGLMultisampleRenderTarget.d.ts +5 -12
- three/src/renderers/WebGLRenderTarget.d.ts +7 -2
- three/src/renderers/WebGLRenderer.d.ts +4 -5
- three/src/renderers/webgl/WebGLUtils.d.ts +3 -1
- three/src/renderers/webxr/WebXRManager.d.ts +1 -1
- three/src/scenes/Scene.d.ts +0 -15
- three/src/textures/CompressedTexture.d.ts +2 -1
- three/src/textures/CubeTexture.d.ts +1 -1
- three/src/textures/Data3DTexture.d.ts +33 -0
- three/src/textures/DataArrayTexture.d.ts +33 -0
- three/src/textures/DataTexture.d.ts +2 -1
- three/src/textures/DataTexture2DArray.d.ts +5 -32
- three/src/textures/DataTexture3D.d.ts +5 -32
- three/src/textures/DepthTexture.d.ts +2 -1
- three/src/textures/Source.d.ts +39 -0
- three/src/textures/Texture.d.ts +30 -3
- three/src/textures/VideoTexture.d.ts +1 -1
- three/examples/jsm/loaders/VRMLoader.d.ts +0 -19
- three/examples/jsm/nodes/Nodes.d.ts +0 -106
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +0 -29
- three/examples/jsm/nodes/accessors/ColorsNode.d.ts +0 -10
- three/examples/jsm/nodes/accessors/LightNode.d.ts +0 -12
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +0 -13
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +0 -15
- three/examples/jsm/nodes/accessors/ReflectNode.d.ts +0 -12
- three/examples/jsm/nodes/accessors/ResolutionNode.d.ts +0 -14
- three/examples/jsm/nodes/accessors/ScreenUVNode.d.ts +0 -11
- three/examples/jsm/nodes/accessors/UVNode.d.ts +0 -10
- three/examples/jsm/nodes/core/AttributeNode.d.ts +0 -13
- three/examples/jsm/nodes/core/ConstNode.d.ts +0 -22
- three/examples/jsm/nodes/core/ExpressionNode.d.ts +0 -5
- three/examples/jsm/nodes/core/FunctionCallNode.d.ts +0 -17
- three/examples/jsm/nodes/core/FunctionNode.d.ts +0 -28
- three/examples/jsm/nodes/core/InputNode.d.ts +0 -12
- three/examples/jsm/nodes/core/Node.d.ts +0 -34
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +0 -149
- three/examples/jsm/nodes/core/NodeFrame.d.ts +0 -17
- three/examples/jsm/nodes/core/NodeLib.d.ts +0 -22
- three/examples/jsm/nodes/core/NodeUniform.d.ts +0 -17
- three/examples/jsm/nodes/core/NodeUtils.d.ts +0 -7
- three/examples/jsm/nodes/core/StructNode.d.ts +0 -19
- three/examples/jsm/nodes/core/TempNode.d.ts +0 -23
- three/examples/jsm/nodes/core/VarNode.d.ts +0 -12
- three/examples/jsm/nodes/effects/BlurNode.d.ts +0 -31
- three/examples/jsm/nodes/effects/ColorAdjustmentNode.d.ts +0 -27
- three/examples/jsm/nodes/effects/LuminanceNode.d.ts +0 -18
- three/examples/jsm/nodes/inputs/BoolNode.d.ts +0 -19
- three/examples/jsm/nodes/inputs/ColorNode.d.ts +0 -21
- three/examples/jsm/nodes/inputs/CubeTextureNode.d.ts +0 -17
- three/examples/jsm/nodes/inputs/FloatNode.d.ts +0 -19
- three/examples/jsm/nodes/inputs/IntNode.d.ts +0 -19
- three/examples/jsm/nodes/inputs/Matrix3Node.d.ts +0 -22
- three/examples/jsm/nodes/inputs/Matrix4Node.d.ts +0 -22
- three/examples/jsm/nodes/inputs/PropertyNode.d.ts +0 -10
- three/examples/jsm/nodes/inputs/RTTNode.d.ts +0 -27
- three/examples/jsm/nodes/inputs/ReflectorNode.d.ts +0 -21
- three/examples/jsm/nodes/inputs/ScreenNode.d.ts +0 -11
- three/examples/jsm/nodes/inputs/TextureNode.d.ts +0 -20
- three/examples/jsm/nodes/inputs/Vector2Node.d.ts +0 -21
- three/examples/jsm/nodes/inputs/Vector3Node.d.ts +0 -21
- three/examples/jsm/nodes/inputs/Vector4Node.d.ts +0 -21
- three/examples/jsm/nodes/materials/BasicNodeMaterial.d.ts +0 -11
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +0 -21
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +0 -28
- three/examples/jsm/nodes/materials/PhongNodeMaterial.d.ts +0 -21
- three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +0 -12
- three/examples/jsm/nodes/materials/StandardNodeMaterial.d.ts +0 -25
- three/examples/jsm/nodes/materials/nodes/BasicNode.d.ts +0 -15
- three/examples/jsm/nodes/materials/nodes/MeshStandardNode.d.ts +0 -25
- three/examples/jsm/nodes/materials/nodes/PhongNode.d.ts +0 -14
- three/examples/jsm/nodes/materials/nodes/RawNode.d.ts +0 -10
- three/examples/jsm/nodes/materials/nodes/SpriteNode.d.ts +0 -13
- three/examples/jsm/nodes/materials/nodes/StandardNode.d.ts +0 -15
- three/examples/jsm/nodes/math/CondNode.d.ts +0 -26
- three/examples/jsm/nodes/math/MathNode.d.ts +0 -57
- three/examples/jsm/nodes/math/OperatorNode.d.ts +0 -17
- three/examples/jsm/nodes/misc/BumpMapNode.d.ts +0 -21
- three/examples/jsm/nodes/misc/NormalMapNode.d.ts +0 -19
- three/examples/jsm/nodes/misc/TextureCubeNode.d.ts +0 -21
- three/examples/jsm/nodes/misc/TextureCubeUVNode.d.ts +0 -18
- three/examples/jsm/nodes/postprocessing/NodePass.d.ts +0 -15
- three/examples/jsm/nodes/postprocessing/NodePostProcessing.d.ts +0 -26
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +0 -17
- three/examples/jsm/nodes/procedural/NoiseNode.d.ts +0 -17
- three/examples/jsm/nodes/utils/BypassNode.d.ts +0 -11
- three/examples/jsm/nodes/utils/ColorSpaceNode.d.ts +0 -55
- three/examples/jsm/nodes/utils/JoinNode.d.ts +0 -15
- three/examples/jsm/nodes/utils/MaxMIPLevelNode.d.ts +0 -11
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +0 -17
- three/examples/jsm/nodes/utils/SubSlot.d.ts +0 -9
- three/examples/jsm/nodes/utils/SwitchNode.d.ts +0 -11
- three/examples/jsm/nodes/utils/TimerNode.d.ts +0 -19
- three/examples/jsm/nodes/utils/UVTransformNode.d.ts +0 -15
- three/examples/jsm/nodes/utils/VelocityNode.d.ts +0 -28
- three/examples/jsm/objects/ReflectorRTT.d.ts +0 -6
- three/examples/jsm/postprocessing/SSRrPass.d.ts +0 -121
- three/examples/jsm/utils/RoughnessMipmapper.d.ts +0 -7
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: Sat, 26 Mar 2022 21:01:43 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `THREE`
|
|
14
14
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
declare namespace WEBGL {
|
|
2
2
|
function isWebGLAvailable(): boolean;
|
|
3
3
|
function isWebGL2Available(): boolean;
|
|
4
4
|
function getWebGLErrorMessage(): HTMLElement;
|
|
5
5
|
function getWebGL2ErrorMessage(): HTMLElement;
|
|
6
6
|
function getErrorMessage(version: number): HTMLElement;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
export default WEBGL;
|
|
@@ -42,11 +42,14 @@ export class OrbitControls {
|
|
|
42
42
|
autoRotate: boolean;
|
|
43
43
|
autoRotateSpeed: number;
|
|
44
44
|
|
|
45
|
-
enableKeys: boolean;
|
|
46
45
|
keys: { LEFT: string; UP: string; RIGHT: string; BOTTOM: string };
|
|
47
46
|
mouseButtons: { LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE };
|
|
48
47
|
touches: { ONE: TOUCH; TWO: TOUCH };
|
|
49
48
|
|
|
49
|
+
target0: Vector3;
|
|
50
|
+
position0: Vector3;
|
|
51
|
+
zoomO: number;
|
|
52
|
+
|
|
50
53
|
update(): boolean;
|
|
51
54
|
|
|
52
55
|
listenToKeyEvents(domElement: HTMLElement): void;
|
|
@@ -1,70 +1,68 @@
|
|
|
1
1
|
import { Curve, Vector3 } from '../../../src/Three';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
3
|
+
export class GrannyKnot extends Curve<Vector3> {
|
|
4
|
+
constructor();
|
|
5
|
+
}
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
export class HeartCurve extends Curve<Vector3> {
|
|
8
|
+
constructor(scale?: number);
|
|
9
|
+
scale: number;
|
|
10
|
+
}
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
export class VivianiCurve extends Curve<Vector3> {
|
|
13
|
+
constructor(scale?: number);
|
|
14
|
+
scale: number;
|
|
15
|
+
}
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
export class KnotCurve extends Curve<Vector3> {
|
|
18
|
+
constructor();
|
|
19
|
+
}
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
export class HelixCurve extends Curve<Vector3> {
|
|
22
|
+
constructor();
|
|
23
|
+
}
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
export class TrefoilKnot extends Curve<Vector3> {
|
|
26
|
+
constructor(scale?: number);
|
|
27
|
+
scale: number;
|
|
28
|
+
}
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
export class TorusKnot extends Curve<Vector3> {
|
|
31
|
+
constructor(scale?: number);
|
|
32
|
+
scale: number;
|
|
33
|
+
}
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
export class CinquefoilKnot extends Curve<Vector3> {
|
|
36
|
+
constructor(scale?: number);
|
|
37
|
+
scale: number;
|
|
38
|
+
}
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
export class TrefoilPolynomialKnot extends Curve<Vector3> {
|
|
41
|
+
constructor(scale?: number);
|
|
42
|
+
scale: number;
|
|
43
|
+
}
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
export class FigureEightPolynomialKnot extends Curve<Vector3> {
|
|
46
|
+
constructor(scale?: number);
|
|
47
|
+
scale: number;
|
|
48
|
+
}
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
export class DecoratedTorusKnot4a extends Curve<Vector3> {
|
|
51
|
+
constructor(scale?: number);
|
|
52
|
+
scale: number;
|
|
53
|
+
}
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
export class DecoratedTorusKnot4b extends Curve<Vector3> {
|
|
56
|
+
constructor(scale?: number);
|
|
57
|
+
scale: number;
|
|
58
|
+
}
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
export class DecoratedTorusKnot5a extends Curve<Vector3> {
|
|
61
|
+
constructor(scale?: number);
|
|
62
|
+
scale: number;
|
|
63
|
+
}
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
65
|
+
export class DecoratedTorusKnot5c extends Curve<Vector3> {
|
|
66
|
+
constructor(scale?: number);
|
|
67
|
+
scale: number;
|
|
70
68
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author sciecode / https://github.com/sciecode
|
|
3
|
+
*
|
|
4
|
+
* EXR format references:
|
|
5
|
+
* https://www.openexr.com/documentation/openexrfilelayout.pdf
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { WebGLRenderer, WebGLRenderTarget, TextureDataType } from '../../../src/Three';
|
|
9
|
+
|
|
10
|
+
export const NO_COMPRESSION: 0;
|
|
11
|
+
export const ZIPS_COMPRESSION: 2;
|
|
12
|
+
export const ZIP_COMPRESSION: 3;
|
|
13
|
+
|
|
14
|
+
export interface EXRExporterParseOptions {
|
|
15
|
+
compression?: number;
|
|
16
|
+
type?: TextureDataType;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class EXRExporter {
|
|
20
|
+
parse(renderer: WebGLRenderer, renderTarget: WebGLRenderTarget, options?: EXRExporterParseOptions): Uint8Array;
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ColorRepresentation, LineSegments } from '../../../src/Three';
|
|
2
|
+
import { Octree } from '../math/Octree';
|
|
3
|
+
|
|
4
|
+
export class OctreeHelper extends LineSegments {
|
|
5
|
+
constructor(octree: Octree, color: ColorRepresentation);
|
|
6
|
+
|
|
7
|
+
octree: Octree;
|
|
8
|
+
color: ColorRepresentation;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @default 'OctreeHelper'
|
|
12
|
+
*/
|
|
13
|
+
type: 'OctreeHelper' | string;
|
|
14
|
+
}
|
|
@@ -101,15 +101,8 @@ export class GLTFParser {
|
|
|
101
101
|
loadBufferView: (bufferViewIndex: number) => Promise<ArrayBuffer>;
|
|
102
102
|
loadAccessor: (accessorIndex: number) => Promise<BufferAttribute | InterleavedBufferAttribute>;
|
|
103
103
|
loadTexture: (textureIndex: number) => Promise<Texture>;
|
|
104
|
-
loadTextureImage: (
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* GLTF.Image
|
|
108
|
-
* See: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/schema/image.schema.json
|
|
109
|
-
*/
|
|
110
|
-
source: { [key: string]: any },
|
|
111
|
-
loader: Loader,
|
|
112
|
-
) => Promise<Texture>;
|
|
104
|
+
loadTextureImage: (textureIndex: number, sourceIndex: number, loader: Loader) => Promise<Texture>;
|
|
105
|
+
loadImageSource: (sourceIndex: number, loader: Loader) => Promise<Texture>;
|
|
113
106
|
assignTexture: (
|
|
114
107
|
materialParams: { [key: string]: any },
|
|
115
108
|
mapName: string,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Loader, LoadingManager, Group, Material } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export class LDrawLoader extends Loader {
|
|
4
|
+
materials: Material[];
|
|
5
|
+
materialsLibrary: Record<string, Material>;
|
|
6
|
+
fileMap: Record<string, string>;
|
|
7
|
+
smoothNormals: boolean;
|
|
8
|
+
|
|
4
9
|
constructor(manager?: LoadingManager);
|
|
5
10
|
|
|
6
11
|
load(
|
|
@@ -10,6 +15,7 @@ export class LDrawLoader extends Loader {
|
|
|
10
15
|
onError?: (event: ErrorEvent) => void,
|
|
11
16
|
): void;
|
|
12
17
|
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Group>;
|
|
18
|
+
preloadMaterials(url: string): Promise<void>;
|
|
13
19
|
setFileMap(fileMap: Record<string, string>): void;
|
|
14
20
|
setMaterials(materials: Material[]): void;
|
|
15
21
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Loader, LoadingManager, DataTexture,
|
|
1
|
+
import { Loader, LoadingManager, DataTexture, Data3DTexture } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export interface LUT3dlResult {
|
|
4
4
|
size: number;
|
|
5
5
|
texture: DataTexture;
|
|
6
|
-
texture3D:
|
|
6
|
+
texture3D: Data3DTexture;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export class LUT3dlLoader extends Loader {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Loader, LoadingManager, Vector3, DataTexture,
|
|
1
|
+
import { Loader, LoadingManager, Vector3, DataTexture, Data3DTexture } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export interface LUTCubeResult {
|
|
4
4
|
title: string;
|
|
@@ -6,7 +6,7 @@ export interface LUTCubeResult {
|
|
|
6
6
|
domainMin: Vector3;
|
|
7
7
|
domainMax: Vector3;
|
|
8
8
|
texture: DataTexture;
|
|
9
|
-
texture3D:
|
|
9
|
+
texture3D: Data3DTexture;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export class LUTCubeLoader extends Loader {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Data3DTexture, Mesh, Loader, LoadingManager } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export interface Chunk {
|
|
4
4
|
palette: number[];
|
|
@@ -23,6 +23,6 @@ export class VOXMesh extends Mesh {
|
|
|
23
23
|
constructor(chunk: Chunk);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export class
|
|
26
|
+
export class VOXData3DTexture extends Data3DTexture {
|
|
27
27
|
constructor(chunk: Chunk);
|
|
28
28
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { DataTexture,
|
|
1
|
+
import { DataTexture, Data3DTexture } from '../../../src/Three';
|
|
2
2
|
import { ShaderPass } from './ShaderPass';
|
|
3
3
|
|
|
4
4
|
export interface LUTPassParameters {
|
|
5
|
-
lut?: DataTexture |
|
|
5
|
+
lut?: DataTexture | Data3DTexture;
|
|
6
6
|
intensity?: number;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export class LUTPass extends ShaderPass {
|
|
10
|
-
lut?: DataTexture |
|
|
10
|
+
lut?: DataTexture | Data3DTexture;
|
|
11
11
|
intensity?: number;
|
|
12
12
|
constructor(params: LUTPassParameters);
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ import { Scene, Camera, ColorRepresentation, ShaderMaterial, WebGLRenderTarget }
|
|
|
3
3
|
import { Pass } from './Pass';
|
|
4
4
|
|
|
5
5
|
export class SSAARenderPass extends Pass {
|
|
6
|
-
constructor(scene: Scene, camera: Camera, clearColor
|
|
6
|
+
constructor(scene: Scene, camera: Camera, clearColor?: ColorRepresentation, clearAlpha?: number);
|
|
7
7
|
scene: Scene;
|
|
8
8
|
camera: Camera;
|
|
9
9
|
sampleLevel: number;
|
|
@@ -15,3 +15,5 @@ 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 computeTangents(geometry: BufferGeometry, negateSign?: boolean): BufferGeometry;
|
|
19
|
+
export function mergeGroups(geometry: BufferGeometry): BufferGeometry;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PackedPhongMaterial` inherited from THREE.MeshPhongMaterial
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} parameters
|
|
5
|
+
*/
|
|
6
|
+
import { MeshPhongMaterial, MeshPhongMaterialParameters } from '../../../src/Three';
|
|
7
|
+
|
|
8
|
+
export class PackedPhongMaterial extends MeshPhongMaterial {
|
|
9
|
+
constructor(parameters: MeshPhongMaterialParameters);
|
|
10
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { BufferGeometry, Group, InstancedMesh, Material, Object3D, Scene } from '../../../src/Three';
|
|
1
|
+
import { BufferGeometry, Group, InstancedMesh, Material, Object3D, Scene, Mesh } from '../../../src/Three';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
export function createMeshesFromInstancedMesh(instancedMesh: InstancedMesh): Group;
|
|
4
|
+
export function createMultiMaterialObject(geometry: BufferGeometry, materials: Material[]): Group;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use scene.attach( child ) instead.
|
|
7
|
+
*/
|
|
8
|
+
export function detach(child: Object3D, parent: Object3D, scene: Scene): void;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use parent.attach( child ) instead.
|
|
11
|
+
*/
|
|
12
|
+
export function attach(child: Object3D, scene: Scene, parent: Object3D): void;
|
|
13
|
+
|
|
14
|
+
export function createMeshesFromMultiMaterialMesh(mesh: Mesh): Group;
|
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.139.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": "3d3b533eda48e6d4aad35b8b2177550c7d54d7f9eef4a9c679730a92b75d3551",
|
|
29
|
+
"typeScriptVersion": "3.9"
|
|
30
30
|
}
|
three/src/Three.d.ts
CHANGED
|
@@ -181,6 +181,8 @@ export * from './renderers/WebGLMultipleRenderTargets';
|
|
|
181
181
|
export * from './renderers/WebGLRenderTarget';
|
|
182
182
|
export * from './renderers/WebGLRenderer';
|
|
183
183
|
export * from './renderers/WebGL1Renderer';
|
|
184
|
+
export * from './renderers/WebGL3DRenderTarget';
|
|
185
|
+
export * from './renderers/WebGLArrayRenderTarget';
|
|
184
186
|
export * from './renderers/shaders/ShaderLib';
|
|
185
187
|
export * from './renderers/shaders/UniformsLib';
|
|
186
188
|
export * from './renderers/shaders/UniformsUtils';
|
|
@@ -207,6 +209,7 @@ export * from './renderers/webgl/WebGLUniforms';
|
|
|
207
209
|
export * from './renderers/webxr/WebXR';
|
|
208
210
|
export * from './renderers/webxr/WebXRController';
|
|
209
211
|
export * from './renderers/webxr/WebXRManager';
|
|
212
|
+
export { WebGLUtils } from './renderers/webgl/WebGLUtils.js';
|
|
210
213
|
/**
|
|
211
214
|
* Scenes
|
|
212
215
|
*/
|
|
@@ -222,7 +225,10 @@ export * from './textures/DataTexture2DArray';
|
|
|
222
225
|
export * from './textures/DataTexture3D';
|
|
223
226
|
export * from './textures/CompressedTexture';
|
|
224
227
|
export * from './textures/CubeTexture';
|
|
228
|
+
export * from './textures/Data3DTexture';
|
|
229
|
+
export * from './textures/DataArrayTexture';
|
|
225
230
|
export * from './textures/CanvasTexture';
|
|
226
231
|
export * from './textures/DepthTexture';
|
|
227
232
|
export * from './textures/FramebufferTexture';
|
|
233
|
+
export * from './textures/Source';
|
|
228
234
|
export * from './textures/Texture';
|
|
@@ -4,7 +4,7 @@ export namespace AnimationUtils {
|
|
|
4
4
|
function arraySlice(array: any, from: number, to: number): any;
|
|
5
5
|
function convertArray(array: any, type: any, forceClone: boolean): any;
|
|
6
6
|
function isTypedArray(object: any): boolean;
|
|
7
|
-
function
|
|
7
|
+
function getKeyframeOrder(times: number[]): number[];
|
|
8
8
|
function sortedArray(values: any[], stride: number, order: number[]): any[];
|
|
9
9
|
function flattenJSON(jsonKeys: string[], times: any[], values: any[], valuePropertyName: string): void;
|
|
10
10
|
|
three/src/constants.d.ts
CHANGED
|
@@ -105,6 +105,7 @@ export const LinearToneMapping: ToneMapping;
|
|
|
105
105
|
export const ReinhardToneMapping: ToneMapping;
|
|
106
106
|
export const CineonToneMapping: ToneMapping;
|
|
107
107
|
export const ACESFilmicToneMapping: ToneMapping;
|
|
108
|
+
export const CustomToneMapping: ToneMapping;
|
|
108
109
|
|
|
109
110
|
// Mapping modes
|
|
110
111
|
export enum Mapping {}
|
|
@@ -114,7 +115,6 @@ export const CubeRefractionMapping: Mapping;
|
|
|
114
115
|
export const EquirectangularReflectionMapping: Mapping;
|
|
115
116
|
export const EquirectangularRefractionMapping: Mapping;
|
|
116
117
|
export const CubeUVReflectionMapping: Mapping;
|
|
117
|
-
export const CubeUVRefractionMapping: Mapping;
|
|
118
118
|
|
|
119
119
|
// Wrapping modes
|
|
120
120
|
export enum Wrapping {}
|
|
@@ -147,7 +147,6 @@ export const FloatType: TextureDataType;
|
|
|
147
147
|
export const HalfFloatType: TextureDataType;
|
|
148
148
|
export const UnsignedShort4444Type: TextureDataType;
|
|
149
149
|
export const UnsignedShort5551Type: TextureDataType;
|
|
150
|
-
export const UnsignedShort565Type: TextureDataType;
|
|
151
150
|
export const UnsignedInt248Type: TextureDataType;
|
|
152
151
|
|
|
153
152
|
// Pixel formats
|
|
@@ -163,8 +162,9 @@ export const RedFormat: PixelFormat;
|
|
|
163
162
|
export const RedIntegerFormat: PixelFormat;
|
|
164
163
|
export const RGFormat: PixelFormat;
|
|
165
164
|
export const RGIntegerFormat: PixelFormat;
|
|
166
|
-
export const RGBIntegerFormat: PixelFormat;
|
|
167
165
|
export const RGBAIntegerFormat: PixelFormat;
|
|
166
|
+
export const _SRGBFormat: PixelFormat; // fallback for WebGL 1
|
|
167
|
+
export const _SRGBAFormat: PixelFormat; // fallback for WebGL 1
|
|
168
168
|
|
|
169
169
|
// Internal Pixel Formats
|
|
170
170
|
export type PixelFormatGPU =
|
|
@@ -223,6 +223,7 @@ export type PixelFormatGPU =
|
|
|
223
223
|
| 'RGB10_A2'
|
|
224
224
|
| 'RGB10_A2UI'
|
|
225
225
|
| 'SRGB8_ALPHA8'
|
|
226
|
+
| 'SRGB8'
|
|
226
227
|
| 'DEPTH_COMPONENT16'
|
|
227
228
|
| 'DEPTH_COMPONENT24'
|
|
228
229
|
| 'DEPTH_COMPONENT32F'
|
|
@@ -263,20 +264,6 @@ export const RGBA_ASTC_10x8_Format: CompressedPixelFormat;
|
|
|
263
264
|
export const RGBA_ASTC_10x10_Format: CompressedPixelFormat;
|
|
264
265
|
export const RGBA_ASTC_12x10_Format: CompressedPixelFormat;
|
|
265
266
|
export const RGBA_ASTC_12x12_Format: CompressedPixelFormat;
|
|
266
|
-
export const SRGB8_ALPHA8_ASTC_4x4_Format: CompressedPixelFormat;
|
|
267
|
-
export const SRGB8_ALPHA8_ASTC_5x4_Format: CompressedPixelFormat;
|
|
268
|
-
export const SRGB8_ALPHA8_ASTC_5x5_Format: CompressedPixelFormat;
|
|
269
|
-
export const SRGB8_ALPHA8_ASTC_6x5_Format: CompressedPixelFormat;
|
|
270
|
-
export const SRGB8_ALPHA8_ASTC_6x6_Format: CompressedPixelFormat;
|
|
271
|
-
export const SRGB8_ALPHA8_ASTC_8x5_Format: CompressedPixelFormat;
|
|
272
|
-
export const SRGB8_ALPHA8_ASTC_8x6_Format: CompressedPixelFormat;
|
|
273
|
-
export const SRGB8_ALPHA8_ASTC_8x8_Format: CompressedPixelFormat;
|
|
274
|
-
export const SRGB8_ALPHA8_ASTC_10x5_Format: CompressedPixelFormat;
|
|
275
|
-
export const SRGB8_ALPHA8_ASTC_10x6_Format: CompressedPixelFormat;
|
|
276
|
-
export const SRGB8_ALPHA8_ASTC_10x8_Format: CompressedPixelFormat;
|
|
277
|
-
export const SRGB8_ALPHA8_ASTC_10x10_Format: CompressedPixelFormat;
|
|
278
|
-
export const SRGB8_ALPHA8_ASTC_12x10_Format: CompressedPixelFormat;
|
|
279
|
-
export const SRGB8_ALPHA8_ASTC_12x12_Format: CompressedPixelFormat;
|
|
280
267
|
|
|
281
268
|
// BPTC compressed texture formats
|
|
282
269
|
export const RGBA_BPTC_Format: CompressedPixelFormat;
|
|
@@ -315,8 +302,6 @@ export enum TextureEncoding {}
|
|
|
315
302
|
export const LinearEncoding: TextureEncoding;
|
|
316
303
|
export const sRGBEncoding: TextureEncoding;
|
|
317
304
|
export const LogLuvEncoding: TextureEncoding;
|
|
318
|
-
export const RGBM7Encoding: TextureEncoding;
|
|
319
|
-
export const RGBM16Encoding: TextureEncoding;
|
|
320
305
|
|
|
321
306
|
// Depth packing strategies
|
|
322
307
|
export enum DepthPackingStrategies {}
|
|
@@ -328,6 +313,11 @@ export enum NormalMapTypes {}
|
|
|
328
313
|
export const TangentSpaceNormalMap: NormalMapTypes;
|
|
329
314
|
export const ObjectSpaceNormalMap: NormalMapTypes;
|
|
330
315
|
|
|
316
|
+
export type ColorSpace = NoColorSpace | SRGBColorSpace | LinearSRGBColorSpace;
|
|
317
|
+
export type NoColorSpace = '';
|
|
318
|
+
export type SRGBColorSpace = 'srgb';
|
|
319
|
+
export type LinearSRGBColorSpace = 'srgb-linear';
|
|
320
|
+
|
|
331
321
|
// Stencil Op types
|
|
332
322
|
export enum StencilOp {}
|
|
333
323
|
export const ZeroStencilOp: StencilOp;
|
|
@@ -13,12 +13,8 @@ export class InstancedBufferGeometry extends BufferGeometry {
|
|
|
13
13
|
|
|
14
14
|
isInstancedBufferGeometry: boolean;
|
|
15
15
|
|
|
16
|
-
groups: Array<{ start: number; count: number; instances: number }>;
|
|
17
|
-
|
|
18
16
|
/**
|
|
19
17
|
* @default Infinity
|
|
20
18
|
*/
|
|
21
19
|
instanceCount: number;
|
|
22
|
-
|
|
23
|
-
addGroup(start: number, count: number, instances: number): void;
|
|
24
20
|
}
|
three/src/core/Raycaster.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export interface Intersection<TIntersected extends Object3D = Object3D> {
|
|
|
22
22
|
faceIndex?: number | undefined;
|
|
23
23
|
object: TIntersected;
|
|
24
24
|
uv?: Vector2 | undefined;
|
|
25
|
+
uv2?: Vector2 | undefined;
|
|
25
26
|
instanceId?: number | undefined;
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -94,7 +95,7 @@ export class Raycaster {
|
|
|
94
95
|
/**
|
|
95
96
|
* Checks all intersection between the ray and the object with or without the descendants. Intersections are returned sorted by distance, closest first.
|
|
96
97
|
* @param object The object to check for intersection with the ray.
|
|
97
|
-
* @param recursive If true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is
|
|
98
|
+
* @param recursive If true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is true.
|
|
98
99
|
* @param optionalTarget (optional) target to set the result. Otherwise a new Array is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
|
|
99
100
|
*/
|
|
100
101
|
intersectObject<TIntersected extends Object3D>(
|
|
@@ -108,7 +109,7 @@ export class Raycaster {
|
|
|
108
109
|
* Intersections are returned sorted by distance, closest first.
|
|
109
110
|
* Intersections are of the same form as those returned by .intersectObject.
|
|
110
111
|
* @param objects The objects to check for intersection with the ray.
|
|
111
|
-
* @param recursive If true, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects. Default is
|
|
112
|
+
* @param recursive If true, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects. Default is true.
|
|
112
113
|
* @param optionalTarget (optional) target to set the result. Otherwise a new Array is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
|
|
113
114
|
*/
|
|
114
115
|
intersectObjects<TIntersected extends Object3D>(
|
three/src/core/Uniform.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export class Uniform {
|
|
|
13
13
|
* @deprecated Use {@link Object3D#onBeforeRender object.onBeforeRender()} instead.
|
|
14
14
|
*/
|
|
15
15
|
dynamic: boolean;
|
|
16
|
-
onUpdateCallback: () => void;
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
18
|
* @deprecated Use {@link Object3D#onBeforeRender object.onBeforeRender()} instead.
|
three/src/extras/DataUtils.d.ts
CHANGED
three/src/extras/ImageUtils.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { Scene } from '../scenes/Scene';
|
|
|
7
7
|
export class PMREMGenerator {
|
|
8
8
|
constructor(renderer: WebGLRenderer);
|
|
9
9
|
fromScene(scene: Scene, sigma?: number, near?: number, far?: number): WebGLRenderTarget;
|
|
10
|
-
fromEquirectangular(equirectangular: Texture): WebGLRenderTarget;
|
|
11
|
-
fromCubemap(cubemap: CubeTexture): WebGLRenderTarget;
|
|
10
|
+
fromEquirectangular(equirectangular: Texture, renderTarget?: WebGLRenderTarget | null): WebGLRenderTarget;
|
|
11
|
+
fromCubemap(cubemap: CubeTexture, renderTarget?: WebGLRenderTarget | null): WebGLRenderTarget;
|
|
12
12
|
compileCubemapShader(): void;
|
|
13
13
|
compileEquirectangularShader(): void;
|
|
14
14
|
dispose(): void;
|