@types/three 0.137.0 → 0.140.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 +1 -2
- three/examples/jsm/controls/TransformControls.d.ts +41 -1
- three/examples/jsm/curves/CurveExtras.d.ts +52 -54
- three/examples/jsm/exporters/EXRExporter.d.ts +21 -0
- three/examples/jsm/exporters/GLTFExporter.d.ts +102 -5
- 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 +8 -10
- 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 +12 -1
- three/examples/jsm/objects/Refractor.d.ts +12 -1
- three/examples/jsm/postprocessing/LUTPass.d.ts +3 -3
- three/examples/jsm/postprocessing/SSAARenderPass.d.ts +1 -1
- three/examples/jsm/postprocessing/SavePass.d.ts +1 -1
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +8 -0
- three/examples/jsm/utils/SceneUtils.d.ts +3 -1
- three/examples/jsm/utils/SkeletonUtils.d.ts +15 -11
- three/index.d.ts +6 -5
- three/package.json +3 -3
- three/src/Three.d.ts +7 -0
- three/src/animation/AnimationUtils.d.ts +1 -1
- three/src/constants.d.ts +6 -4
- three/src/core/BufferGeometry.d.ts +0 -2
- three/src/core/InstancedBufferGeometry.d.ts +0 -4
- three/src/core/Raycaster.d.ts +2 -2
- three/src/core/Uniform.d.ts +0 -1
- three/src/extras/DataUtils.d.ts +1 -0
- three/src/extras/Earcut.d.ts +4 -0
- three/src/geometries/CapsuleGeometry.d.ts +27 -0
- three/src/geometries/Geometries.d.ts +1 -0
- three/src/materials/Material.d.ts +0 -15
- three/src/materials/MeshBasicMaterial.d.ts +7 -0
- three/src/materials/MeshLambertMaterial.d.ts +7 -0
- three/src/materials/MeshMatcapMaterial.d.ts +7 -1
- three/src/materials/MeshPhongMaterial.d.ts +7 -1
- three/src/materials/MeshStandardMaterial.d.ts +7 -7
- three/src/materials/MeshToonMaterial.d.ts +7 -0
- three/src/materials/PointsMaterial.d.ts +7 -0
- three/src/materials/ShadowMaterial.d.ts +7 -0
- three/src/materials/SpriteMaterial.d.ts +7 -0
- three/src/math/Color.d.ts +22 -10
- three/src/math/ColorManagement.d.ts +18 -0
- three/src/math/Euler.d.ts +2 -1
- three/src/math/Plane.d.ts +0 -1
- three/src/math/Quaternion.d.ts +2 -0
- 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 +2 -2
- three/src/scenes/Scene.d.ts +0 -15
- 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/examples/jsm/postprocessing/SSRrPass.d.ts +0 -121
|
@@ -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 {}
|
|
@@ -22,7 +22,6 @@ export interface WebGLRenderTargetOptions {
|
|
|
22
22
|
export class WebGLRenderTarget extends EventDispatcher {
|
|
23
23
|
constructor(width: number, height: number, options?: WebGLRenderTargetOptions);
|
|
24
24
|
|
|
25
|
-
uuid: string;
|
|
26
25
|
width: number;
|
|
27
26
|
height: number;
|
|
28
27
|
depth: number;
|
|
@@ -49,6 +48,13 @@ export class WebGLRenderTarget extends EventDispatcher {
|
|
|
49
48
|
* @default null
|
|
50
49
|
*/
|
|
51
50
|
depthTexture: DepthTexture;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Defines the count of MSAA samples. Can only be used with WebGL 2. Default is **0**.
|
|
54
|
+
* @default 0
|
|
55
|
+
*/
|
|
56
|
+
samples: number;
|
|
57
|
+
|
|
52
58
|
readonly isWebGLRenderTarget: true;
|
|
53
59
|
|
|
54
60
|
/**
|
|
@@ -92,7 +98,6 @@ export class WebGLRenderTarget extends EventDispatcher {
|
|
|
92
98
|
*/
|
|
93
99
|
generateMipmaps: any;
|
|
94
100
|
|
|
95
|
-
setTexture(texture: Texture): void;
|
|
96
101
|
setSize(width: number, height: number, depth?: number): void;
|
|
97
102
|
clone(): this;
|
|
98
103
|
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 {
|
|
@@ -219,7 +218,7 @@ export class WebGLRenderer implements Renderer {
|
|
|
219
218
|
/**
|
|
220
219
|
* Return the WebGL context.
|
|
221
220
|
*/
|
|
222
|
-
getContext(): WebGLRenderingContext;
|
|
221
|
+
getContext(): WebGLRenderingContext | WebGL2RenderingContext;
|
|
223
222
|
getContextAttributes(): any;
|
|
224
223
|
forceContextLoss(): void;
|
|
225
224
|
forceContextRestore(): void;
|
|
@@ -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
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CompressedPixelFormat, TextureEncoding } from '../../constants';
|
|
1
|
+
import { CompressedPixelFormat, PixelFormat, TextureEncoding, TextureDataType } from '../../constants';
|
|
2
2
|
|
|
3
3
|
export class WebGLUtils {
|
|
4
4
|
constructor(gl: WebGLRenderingContext | WebGL2RenderingContext, extensions: any, capabilities: any);
|
|
5
5
|
|
|
6
|
-
convert(p: CompressedPixelFormat, encoding?: TextureEncoding | null):
|
|
6
|
+
convert(p: PixelFormat | CompressedPixelFormat | TextureDataType, encoding?: TextureEncoding | null): number | null;
|
|
7
7
|
}
|
three/src/scenes/Scene.d.ts
CHANGED
|
@@ -45,20 +45,5 @@ export class Scene extends Object3D {
|
|
|
45
45
|
|
|
46
46
|
readonly isScene: true;
|
|
47
47
|
|
|
48
|
-
/**
|
|
49
|
-
* Calls before rendering scene
|
|
50
|
-
*/
|
|
51
|
-
onBeforeRender: (
|
|
52
|
-
renderer: WebGLRenderer,
|
|
53
|
-
scene: Scene,
|
|
54
|
-
camera: Camera,
|
|
55
|
-
renderTarget: any, // any required for Object3D.onBeforeRender compatibility
|
|
56
|
-
) => void;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Calls after rendering scene
|
|
60
|
-
*/
|
|
61
|
-
onAfterRender: (renderer: WebGLRenderer, scene: Scene, camera: Camera) => void;
|
|
62
|
-
|
|
63
48
|
toJSON(meta?: any): any;
|
|
64
49
|
}
|
|
@@ -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
|
+
}
|
|
@@ -1,33 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TextureFilter } from '../constants';
|
|
1
|
+
import { DataArrayTexture } from './DataArrayTexture';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
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 isDataTexture2DArray: true;
|
|
33
|
-
}
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated THREE.DataTexture2DArray has been renamed to DataArrayTexture.
|
|
5
|
+
*/
|
|
6
|
+
export class DataTexture2DArray extends DataArrayTexture {}
|
|
@@ -1,33 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TextureFilter } from '../constants';
|
|
1
|
+
import { Data3DTexture } from './Data3DTexture';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
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 isDataTexture3D: true;
|
|
33
|
-
}
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated THREE.DataTexture3D has been renamed to Data3DTexture.
|
|
5
|
+
*/
|
|
6
|
+
export class DataTexture3D extends Data3DTexture {}
|
|
@@ -25,7 +25,8 @@ export class DepthTexture extends Texture {
|
|
|
25
25
|
anisotropy?: number,
|
|
26
26
|
);
|
|
27
27
|
|
|
28
|
-
image: { width: number; height: number };
|
|
28
|
+
get image(): { width: number; height: number };
|
|
29
|
+
set image(value: { width: number; height: number });
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
32
|
* @default false
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the data source of a texture.
|
|
3
|
+
*/
|
|
4
|
+
export class Source {
|
|
5
|
+
/**
|
|
6
|
+
* @param [data] The data definition of a texture. default is **null**.
|
|
7
|
+
*/
|
|
8
|
+
constructor(data: any);
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The actual data of a texture. The type of this property depends on the texture that uses this instance.
|
|
12
|
+
*/
|
|
13
|
+
data: any;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Set this to **true** to trigger a data upload to the GPU next time the source is used.
|
|
17
|
+
*/
|
|
18
|
+
set needsUpdate(value: boolean);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* [UUID](http://en.wikipedia.org/wiki/Universally_unique_identifier) of this object instance.
|
|
22
|
+
* This gets automatically assigned, so this shouldn't be edited.
|
|
23
|
+
*/
|
|
24
|
+
uuid: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* This starts at **0** and counts how many times [property:Boolean needsUpdate] is set to **true**.
|
|
28
|
+
*/
|
|
29
|
+
version: number;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Convert the data source to three.js [JSON Object/Scene format](https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4).
|
|
33
|
+
*
|
|
34
|
+
* @param [meta] optional object containing metadata.
|
|
35
|
+
*/
|
|
36
|
+
toJSON(meta: any): any;
|
|
37
|
+
|
|
38
|
+
readonly isTexture: true;
|
|
39
|
+
}
|
three/src/textures/Texture.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Vector2 } from './../math/Vector2';
|
|
2
2
|
import { Matrix3 } from './../math/Matrix3';
|
|
3
|
+
import { Source } from './Source';
|
|
3
4
|
import { EventDispatcher } from './../core/EventDispatcher';
|
|
4
5
|
import {
|
|
5
6
|
Mapping,
|
|
@@ -47,9 +48,30 @@ export class Texture extends EventDispatcher {
|
|
|
47
48
|
sourceFile: string;
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
|
-
*
|
|
51
|
+
* The data definition of a texture. A reference to the data source can be shared across textures.
|
|
52
|
+
* This is often useful in context of spritesheets where multiple textures render the same data but with different texture transformations.
|
|
51
53
|
*/
|
|
52
|
-
|
|
54
|
+
source: Source;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* An image object, typically created using the {@link TextureLoader.load} method.
|
|
58
|
+
* This can be any image (e.g., PNG, JPG, GIF, DDS) or video (e.g., MP4, OGG/OGV) type supported by three.js.
|
|
59
|
+
*
|
|
60
|
+
* To use video as a texture you need to have a playing HTML5
|
|
61
|
+
* video element as a source for your texture image and continuously update this texture
|
|
62
|
+
* as long as video is playing - the {@link VideoTexture} class handles this automatically.
|
|
63
|
+
*/
|
|
64
|
+
get image(): any;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* An image object, typically created using the {@link TextureLoader.load} method.
|
|
68
|
+
* This can be any image (e.g., PNG, JPG, GIF, DDS) or video (e.g., MP4, OGG/OGV) type supported by three.js.
|
|
69
|
+
*
|
|
70
|
+
* To use video as a texture you need to have a playing HTML5
|
|
71
|
+
* video element as a source for your texture image and continuously update this texture
|
|
72
|
+
* as long as video is playing - the {@link VideoTexture} class handles this automatically.
|
|
73
|
+
*/
|
|
74
|
+
set image(data: any);
|
|
53
75
|
|
|
54
76
|
/**
|
|
55
77
|
* @default []
|
|
@@ -158,6 +180,11 @@ export class Texture extends EventDispatcher {
|
|
|
158
180
|
*/
|
|
159
181
|
isRenderTargetTexture: boolean;
|
|
160
182
|
|
|
183
|
+
/**
|
|
184
|
+
* @default false
|
|
185
|
+
*/
|
|
186
|
+
needsPMREMUpdate: boolean;
|
|
187
|
+
|
|
161
188
|
/**
|
|
162
189
|
* 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
190
|
* @default {}
|
|
@@ -168,7 +195,7 @@ export class Texture extends EventDispatcher {
|
|
|
168
195
|
* @default 0
|
|
169
196
|
*/
|
|
170
197
|
version: number;
|
|
171
|
-
needsUpdate: boolean;
|
|
198
|
+
set needsUpdate(value: boolean);
|
|
172
199
|
readonly isTexture: true;
|
|
173
200
|
|
|
174
201
|
onUpdate: () => void;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Loader, LoadingManager } from '../../../src/Three';
|
|
2
|
-
|
|
3
|
-
import { GLTFLoader, GLTF } from './GLTFLoader';
|
|
4
|
-
import { DRACOLoader } from './DRACOLoader';
|
|
5
|
-
|
|
6
|
-
export class VRMLoader extends Loader {
|
|
7
|
-
constructor(manager?: LoadingManager);
|
|
8
|
-
gltfLoader: GLTFLoader;
|
|
9
|
-
|
|
10
|
-
load(
|
|
11
|
-
url: string,
|
|
12
|
-
onLoad: (scene: GLTF) => void,
|
|
13
|
-
onProgress?: (event: ProgressEvent) => void,
|
|
14
|
-
onError?: (event: ErrorEvent) => void,
|
|
15
|
-
): void;
|
|
16
|
-
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<GLTF>;
|
|
17
|
-
parse(gltf: GLTF, onLoad: (scene: GLTF) => void): void;
|
|
18
|
-
setDRACOLoader(dracoLoader: DRACOLoader): this;
|
|
19
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
// core
|
|
2
|
-
|
|
3
|
-
export * from './core/Node';
|
|
4
|
-
export * from './core/TempNode';
|
|
5
|
-
export * from './core/InputNode';
|
|
6
|
-
export * from './core/ConstNode';
|
|
7
|
-
export * from './core/VarNode';
|
|
8
|
-
export * from './core/StructNode';
|
|
9
|
-
export * from './core/AttributeNode';
|
|
10
|
-
export * from './core/FunctionNode';
|
|
11
|
-
export * from './core/ExpressionNode';
|
|
12
|
-
export * from './core/FunctionCallNode';
|
|
13
|
-
export * from './core/NodeLib';
|
|
14
|
-
export * from './core/NodeUtils';
|
|
15
|
-
export * from './core/NodeFrame';
|
|
16
|
-
export * from './core/NodeUniform';
|
|
17
|
-
export * from './core/NodeBuilder';
|
|
18
|
-
|
|
19
|
-
// inputs
|
|
20
|
-
|
|
21
|
-
export * from './inputs/BoolNode';
|
|
22
|
-
export * from './inputs/IntNode';
|
|
23
|
-
export * from './inputs/FloatNode';
|
|
24
|
-
export * from './inputs/Vector2Node';
|
|
25
|
-
export * from './inputs/Vector3Node';
|
|
26
|
-
export * from './inputs/Vector4Node';
|
|
27
|
-
export * from './inputs/ColorNode';
|
|
28
|
-
export * from './inputs/Matrix3Node';
|
|
29
|
-
export * from './inputs/Matrix4Node';
|
|
30
|
-
export * from './inputs/TextureNode';
|
|
31
|
-
export * from './inputs/CubeTextureNode';
|
|
32
|
-
export * from './inputs/ScreenNode';
|
|
33
|
-
export * from './inputs/ReflectorNode';
|
|
34
|
-
export * from './inputs/PropertyNode';
|
|
35
|
-
export * from './inputs/RTTNode';
|
|
36
|
-
|
|
37
|
-
// accessors
|
|
38
|
-
|
|
39
|
-
export * from './accessors/UVNode';
|
|
40
|
-
export * from './accessors/ColorsNode';
|
|
41
|
-
export * from './accessors/PositionNode';
|
|
42
|
-
export * from './accessors/NormalNode';
|
|
43
|
-
export * from './accessors/CameraNode';
|
|
44
|
-
export * from './accessors/LightNode';
|
|
45
|
-
export * from './accessors/ReflectNode';
|
|
46
|
-
export * from './accessors/ScreenUVNode';
|
|
47
|
-
export * from './accessors/ResolutionNode';
|
|
48
|
-
|
|
49
|
-
// math
|
|
50
|
-
|
|
51
|
-
export * from './math/MathNode';
|
|
52
|
-
export * from './math/OperatorNode';
|
|
53
|
-
export * from './math/CondNode';
|
|
54
|
-
|
|
55
|
-
// procedural
|
|
56
|
-
|
|
57
|
-
export * from './procedural/NoiseNode';
|
|
58
|
-
export * from './procedural/CheckerNode';
|
|
59
|
-
|
|
60
|
-
// misc
|
|
61
|
-
|
|
62
|
-
export * from './misc/TextureCubeUVNode';
|
|
63
|
-
export * from './misc/TextureCubeNode';
|
|
64
|
-
export * from './misc/NormalMapNode';
|
|
65
|
-
export * from './misc/BumpMapNode';
|
|
66
|
-
|
|
67
|
-
// utils
|
|
68
|
-
|
|
69
|
-
export * from './utils/BypassNode';
|
|
70
|
-
export * from './utils/JoinNode';
|
|
71
|
-
export * from './utils/SwitchNode';
|
|
72
|
-
export * from './utils/TimerNode';
|
|
73
|
-
export * from './utils/VelocityNode';
|
|
74
|
-
export * from './utils/UVTransformNode';
|
|
75
|
-
export * from './utils/MaxMIPLevelNode';
|
|
76
|
-
export * from './utils/SpecularMIPLevelNode';
|
|
77
|
-
export * from './utils/ColorSpaceNode';
|
|
78
|
-
|
|
79
|
-
// effects
|
|
80
|
-
|
|
81
|
-
export * from './effects/BlurNode';
|
|
82
|
-
export * from './effects/ColorAdjustmentNode';
|
|
83
|
-
export * from './effects/LuminanceNode';
|
|
84
|
-
|
|
85
|
-
// material nodes
|
|
86
|
-
|
|
87
|
-
export * from './materials/nodes/RawNode';
|
|
88
|
-
export * from './materials/nodes/BasicNode';
|
|
89
|
-
export * from './materials/nodes/SpriteNode';
|
|
90
|
-
export * from './materials/nodes/PhongNode';
|
|
91
|
-
export * from './materials/nodes/StandardNode';
|
|
92
|
-
export * from './materials/nodes/MeshStandardNode';
|
|
93
|
-
|
|
94
|
-
// materials
|
|
95
|
-
|
|
96
|
-
export * from './materials/NodeMaterial';
|
|
97
|
-
export * from './materials/BasicNodeMaterial';
|
|
98
|
-
export * from './materials/SpriteNodeMaterial';
|
|
99
|
-
export * from './materials/PhongNodeMaterial';
|
|
100
|
-
export * from './materials/StandardNodeMaterial';
|
|
101
|
-
export * from './materials/MeshStandardNodeMaterial';
|
|
102
|
-
|
|
103
|
-
// postprocessing
|
|
104
|
-
|
|
105
|
-
export * from './postprocessing/NodePostProcessing';
|
|
106
|
-
// export * from './postprocessing/NodePass';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Camera } from '../../../../src/Three';
|
|
2
|
-
|
|
3
|
-
import { NodeFrame } from '../core/NodeFrame';
|
|
4
|
-
import { TempNode } from '../core/TempNode';
|
|
5
|
-
import { FunctionNode } from '../core/FunctionNode';
|
|
6
|
-
import { FloatNode } from '../inputs/FloatNode';
|
|
7
|
-
|
|
8
|
-
export class CameraNode extends TempNode {
|
|
9
|
-
constructor(scope?: string, camera?: Camera);
|
|
10
|
-
|
|
11
|
-
scope: string;
|
|
12
|
-
near: FloatNode | undefined;
|
|
13
|
-
far: FloatNode | undefined;
|
|
14
|
-
camera: Camera | undefined;
|
|
15
|
-
updateFrame: boolean | undefined;
|
|
16
|
-
nodeType: string;
|
|
17
|
-
|
|
18
|
-
setCamera(camera: Camera): void;
|
|
19
|
-
setScope(scope: string): void;
|
|
20
|
-
onUpdateFrame(frame: NodeFrame): void;
|
|
21
|
-
copy(source: CameraNode): this;
|
|
22
|
-
|
|
23
|
-
static Nodes: {
|
|
24
|
-
depthColor: FunctionNode;
|
|
25
|
-
};
|
|
26
|
-
static POSITION: string;
|
|
27
|
-
static DEPTH: string;
|
|
28
|
-
static TO_VERTEX: string;
|
|
29
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TempNode } from '../core/TempNode';
|
|
2
|
-
|
|
3
|
-
export class NormalNode extends TempNode {
|
|
4
|
-
constructor(scope?: string);
|
|
5
|
-
|
|
6
|
-
scope: string;
|
|
7
|
-
nodeType: string;
|
|
8
|
-
|
|
9
|
-
copy(source: NormalNode): this;
|
|
10
|
-
|
|
11
|
-
static LOCAL: string;
|
|
12
|
-
static WORLD: string;
|
|
13
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TempNode } from '../core/TempNode';
|
|
2
|
-
|
|
3
|
-
export class PositionNode extends TempNode {
|
|
4
|
-
constructor(scope?: string);
|
|
5
|
-
|
|
6
|
-
scope: string;
|
|
7
|
-
nodeType: string;
|
|
8
|
-
|
|
9
|
-
copy(source: PositionNode): this;
|
|
10
|
-
|
|
11
|
-
static LOCAL: string;
|
|
12
|
-
static WORLD: string;
|
|
13
|
-
static VIEW: string;
|
|
14
|
-
static PROJECTION: string;
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Vector2 } from '../../../../src/Three';
|
|
2
|
-
|
|
3
|
-
import { NodeFrame } from '../core/NodeFrame';
|
|
4
|
-
import { Vector2Node } from '../inputs/Vector2Node';
|
|
5
|
-
|
|
6
|
-
export class ResolutionNode extends Vector2Node {
|
|
7
|
-
constructor();
|
|
8
|
-
|
|
9
|
-
size: Vector2;
|
|
10
|
-
nodeType: string;
|
|
11
|
-
|
|
12
|
-
updateFrame(frame: NodeFrame): void;
|
|
13
|
-
copy(source: ResolutionNode): this;
|
|
14
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TempNode } from '../core/TempNode';
|
|
2
|
-
import { ResolutionNode } from './ResolutionNode';
|
|
3
|
-
|
|
4
|
-
export class ScreenUVNode extends TempNode {
|
|
5
|
-
constructor(resolution?: ResolutionNode);
|
|
6
|
-
|
|
7
|
-
resolution: ResolutionNode;
|
|
8
|
-
nodeType: string;
|
|
9
|
-
|
|
10
|
-
copy(source: ScreenUVNode): this;
|
|
11
|
-
}
|