@babylonjs/loaders 8.28.1 → 8.28.3

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.
Files changed (69) hide show
  1. package/OBJ/solidParser.d.ts +8 -7
  2. package/OBJ/solidParser.js +95 -53
  3. package/OBJ/solidParser.js.map +1 -1
  4. package/glTF/2.0/Extensions/KHR_materials_anisotropy.d.ts +1 -1
  5. package/glTF/2.0/Extensions/KHR_materials_anisotropy.js +15 -10
  6. package/glTF/2.0/Extensions/KHR_materials_anisotropy.js.map +1 -1
  7. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +44 -28
  8. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
  9. package/glTF/2.0/Extensions/KHR_materials_clearcoat_anisotropy.d.ts +42 -0
  10. package/glTF/2.0/Extensions/KHR_materials_clearcoat_anisotropy.js +66 -0
  11. package/glTF/2.0/Extensions/KHR_materials_clearcoat_anisotropy.js.map +1 -0
  12. package/glTF/2.0/Extensions/KHR_materials_clearcoat_color.d.ts +42 -0
  13. package/glTF/2.0/Extensions/KHR_materials_clearcoat_color.js +62 -0
  14. package/glTF/2.0/Extensions/KHR_materials_clearcoat_color.js.map +1 -0
  15. package/glTF/2.0/Extensions/KHR_materials_clearcoat_darkening.d.ts +43 -0
  16. package/glTF/2.0/Extensions/KHR_materials_clearcoat_darkening.js +62 -0
  17. package/glTF/2.0/Extensions/KHR_materials_clearcoat_darkening.js.map +1 -0
  18. package/glTF/2.0/Extensions/{EXT_materials_diffuse_roughness.d.ts → KHR_materials_diffuse_roughness.d.ts} +5 -5
  19. package/glTF/2.0/Extensions/{EXT_materials_diffuse_roughness.js → KHR_materials_diffuse_roughness.js} +8 -18
  20. package/glTF/2.0/Extensions/KHR_materials_diffuse_roughness.js.map +1 -0
  21. package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js +6 -31
  22. package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js.map +1 -1
  23. package/glTF/2.0/Extensions/KHR_materials_dispersion.js +3 -7
  24. package/glTF/2.0/Extensions/KHR_materials_dispersion.js.map +1 -1
  25. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +5 -9
  26. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
  27. package/glTF/2.0/Extensions/KHR_materials_ior.js +3 -10
  28. package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
  29. package/glTF/2.0/Extensions/KHR_materials_iridescence.js +13 -11
  30. package/glTF/2.0/Extensions/KHR_materials_iridescence.js.map +1 -1
  31. package/glTF/2.0/Extensions/KHR_materials_sheen.js +11 -22
  32. package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
  33. package/glTF/2.0/Extensions/KHR_materials_specular.js +9 -17
  34. package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
  35. package/glTF/2.0/Extensions/KHR_materials_transmission.js +25 -39
  36. package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
  37. package/glTF/2.0/Extensions/KHR_materials_unlit.js +7 -13
  38. package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
  39. package/glTF/2.0/Extensions/KHR_materials_volume.js +13 -22
  40. package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
  41. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +1 -2
  42. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
  43. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +5 -8
  44. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
  45. package/glTF/2.0/Extensions/dynamic.js +3 -3
  46. package/glTF/2.0/Extensions/dynamic.js.map +1 -1
  47. package/glTF/2.0/Extensions/index.d.ts +4 -1
  48. package/glTF/2.0/Extensions/index.js +4 -1
  49. package/glTF/2.0/Extensions/index.js.map +1 -1
  50. package/glTF/2.0/glTFLoader.d.ts +17 -0
  51. package/glTF/2.0/glTFLoader.js +104 -50
  52. package/glTF/2.0/glTFLoader.js.map +1 -1
  53. package/glTF/2.0/index.d.ts +2 -0
  54. package/glTF/2.0/index.js +2 -0
  55. package/glTF/2.0/index.js.map +1 -1
  56. package/glTF/2.0/materialLoadingAdapter.d.ts +314 -0
  57. package/glTF/2.0/materialLoadingAdapter.js +2 -0
  58. package/glTF/2.0/materialLoadingAdapter.js.map +1 -0
  59. package/glTF/2.0/openPbrMaterialLoadingAdapter.d.ts +594 -0
  60. package/glTF/2.0/openPbrMaterialLoadingAdapter.js +902 -0
  61. package/glTF/2.0/openPbrMaterialLoadingAdapter.js.map +1 -0
  62. package/glTF/2.0/pbrMaterialLoadingAdapter.d.ts +612 -0
  63. package/glTF/2.0/pbrMaterialLoadingAdapter.js +973 -0
  64. package/glTF/2.0/pbrMaterialLoadingAdapter.js.map +1 -0
  65. package/glTF/glTFFileLoader.d.ts +5 -0
  66. package/glTF/glTFFileLoader.js +6 -0
  67. package/glTF/glTFFileLoader.js.map +1 -1
  68. package/package.json +3 -3
  69. package/glTF/2.0/Extensions/EXT_materials_diffuse_roughness.js.map +0 -1
@@ -0,0 +1,902 @@
1
+ /**
2
+ * Material Loading Adapter for OpenPBR materials that provides a unified OpenPBR-like interface.
3
+ */
4
+ export class OpenPBRMaterialLoadingAdapter {
5
+ /**
6
+ * Creates a new instance of the OpenPBRMaterialLoadingAdapter.
7
+ * @param material - The OpenPBR material to adapt.
8
+ */
9
+ constructor(material) {
10
+ this._material = material;
11
+ }
12
+ /**
13
+ * Gets the underlying material
14
+ */
15
+ get material() {
16
+ return this._material;
17
+ }
18
+ /**
19
+ * Whether the material should be treated as unlit
20
+ */
21
+ get isUnlit() {
22
+ return this._material.unlit;
23
+ }
24
+ /**
25
+ * Sets whether the material should be treated as unlit
26
+ */
27
+ set isUnlit(value) {
28
+ this._material.unlit = value;
29
+ }
30
+ // ========================================
31
+ // CULLING PROPERTIES
32
+ // ========================================
33
+ /**
34
+ * Sets whether back face culling is enabled.
35
+ * @param value True to enable back face culling
36
+ */
37
+ set backFaceCulling(value) {
38
+ this._material.backFaceCulling = value;
39
+ }
40
+ /**
41
+ * Gets whether back face culling is enabled.
42
+ * @returns True if back face culling is enabled
43
+ */
44
+ get backFaceCulling() {
45
+ return this._material.backFaceCulling;
46
+ }
47
+ /**
48
+ * Sets whether two-sided lighting is enabled.
49
+ * @param value True to enable two-sided lighting
50
+ */
51
+ set twoSidedLighting(value) {
52
+ this._material.twoSidedLighting = value;
53
+ }
54
+ /**
55
+ * Gets whether two-sided lighting is enabled.
56
+ * @returns True if two-sided lighting is enabled
57
+ */
58
+ get twoSidedLighting() {
59
+ return this._material.twoSidedLighting;
60
+ }
61
+ // ========================================
62
+ // ALPHA PROPERTIES
63
+ // ========================================
64
+ /**
65
+ * Sets the alpha cutoff value for alpha testing.
66
+ * Note: OpenPBR doesn't have a direct equivalent, so this is a no-op.
67
+ * @param value The alpha cutoff threshold (ignored for OpenPBR)
68
+ */
69
+ set alphaCutOff(value) {
70
+ // OpenPBR doesn't have a direct equivalent, but could be implemented if needed
71
+ }
72
+ /**
73
+ * Gets the alpha cutoff value.
74
+ * @returns Default value of 0.5 (OpenPBR doesn't support this directly)
75
+ */
76
+ get alphaCutOff() {
77
+ return 0.5; // Default value
78
+ }
79
+ /**
80
+ * Sets whether to use alpha from the base color texture.
81
+ * Note: OpenPBR handles this differently through the baseColorTexture alpha channel.
82
+ * @param value True to use alpha from base color texture (handled automatically in OpenPBR)
83
+ */
84
+ set useAlphaFromBaseColorTexture(value) {
85
+ this._material._useAlphaFromBaseColorTexture = value;
86
+ }
87
+ /**
88
+ * Gets whether alpha is used from the base color texture.
89
+ * @returns Always false for OpenPBR as it's handled automatically
90
+ */
91
+ get useAlphaFromBaseColorTexture() {
92
+ return false;
93
+ }
94
+ /**
95
+ * Gets whether the transparency is treated as alpha coverage.
96
+ */
97
+ get transparencyAsAlphaCoverage() {
98
+ // OpenPBR doesn't support treating transparency as alpha coverage.
99
+ return false;
100
+ }
101
+ /**
102
+ * Sets/Gets whether the transparency is treated as alpha coverage
103
+ */
104
+ set transparencyAsAlphaCoverage(value) {
105
+ // OpenPBR doesn't support treating transparency as alpha coverage.
106
+ }
107
+ // ========================================
108
+ // BASE PARAMETERS
109
+ // ========================================
110
+ /**
111
+ * Sets the base color of the OpenPBR material.
112
+ * @param value The base color as a Color3
113
+ */
114
+ set baseColor(value) {
115
+ this._material.baseColor = value;
116
+ }
117
+ /**
118
+ * Gets the base color of the OpenPBR material.
119
+ * @returns The base color as a Color3
120
+ */
121
+ get baseColor() {
122
+ return this._material.baseColor;
123
+ }
124
+ /**
125
+ * Sets the base color texture of the OpenPBR material.
126
+ * @param value The base color texture or null
127
+ */
128
+ set baseColorTexture(value) {
129
+ this._material.baseColorTexture = value;
130
+ }
131
+ /**
132
+ * Gets the base color texture of the OpenPBR material.
133
+ * @returns The base color texture or null
134
+ */
135
+ get baseColorTexture() {
136
+ return this._material.baseColorTexture;
137
+ }
138
+ /**
139
+ * Sets the base diffuse roughness of the OpenPBR material.
140
+ * @param value The diffuse roughness value (0-1)
141
+ */
142
+ set baseDiffuseRoughness(value) {
143
+ this._material.baseDiffuseRoughness = value;
144
+ }
145
+ /**
146
+ * Gets the base diffuse roughness of the OpenPBR material.
147
+ * @returns The diffuse roughness value (0-1)
148
+ */
149
+ get baseDiffuseRoughness() {
150
+ return this._material.baseDiffuseRoughness;
151
+ }
152
+ /**
153
+ * Sets the base diffuse roughness texture of the OpenPBR material.
154
+ * @param value The diffuse roughness texture or null
155
+ */
156
+ set baseDiffuseRoughnessTexture(value) {
157
+ this._material.baseDiffuseRoughnessTexture = value;
158
+ }
159
+ /**
160
+ * Gets the base diffuse roughness texture of the OpenPBR material.
161
+ * @returns The diffuse roughness texture or null
162
+ */
163
+ get baseDiffuseRoughnessTexture() {
164
+ return this._material.baseDiffuseRoughnessTexture;
165
+ }
166
+ /**
167
+ * Sets the base metalness value of the OpenPBR material.
168
+ * @param value The metalness value (0-1)
169
+ */
170
+ set baseMetalness(value) {
171
+ this._material.baseMetalness = value;
172
+ }
173
+ /**
174
+ * Gets the base metalness value of the OpenPBR material.
175
+ * @returns The metalness value (0-1)
176
+ */
177
+ get baseMetalness() {
178
+ return this._material.baseMetalness;
179
+ }
180
+ /**
181
+ * Sets the base metalness texture of the OpenPBR material.
182
+ * @param value The metalness texture or null
183
+ */
184
+ set baseMetalnessTexture(value) {
185
+ this._material.baseMetalnessTexture = value;
186
+ }
187
+ /**
188
+ * Gets the base metalness texture of the OpenPBR material.
189
+ * @returns The metalness texture or null
190
+ */
191
+ get baseMetalnessTexture() {
192
+ return this._material.baseMetalnessTexture;
193
+ }
194
+ /**
195
+ * Sets whether to use roughness from the metallic texture's green channel.
196
+ * @param value True to use green channel for roughness
197
+ */
198
+ set useRoughnessFromMetallicTextureGreen(value) {
199
+ this._material._useRoughnessFromMetallicTextureGreen = value;
200
+ }
201
+ /**
202
+ * Sets whether to use metalness from the metallic texture's blue channel.
203
+ * @param value True to use blue channel for metalness
204
+ */
205
+ set useMetallicFromMetallicTextureBlue(value) {
206
+ this._material._useMetallicFromMetallicTextureBlue = value;
207
+ }
208
+ // ========================================
209
+ // SPECULAR PARAMETERS
210
+ // ========================================
211
+ /**
212
+ * Configures specular properties for OpenPBR material.
213
+ * @param _enableEdgeColor Whether to enable edge color support (ignored for OpenPBR)
214
+ */
215
+ enableSpecularEdgeColor(_enableEdgeColor = false) {
216
+ // OpenPBR already supports edge color natively, no configuration needed
217
+ }
218
+ /**
219
+ * Sets the specular weight of the OpenPBR material.
220
+ * @param value The specular weight value (0-1)
221
+ */
222
+ set specularWeight(value) {
223
+ this._material.specularWeight = value;
224
+ }
225
+ /**
226
+ * Gets the specular weight of the OpenPBR material.
227
+ * @returns The specular weight value (0-1)
228
+ */
229
+ get specularWeight() {
230
+ return this._material.specularWeight;
231
+ }
232
+ /**
233
+ * Sets the specular weight texture of the OpenPBR material.
234
+ * If the same texture is used for specular color, optimizes by using alpha channel for weight.
235
+ * @param value The specular weight texture or null
236
+ */
237
+ set specularWeightTexture(value) {
238
+ if (this._material.specularColorTexture === value) {
239
+ this._material.specularWeightTexture = null;
240
+ this._material._useSpecularWeightFromSpecularColorTexture = true;
241
+ this._material._useSpecularWeightFromAlpha = true;
242
+ }
243
+ else {
244
+ this._material.specularWeightTexture = value;
245
+ }
246
+ }
247
+ /**
248
+ * Gets the specular weight texture of the OpenPBR material.
249
+ * @returns The specular weight texture or null
250
+ */
251
+ get specularWeightTexture() {
252
+ return this._material.specularWeightTexture;
253
+ }
254
+ /**
255
+ * Sets the specular color of the OpenPBR material.
256
+ * @param value The specular color as a Color3
257
+ */
258
+ set specularColor(value) {
259
+ this._material.specularColor = value;
260
+ }
261
+ /**
262
+ * Gets the specular color of the OpenPBR material.
263
+ * @returns The specular color as a Color3
264
+ */
265
+ get specularColor() {
266
+ return this._material.specularColor;
267
+ }
268
+ /**
269
+ * Sets the specular color texture of the OpenPBR material.
270
+ * If the same texture is used for specular weight, optimizes by using alpha channel for weight.
271
+ * @param value The specular color texture or null
272
+ */
273
+ set specularColorTexture(value) {
274
+ this._material.specularColorTexture = value;
275
+ if (this._material.specularWeightTexture === this._material.specularColorTexture) {
276
+ this._material.specularWeightTexture = null;
277
+ this._material._useSpecularWeightFromSpecularColorTexture = true;
278
+ this._material._useSpecularWeightFromAlpha = true;
279
+ }
280
+ }
281
+ /**
282
+ * Gets the specular color texture of the OpenPBR material.
283
+ * @returns The specular color texture or null
284
+ */
285
+ get specularColorTexture() {
286
+ return this._material.specularColorTexture;
287
+ }
288
+ /**
289
+ * Sets the specular roughness of the OpenPBR material.
290
+ * @param value The roughness value (0-1)
291
+ */
292
+ set specularRoughness(value) {
293
+ this._material.specularRoughness = value;
294
+ }
295
+ /**
296
+ * Gets the specular roughness of the OpenPBR material.
297
+ * @returns The roughness value (0-1)
298
+ */
299
+ get specularRoughness() {
300
+ return this._material.specularRoughness;
301
+ }
302
+ /**
303
+ * Sets the specular roughness texture of the OpenPBR material.
304
+ * @param value The roughness texture or null
305
+ */
306
+ set specularRoughnessTexture(value) {
307
+ this._material.specularRoughnessTexture = value;
308
+ }
309
+ /**
310
+ * Gets the specular roughness texture of the OpenPBR material.
311
+ * @returns The roughness texture or null
312
+ */
313
+ get specularRoughnessTexture() {
314
+ return this._material.specularRoughnessTexture;
315
+ }
316
+ /**
317
+ * Sets the specular index of refraction (IOR) of the OpenPBR material.
318
+ * @param value The IOR value
319
+ */
320
+ set specularIor(value) {
321
+ this._material.specularIor = value;
322
+ }
323
+ /**
324
+ * Gets the specular index of refraction (IOR) of the OpenPBR material.
325
+ * @returns The IOR value
326
+ */
327
+ get specularIor() {
328
+ return this._material.specularIor;
329
+ }
330
+ // ========================================
331
+ // EMISSION PARAMETERS
332
+ // ========================================
333
+ /**
334
+ * Sets the emission color of the OpenPBR material.
335
+ * @param value The emission color as a Color3
336
+ */
337
+ set emissionColor(value) {
338
+ this._material.emissionColor = value;
339
+ }
340
+ /**
341
+ * Gets the emission color of the OpenPBR material.
342
+ * @returns The emission color as a Color3
343
+ */
344
+ get emissionColor() {
345
+ return this._material.emissionColor;
346
+ }
347
+ /**
348
+ * Sets the emission luminance of the OpenPBR material.
349
+ * @param value The emission luminance value
350
+ */
351
+ set emissionLuminance(value) {
352
+ this._material.emissionLuminance = value;
353
+ }
354
+ /**
355
+ * Gets the emission luminance of the OpenPBR material.
356
+ * @returns The emission luminance value
357
+ */
358
+ get emissionLuminance() {
359
+ return this._material.emissionLuminance;
360
+ }
361
+ /**
362
+ * Sets the emission color texture of the OpenPBR material.
363
+ * @param value The emission texture or null
364
+ */
365
+ set emissionColorTexture(value) {
366
+ this._material.emissionColorTexture = value;
367
+ }
368
+ /**
369
+ * Gets the emission color texture of the OpenPBR material.
370
+ * @returns The emission texture or null
371
+ */
372
+ get emissionColorTexture() {
373
+ return this._material.emissionColorTexture;
374
+ }
375
+ // ========================================
376
+ // AMBIENT OCCLUSION
377
+ // ========================================
378
+ /**
379
+ * Sets the ambient occlusion texture of the OpenPBR material.
380
+ * @param value The ambient occlusion texture or null
381
+ */
382
+ set ambientOcclusionTexture(value) {
383
+ this._material.ambientOcclusionTexture = value;
384
+ }
385
+ /**
386
+ * Gets the ambient occlusion texture of the OpenPBR material.
387
+ * @returns The ambient occlusion texture or null
388
+ */
389
+ get ambientOcclusionTexture() {
390
+ return this._material.ambientOcclusionTexture;
391
+ }
392
+ /**
393
+ * Sets the ambient occlusion texture strength by modifying the texture's level.
394
+ * @param value The strength value (typically 0-1)
395
+ */
396
+ set ambientOcclusionTextureStrength(value) {
397
+ const texture = this._material.ambientOcclusionTexture;
398
+ if (texture) {
399
+ texture.level = value;
400
+ }
401
+ }
402
+ /**
403
+ * Gets the ambient occlusion texture strength from the texture's level property.
404
+ * @returns The strength value, defaults to 1.0 if no texture or level is set
405
+ */
406
+ get ambientOcclusionTextureStrength() {
407
+ const texture = this._material.ambientOcclusionTexture;
408
+ return texture?.level ?? 1.0;
409
+ }
410
+ // ========================================
411
+ // COAT PARAMETERS
412
+ // ========================================
413
+ /**
414
+ * Configures coat parameters for OpenPBR material.
415
+ * OpenPBR coat is already built-in, so no configuration is needed.
416
+ */
417
+ configureCoat() {
418
+ // OpenPBR coat is already built-in, no configuration needed
419
+ }
420
+ /**
421
+ * Sets the coat weight of the OpenPBR material.
422
+ * @param value The coat weight value (0-1)
423
+ */
424
+ set coatWeight(value) {
425
+ this._material.coatWeight = value;
426
+ }
427
+ /**
428
+ * Gets the coat weight of the OpenPBR material.
429
+ * @returns The coat weight value (0-1)
430
+ */
431
+ get coatWeight() {
432
+ return this._material.coatWeight;
433
+ }
434
+ /**
435
+ * Sets the coat weight texture of the OpenPBR material.
436
+ * @param value The coat weight texture or null
437
+ */
438
+ set coatWeightTexture(value) {
439
+ this._material.coatWeightTexture = value;
440
+ }
441
+ /**
442
+ * Gets the coat weight texture of the OpenPBR material.
443
+ * @returns The coat weight texture or null
444
+ */
445
+ get coatWeightTexture() {
446
+ return this._material.coatWeightTexture;
447
+ }
448
+ /**
449
+ * Sets the coat color of the OpenPBR material.
450
+ * @param value The coat color as a Color3
451
+ */
452
+ set coatColor(value) {
453
+ this._material.coatColor = value;
454
+ }
455
+ /**
456
+ * Sets the coat color texture of the OpenPBR material.
457
+ * @param value The coat color texture or null
458
+ */
459
+ set coatColorTexture(value) {
460
+ this._material.coatColorTexture = value;
461
+ }
462
+ /**
463
+ * Sets the coat roughness of the OpenPBR material.
464
+ * @param value The coat roughness value (0-1)
465
+ */
466
+ set coatRoughness(value) {
467
+ this._material.coatRoughness = value;
468
+ }
469
+ /**
470
+ * Gets the coat roughness of the OpenPBR material.
471
+ * @returns The coat roughness value (0-1)
472
+ */
473
+ get coatRoughness() {
474
+ return this._material.coatRoughness;
475
+ }
476
+ /**
477
+ * Sets the coat roughness texture of the OpenPBR material.
478
+ * @param value The coat roughness texture or null
479
+ */
480
+ set coatRoughnessTexture(value) {
481
+ this._material.coatRoughnessTexture = value;
482
+ }
483
+ /**
484
+ * Gets the coat roughness texture of the OpenPBR material.
485
+ * @returns The coat roughness texture or null
486
+ */
487
+ get coatRoughnessTexture() {
488
+ return this._material.coatRoughnessTexture;
489
+ }
490
+ /**
491
+ * Sets the coat darkening value of the OpenPBR material.
492
+ * @param value The coat darkening value
493
+ */
494
+ set coatDarkening(value) {
495
+ this._material.coatDarkening = value;
496
+ }
497
+ /**
498
+ * Sets the coat darkening texture (OpenPBR: coatDarkeningTexture, no PBR equivalent)
499
+ */
500
+ set coatDarkeningTexture(value) {
501
+ this._material.coatDarkeningTexture = value;
502
+ }
503
+ /**
504
+ * Sets the coat roughness anisotropy.
505
+ * TODO: Implementation pending OpenPBR coat anisotropy feature availability.
506
+ * @param value The coat anisotropy intensity value
507
+ */
508
+ set coatRoughnessAnisotropy(value) {
509
+ this._material.coatRoughnessAnisotropy = value;
510
+ }
511
+ /**
512
+ * Gets the coat roughness anisotropy.
513
+ * TODO: Implementation pending OpenPBR coat anisotropy feature availability.
514
+ * @returns Currently returns 0 as coat anisotropy is not yet available
515
+ */
516
+ get coatRoughnessAnisotropy() {
517
+ return this._material.coatRoughnessAnisotropy;
518
+ }
519
+ /**
520
+ * Sets the coat tangent angle for anisotropy.
521
+ * TODO: Implementation pending OpenPBR coat anisotropy feature availability.
522
+ * @param value The coat anisotropy rotation angle in radians
523
+ */
524
+ set geometryCoatTangentAngle(value) {
525
+ this._material.geometryCoatTangentAngle = value;
526
+ }
527
+ /**
528
+ * Sets the coat tangent texture for anisotropy.
529
+ * TODO: Implementation pending OpenPBR coat anisotropy feature availability.
530
+ * @param value The coat anisotropy texture or null
531
+ */
532
+ set geometryCoatTangentTexture(value) {
533
+ this._material.geometryCoatTangentTexture = value;
534
+ if (value) {
535
+ this._material._useCoatRoughnessAnisotropyFromTangentTexture = true;
536
+ }
537
+ }
538
+ /**
539
+ * Gets the coat tangent texture for anisotropy.
540
+ * TODO: Implementation pending OpenPBR coat anisotropy feature availability.
541
+ * @returns Currently returns null as coat anisotropy is not yet available
542
+ */
543
+ get geometryCoatTangentTexture() {
544
+ return this._material.geometryCoatTangentTexture;
545
+ }
546
+ // ========================================
547
+ // TRANSMISSION LAYER
548
+ // ========================================
549
+ /**
550
+ * Sets the transmission weight.
551
+ * TODO: Implementation pending OpenPBR transmission feature availability.
552
+ * @param value The transmission weight value (0-1)
553
+ */
554
+ set transmissionWeight(value) {
555
+ // TODO: Implement when OpenPBR transmission is available
556
+ // this._material.transmissionWeight = value;
557
+ }
558
+ /**
559
+ * Sets the transmission weight texture.
560
+ * TODO: Implementation pending OpenPBR transmission feature availability.
561
+ * @param value The transmission weight texture or null
562
+ */
563
+ set transmissionWeightTexture(value) {
564
+ // TODO: Implement when OpenPBR transmission is available
565
+ // this._material.transmissionWeightTexture = value;
566
+ }
567
+ /**
568
+ * Gets the transmission weight.
569
+ * TODO: Implementation pending OpenPBR transmission feature availability.
570
+ * @returns Currently returns 0 as transmission is not yet available
571
+ */
572
+ get transmissionWeight() {
573
+ // TODO: Implement when OpenPBR transmission is available
574
+ // return this._material.transmissionWeight;
575
+ return 0;
576
+ }
577
+ /**
578
+ * Gets the transmission dispersion Abbe number.
579
+ * @param value The Abbe number value
580
+ */
581
+ set transmissionDispersionAbbeNumber(value) {
582
+ // TODO: Implement when OpenPBR transmission dispersion is available
583
+ }
584
+ /**
585
+ * Configures transmission for OpenPBR material.
586
+ * TODO: Implementation pending OpenPBR transmission feature availability.
587
+ */
588
+ configureTransmission() {
589
+ // OpenPBR transmission will be configured differently when available
590
+ }
591
+ // ========================================
592
+ // VOLUME PROPERTIES (Subsurface Scattering)
593
+ // ========================================
594
+ /**
595
+ * Sets the attenuation distance for volume scattering.
596
+ * TODO: Implementation pending OpenPBR volume feature availability.
597
+ * @param value The attenuation distance value
598
+ */
599
+ set transmissionDepth(value) {
600
+ // TODO: Implement when OpenPBR volume properties are available
601
+ // this._material.attenuationDistance = value;
602
+ }
603
+ /**
604
+ * Sets the attenuation color for volume scattering.
605
+ * TODO: Implementation pending OpenPBR volume feature availability.
606
+ * @param value The attenuation color as a Color3
607
+ */
608
+ set transmissionColor(value) {
609
+ // TODO: Implement when OpenPBR volume properties are available
610
+ // this._material.attenuationColor = value;
611
+ }
612
+ /**
613
+ * Sets the thickness texture for volume scattering.
614
+ * TODO: Implementation pending OpenPBR volume feature availability.
615
+ * @param value The thickness texture or null
616
+ */
617
+ set volumeThicknessTexture(value) {
618
+ // TODO: Implement when OpenPBR volume properties are available
619
+ // this._material.thicknessTexture = value;
620
+ }
621
+ /**
622
+ * Sets the thickness factor for volume scattering.
623
+ * TODO: Implementation pending OpenPBR volume feature availability.
624
+ * @param value The thickness value
625
+ */
626
+ set volumeThickness(value) {
627
+ // TODO: Implement when OpenPBR volume properties are available
628
+ // this._material.thickness = value;
629
+ }
630
+ // ========================================
631
+ // SUBSURFACE PROPERTIES (Subsurface Scattering)
632
+ // ========================================
633
+ /**
634
+ * Configures subsurface properties for PBR material
635
+ */
636
+ configureSubsurface() {
637
+ // TODO
638
+ }
639
+ /**
640
+ * Sets the subsurface weight
641
+ */
642
+ set subsurfaceWeight(value) {
643
+ // TODO
644
+ }
645
+ get subsurfaceWeight() {
646
+ // TODO
647
+ return 0;
648
+ }
649
+ /**
650
+ * Sets the subsurface weight texture
651
+ */
652
+ set subsurfaceWeightTexture(value) {
653
+ // TODO
654
+ }
655
+ /**
656
+ * Sets the subsurface color.
657
+ * @param value The subsurface tint color as a Color3
658
+ */
659
+ set subsurfaceColor(value) {
660
+ // TODO
661
+ }
662
+ /**
663
+ * Sets the subsurface color texture.
664
+ * @param value The subsurface tint texture or null
665
+ */
666
+ set subsurfaceColorTexture(value) {
667
+ // TODO
668
+ }
669
+ // ========================================
670
+ // FUZZ LAYER (Sheen)
671
+ // ========================================
672
+ /**
673
+ * Configures fuzz for OpenPBR.
674
+ * Enables fuzz and sets up proper configuration.
675
+ */
676
+ configureFuzz() {
677
+ // Currently no setup to do for OpenPBR
678
+ }
679
+ /**
680
+ * Sets the fuzz weight.
681
+ * TODO: Implementation pending OpenPBR fuzz feature availability.
682
+ * @param value The fuzz weight value
683
+ */
684
+ set fuzzWeight(value) {
685
+ // TODO: Implement when OpenPBR fuzz is available
686
+ // this._material.fuzzWeight = value;
687
+ }
688
+ /**
689
+ * Sets the fuzz color.
690
+ * TODO: Implementation pending OpenPBR fuzz feature availability.
691
+ * @param value The fuzz color as a Color3
692
+ */
693
+ set fuzzColor(value) {
694
+ // TODO: Implement when OpenPBR fuzz is available
695
+ // this._material.fuzzColor = value;
696
+ }
697
+ /**
698
+ * Sets the fuzz color texture.
699
+ * TODO: Implementation pending OpenPBR fuzz feature availability.
700
+ * @param value The fuzz color texture or null
701
+ */
702
+ set fuzzColorTexture(value) {
703
+ // TODO: Implement when OpenPBR fuzz is available
704
+ // this._material.fuzzColorTexture = value;
705
+ }
706
+ /**
707
+ * Sets the fuzz roughness.
708
+ * TODO: Implementation pending OpenPBR fuzz feature availability.
709
+ * @param value The fuzz roughness value (0-1)
710
+ */
711
+ set fuzzRoughness(value) {
712
+ // TODO: Implement when OpenPBR fuzz is available
713
+ // this._material.fuzzRoughness = value;
714
+ }
715
+ /**
716
+ * Sets the fuzz roughness texture.
717
+ * TODO: Implementation pending OpenPBR fuzz feature availability.
718
+ * @param value The fuzz roughness texture or null
719
+ */
720
+ set fuzzRoughnessTexture(value) {
721
+ // TODO: Implement when OpenPBR fuzz is available
722
+ // this._material.fuzzRoughnessTexture = value;
723
+ }
724
+ // ========================================
725
+ // ANISOTROPY
726
+ // ========================================
727
+ /**
728
+ * Sets the specular roughness anisotropy of the OpenPBR material.
729
+ * @param value The anisotropy intensity value
730
+ */
731
+ set specularRoughnessAnisotropy(value) {
732
+ this._material.specularRoughnessAnisotropy = value;
733
+ }
734
+ /**
735
+ * Gets the specular roughness anisotropy of the OpenPBR material.
736
+ * @returns The anisotropy intensity value
737
+ */
738
+ get specularRoughnessAnisotropy() {
739
+ return this._material.specularRoughnessAnisotropy;
740
+ }
741
+ /**
742
+ * Sets the anisotropy rotation angle.
743
+ * @param value The anisotropy rotation angle in radians
744
+ */
745
+ set geometryTangentAngle(value) {
746
+ this._material.geometryTangentAngle = value;
747
+ }
748
+ /**
749
+ * Sets the geometry tangent texture for anisotropy.
750
+ * Automatically enables using anisotropy from the tangent texture.
751
+ * @param value The anisotropy texture or null
752
+ */
753
+ set geometryTangentTexture(value) {
754
+ this._material.geometryTangentTexture = value;
755
+ this._material._useSpecularRoughnessAnisotropyFromTangentTexture = true;
756
+ }
757
+ /**
758
+ * Gets the geometry tangent texture for anisotropy.
759
+ * @returns The anisotropy texture or null
760
+ */
761
+ get geometryTangentTexture() {
762
+ return this._material.geometryTangentTexture;
763
+ }
764
+ /**
765
+ * Configures glTF-style anisotropy for the OpenPBR material.
766
+ * @param useGltfStyle Whether to use glTF-style anisotropy
767
+ */
768
+ configureGltfStyleAnisotropy(useGltfStyle = true) {
769
+ this._material._useGltfStyleAnisotropy = useGltfStyle;
770
+ }
771
+ // ========================================
772
+ // THIN FILM IRIDESCENCE
773
+ // ========================================
774
+ /**
775
+ * Sets the iridescence weight.
776
+ * TODO: Implementation pending OpenPBR iridescence feature availability.
777
+ * @param value The iridescence intensity value
778
+ */
779
+ set iridescenceWeight(value) {
780
+ // TODO: Implement when OpenPBR iridescence is available
781
+ // this._material.iridescenceWeight = value;
782
+ }
783
+ /**
784
+ * Sets the iridescence IOR.
785
+ * TODO: Implementation pending OpenPBR iridescence feature availability.
786
+ * @param value The iridescence IOR value
787
+ */
788
+ set iridescenceIor(value) {
789
+ // TODO: Implement when OpenPBR iridescence is available
790
+ // this._material.iridescenceIor = value;
791
+ }
792
+ /**
793
+ * Sets the iridescence thickness minimum.
794
+ * TODO: Implementation pending OpenPBR iridescence feature availability.
795
+ * @param value The minimum thickness value in nanometers
796
+ */
797
+ set iridescenceThicknessMinimum(value) {
798
+ // TODO: Implement when OpenPBR iridescence is available
799
+ // this._material.iridescenceThicknessMinimum = value;
800
+ }
801
+ /**
802
+ * Sets the iridescence thickness maximum.
803
+ * TODO: Implementation pending OpenPBR iridescence feature availability.
804
+ * @param value The maximum thickness value in nanometers
805
+ */
806
+ set iridescenceThicknessMaximum(value) {
807
+ // TODO: Implement when OpenPBR iridescence is available
808
+ // this._material.iridescenceThicknessMaximum = value;
809
+ }
810
+ /**
811
+ * Sets the iridescence texture.
812
+ * TODO: Implementation pending OpenPBR iridescence feature availability.
813
+ * @param value The iridescence intensity texture or null
814
+ */
815
+ set iridescenceTexture(value) {
816
+ // TODO: Implement when OpenPBR iridescence is available
817
+ // this._material.iridescenceTexture = value;
818
+ }
819
+ /**
820
+ * Sets the iridescence thickness texture.
821
+ * TODO: Implementation pending OpenPBR iridescence feature availability.
822
+ * @param value The iridescence thickness texture or null
823
+ */
824
+ set iridescenceThicknessTexture(value) {
825
+ // TODO: Implement when OpenPBR iridescence is available
826
+ // this._material.iridescenceThicknessTexture = value;
827
+ }
828
+ // ========================================
829
+ // UNLIT MATERIALS
830
+ // ========================================
831
+ /**
832
+ * Sets whether the OpenPBR material is unlit.
833
+ * @param value True to make the material unlit
834
+ */
835
+ set unlit(value) {
836
+ this._material.unlit = value;
837
+ }
838
+ // ========================================
839
+ // GEOMETRY PARAMETERS
840
+ // ========================================
841
+ /**
842
+ * Sets the geometry opacity of the OpenPBR material.
843
+ * @param value The opacity value (0-1)
844
+ */
845
+ set geometryOpacity(value) {
846
+ this._material.geometryOpacity = value;
847
+ }
848
+ /**
849
+ * Gets the geometry opacity of the OpenPBR material.
850
+ * @returns The opacity value (0-1)
851
+ */
852
+ get geometryOpacity() {
853
+ return this._material.geometryOpacity;
854
+ }
855
+ /**
856
+ * Sets the geometry normal texture of the OpenPBR material.
857
+ * @param value The normal texture or null
858
+ */
859
+ set geometryNormalTexture(value) {
860
+ this._material.geometryNormalTexture = value;
861
+ }
862
+ /**
863
+ * Gets the geometry normal texture of the OpenPBR material.
864
+ * @returns The normal texture or null
865
+ */
866
+ get geometryNormalTexture() {
867
+ return this._material.geometryNormalTexture;
868
+ }
869
+ /**
870
+ * Sets the normal map inversions for the OpenPBR material.
871
+ * Note: OpenPBR may handle normal map inversions differently or may not need them.
872
+ * @param invertX Whether to invert the normal map on the X axis (may be ignored)
873
+ * @param invertY Whether to invert the normal map on the Y axis (may be ignored)
874
+ */
875
+ setNormalMapInversions(invertX, invertY) {
876
+ // OpenPBR handles normal map inversions differently or may not need them
877
+ }
878
+ /**
879
+ * Sets the geometry coat normal texture of the OpenPBR material.
880
+ * @param value The coat normal texture or null
881
+ */
882
+ set geometryCoatNormalTexture(value) {
883
+ this._material.geometryCoatNormalTexture = value;
884
+ }
885
+ /**
886
+ * Gets the geometry coat normal texture of the OpenPBR material.
887
+ * @returns The coat normal texture or null
888
+ */
889
+ get geometryCoatNormalTexture() {
890
+ return this._material.geometryCoatNormalTexture;
891
+ }
892
+ /**
893
+ * Sets the geometry coat normal texture scale.
894
+ * @param value The scale value for the coat normal texture
895
+ */
896
+ set geometryCoatNormalTextureScale(value) {
897
+ if (this._material.geometryCoatNormalTexture) {
898
+ this._material.geometryCoatNormalTexture.level = value;
899
+ }
900
+ }
901
+ }
902
+ //# sourceMappingURL=openPbrMaterialLoadingAdapter.js.map