forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTexture.d.ts
67 lines (61 loc) · 1.55 KB
/
Texture.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { Vector2, Vector } from './../math/Vector2';
import { EventDispatcher } from './../core/EventDispatcher';
import {
Mapping,
Wrapping,
TextureFilter,
PixelFormat,
PixelFormatGPU,
TextureDataType,
TextureEncoding
} from '../constants';
// Textures /////////////////////////////////////////////////////////////////////
export let TextureIdCount: number;
export class Texture extends EventDispatcher {
constructor(
image?: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement,
mapping?: Mapping,
wrapS?: Wrapping,
wrapT?: Wrapping,
magFilter?: TextureFilter,
minFilter?: TextureFilter,
format?: PixelFormat,
type?: TextureDataType,
anisotropy?: number,
encoding?: TextureEncoding
);
id: number;
uuid: string;
name: string;
sourceFile: string;
image: any; // HTMLImageElement or ImageData or { width: number, height: number } in some children;
mipmaps: ImageData[];
mapping: Mapping;
wrapS: Wrapping;
wrapT: Wrapping;
magFilter: TextureFilter;
minFilter: TextureFilter;
anisotropy: number;
format: PixelFormat;
internalFormat: PixelFormatGPU | null;
type: TextureDataType;
offset: Vector2;
repeat: Vector2;
center: Vector2;
rotation: number;
generateMipmaps: boolean;
premultiplyAlpha: boolean;
flipY: boolean;
unpackAlignment: number;
encoding: TextureEncoding;
version: number;
needsUpdate: boolean;
onUpdate: () => void;
static DEFAULT_IMAGE: any;
static DEFAULT_MAPPING: any;
clone(): this;
copy( source: Texture ): this;
toJSON( meta: any ): any;
dispose(): void;
transformUv( uv: Vector2 ): Vector2;
}