UNPKG

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