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