@types/three 0.137.0 → 0.138.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 +0 -1
- three/examples/jsm/curves/CurveExtras.d.ts +52 -54
- three/examples/jsm/exporters/EXRExporter.d.ts +20 -0
- 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/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/index.d.ts +1 -1
- three/package.json +3 -3
- three/src/Three.d.ts +5 -0
- three/src/constants.d.ts +0 -2
- three/src/core/Raycaster.d.ts +2 -2
- three/src/math/Euler.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 -1
- three/src/renderers/WebGLRenderer.d.ts +3 -4
- three/src/textures/CompressedTexture.d.ts +2 -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/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/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: Wed, 02 Mar 2022 16:01:44 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,7 +42,6 @@ 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 };
|
|
@@ -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,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author sciecode / https://github.com/sciecode
|
|
3
|
+
*
|
|
4
|
+
* EXR format references: https://www.openexr.com/documentation/openexrfilelayout.pdf
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { WebGLRenderer, WebGLRenderTarget, TextureDataType } from '../../../src/Three';
|
|
8
|
+
|
|
9
|
+
export const NO_COMPRESSION: 0;
|
|
10
|
+
export const ZIPS_COMPRESSION: 2;
|
|
11
|
+
export const ZIP_COMPRESSION: 3;
|
|
12
|
+
|
|
13
|
+
export interface EXRExporterParseOptions {
|
|
14
|
+
compression?: number;
|
|
15
|
+
type?: TextureDataType;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class EXRExporter {
|
|
19
|
+
parse(renderer: WebGLRenderer, renderTarget: WebGLRenderTarget, options?: EXRExporterParseOptions): Uint8Array;
|
|
20
|
+
}
|
|
@@ -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,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
|
}
|
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.138.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": "7873774346bfbeaa8143902909709f9b2a5154afc0017f590bff41e5d3e5e0b7",
|
|
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';
|
|
@@ -222,7 +224,10 @@ export * from './textures/DataTexture2DArray';
|
|
|
222
224
|
export * from './textures/DataTexture3D';
|
|
223
225
|
export * from './textures/CompressedTexture';
|
|
224
226
|
export * from './textures/CubeTexture';
|
|
227
|
+
export * from './textures/Data3DTexture';
|
|
228
|
+
export * from './textures/DataArrayTexture';
|
|
225
229
|
export * from './textures/CanvasTexture';
|
|
226
230
|
export * from './textures/DepthTexture';
|
|
227
231
|
export * from './textures/FramebufferTexture';
|
|
232
|
+
export * from './textures/Source';
|
|
228
233
|
export * from './textures/Texture';
|
three/src/constants.d.ts
CHANGED
|
@@ -302,8 +302,6 @@ export enum TextureEncoding {}
|
|
|
302
302
|
export const LinearEncoding: TextureEncoding;
|
|
303
303
|
export const sRGBEncoding: TextureEncoding;
|
|
304
304
|
export const LogLuvEncoding: TextureEncoding;
|
|
305
|
-
export const RGBM7Encoding: TextureEncoding;
|
|
306
|
-
export const RGBM16Encoding: TextureEncoding;
|
|
307
305
|
|
|
308
306
|
// Depth packing strategies
|
|
309
307
|
export enum DepthPackingStrategies {}
|
three/src/core/Raycaster.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ export class Raycaster {
|
|
|
95
95
|
/**
|
|
96
96
|
* Checks all intersection between the ray and the object with or without the descendants. Intersections are returned sorted by distance, closest first.
|
|
97
97
|
* @param object The object to check for intersection with the ray.
|
|
98
|
-
* @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.
|
|
99
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;).
|
|
100
100
|
*/
|
|
101
101
|
intersectObject<TIntersected extends Object3D>(
|
|
@@ -109,7 +109,7 @@ export class Raycaster {
|
|
|
109
109
|
* Intersections are returned sorted by distance, closest first.
|
|
110
110
|
* Intersections are of the same form as those returned by .intersectObject.
|
|
111
111
|
* @param objects The objects to check for intersection with the ray.
|
|
112
|
-
* @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.
|
|
113
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;).
|
|
114
114
|
*/
|
|
115
115
|
intersectObjects<TIntersected extends Object3D>(
|
three/src/math/Euler.d.ts
CHANGED
|
@@ -38,7 +38,6 @@ export class Euler {
|
|
|
38
38
|
equals(euler: Euler): boolean;
|
|
39
39
|
fromArray(xyzo: any[]): Euler;
|
|
40
40
|
toArray(array?: number[], offset?: number): number[];
|
|
41
|
-
toVector3(optionalResult?: Vector3): Vector3;
|
|
42
41
|
_onChange(callback: () => void): this;
|
|
43
42
|
|
|
44
43
|
static RotationOrders: string[];
|
three/src/math/Vector3.d.ts
CHANGED
|
@@ -252,6 +252,11 @@ export class Vector3 implements Vector {
|
|
|
252
252
|
setFromMatrixColumn(matrix: Matrix4, index: number): this;
|
|
253
253
|
setFromMatrix3Column(matrix: Matrix3, index: number): this;
|
|
254
254
|
|
|
255
|
+
/**
|
|
256
|
+
* Sets this vector's {@link x}, {@link y} and {@link z} components from the x, y, and z components of the specified {@link Euler Euler Angle}.
|
|
257
|
+
*/
|
|
258
|
+
setFromEuler(e: Euler): this;
|
|
259
|
+
|
|
255
260
|
/**
|
|
256
261
|
* Checks for strict equality of this vector and v.
|
|
257
262
|
*/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Data3DTexture } from '../textures/Data3DTexture';
|
|
2
|
+
import { WebGLRenderTarget } from './WebGLRenderTarget';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Represents a three-dimensional render target.
|
|
6
|
+
*/
|
|
7
|
+
export class WebGL3DRenderTarget extends WebGLRenderTarget {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new WebGL3DRenderTarget.
|
|
10
|
+
*
|
|
11
|
+
* @param width the width of the render target, in pixels.
|
|
12
|
+
* @param height the height of the render target, in pixels.
|
|
13
|
+
* @param depth the depth of the render target.
|
|
14
|
+
*/
|
|
15
|
+
constructor(width: number, height: number, depth: number);
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The depth of the render target.
|
|
19
|
+
*/
|
|
20
|
+
depth: number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The texture property is overwritten with an instance of {@link Data3DTexture}.
|
|
24
|
+
*/
|
|
25
|
+
texture: Data3DTexture;
|
|
26
|
+
|
|
27
|
+
readonly isWebGL3DRenderTarget: true;
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DataArrayTexture } from '../textures/DataArrayTexture';
|
|
2
|
+
import { WebGLRenderTarget } from './WebGLRenderTarget';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This type of render target represents an array of textures.
|
|
6
|
+
*/
|
|
7
|
+
export class WebGLArrayRenderTarget extends WebGLRenderTarget {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new WebGLArrayRenderTarget.
|
|
10
|
+
*
|
|
11
|
+
* @param width the width of the render target, in pixels.
|
|
12
|
+
* @param height the height of the render target, in pixels.
|
|
13
|
+
* @param depth the depth/layer count of the render target.
|
|
14
|
+
*/
|
|
15
|
+
constructor(width: number, height: number, depth: number);
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The depth of the render target.
|
|
19
|
+
*/
|
|
20
|
+
depth: number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The texture property is overwritten with an instance of {@link DataArrayTexture}.
|
|
24
|
+
*/
|
|
25
|
+
texture: DataArrayTexture;
|
|
26
|
+
|
|
27
|
+
readonly isWebGLArrayRenderTarget: true;
|
|
28
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventDispatcher } from '../core/EventDispatcher';
|
|
2
2
|
import { Texture } from '../textures/Texture';
|
|
3
|
+
import { WebGLRenderTargetOptions } from './WebGLRenderTarget';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* This class originall extended WebGLMultipleRenderTarget
|
|
@@ -10,7 +11,14 @@ export class WebGLMultipleRenderTargets extends EventDispatcher {
|
|
|
10
11
|
|
|
11
12
|
readonly isWebGLMultipleRenderTargets = true;
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @param width The width of the render target.
|
|
16
|
+
* @param height The height of the render target.
|
|
17
|
+
* @param count The number of render targets.
|
|
18
|
+
* @param options object that holds texture parameters for an auto-generated target texture and depthBuffer/stencilBuffer booleans.
|
|
19
|
+
* For an explanation of the texture parameters see {@link Texture}.
|
|
20
|
+
*/
|
|
21
|
+
constructor(width: number, height: number, count: number, options?: WebGLRenderTargetOptions);
|
|
14
22
|
|
|
15
23
|
setSize(width: number, height: number, depth?: number): this;
|
|
16
24
|
copy(source: WebGLMultipleRenderTargets): this;
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import { WebGLRenderTarget
|
|
1
|
+
import { WebGLRenderTarget } from './WebGLRenderTarget';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Specifies the number of samples to be used for the renderbuffer storage.However, the maximum supported size for multisampling is platform dependent and defined via gl.MAX_SAMPLES.
|
|
10
|
-
* @default 4
|
|
11
|
-
*/
|
|
12
|
-
samples: number;
|
|
13
|
-
}
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated THREE.WebGLMultisampleRenderTarget has been removed. Use a normal {@link WebGLRenderTarget render target} and set the "samples" property to greater 0 to enable multisampling.
|
|
5
|
+
*/
|
|
6
|
+
export class WebGLMultisampleRenderTarget extends WebGLRenderTarget {}
|
|
@@ -49,6 +49,13 @@ export class WebGLRenderTarget extends EventDispatcher {
|
|
|
49
49
|
* @default null
|
|
50
50
|
*/
|
|
51
51
|
depthTexture: DepthTexture;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Defines the count of MSAA samples. Can only be used with WebGL 2. Default is **0**.
|
|
55
|
+
* @default 0
|
|
56
|
+
*/
|
|
57
|
+
samples: number;
|
|
58
|
+
|
|
52
59
|
readonly isWebGLRenderTarget: true;
|
|
53
60
|
|
|
54
61
|
/**
|
|
@@ -92,7 +99,6 @@ export class WebGLRenderTarget extends EventDispatcher {
|
|
|
92
99
|
*/
|
|
93
100
|
generateMipmaps: any;
|
|
94
101
|
|
|
95
|
-
setTexture(texture: Texture): void;
|
|
96
102
|
setSize(width: number, height: number, depth?: number): void;
|
|
97
103
|
clone(): this;
|
|
98
104
|
copy(source: WebGLRenderTarget): this;
|
|
@@ -5,7 +5,6 @@ import { WebGLInfo } from './webgl/WebGLInfo';
|
|
|
5
5
|
import { WebGLShadowMap } from './webgl/WebGLShadowMap';
|
|
6
6
|
import { WebGLCapabilities } from './webgl/WebGLCapabilities';
|
|
7
7
|
import { WebGLProperties } from './webgl/WebGLProperties';
|
|
8
|
-
import { WebGLProgram } from './webgl/WebGLProgram';
|
|
9
8
|
import { WebGLRenderLists } from './webgl/WebGLRenderLists';
|
|
10
9
|
import { WebGLState } from './webgl/WebGLState';
|
|
11
10
|
import { Vector2 } from './../math/Vector2';
|
|
@@ -19,11 +18,11 @@ import { ToneMapping, ShadowMapType, CullFace, TextureEncoding } from '../consta
|
|
|
19
18
|
import { WebXRManager } from '../renderers/webxr/WebXRManager';
|
|
20
19
|
import { BufferGeometry } from './../core/BufferGeometry';
|
|
21
20
|
import { Texture } from '../textures/Texture';
|
|
22
|
-
import {
|
|
21
|
+
import { Data3DTexture } from '../textures/Data3DTexture';
|
|
23
22
|
import { XRAnimationLoopCallback } from './webxr/WebXR';
|
|
24
23
|
import { Vector3 } from '../math/Vector3';
|
|
25
24
|
import { Box3 } from '../math/Box3';
|
|
26
|
-
import {
|
|
25
|
+
import { DataArrayTexture } from '../textures/DataArrayTexture';
|
|
27
26
|
import { ColorRepresentation } from '../utils';
|
|
28
27
|
|
|
29
28
|
export interface Renderer {
|
|
@@ -437,7 +436,7 @@ export class WebGLRenderer implements Renderer {
|
|
|
437
436
|
sourceBox: Box3,
|
|
438
437
|
position: Vector3,
|
|
439
438
|
srcTexture: Texture,
|
|
440
|
-
dstTexture:
|
|
439
|
+
dstTexture: Data3DTexture | DataArrayTexture,
|
|
441
440
|
level?: number,
|
|
442
441
|
): void;
|
|
443
442
|
|
|
@@ -38,7 +38,8 @@ export class CompressedTexture extends Texture {
|
|
|
38
38
|
encoding?: TextureEncoding,
|
|
39
39
|
);
|
|
40
40
|
|
|
41
|
-
image: { width: number; height: number };
|
|
41
|
+
get image(): { width: number; height: number };
|
|
42
|
+
set image(value: { width: number; height: number });
|
|
42
43
|
|
|
43
44
|
mipmaps: ImageData[];
|
|
44
45
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Texture } from './Texture';
|
|
2
|
+
import { TextureFilter } from '../constants';
|
|
3
|
+
|
|
4
|
+
export class Data3DTexture extends Texture {
|
|
5
|
+
constructor(data: BufferSource, width: number, height: number, depth: number);
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @default THREE.NearestFilter
|
|
9
|
+
*/
|
|
10
|
+
magFilter: TextureFilter;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @default THREE.NearestFilter
|
|
14
|
+
*/
|
|
15
|
+
minFilter: TextureFilter;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @default THREE.ClampToEdgeWrapping
|
|
19
|
+
*/
|
|
20
|
+
wrapR: boolean;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
flipY: boolean;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
generateMipmaps: boolean;
|
|
31
|
+
|
|
32
|
+
readonly isData3DTexture: true;
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Texture } from './Texture';
|
|
2
|
+
import { TextureFilter } from '../constants';
|
|
3
|
+
|
|
4
|
+
export class DataArrayTexture extends Texture {
|
|
5
|
+
constructor(data?: BufferSource, width?: number, height?: number, depth?: number);
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @default THREE.NearestFilter
|
|
9
|
+
*/
|
|
10
|
+
magFilter: TextureFilter;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @default THREE.NearestFilter
|
|
14
|
+
*/
|
|
15
|
+
minFilter: TextureFilter;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @default THREE.ClampToEdgeWrapping
|
|
19
|
+
*/
|
|
20
|
+
wrapR: boolean;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
flipY: boolean;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
generateMipmaps: boolean;
|
|
31
|
+
|
|
32
|
+
readonly isDataArrayTexture: true;
|
|
33
|
+
}
|