@babylonjs/loaders 8.28.1 → 8.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OBJ/solidParser.d.ts +8 -7
- package/OBJ/solidParser.js +95 -53
- package/OBJ/solidParser.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.d.ts +1 -1
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.js +15 -10
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +44 -28
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_clearcoat_anisotropy.d.ts +42 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat_anisotropy.js +66 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat_anisotropy.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat_color.d.ts +42 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat_color.js +62 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat_color.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat_darkening.d.ts +43 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat_darkening.js +62 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat_darkening.js.map +1 -0
- package/glTF/2.0/Extensions/{EXT_materials_diffuse_roughness.d.ts → KHR_materials_diffuse_roughness.d.ts} +5 -5
- package/glTF/2.0/Extensions/{EXT_materials_diffuse_roughness.js → KHR_materials_diffuse_roughness.js} +8 -18
- package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js +6 -31
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_dispersion.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_dispersion.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +5 -9
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_ior.js +3 -10
- package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js +13 -11
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_sheen.js +11 -22
- package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_specular.js +9 -17
- package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_transmission.js +21 -32
- package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_unlit.js +7 -13
- package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_volume.js +13 -22
- package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +1 -2
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +5 -8
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
- package/glTF/2.0/Extensions/dynamic.js +3 -3
- package/glTF/2.0/Extensions/dynamic.js.map +1 -1
- package/glTF/2.0/Extensions/index.d.ts +4 -1
- package/glTF/2.0/Extensions/index.js +4 -1
- package/glTF/2.0/Extensions/index.js.map +1 -1
- package/glTF/2.0/glTFLoader.d.ts +17 -0
- package/glTF/2.0/glTFLoader.js +104 -50
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/glTF/2.0/index.d.ts +2 -0
- package/glTF/2.0/index.js +2 -0
- package/glTF/2.0/index.js.map +1 -1
- package/glTF/2.0/materialLoadingAdapter.d.ts +314 -0
- package/glTF/2.0/materialLoadingAdapter.js +2 -0
- package/glTF/2.0/materialLoadingAdapter.js.map +1 -0
- package/glTF/2.0/openPbrMaterialLoadingAdapter.d.ts +594 -0
- package/glTF/2.0/openPbrMaterialLoadingAdapter.js +902 -0
- package/glTF/2.0/openPbrMaterialLoadingAdapter.js.map +1 -0
- package/glTF/2.0/pbrMaterialLoadingAdapter.d.ts +612 -0
- package/glTF/2.0/pbrMaterialLoadingAdapter.js +973 -0
- package/glTF/2.0/pbrMaterialLoadingAdapter.js.map +1 -0
- package/glTF/glTFFileLoader.d.ts +5 -0
- package/glTF/glTFFileLoader.js +6 -0
- package/glTF/glTFFileLoader.js.map +1 -1
- package/package.json +3 -3
- package/glTF/2.0/Extensions/EXT_materials_diffuse_roughness.js.map +0 -1
@@ -0,0 +1,612 @@
|
|
1
|
+
import type { PBRMaterial } from "@babylonjs/core/Materials/PBR/pbrMaterial.js";
|
2
|
+
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
+
import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
|
4
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
5
|
+
import { Color3 } from "@babylonjs/core/Maths/math.color.js";
|
6
|
+
import type { IMaterialLoadingAdapter } from "./materialLoadingAdapter.js";
|
7
|
+
/**
|
8
|
+
* Material Loading Adapter for PBR materials that provides a unified OpenPBR-like interface.
|
9
|
+
*/
|
10
|
+
export declare class PBRMaterialLoadingAdapter implements IMaterialLoadingAdapter {
|
11
|
+
private _material;
|
12
|
+
/**
|
13
|
+
* Creates a new instance of the PBRMaterialLoadingAdapter.
|
14
|
+
* @param material - The PBR material to adapt.
|
15
|
+
*/
|
16
|
+
constructor(material: Material);
|
17
|
+
/**
|
18
|
+
* Gets the underlying material
|
19
|
+
*/
|
20
|
+
get material(): PBRMaterial;
|
21
|
+
/**
|
22
|
+
* Whether the material should be treated as unlit
|
23
|
+
*/
|
24
|
+
get isUnlit(): boolean;
|
25
|
+
/**
|
26
|
+
* Sets whether the material should be treated as unlit
|
27
|
+
*/
|
28
|
+
set isUnlit(value: boolean);
|
29
|
+
/**
|
30
|
+
* Sets whether back face culling is enabled.
|
31
|
+
* @param value True to enable back face culling
|
32
|
+
*/
|
33
|
+
set backFaceCulling(value: boolean);
|
34
|
+
/**
|
35
|
+
* Gets whether back face culling is enabled.
|
36
|
+
* @returns True if back face culling is enabled
|
37
|
+
*/
|
38
|
+
get backFaceCulling(): boolean;
|
39
|
+
/**
|
40
|
+
* Sets whether two-sided lighting is enabled.
|
41
|
+
* @param value True to enable two-sided lighting
|
42
|
+
*/
|
43
|
+
set twoSidedLighting(value: boolean);
|
44
|
+
/**
|
45
|
+
* Gets whether two-sided lighting is enabled.
|
46
|
+
* @returns True if two-sided lighting is enabled
|
47
|
+
*/
|
48
|
+
get twoSidedLighting(): boolean;
|
49
|
+
/**
|
50
|
+
* Sets the alpha cutoff value for alpha testing.
|
51
|
+
* @param value The alpha cutoff threshold (0-1)
|
52
|
+
*/
|
53
|
+
set alphaCutOff(value: number);
|
54
|
+
/**
|
55
|
+
* Gets the alpha cutoff value.
|
56
|
+
* @returns The alpha cutoff threshold (0-1)
|
57
|
+
*/
|
58
|
+
get alphaCutOff(): number;
|
59
|
+
/**
|
60
|
+
* Sets whether to use alpha from the albedo texture.
|
61
|
+
* @param value True to use alpha from albedo texture
|
62
|
+
*/
|
63
|
+
set useAlphaFromBaseColorTexture(value: boolean);
|
64
|
+
/**
|
65
|
+
* Gets whether alpha is used from the albedo texture.
|
66
|
+
* @returns True if using alpha from albedo texture
|
67
|
+
*/
|
68
|
+
get useAlphaFromBaseColorTexture(): boolean;
|
69
|
+
/**
|
70
|
+
* Gets whether the transparency is treated as alpha coverage.
|
71
|
+
*/
|
72
|
+
get transparencyAsAlphaCoverage(): boolean;
|
73
|
+
/**
|
74
|
+
* Sets/Gets whether the transparency is treated as alpha coverage
|
75
|
+
*/
|
76
|
+
set transparencyAsAlphaCoverage(value: boolean);
|
77
|
+
/**
|
78
|
+
* Sets the base color of the material (mapped to PBR albedoColor).
|
79
|
+
* @param value The base color as a Color3
|
80
|
+
*/
|
81
|
+
set baseColor(value: Color3);
|
82
|
+
/**
|
83
|
+
* Gets the base color of the material.
|
84
|
+
* @returns The base color as a Color3
|
85
|
+
*/
|
86
|
+
get baseColor(): Color3;
|
87
|
+
/**
|
88
|
+
* Sets the base color texture of the material (mapped to PBR albedoTexture).
|
89
|
+
* @param value The base color texture or null
|
90
|
+
*/
|
91
|
+
set baseColorTexture(value: Nullable<BaseTexture>);
|
92
|
+
/**
|
93
|
+
* Gets the base color texture of the material.
|
94
|
+
* @returns The base color texture or null
|
95
|
+
*/
|
96
|
+
get baseColorTexture(): Nullable<BaseTexture>;
|
97
|
+
/**
|
98
|
+
* Sets the base diffuse roughness of the material.
|
99
|
+
* @param value The diffuse roughness value (0-1)
|
100
|
+
*/
|
101
|
+
set baseDiffuseRoughness(value: number);
|
102
|
+
/**
|
103
|
+
* Gets the base diffuse roughness of the material.
|
104
|
+
* @returns The diffuse roughness value (0-1), defaults to 0 if not set
|
105
|
+
*/
|
106
|
+
get baseDiffuseRoughness(): number;
|
107
|
+
/**
|
108
|
+
* Sets the base diffuse roughness texture of the material.
|
109
|
+
* @param value The diffuse roughness texture or null
|
110
|
+
*/
|
111
|
+
set baseDiffuseRoughnessTexture(value: Nullable<BaseTexture>);
|
112
|
+
/**
|
113
|
+
* Gets the base diffuse roughness texture of the material.
|
114
|
+
* @returns The diffuse roughness texture or null
|
115
|
+
*/
|
116
|
+
get baseDiffuseRoughnessTexture(): Nullable<BaseTexture>;
|
117
|
+
/**
|
118
|
+
* Sets the base metalness value of the material (mapped to PBR metallic).
|
119
|
+
* @param value The metalness value (0-1)
|
120
|
+
*/
|
121
|
+
set baseMetalness(value: number);
|
122
|
+
/**
|
123
|
+
* Gets the base metalness value of the material.
|
124
|
+
* @returns The metalness value (0-1), defaults to 1 if not set
|
125
|
+
*/
|
126
|
+
get baseMetalness(): number;
|
127
|
+
/**
|
128
|
+
* Sets the base metalness texture of the material (mapped to PBR metallicTexture).
|
129
|
+
* @param value The metalness texture or null
|
130
|
+
*/
|
131
|
+
set baseMetalnessTexture(value: Nullable<BaseTexture>);
|
132
|
+
/**
|
133
|
+
* Gets the base metalness texture of the material.
|
134
|
+
* @returns The metalness texture or null
|
135
|
+
*/
|
136
|
+
get baseMetalnessTexture(): Nullable<BaseTexture>;
|
137
|
+
/**
|
138
|
+
* Sets whether to use roughness from the metallic texture's green channel.
|
139
|
+
* Also disables using roughness from the alpha channel when enabled.
|
140
|
+
* @param value True to use green channel for roughness
|
141
|
+
*/
|
142
|
+
set useRoughnessFromMetallicTextureGreen(value: boolean);
|
143
|
+
/**
|
144
|
+
* Sets whether to use metalness from the metallic texture's blue channel.
|
145
|
+
* @param value True to use blue channel for metalness
|
146
|
+
*/
|
147
|
+
set useMetallicFromMetallicTextureBlue(value: boolean);
|
148
|
+
/**
|
149
|
+
* Configures specular properties and optionally enables OpenPBR BRDF model for edge color support.
|
150
|
+
* @param enableEdgeColor Whether to enable OpenPBR BRDF models for edge color support
|
151
|
+
*/
|
152
|
+
enableSpecularEdgeColor(enableEdgeColor?: boolean): void;
|
153
|
+
/**
|
154
|
+
* Sets the specular weight (mapped to PBR metallicF0Factor).
|
155
|
+
* @param value The specular weight value
|
156
|
+
*/
|
157
|
+
set specularWeight(value: number);
|
158
|
+
/**
|
159
|
+
* Gets the specular weight.
|
160
|
+
* @returns The specular weight value, defaults to 1 if not set
|
161
|
+
*/
|
162
|
+
get specularWeight(): number;
|
163
|
+
/**
|
164
|
+
* Sets the specular weight texture (mapped to PBR metallicReflectanceTexture).
|
165
|
+
* Configures the material to use only metalness from this texture when set.
|
166
|
+
* @param value The specular weight texture or null
|
167
|
+
*/
|
168
|
+
set specularWeightTexture(value: Nullable<BaseTexture>);
|
169
|
+
/**
|
170
|
+
* Gets the specular weight texture.
|
171
|
+
* @returns The specular weight texture or null
|
172
|
+
*/
|
173
|
+
get specularWeightTexture(): Nullable<BaseTexture>;
|
174
|
+
/**
|
175
|
+
* Sets the specular color (mapped to PBR metallicReflectanceColor).
|
176
|
+
* @param value The specular color as a Color3
|
177
|
+
*/
|
178
|
+
set specularColor(value: Color3);
|
179
|
+
/**
|
180
|
+
* Gets the specular color.
|
181
|
+
* @returns The specular color as a Color3
|
182
|
+
*/
|
183
|
+
get specularColor(): Color3;
|
184
|
+
/**
|
185
|
+
* Sets the specular color texture (mapped to PBR reflectanceTexture).
|
186
|
+
* @param value The specular color texture or null
|
187
|
+
*/
|
188
|
+
set specularColorTexture(value: Nullable<BaseTexture>);
|
189
|
+
/**
|
190
|
+
* Gets the specular color texture.
|
191
|
+
* @returns The specular color texture or null
|
192
|
+
*/
|
193
|
+
get specularColorTexture(): Nullable<BaseTexture>;
|
194
|
+
/**
|
195
|
+
* Sets the specular roughness (mapped to PBR roughness).
|
196
|
+
* @param value The roughness value (0-1)
|
197
|
+
*/
|
198
|
+
set specularRoughness(value: number);
|
199
|
+
/**
|
200
|
+
* Gets the specular roughness.
|
201
|
+
* @returns The roughness value (0-1), defaults to 1 if not set
|
202
|
+
*/
|
203
|
+
get specularRoughness(): number;
|
204
|
+
/**
|
205
|
+
* Sets the specular roughness texture.
|
206
|
+
* Note: PBR uses the same texture for both metallic and roughness,
|
207
|
+
* so this only sets the texture if no base metalness texture exists.
|
208
|
+
* @param value The roughness texture or null
|
209
|
+
*/
|
210
|
+
set specularRoughnessTexture(value: Nullable<BaseTexture>);
|
211
|
+
/**
|
212
|
+
* Gets the specular roughness texture.
|
213
|
+
* @returns The roughness texture (same as metallic texture for PBR) or null
|
214
|
+
*/
|
215
|
+
get specularRoughnessTexture(): Nullable<BaseTexture>;
|
216
|
+
/**
|
217
|
+
* Sets the specular index of refraction (mapped to PBR indexOfRefraction).
|
218
|
+
* @param value The IOR value
|
219
|
+
*/
|
220
|
+
set specularIor(value: number);
|
221
|
+
/**
|
222
|
+
* Gets the specular index of refraction.
|
223
|
+
* @returns The IOR value
|
224
|
+
*/
|
225
|
+
get specularIor(): number;
|
226
|
+
/**
|
227
|
+
* Sets the emission color (mapped to PBR emissiveColor).
|
228
|
+
* @param value The emission color as a Color3
|
229
|
+
*/
|
230
|
+
set emissionColor(value: Color3);
|
231
|
+
/**
|
232
|
+
* Gets the emission color.
|
233
|
+
* @returns The emission color as a Color3
|
234
|
+
*/
|
235
|
+
get emissionColor(): Color3;
|
236
|
+
/**
|
237
|
+
* Sets the emission luminance/intensity (mapped to PBR emissiveIntensity).
|
238
|
+
* @param value The emission intensity value
|
239
|
+
*/
|
240
|
+
set emissionLuminance(value: number);
|
241
|
+
/**
|
242
|
+
* Gets the emission luminance/intensity.
|
243
|
+
* @returns The emission intensity value
|
244
|
+
*/
|
245
|
+
get emissionLuminance(): number;
|
246
|
+
/**
|
247
|
+
* Sets the emission color texture (mapped to PBR emissiveTexture).
|
248
|
+
* @param value The emission texture or null
|
249
|
+
*/
|
250
|
+
set emissionColorTexture(value: Nullable<BaseTexture>);
|
251
|
+
/**
|
252
|
+
* Gets the emission color texture.
|
253
|
+
* @returns The emission texture or null
|
254
|
+
*/
|
255
|
+
get emissionColorTexture(): Nullable<BaseTexture>;
|
256
|
+
/**
|
257
|
+
* Sets the ambient occlusion texture (mapped to PBR ambientTexture).
|
258
|
+
* Automatically enables grayscale mode when set.
|
259
|
+
* @param value The ambient occlusion texture or null
|
260
|
+
*/
|
261
|
+
set ambientOcclusionTexture(value: Nullable<BaseTexture>);
|
262
|
+
/**
|
263
|
+
* Gets the ambient occlusion texture.
|
264
|
+
* @returns The ambient occlusion texture or null
|
265
|
+
*/
|
266
|
+
get ambientOcclusionTexture(): Nullable<BaseTexture>;
|
267
|
+
/**
|
268
|
+
* Sets the ambient occlusion texture strength.
|
269
|
+
* @param value The strength value (typically 0-1)
|
270
|
+
*/
|
271
|
+
set ambientOcclusionTextureStrength(value: number);
|
272
|
+
/**
|
273
|
+
* Gets the ambient occlusion texture strength.
|
274
|
+
* @returns The strength value, defaults to 1.0 if not set
|
275
|
+
*/
|
276
|
+
get ambientOcclusionTextureStrength(): number;
|
277
|
+
/**
|
278
|
+
* Configures clear coat for PBR material.
|
279
|
+
* Enables clear coat and sets up proper configuration.
|
280
|
+
*/
|
281
|
+
configureCoat(): void;
|
282
|
+
/**
|
283
|
+
* Sets the coat weight (mapped to PBR clearCoat.intensity).
|
284
|
+
* Automatically enables clear coat.
|
285
|
+
* @param value The coat weight value (0-1)
|
286
|
+
*/
|
287
|
+
set coatWeight(value: number);
|
288
|
+
/**
|
289
|
+
* Gets the coat weight.
|
290
|
+
* @returns The coat weight value
|
291
|
+
*/
|
292
|
+
get coatWeight(): number;
|
293
|
+
/**
|
294
|
+
* Sets the coat weight texture (mapped to PBR clearCoat.texture).
|
295
|
+
* Automatically enables clear coat.
|
296
|
+
* @param value The coat weight texture or null
|
297
|
+
*/
|
298
|
+
set coatWeightTexture(value: Nullable<BaseTexture>);
|
299
|
+
/**
|
300
|
+
* Gets the coat weight texture.
|
301
|
+
* @returns The coat weight texture or null
|
302
|
+
*/
|
303
|
+
get coatWeightTexture(): Nullable<BaseTexture>;
|
304
|
+
/**
|
305
|
+
* Sets the coat color (mapped to PBR clearCoat.tintColor).
|
306
|
+
* @param value The coat tint color as a Color3
|
307
|
+
*/
|
308
|
+
set coatColor(value: Color3);
|
309
|
+
/**
|
310
|
+
* Sets the coat color texture (mapped to PBR clearCoat.tintTexture).
|
311
|
+
* @param value The coat color texture or null
|
312
|
+
*/
|
313
|
+
set coatColorTexture(value: Nullable<BaseTexture>);
|
314
|
+
/**
|
315
|
+
* Sets the coat roughness (mapped to PBR clearCoat.roughness).
|
316
|
+
* Automatically enables clear coat.
|
317
|
+
* @param value The coat roughness value (0-1)
|
318
|
+
*/
|
319
|
+
set coatRoughness(value: number);
|
320
|
+
/**
|
321
|
+
* Gets the coat roughness.
|
322
|
+
* @returns The coat roughness value, defaults to 0 if not set
|
323
|
+
*/
|
324
|
+
get coatRoughness(): number;
|
325
|
+
/**
|
326
|
+
* Sets the coat roughness texture (mapped to PBR clearCoat.textureRoughness).
|
327
|
+
* Automatically enables clear coat and disables using roughness from main texture.
|
328
|
+
* @param value The coat roughness texture or null
|
329
|
+
*/
|
330
|
+
set coatRoughnessTexture(value: Nullable<BaseTexture>);
|
331
|
+
/**
|
332
|
+
* Gets the coat roughness texture.
|
333
|
+
* @returns The coat roughness texture or null
|
334
|
+
*/
|
335
|
+
get coatRoughnessTexture(): Nullable<BaseTexture>;
|
336
|
+
/**
|
337
|
+
* Sets the coat darkening value.
|
338
|
+
* Note: PBR doesn't have a direct coat darkening property, so this is a no-op.
|
339
|
+
* @param value The coat darkening value (ignored for PBR)
|
340
|
+
*/
|
341
|
+
set coatDarkening(value: number);
|
342
|
+
/**
|
343
|
+
* Sets the coat darkening texture
|
344
|
+
* @param value The coat darkening texture or null
|
345
|
+
*/
|
346
|
+
set coatDarkeningTexture(value: Nullable<BaseTexture>);
|
347
|
+
/**
|
348
|
+
* Sets the coat roughness anisotropy.
|
349
|
+
* Note: PBR clearCoat doesn't support anisotropy yet, so this is a placeholder.
|
350
|
+
* @param value The coat anisotropy intensity value (currently ignored)
|
351
|
+
*/
|
352
|
+
set coatRoughnessAnisotropy(value: number);
|
353
|
+
/**
|
354
|
+
* Gets the coat roughness anisotropy.
|
355
|
+
* Note: PBR clearCoat doesn't support anisotropy yet, so this returns 0.
|
356
|
+
* @returns Currently returns 0 as clearCoat anisotropy is not yet available
|
357
|
+
*/
|
358
|
+
get coatRoughnessAnisotropy(): number;
|
359
|
+
/**
|
360
|
+
* Sets the coat tangent angle for anisotropy.
|
361
|
+
* Note: PBR clearCoat doesn't support anisotropy yet, so this is a placeholder.
|
362
|
+
* @param value The coat anisotropy rotation angle in radians (currently ignored)
|
363
|
+
*/
|
364
|
+
set geometryCoatTangentAngle(value: number);
|
365
|
+
/**
|
366
|
+
* Sets the coat tangent texture for anisotropy.
|
367
|
+
* Note: PBR clearCoat doesn't support anisotropy textures yet, so this is a placeholder.
|
368
|
+
* @param value The coat anisotropy texture (currently ignored)
|
369
|
+
*/
|
370
|
+
set geometryCoatTangentTexture(value: Nullable<BaseTexture>);
|
371
|
+
/**
|
372
|
+
* Gets the coat tangent texture for anisotropy.
|
373
|
+
* Note: PBR clearCoat doesn't support anisotropy textures yet, so this returns null.
|
374
|
+
* @returns Currently returns null as clearCoat anisotropy is not yet available
|
375
|
+
*/
|
376
|
+
get geometryCoatTangentTexture(): Nullable<BaseTexture>;
|
377
|
+
/**
|
378
|
+
* Sets the transmission weight (mapped to PBR subSurface.refractionIntensity).
|
379
|
+
* Enables refraction when value \> 0.
|
380
|
+
* @param value The transmission weight value (0-1)
|
381
|
+
*/
|
382
|
+
set transmissionWeight(value: number);
|
383
|
+
/**
|
384
|
+
* Gets the transmission weight.
|
385
|
+
* @returns The transmission weight value
|
386
|
+
*/
|
387
|
+
get transmissionWeight(): number;
|
388
|
+
/**
|
389
|
+
* Sets the transmission weight texture (mapped to PBR subSurface.refractionIntensityTexture).
|
390
|
+
* Automatically enables refraction and glTF-style textures.
|
391
|
+
* @param value The transmission weight texture or null
|
392
|
+
*/
|
393
|
+
set transmissionWeightTexture(value: Nullable<BaseTexture>);
|
394
|
+
/**
|
395
|
+
* Sets the attenuation distance for volume scattering.
|
396
|
+
* @param value The attenuation distance value
|
397
|
+
*/
|
398
|
+
set transmissionDepth(value: number);
|
399
|
+
/**
|
400
|
+
* Sets the attenuation color (mapped to PBR subSurface.tintColor).
|
401
|
+
* @param value The attenuation color as a Color3
|
402
|
+
*/
|
403
|
+
set transmissionColor(value: Color3);
|
404
|
+
/**
|
405
|
+
* Gets the transmission dispersion Abbe number.
|
406
|
+
* @param value The Abbe number value
|
407
|
+
*/
|
408
|
+
set transmissionDispersionAbbeNumber(value: number);
|
409
|
+
/**
|
410
|
+
* Configures transmission for thin-surface transmission (KHR_materials_transmission).
|
411
|
+
* Sets up the material for proper thin-surface transmission behavior.
|
412
|
+
*/
|
413
|
+
configureTransmission(): void;
|
414
|
+
/**
|
415
|
+
* Sets the thickness texture (mapped to PBR subSurface.thicknessTexture).
|
416
|
+
* Automatically enables refraction.
|
417
|
+
* @param value The thickness texture or null
|
418
|
+
*/
|
419
|
+
set volumeThicknessTexture(value: Nullable<BaseTexture>);
|
420
|
+
/**
|
421
|
+
* Sets the thickness factor (mapped to PBR subSurface.maximumThickness).
|
422
|
+
* Automatically enables refraction.
|
423
|
+
* @param value The thickness value
|
424
|
+
*/
|
425
|
+
set volumeThickness(value: number);
|
426
|
+
/**
|
427
|
+
* Configures subsurface properties for PBR material
|
428
|
+
*/
|
429
|
+
configureSubsurface(): void;
|
430
|
+
/**
|
431
|
+
* Sets the subsurface weight
|
432
|
+
*/
|
433
|
+
set subsurfaceWeight(value: number);
|
434
|
+
/**
|
435
|
+
* Gets the subsurface weight
|
436
|
+
* @returns The subsurface weight value
|
437
|
+
*/
|
438
|
+
get subsurfaceWeight(): number;
|
439
|
+
/**
|
440
|
+
* Sets the subsurface weight texture
|
441
|
+
*/
|
442
|
+
set subsurfaceWeightTexture(value: Nullable<BaseTexture>);
|
443
|
+
/**
|
444
|
+
* Sets the subsurface color.
|
445
|
+
* @param value The subsurface tint color as a Color3
|
446
|
+
*/
|
447
|
+
set subsurfaceColor(value: Color3);
|
448
|
+
/**
|
449
|
+
* Sets the subsurface color texture.
|
450
|
+
* @param value The subsurface tint texture or null
|
451
|
+
*/
|
452
|
+
set subsurfaceColorTexture(value: Nullable<BaseTexture>);
|
453
|
+
/**
|
454
|
+
* Configures sheen for PBR material.
|
455
|
+
* Enables sheen and sets up proper configuration.
|
456
|
+
*/
|
457
|
+
configureFuzz(): void;
|
458
|
+
/**
|
459
|
+
* Sets the sheen weight (mapped to PBR sheen.intensity).
|
460
|
+
* Automatically enables sheen.
|
461
|
+
* @param value The sheen weight value
|
462
|
+
*/
|
463
|
+
set fuzzWeight(value: number);
|
464
|
+
/**
|
465
|
+
* Sets the sheen color (mapped to PBR sheen.color).
|
466
|
+
* Automatically enables sheen.
|
467
|
+
* @param value The sheen color as a Color3
|
468
|
+
*/
|
469
|
+
set fuzzColor(value: Color3);
|
470
|
+
/**
|
471
|
+
* Sets the sheen color texture (mapped to PBR sheen.texture).
|
472
|
+
* Automatically enables sheen.
|
473
|
+
* @param value The sheen color texture or null
|
474
|
+
*/
|
475
|
+
set fuzzColorTexture(value: Nullable<BaseTexture>);
|
476
|
+
/**
|
477
|
+
* Sets the sheen roughness (mapped to PBR sheen.roughness).
|
478
|
+
* Automatically enables sheen.
|
479
|
+
* @param value The sheen roughness value (0-1)
|
480
|
+
*/
|
481
|
+
set fuzzRoughness(value: number);
|
482
|
+
/**
|
483
|
+
* Sets the sheen roughness texture (mapped to PBR sheen.textureRoughness).
|
484
|
+
* Automatically enables sheen.
|
485
|
+
* @param value The sheen roughness texture or null
|
486
|
+
*/
|
487
|
+
set fuzzRoughnessTexture(value: Nullable<BaseTexture>);
|
488
|
+
/**
|
489
|
+
* Sets the specular roughness anisotropy (mapped to PBR anisotropy.intensity).
|
490
|
+
* Automatically enables anisotropy.
|
491
|
+
* @param value The anisotropy intensity value
|
492
|
+
*/
|
493
|
+
set specularRoughnessAnisotropy(value: number);
|
494
|
+
/**
|
495
|
+
* Gets the specular roughness anisotropy.
|
496
|
+
* @returns The anisotropy intensity value
|
497
|
+
*/
|
498
|
+
get specularRoughnessAnisotropy(): number;
|
499
|
+
/**
|
500
|
+
* Sets the anisotropy rotation (mapped to PBR anisotropy.angle).
|
501
|
+
* Automatically enables anisotropy.
|
502
|
+
* @param value The anisotropy rotation angle in radians
|
503
|
+
*/
|
504
|
+
set geometryTangentAngle(value: number);
|
505
|
+
/**
|
506
|
+
* Sets the geometry tangent texture (mapped to PBR anisotropy.texture).
|
507
|
+
* Automatically enables anisotropy.
|
508
|
+
* @param value The anisotropy texture or null
|
509
|
+
*/
|
510
|
+
set geometryTangentTexture(value: Nullable<BaseTexture>);
|
511
|
+
/**
|
512
|
+
* Gets the geometry tangent texture.
|
513
|
+
* @returns The anisotropy texture or null
|
514
|
+
*/
|
515
|
+
get geometryTangentTexture(): Nullable<BaseTexture>;
|
516
|
+
/**
|
517
|
+
* Configures glTF-style anisotropy for the material.
|
518
|
+
* Note: PBR materials don't need this configuration, so this is a no-op.
|
519
|
+
* @param useGltfStyle Whether to use glTF-style anisotropy (ignored for PBR)
|
520
|
+
*/
|
521
|
+
configureGltfStyleAnisotropy(useGltfStyle?: boolean): void;
|
522
|
+
/**
|
523
|
+
* Sets the iridescence weight (mapped to PBR iridescence.intensity).
|
524
|
+
* Automatically enables iridescence.
|
525
|
+
* @param value The iridescence intensity value
|
526
|
+
*/
|
527
|
+
set iridescenceWeight(value: number);
|
528
|
+
/**
|
529
|
+
* Sets the iridescence IOR (mapped to PBR iridescence.indexOfRefraction).
|
530
|
+
* Automatically enables iridescence.
|
531
|
+
* @param value The iridescence IOR value
|
532
|
+
*/
|
533
|
+
set iridescenceIor(value: number);
|
534
|
+
/**
|
535
|
+
* Sets the iridescence thickness minimum (mapped to PBR iridescence.minimumThickness).
|
536
|
+
* Automatically enables iridescence.
|
537
|
+
* @param value The minimum thickness value in nanometers
|
538
|
+
*/
|
539
|
+
set iridescenceThicknessMinimum(value: number);
|
540
|
+
/**
|
541
|
+
* Sets the iridescence thickness maximum (mapped to PBR iridescence.maximumThickness).
|
542
|
+
* Automatically enables iridescence.
|
543
|
+
* @param value The maximum thickness value in nanometers
|
544
|
+
*/
|
545
|
+
set iridescenceThicknessMaximum(value: number);
|
546
|
+
/**
|
547
|
+
* Sets the iridescence texture (mapped to PBR iridescence.texture).
|
548
|
+
* Automatically enables iridescence.
|
549
|
+
* @param value The iridescence intensity texture or null
|
550
|
+
*/
|
551
|
+
set iridescenceTexture(value: Nullable<BaseTexture>);
|
552
|
+
/**
|
553
|
+
* Sets the iridescence thickness texture (mapped to PBR iridescence.thicknessTexture).
|
554
|
+
* Automatically enables iridescence.
|
555
|
+
* @param value The iridescence thickness texture or null
|
556
|
+
*/
|
557
|
+
set iridescenceThicknessTexture(value: Nullable<BaseTexture>);
|
558
|
+
/**
|
559
|
+
* Sets the transmission dispersion value.
|
560
|
+
* Note: PBR doesn't have direct dispersion support, so this stores it as metadata.
|
561
|
+
* @param value The dispersion value (stored as metadata)
|
562
|
+
*/
|
563
|
+
set transmissionDispersion(value: number);
|
564
|
+
/**
|
565
|
+
* Sets whether the material is unlit.
|
566
|
+
* @param value True to make the material unlit
|
567
|
+
*/
|
568
|
+
set unlit(value: boolean);
|
569
|
+
/**
|
570
|
+
* Sets the geometry opacity (mapped to PBR alpha).
|
571
|
+
* @param value The opacity value (0-1)
|
572
|
+
*/
|
573
|
+
set geometryOpacity(value: number);
|
574
|
+
/**
|
575
|
+
* Gets the geometry opacity.
|
576
|
+
* @returns The opacity value (0-1)
|
577
|
+
*/
|
578
|
+
get geometryOpacity(): number;
|
579
|
+
/**
|
580
|
+
* Sets the geometry normal texture (mapped to PBR bumpTexture).
|
581
|
+
* Also forces irradiance computation in fragment shader for better lighting.
|
582
|
+
* @param value The normal texture or null
|
583
|
+
*/
|
584
|
+
set geometryNormalTexture(value: Nullable<BaseTexture>);
|
585
|
+
/**
|
586
|
+
* Gets the geometry normal texture.
|
587
|
+
* @returns The normal texture or null
|
588
|
+
*/
|
589
|
+
get geometryNormalTexture(): Nullable<BaseTexture>;
|
590
|
+
/**
|
591
|
+
* Sets the normal map inversions for the material.
|
592
|
+
* @param invertX Whether to invert the normal map on the X axis
|
593
|
+
* @param invertY Whether to invert the normal map on the Y axis
|
594
|
+
*/
|
595
|
+
setNormalMapInversions(invertX: boolean, invertY: boolean): void;
|
596
|
+
/**
|
597
|
+
* Sets the geometry coat normal texture (mapped to PBR clearCoat.bumpTexture).
|
598
|
+
* Automatically enables clear coat.
|
599
|
+
* @param value The coat normal texture or null
|
600
|
+
*/
|
601
|
+
set geometryCoatNormalTexture(value: Nullable<BaseTexture>);
|
602
|
+
/**
|
603
|
+
* Gets the geometry coat normal texture.
|
604
|
+
* @returns The coat normal texture or null
|
605
|
+
*/
|
606
|
+
get geometryCoatNormalTexture(): Nullable<BaseTexture>;
|
607
|
+
/**
|
608
|
+
* Sets the geometry coat normal texture scale.
|
609
|
+
* @param value The scale value for the coat normal texture
|
610
|
+
*/
|
611
|
+
set geometryCoatNormalTextureScale(value: number);
|
612
|
+
}
|