UNPKG

1.42 kBTypeScriptView Raw
1import { Color, ColorRepresentation } from "../math/Color.js";
2import { Texture } from "../textures/Texture.js";
3import { Material, MaterialParameters } from "./Material.js";
4
5export interface SpriteMaterialParameters extends MaterialParameters {
6 color?: ColorRepresentation | undefined;
7 map?: Texture | null | undefined;
8 alphaMap?: Texture | null | undefined;
9 rotation?: number | undefined;
10 sizeAttenuation?: boolean | undefined;
11 fog?: boolean | undefined;
12}
13
14export class SpriteMaterial extends Material {
15 constructor(parameters?: SpriteMaterialParameters);
16 /**
17 * Read-only flag to check if a given object is of type {@link SpriteMaterial}.
18 * @remarks This is a _constant_ value
19 * @defaultValue `true`
20 */
21 readonly isSpriteMaterial: true;
22
23 /**
24 * @default new THREE.Color( 0xffffff )
25 */
26 color: Color;
27
28 /**
29 * @default null
30 */
31 map: Texture | null;
32
33 /**
34 * @default null
35 */
36 alphaMap: Texture | null;
37
38 /**
39 * @default 0
40 */
41 rotation: number;
42
43 /**
44 * @default true
45 */
46 sizeAttenuation: boolean;
47
48 /**
49 * @default true
50 */
51 transparent: boolean;
52
53 /**
54 * Whether the material is affected by fog. Default is true.
55 * @default fog
56 */
57 fog: boolean;
58
59 setValues(parameters: SpriteMaterialParameters): void;
60 copy(source: SpriteMaterial): this;
61}