UNPKG

1.61 kBTypeScriptView Raw
1import { DepthPackingStrategies } from "../constants.js";
2import { Texture } from "../textures/Texture.js";
3import { Material, MaterialParameters } from "./Material.js";
4
5export interface MeshDepthMaterialParameters extends MaterialParameters {
6 map?: Texture | null | undefined;
7 alphaMap?: Texture | null | undefined;
8 depthPacking?: DepthPackingStrategies | undefined;
9 displacementMap?: Texture | null | undefined;
10 displacementScale?: number | undefined;
11 displacementBias?: number | undefined;
12 wireframe?: boolean | undefined;
13 wireframeLinewidth?: number | undefined;
14}
15
16export class MeshDepthMaterial extends Material {
17 constructor(parameters?: MeshDepthMaterialParameters);
18 /**
19 * Read-only flag to check if a given object is of type {@link MeshDepthMaterial}.
20 * @remarks This is a _constant_ value
21 * @defaultValue `true`
22 */
23 readonly isMeshDepthMaterial: true;
24
25 /**
26 * @default null
27 */
28 map: Texture | null;
29
30 /**
31 * @default null
32 */
33 alphaMap: Texture | null;
34
35 /**
36 * @default THREE.BasicDepthPacking
37 */
38 depthPacking: DepthPackingStrategies;
39
40 /**
41 * @default null
42 */
43 displacementMap: Texture | null;
44
45 /**
46 * @default 1
47 */
48 displacementScale: number;
49
50 /**
51 * @default 0
52 */
53 displacementBias: number;
54
55 /**
56 * @default false
57 */
58 wireframe: boolean;
59
60 /**
61 * @default 1
62 */
63 wireframeLinewidth: number;
64
65 /**
66 * @default false
67 */
68 fog: boolean;
69
70 setValues(parameters: MeshDepthMaterialParameters): void;
71}