UNPKG

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