UNPKG

2.92 kBTypeScriptView Raw
1import { Combine } from "../constants.js";
2import { Color, ColorRepresentation } from "../math/Color.js";
3import { Euler } from "../math/Euler.js";
4import { Texture } from "../textures/Texture.js";
5import { Material, MaterialParameters } from "./Material.js";
6
7/**
8 * parameters is an object with one or more properties defining the material's appearance.
9 */
10export interface MeshBasicMaterialParameters extends MaterialParameters {
11 color?: ColorRepresentation | undefined;
12 opacity?: number | undefined;
13 map?: Texture | null | undefined;
14 lightMap?: Texture | null;
15 lightMapIntensity?: number | undefined;
16 aoMap?: Texture | null | undefined;
17 aoMapIntensity?: number | undefined;
18 specularMap?: Texture | null | undefined;
19 alphaMap?: Texture | null | undefined;
20 fog?: boolean | undefined;
21 envMap?: Texture | null | undefined;
22 envMapRotation?: Euler | undefined;
23 combine?: Combine | undefined;
24 reflectivity?: number | undefined;
25 refractionRatio?: number | undefined;
26 wireframe?: boolean | undefined;
27 wireframeLinewidth?: number | undefined;
28 wireframeLinecap?: string | undefined;
29 wireframeLinejoin?: string | undefined;
30}
31
32export class MeshBasicMaterial extends Material {
33 constructor(parameters?: MeshBasicMaterialParameters);
34
35 /**
36 * Read-only flag to check if a given object is of type {@link MeshBasicMaterial}.
37 * @remarks This is a _constant_ value
38 * @defaultValue `true`
39 */
40 readonly isMeshBasicMaterial: true;
41
42 /**
43 * @default new THREE.Color( 0xffffff )
44 */
45 color: Color;
46
47 /**
48 * @default null
49 */
50 map: Texture | null;
51
52 /**
53 * @default null
54 */
55 lightMap: Texture | null;
56
57 /**
58 * @default 1
59 */
60 lightMapIntensity: number;
61
62 /**
63 * @default null
64 */
65 aoMap: Texture | null;
66
67 /**
68 * @default 1
69 */
70 aoMapIntensity: number;
71
72 /**
73 * @default null
74 */
75 specularMap: Texture | null;
76
77 /**
78 * @default null
79 */
80 alphaMap: Texture | null;
81
82 /**
83 * @default null
84 */
85 envMap: Texture | null;
86
87 /**
88 * The rotation of the environment map in radians. Default is `(0,0,0)`.
89 */
90 envMapRotation: Euler;
91
92 /**
93 * @default THREE.MultiplyOperation
94 */
95 combine: Combine;
96
97 /**
98 * @default 1
99 */
100 reflectivity: number;
101
102 /**
103 * @default 0.98
104 */
105 refractionRatio: number;
106
107 /**
108 * @default false
109 */
110 wireframe: boolean;
111
112 /**
113 * @default 1
114 */
115 wireframeLinewidth: number;
116
117 /**
118 * @default 'round'
119 */
120 wireframeLinecap: string;
121
122 /**
123 * @default 'round'
124 */
125 wireframeLinejoin: string;
126
127 /**
128 * Whether the material is affected by fog. Default is true.
129 * @default fog
130 */
131 fog: boolean;
132
133 setValues(parameters: MeshBasicMaterialParameters): void;
134}