1 | import { Texture } from './Texture';
|
2 | import { Mapping, Wrapping, TextureFilter, PixelFormat, TextureDataType } from '../constants';
|
3 |
|
4 | export class CanvasTexture extends Texture {
|
5 | /**
|
6 | * @param canvas
|
7 | * @param [format=THREE.RGBAFormat]
|
8 | * @param [type=THREE.UnsignedByteType]
|
9 | * @param [mapping=THREE.Texture.DEFAULT_MAPPING]
|
10 | * @param [wrapS=THREE.ClampToEdgeWrapping]
|
11 | * @param [wrapT=THREE.ClampToEdgeWrapping]
|
12 | * @param [magFilter=THREE.LinearFilter]
|
13 | * @param [minFilter=THREE.LinearMipmapLinearFilter]
|
14 | * @param [anisotropy=1]
|
15 | * @param [encoding=THREE.LinearEncoding]
|
16 | */
|
17 | constructor(
|
18 | canvas: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap,
|
19 | mapping?: Mapping,
|
20 | wrapS?: Wrapping,
|
21 | wrapT?: Wrapping,
|
22 | magFilter?: TextureFilter,
|
23 | minFilter?: TextureFilter,
|
24 | format?: PixelFormat,
|
25 | type?: TextureDataType,
|
26 | anisotropy?: number,
|
27 | );
|
28 |
|
29 | readonly isCanvasTexture: true;
|
30 | }
|