@types/three 0.150.0 → 0.150.2
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/OrbitControls.d.ts +3 -3
- three/examples/jsm/controls/TrackballControls.d.ts +2 -2
- three/examples/jsm/controls/TransformControls.d.ts +2 -6
- three/examples/jsm/geometries/TextGeometry.d.ts +92 -15
- three/examples/jsm/loaders/EXRLoader.d.ts +3 -2
- three/examples/jsm/misc/GPUComputationRenderer.d.ts +4 -2
- three/package.json +2 -2
- three/src/Three.d.ts +0 -1
- three/src/audio/Audio.d.ts +184 -20
- three/src/audio/AudioAnalyser.d.ts +42 -4
- three/src/audio/AudioContext.d.ts +12 -1
- three/src/audio/AudioListener.d.ts +76 -8
- three/src/audio/PositionalAudio.d.ts +86 -5
- three/src/cameras/ArrayCamera.d.ts +23 -2
- three/src/cameras/Camera.d.ts +42 -13
- three/src/cameras/CubeCamera.d.ts +49 -1
- three/src/cameras/OrthographicCamera.d.ts +77 -25
- three/src/cameras/PerspectiveCamera.d.ts +132 -56
- three/src/cameras/StereoCamera.d.ts +29 -2
- three/src/constants.d.ts +431 -26
- three/src/core/BufferGeometry.d.ts +5 -3
- three/src/core/Object3D.d.ts +17 -13
- three/src/core/Raycaster.d.ts +1 -0
- three/src/geometries/BoxGeometry.d.ts +39 -16
- three/src/geometries/CapsuleGeometry.d.ts +35 -12
- three/src/geometries/CircleGeometry.d.ts +38 -12
- three/src/geometries/ConeGeometry.d.ts +45 -10
- three/src/geometries/CylinderGeometry.d.ts +41 -19
- three/src/geometries/DodecahedronGeometry.d.ts +14 -5
- three/src/geometries/EdgesGeometry.d.ts +30 -8
- three/src/geometries/ExtrudeGeometry.d.ts +93 -12
- three/src/geometries/IcosahedronGeometry.d.ts +15 -5
- three/src/geometries/LatheGeometry.d.ts +41 -12
- three/src/geometries/OctahedronGeometry.d.ts +14 -5
- three/src/geometries/PlaneGeometry.d.ts +35 -12
- three/src/geometries/PolyhedronGeometry.d.ts +41 -12
- three/src/geometries/RingGeometry.d.ts +39 -16
- three/src/geometries/ShapeGeometry.d.ts +44 -4
- three/src/geometries/SphereGeometry.d.ts +43 -21
- three/src/geometries/TetrahedronGeometry.d.ts +14 -5
- three/src/geometries/TorusGeometry.d.ts +35 -13
- three/src/geometries/TorusKnotGeometry.d.ts +39 -16
- three/src/geometries/TubeGeometry.d.ts +63 -15
- three/src/geometries/WireframeGeometry.d.ts +30 -4
- three/src/helpers/ArrowHelper.d.ts +1 -1
- three/src/helpers/BoxHelper.d.ts +1 -1
- three/src/helpers/DirectionalLightHelper.d.ts +1 -1
- three/src/helpers/GridHelper.d.ts +1 -1
- three/src/helpers/HemisphereLightHelper.d.ts +1 -2
- three/src/helpers/PointLightHelper.d.ts +1 -1
- three/src/helpers/PolarGridHelper.d.ts +1 -1
- three/src/helpers/SpotLightHelper.d.ts +1 -1
- three/src/lights/AmbientLight.d.ts +1 -1
- three/src/lights/AmbientLightProbe.d.ts +1 -1
- three/src/lights/DirectionalLight.d.ts +1 -1
- three/src/lights/HemisphereLight.d.ts +1 -2
- three/src/lights/HemisphereLightProbe.d.ts +1 -1
- three/src/lights/PointLight.d.ts +1 -1
- three/src/lights/RectAreaLight.d.ts +1 -1
- three/src/lights/SpotLight.d.ts +1 -2
- three/src/materials/LineBasicMaterial.d.ts +1 -2
- three/src/materials/MeshBasicMaterial.d.ts +1 -2
- three/src/materials/MeshLambertMaterial.d.ts +1 -2
- three/src/materials/MeshMatcapMaterial.d.ts +1 -2
- three/src/materials/MeshPhongMaterial.d.ts +1 -2
- three/src/materials/MeshStandardMaterial.d.ts +1 -2
- three/src/materials/MeshToonMaterial.d.ts +1 -2
- three/src/materials/PointsMaterial.d.ts +1 -2
- three/src/materials/ShadowMaterial.d.ts +1 -2
- three/src/materials/SpriteMaterial.d.ts +1 -2
- three/src/math/Color.d.ts +2 -3
- three/src/math/ColorManagement.d.ts +2 -2
- three/src/objects/Bone.d.ts +30 -3
- three/src/objects/Group.d.ts +37 -1
- three/src/objects/InstancedMesh.d.ts +122 -3
- three/src/objects/LOD.d.ts +62 -18
- three/src/objects/Line.d.ts +67 -4
- three/src/objects/LineLoop.d.ts +26 -1
- three/src/objects/LineSegments.d.ts +21 -9
- three/src/objects/Mesh.d.ts +60 -4
- three/src/objects/Points.d.ts +39 -8
- three/src/objects/Skeleton.d.ts +89 -3
- three/src/objects/SkinnedMesh.d.ts +122 -3
- three/src/objects/Sprite.d.ts +51 -4
- three/src/renderers/WebGLRenderTarget.d.ts +9 -3
- three/src/renderers/WebGLRenderer.d.ts +1 -2
- three/src/scenes/Fog.d.ts +60 -9
- three/src/scenes/FogExp2.d.ts +41 -7
- three/src/scenes/Scene.d.ts +45 -22
- three/src/textures/CanvasTexture.d.ts +35 -13
- three/src/textures/CompressedArrayTexture.d.ts +39 -5
- three/src/textures/CompressedTexture.d.ts +49 -20
- three/src/textures/CubeTexture.d.ts +71 -18
- three/src/textures/Data3DTexture.d.ts +74 -10
- three/src/textures/DataArrayTexture.d.ts +83 -9
- three/src/textures/DataTexture.d.ts +81 -26
- three/src/textures/DepthTexture.d.ts +71 -15
- three/src/textures/FramebufferTexture.d.ts +57 -2
- three/src/textures/Source.d.ts +23 -13
- three/src/textures/Texture.d.ts +289 -73
- three/src/textures/VideoTexture.d.ts +69 -13
- three/src/textures/types.d.ts +9 -0
- three/src/utils.d.ts +0 -6
|
@@ -1,20 +1,56 @@
|
|
|
1
1
|
import { Texture } from './Texture';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Mapping,
|
|
4
|
+
Wrapping,
|
|
5
|
+
PixelFormat,
|
|
6
|
+
TextureDataType,
|
|
7
|
+
TextureEncoding,
|
|
8
|
+
MagnificationTextureFilter,
|
|
9
|
+
MinificationTextureFilter,
|
|
10
|
+
} from '../constants';
|
|
11
|
+
import { TextureImageData } from './types';
|
|
3
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Creates a texture directly from raw data, width and height.
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // create a buffer with color data
|
|
18
|
+
* const width = 512;
|
|
19
|
+
* const height = 512;
|
|
20
|
+
* const size = width * height;
|
|
21
|
+
* const data = new Uint8Array(4 * size);
|
|
22
|
+
* const color = new THREE.Color(0xffffff);
|
|
23
|
+
* const r = Math.floor(color.r * 255);
|
|
24
|
+
* const g = Math.floor(color.g * 255);
|
|
25
|
+
* const b = Math.floor(color.b * 255);
|
|
26
|
+
* for (let i = 0; i & lt; size; i++) {
|
|
27
|
+
* const stride = i * 4;
|
|
28
|
+
* data[stride] = r;
|
|
29
|
+
* data[stride + 1] = g;
|
|
30
|
+
* data[stride + 2] = b;
|
|
31
|
+
* data[stride + 3] = 255;
|
|
32
|
+
* }
|
|
33
|
+
* // used the buffer to create a [name]
|
|
34
|
+
* const texture = new THREE.DataTexture(data, width, height);
|
|
35
|
+
* texture.needsUpdate = true;
|
|
36
|
+
* ```
|
|
37
|
+
* @see {@link https://threejs.org/docs/index.html#api/en/textures/DataTexture | Official Documentation}
|
|
38
|
+
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/textures/DataTexture.js | Source}
|
|
39
|
+
*/
|
|
4
40
|
export class DataTexture extends Texture {
|
|
5
41
|
/**
|
|
6
|
-
* @param data
|
|
7
|
-
* @param width
|
|
8
|
-
* @param height
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @param
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
42
|
+
* @param data {@link https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView | ArrayBufferView} of the texture. Default `null`.
|
|
43
|
+
* @param width Width of the texture. Default `1`.
|
|
44
|
+
* @param height Height of the texture. Default `1`.
|
|
45
|
+
* @param format See {@link Texture.format | .format}. Default {@link THREE.RGBAFormat}
|
|
46
|
+
* @param type See {@link Texture.type | .type}. Default {@link THREE.UnsignedByteType}
|
|
47
|
+
* @param mapping See {@link Texture.mapping | .mapping}. Default {@link THREE.Texture.DEFAULT_MAPPING}
|
|
48
|
+
* @param wrapS See {@link Texture.wrapS | .wrapS}. Default {@link THREE.ClampToEdgeWrapping}
|
|
49
|
+
* @param wrapT See {@link Texture.wrapT | .wrapT}. Default {@link THREE.ClampToEdgeWrapping}
|
|
50
|
+
* @param magFilter See {@link Texture.magFilter | .magFilter}. Default {@link THREE.NearestFilter}
|
|
51
|
+
* @param minFilter See {@link Texture.minFilter | .minFilter}. Default {@link THREE.NearestFilter}
|
|
52
|
+
* @param anisotropy See {@link Texture.anisotropy | .anisotropy}. Default {@link THREE.Texture.DEFAULT_ANISOTROPY}
|
|
53
|
+
* @param encoding See {@link Texture.encoding | .encoding}. Default {@link THREE.LinearEncoding}
|
|
18
54
|
*/
|
|
19
55
|
constructor(
|
|
20
56
|
data?: BufferSource | null,
|
|
@@ -25,34 +61,53 @@ export class DataTexture extends Texture {
|
|
|
25
61
|
mapping?: Mapping,
|
|
26
62
|
wrapS?: Wrapping,
|
|
27
63
|
wrapT?: Wrapping,
|
|
28
|
-
magFilter?:
|
|
29
|
-
minFilter?:
|
|
64
|
+
magFilter?: MagnificationTextureFilter,
|
|
65
|
+
minFilter?: MinificationTextureFilter,
|
|
30
66
|
anisotropy?: number,
|
|
31
67
|
encoding?: TextureEncoding,
|
|
32
68
|
);
|
|
33
69
|
|
|
34
|
-
|
|
35
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Read-only flag to check if a given object is of type {@link DataTexture}.
|
|
72
|
+
* @remarks This is a _constant_ value
|
|
73
|
+
* @defaultValue `true`
|
|
74
|
+
*/
|
|
75
|
+
readonly isDataTexture: true;
|
|
36
76
|
|
|
37
77
|
/**
|
|
38
|
-
*
|
|
78
|
+
* Overridden with a record type holding data, width and height and depth.
|
|
79
|
+
* @override
|
|
39
80
|
*/
|
|
40
|
-
|
|
81
|
+
get image(): TextureImageData;
|
|
82
|
+
set image(value: TextureImageData);
|
|
41
83
|
|
|
42
84
|
/**
|
|
43
|
-
* @
|
|
85
|
+
* @override
|
|
86
|
+
* @defaultValue {@link THREE.NearestFilter}
|
|
44
87
|
*/
|
|
45
|
-
|
|
88
|
+
magFilter: MagnificationTextureFilter;
|
|
46
89
|
|
|
47
90
|
/**
|
|
48
|
-
* @
|
|
91
|
+
* @override
|
|
92
|
+
* @defaultValue {@link THREE.NearestFilter}
|
|
49
93
|
*/
|
|
50
|
-
|
|
94
|
+
minFilter: MinificationTextureFilter;
|
|
51
95
|
|
|
52
96
|
/**
|
|
53
|
-
* @
|
|
97
|
+
* @override
|
|
98
|
+
* @defaultValue `false`
|
|
54
99
|
*/
|
|
55
|
-
|
|
100
|
+
flipY: boolean;
|
|
56
101
|
|
|
57
|
-
|
|
102
|
+
/**
|
|
103
|
+
* @override
|
|
104
|
+
* @defaultValue `false`
|
|
105
|
+
*/
|
|
106
|
+
generateMipmaps: boolean;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @override
|
|
110
|
+
* @defaultValue `1`
|
|
111
|
+
*/
|
|
112
|
+
unpackAlignment: number;
|
|
58
113
|
}
|
|
@@ -1,17 +1,35 @@
|
|
|
1
1
|
import { Texture } from './Texture';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Mapping,
|
|
4
|
+
Wrapping,
|
|
5
|
+
TextureDataType,
|
|
6
|
+
DeepTexturePixelFormat,
|
|
7
|
+
MagnificationTextureFilter,
|
|
8
|
+
MinificationTextureFilter,
|
|
9
|
+
} from '../constants';
|
|
3
10
|
|
|
11
|
+
/**
|
|
12
|
+
* This class can be used to automatically save the depth information of a rendering into a texture
|
|
13
|
+
* @remarks
|
|
14
|
+
* When using a **WebGL1** rendering context, {@link DepthTexture} requires support for the
|
|
15
|
+
* {@link https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ | WEBGL_depth_texture} extension.
|
|
16
|
+
* @see Example: {@link https://threejs.org/examples/#webgl_depth_texture | depth / texture}
|
|
17
|
+
* @see {@link https://threejs.org/docs/index.html#api/en/textures/DepthTexture | Official Documentation}
|
|
18
|
+
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/textures/DepthTexture.js | Source}
|
|
19
|
+
*/
|
|
4
20
|
export class DepthTexture extends Texture {
|
|
5
21
|
/**
|
|
6
|
-
* @
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
22
|
+
* Create a new instance of {@link DepthTexture}
|
|
23
|
+
* @param width Width of the texture.
|
|
24
|
+
* @param height Height of the texture.
|
|
25
|
+
* @param type See {@link Texture.type | .type}. Default {@link THREE.UnsignedByteType} or {@link THREE.UnsignedInt248Type}
|
|
26
|
+
* @param mapping See {@link Texture.mapping | .mapping}. Default {@link THREE.Texture.DEFAULT_MAPPING}
|
|
27
|
+
* @param wrapS See {@link Texture.wrapS | .wrapS}. Default {@link THREE.ClampToEdgeWrapping}
|
|
28
|
+
* @param wrapT See {@link Texture.wrapT | .wrapT}. Default {@link THREE.ClampToEdgeWrapping}
|
|
29
|
+
* @param magFilter See {@link Texture.magFilter | .magFilter}. Default {@link THREE.NearestFilter}
|
|
30
|
+
* @param minFilter See {@link Texture.minFilter | .minFilter}. Default {@link THREE.NearestFilter}
|
|
31
|
+
* @param anisotropy See {@link Texture.anisotropy | .anisotropy}. Default {@link THREE.Texture.DEFAULT_ANISOTROPY}
|
|
32
|
+
* @param format See {@link DepthTexture.format | .format}. Default {@link THREE.DepthFormat}
|
|
15
33
|
*/
|
|
16
34
|
constructor(
|
|
17
35
|
width: number,
|
|
@@ -20,23 +38,61 @@ export class DepthTexture extends Texture {
|
|
|
20
38
|
mapping?: Mapping,
|
|
21
39
|
wrapS?: Wrapping,
|
|
22
40
|
wrapT?: Wrapping,
|
|
23
|
-
magFilter?:
|
|
24
|
-
minFilter?:
|
|
41
|
+
magFilter?: MagnificationTextureFilter,
|
|
42
|
+
minFilter?: MinificationTextureFilter,
|
|
25
43
|
anisotropy?: number,
|
|
44
|
+
format?: DeepTexturePixelFormat,
|
|
26
45
|
);
|
|
27
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Read-only flag to check if a given object is of type {@link DepthTexture}.
|
|
49
|
+
* @remarks This is a _constant_ value
|
|
50
|
+
* @defaultValue `true`
|
|
51
|
+
*/
|
|
52
|
+
readonly isDepthTexture: true;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Overridden with a record type holding width and height.
|
|
56
|
+
* @override
|
|
57
|
+
*/
|
|
28
58
|
get image(): { width: number; height: number };
|
|
29
59
|
set image(value: { width: number; height: number });
|
|
30
60
|
|
|
31
61
|
/**
|
|
32
|
-
* @
|
|
62
|
+
* @override
|
|
63
|
+
* @defaultValue `false`
|
|
33
64
|
*/
|
|
34
65
|
flipY: boolean;
|
|
35
66
|
|
|
36
67
|
/**
|
|
37
|
-
* @
|
|
68
|
+
* @override
|
|
69
|
+
* @defaultValue {@link THREE.NearestFilter}
|
|
70
|
+
*/
|
|
71
|
+
magFilter: MagnificationTextureFilter;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @override
|
|
75
|
+
* @defaultValue {@link THREE.NearestFilter}
|
|
76
|
+
*/
|
|
77
|
+
minFilter: MinificationTextureFilter;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @override Depth textures do not use mipmaps.
|
|
81
|
+
* @defaultValue `false`
|
|
38
82
|
*/
|
|
39
83
|
generateMipmaps: boolean;
|
|
40
84
|
|
|
41
|
-
|
|
85
|
+
/**
|
|
86
|
+
* @override
|
|
87
|
+
* @see {@link Texture.format | Texture.format}
|
|
88
|
+
* @defaultValue {@link THREE.DepthFormat}.
|
|
89
|
+
*/
|
|
90
|
+
format: DeepTexturePixelFormat;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @override
|
|
94
|
+
* @defaultValue {@link THREE.UnsignedByteType} when {@link format | .format} === {@link THREE.DepthFormat}
|
|
95
|
+
* @defaultValue {@link THREE.UnsignedInt248Type} when {@link format | .format} === {@link THREE.DepthStencilFormat}
|
|
96
|
+
*/
|
|
97
|
+
type: TextureDataType;
|
|
42
98
|
}
|
|
@@ -1,8 +1,63 @@
|
|
|
1
1
|
import { Texture } from './Texture';
|
|
2
|
-
import { PixelFormat } from '../constants';
|
|
2
|
+
import { MagnificationTextureFilter, MinificationTextureFilter, PixelFormat } from '../constants';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* This class can only be used in combination with {@link THREE.WebGLRenderer.copyFramebufferToTexture | WebGLRenderer.copyFramebufferToTexture()}.
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const pixelRatio = window.devicePixelRatio;
|
|
9
|
+
* const textureSize = 128 * pixelRatio;
|
|
10
|
+
*
|
|
11
|
+
* // instantiate a framebuffer texture
|
|
12
|
+
* const frameTexture = new FramebufferTexture( textureSize, textureSize, RGBAFormat );
|
|
13
|
+
*
|
|
14
|
+
* // calculate start position for copying part of the frame data
|
|
15
|
+
* const vector = new Vector2();
|
|
16
|
+
* vector.x = ( window.innerWidth * pixelRatio / 2 ) - ( textureSize / 2 );
|
|
17
|
+
* vector.y = ( window.innerHeight * pixelRatio / 2 ) - ( textureSize / 2 );
|
|
18
|
+
*
|
|
19
|
+
* // render the scene
|
|
20
|
+
* renderer.clear();
|
|
21
|
+
* renderer.render( scene, camera );
|
|
22
|
+
*
|
|
23
|
+
* // copy part of the rendered frame into the framebuffer texture
|
|
24
|
+
* renderer.copyFramebufferToTexture( vector, frameTexture );
|
|
25
|
+
* ```
|
|
26
|
+
* @see Example: {@link https://threejs.org/examples/#webgl_framebuffer_texture | webgl_framebuffer_texture}
|
|
27
|
+
* @see {@link https://threejs.org/docs/index.html#api/en/textures/FramebufferTexture | Official Documentation}
|
|
28
|
+
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/textures/FramebufferTexture.js | Source}
|
|
29
|
+
*/
|
|
4
30
|
export class FramebufferTexture extends Texture {
|
|
31
|
+
/**
|
|
32
|
+
* Create a new instance of {@link FramebufferTexture}
|
|
33
|
+
* @param width The width of the texture.
|
|
34
|
+
* @param height The height of the texture.
|
|
35
|
+
* @param format See {@link Texture.format | .format}. Default {@link THREE.RGBAFormat}.
|
|
36
|
+
*/
|
|
37
|
+
constructor(width: number, height: number, format: PixelFormat);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Read-only flag to check if a given object is of type {@link FramebufferTexture}.
|
|
41
|
+
* @remarks This is a _constant_ value
|
|
42
|
+
* @defaultValue `true`
|
|
43
|
+
*/
|
|
5
44
|
readonly isFramebufferTexture: true;
|
|
6
45
|
|
|
7
|
-
|
|
46
|
+
/**
|
|
47
|
+
* @override
|
|
48
|
+
* @defaultValue {@link THREE.NearestFilter}
|
|
49
|
+
*/
|
|
50
|
+
magFilter: MagnificationTextureFilter;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @override
|
|
54
|
+
* @defaultValue {@link THREE.NearestFilter}
|
|
55
|
+
*/
|
|
56
|
+
minFilter: MinificationTextureFilter;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @override
|
|
60
|
+
* @defaultValue `false`
|
|
61
|
+
*/
|
|
62
|
+
generateMipmaps: boolean;
|
|
8
63
|
}
|
three/src/textures/Source.d.ts
CHANGED
|
@@ -1,39 +1,49 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Represents the data
|
|
2
|
+
* Represents the data {@link Source} of a texture.
|
|
3
|
+
* @see {@link https://threejs.org/docs/index.html#api/en/textures/Source | Official Documentation}
|
|
4
|
+
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/textures/Source.js | Source}
|
|
3
5
|
*/
|
|
4
6
|
export class Source {
|
|
5
7
|
/**
|
|
6
|
-
*
|
|
8
|
+
* Create a new instance of {@link Source}
|
|
9
|
+
* @param data The data definition of a texture. Default `null`
|
|
7
10
|
*/
|
|
8
11
|
constructor(data: any);
|
|
9
12
|
|
|
10
13
|
/**
|
|
11
|
-
*
|
|
14
|
+
* Flag to check if a given object is of type {@link Source}.
|
|
15
|
+
* @remarks This is a _constant_ value
|
|
16
|
+
* @defaultValue `true`
|
|
17
|
+
*/
|
|
18
|
+
readonly isSource: true;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The actual data of a texture.
|
|
22
|
+
* @remarks The type of this property depends on the texture that uses this instance.
|
|
12
23
|
*/
|
|
13
24
|
data: any;
|
|
14
25
|
|
|
15
26
|
/**
|
|
16
|
-
* Set this to
|
|
27
|
+
* Set this to `true` to trigger a data upload to the GPU next time the {@link Source} is used.
|
|
17
28
|
*/
|
|
18
29
|
set needsUpdate(value: boolean);
|
|
19
30
|
|
|
20
31
|
/**
|
|
21
|
-
*
|
|
22
|
-
* This gets automatically assigned
|
|
32
|
+
* {@link http://en.wikipedia.org/wiki/Universally_unique_identifier | UUID} of this object instance.
|
|
33
|
+
* @remarks This gets automatically assigned and shouldn't be edited.
|
|
23
34
|
*/
|
|
24
35
|
uuid: string;
|
|
25
36
|
|
|
26
37
|
/**
|
|
27
|
-
* This starts at
|
|
38
|
+
* This starts at `0` and counts how many times {@link needsUpdate | .needsUpdate} is set to `true`.
|
|
39
|
+
* @remarks Expects a `Integer`
|
|
40
|
+
* @defaultValue `0`
|
|
28
41
|
*/
|
|
29
42
|
version: number;
|
|
30
43
|
|
|
31
44
|
/**
|
|
32
|
-
* Convert the data
|
|
33
|
-
*
|
|
34
|
-
* @param [meta] optional object containing metadata.
|
|
45
|
+
* Convert the data {@link Source} to three.js {@link https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 | JSON Object/Scene format}.
|
|
46
|
+
* @param meta Optional object containing metadata.
|
|
35
47
|
*/
|
|
36
|
-
toJSON(meta
|
|
37
|
-
|
|
38
|
-
readonly isTexture: true;
|
|
48
|
+
toJSON(meta?: string | {}): {};
|
|
39
49
|
}
|