UNPKG

1.38 kBTypeScriptView Raw
1import { Texture } from './Texture';
2import { Mapping, Wrapping, TextureFilter, PixelFormat, TextureDataType, TextureEncoding } from '../constants';
3
4export class DataTexture extends Texture {
5 /**
6 * @param data
7 * @param width
8 * @param height
9 * @param [format=THREE.RGBAFormat]
10 * @param [type=THREE.UnsignedByteType]
11 * @param [mapping=THREE.Texture.DEFAULT_MAPPING]
12 * @param [wrapS=THREE.ClampToEdgeWrapping]
13 * @param [wrapT=THREE.ClampToEdgeWrapping]
14 * @param [magFilter=THREE.NearestFilter]
15 * @param [minFilter=THREE.NearestFilter]
16 * @param [anisotropy=1]
17 * @param [encoding=THREE.LinearEncoding]
18 */
19 constructor(
20 data?: BufferSource | null,
21 width?: number,
22 height?: number,
23 format?: PixelFormat,
24 type?: TextureDataType,
25 mapping?: Mapping,
26 wrapS?: Wrapping,
27 wrapT?: Wrapping,
28 magFilter?: TextureFilter,
29 minFilter?: TextureFilter,
30 anisotropy?: number,
31 encoding?: TextureEncoding,
32 );
33
34 image: ImageData;
35
36 /**
37 * @default false
38 */
39 flipY: boolean;
40
41 /**
42 * @default false
43 */
44 generateMipmaps: boolean;
45
46 /**
47 * @default 1
48 */
49 unpackAlignment: number;
50
51 /**
52 * @default THREE.DepthFormat
53 */
54 format: PixelFormat;
55
56 readonly isDataTexture: true;
57}