UNPKG

1.38 kBTypeScriptView Raw
1import { Vector3 } from "../math/Vector3.js";
2import { Texture } from "../textures/Texture.js";
3import { Material, MaterialParameters } from "./Material.js";
4
5export interface MeshDistanceMaterialParameters extends MaterialParameters {
6 map?: Texture | null | undefined;
7 alphaMap?: Texture | null | undefined;
8 displacementMap?: Texture | null | undefined;
9 displacementScale?: number | undefined;
10 displacementBias?: number | undefined;
11 farDistance?: number | undefined;
12 nearDistance?: number | undefined;
13 referencePosition?: Vector3 | undefined;
14}
15
16export class MeshDistanceMaterial extends Material {
17 constructor(parameters?: MeshDistanceMaterialParameters);
18
19 /**
20 * Read-only flag to check if a given object is of type {@link MeshDistanceMaterial}.
21 * @remarks This is a _constant_ value
22 * @defaultValue `true`
23 */
24 readonly isMeshDistanceMaterial: true;
25
26 /**
27 * @default null
28 */
29 map: Texture | null;
30
31 /**
32 * @default null
33 */
34 alphaMap: Texture | null;
35
36 /**
37 * @default null
38 */
39 displacementMap: Texture | null;
40
41 /**
42 * @default 1
43 */
44 displacementScale: number;
45
46 /**
47 * @default 0
48 */
49 displacementBias: number;
50
51 /**
52 * @default false
53 */
54 fog: boolean;
55
56 setValues(parameters: MeshDistanceMaterialParameters): void;
57}