1 | import { Texture } from './Texture';
|
2 | import { Mapping, Wrapping, TextureFilter, PixelFormat, TextureDataType, TextureEncoding } from '../constants';
|
3 |
|
4 | export class DataTexture extends Texture {
|
5 | |
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
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 | }
|