@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.
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 +21 -32
  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
@@ -3,4 +3,6 @@ export * from "./glTFLoaderExtension.js";
3
3
  export * from "./glTFLoaderExtensionRegistry.js";
4
4
  export * from "./glTFLoaderInterfaces.js";
5
5
  export * from "./glTFLoaderAnimation.js";
6
+ export * from "./openPbrMaterialLoadingAdapter.js";
7
+ export * from "./pbrMaterialLoadingAdapter.js";
6
8
  export * from "./Extensions/index.js";
package/glTF/2.0/index.js CHANGED
@@ -4,5 +4,7 @@ export * from "./glTFLoaderExtension.js";
4
4
  export * from "./glTFLoaderExtensionRegistry.js";
5
5
  export * from "./glTFLoaderInterfaces.js";
6
6
  export * from "./glTFLoaderAnimation.js";
7
+ export * from "./openPbrMaterialLoadingAdapter.js";
8
+ export * from "./pbrMaterialLoadingAdapter.js";
7
9
  export * from "./Extensions/index.js";
8
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../dev/loaders/src/glTF/2.0/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./glTFLoader\";\r\nexport * from \"./glTFLoaderExtension\";\r\nexport * from \"./glTFLoaderExtensionRegistry\";\r\nexport * from \"./glTFLoaderInterfaces\";\r\nexport * from \"./glTFLoaderAnimation\";\r\nexport * from \"./Extensions/index\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../dev/loaders/src/glTF/2.0/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./glTFLoader\";\r\nexport * from \"./glTFLoaderExtension\";\r\nexport * from \"./glTFLoaderExtensionRegistry\";\r\nexport * from \"./glTFLoaderInterfaces\";\r\nexport * from \"./glTFLoaderAnimation\";\r\nexport * from \"./openPbrMaterialLoadingAdapter\";\r\nexport * from \"./pbrMaterialLoadingAdapter\";\r\nexport * from \"./Extensions/index\";\r\n"]}
@@ -0,0 +1,314 @@
1
+ import type { Material } from "@babylonjs/core/Materials/material.js";
2
+ import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
3
+ import type { Nullable } from "@babylonjs/core/types.js";
4
+ import type { Color3 } from "@babylonjs/core/Maths/math.color.js";
5
+ /**
6
+ * Interface for material loading adapters that provides a unified OpenPBR-like interface
7
+ * for both OpenPBR and PBR materials, eliminating conditional branches in extensions.
8
+ */
9
+ export interface IMaterialLoadingAdapter {
10
+ /**
11
+ * Gets the underlying material
12
+ */
13
+ readonly material: Material;
14
+ /**
15
+ * Whether the material should be treated as unlit
16
+ */
17
+ isUnlit: boolean;
18
+ /**
19
+ * Sets/gets the back face culling
20
+ */
21
+ backFaceCulling: boolean;
22
+ /**
23
+ * Sets/gets the two sided lighting
24
+ */
25
+ twoSidedLighting: boolean;
26
+ /**
27
+ * Sets/gets the alpha cutoff value (used for alpha test mode)
28
+ */
29
+ alphaCutOff: number;
30
+ /**
31
+ * Sets/gets whether to use alpha from albedo/base color texture
32
+ */
33
+ useAlphaFromBaseColorTexture: boolean;
34
+ /**
35
+ * Sets/Gets whether the transparency is treated as alpha coverage
36
+ */
37
+ transparencyAsAlphaCoverage: boolean;
38
+ /**
39
+ * Sets/gets the base color (OpenPBR: baseColor, PBR: albedoColor)
40
+ */
41
+ baseColor: Color3;
42
+ /**
43
+ * Sets/gets the base color texture (OpenPBR: baseColorTexture, PBR: albedoTexture)
44
+ */
45
+ baseColorTexture: Nullable<BaseTexture>;
46
+ /**
47
+ * Sets/gets the base diffuse roughness (OpenPBR: baseDiffuseRoughness, PBR: baseDiffuseRoughness)
48
+ */
49
+ baseDiffuseRoughness: number;
50
+ /**
51
+ * Sets/gets the base diffuse roughness texture (OpenPBR: baseDiffuseRoughnessTexture, PBR: baseDiffuseRoughnessTexture)
52
+ */
53
+ baseDiffuseRoughnessTexture: Nullable<BaseTexture>;
54
+ /**
55
+ * Sets/gets the base metalness (OpenPBR: baseMetalness, PBR: metallic)
56
+ */
57
+ baseMetalness: number;
58
+ /**
59
+ * Sets/gets the base metalness texture (OpenPBR: baseMetalnessTexture, PBR: metallicTexture)
60
+ */
61
+ baseMetalnessTexture: Nullable<BaseTexture>;
62
+ /**
63
+ * Sets whether to use roughness from metallic texture green channel
64
+ */
65
+ useRoughnessFromMetallicTextureGreen: boolean;
66
+ /**
67
+ * Sets whether to use metallic from metallic texture blue channel
68
+ */
69
+ useMetallicFromMetallicTextureBlue: boolean;
70
+ /**
71
+ * Configures specular properties and enables OpenPBR BRDF model for edge color support
72
+ * @param enableEdgeColor - Whether to enable edge color support
73
+ */
74
+ enableSpecularEdgeColor(enableEdgeColor?: boolean): void;
75
+ /**
76
+ * Sets/gets the specular weight (OpenPBR: specularWeight, PBR: metallicF0Factor)
77
+ */
78
+ specularWeight: number;
79
+ /**
80
+ * Sets/gets the specular weight texture (OpenPBR: specularWeightTexture, PBR: metallicReflectanceTexture)
81
+ */
82
+ specularWeightTexture: Nullable<BaseTexture>;
83
+ /**
84
+ * Sets/gets the specular color (OpenPBR: specularColor, PBR: reflectance)
85
+ */
86
+ specularColor: Color3;
87
+ /**
88
+ * Sets/gets the specular color texture (OpenPBR: specularColorTexture, PBR: reflectanceTexture)
89
+ */
90
+ specularColorTexture: Nullable<BaseTexture>;
91
+ /**
92
+ * Sets/gets the specular roughness (OpenPBR: specularRoughness, PBR: roughness)
93
+ */
94
+ specularRoughness: number;
95
+ /**
96
+ * Sets/gets the specular roughness texture
97
+ */
98
+ specularRoughnessTexture: Nullable<BaseTexture>;
99
+ /**
100
+ * Sets/gets the specular IOR (OpenPBR: specularIor, PBR: indexOfRefraction)
101
+ */
102
+ specularIor: number;
103
+ /**
104
+ * Sets/gets the emissive color (OpenPBR: emissionColor, PBR: emissiveColor)
105
+ */
106
+ emissionColor: Color3;
107
+ /**
108
+ * Sets/gets the emissive luminance (OpenPBR: emissionLuminance, PBR: emissiveIntensity)
109
+ */
110
+ emissionLuminance: number;
111
+ /**
112
+ * Sets/gets the emissive texture
113
+ */
114
+ emissionColorTexture: Nullable<BaseTexture>;
115
+ /**
116
+ * Sets/gets the ambient occlusion texture (OpenPBR: ambientOcclusionTexture, PBR: ambientTexture)
117
+ */
118
+ ambientOcclusionTexture: Nullable<BaseTexture>;
119
+ /**
120
+ * Sets/gets the ambient occlusion texture strength/level
121
+ */
122
+ ambientOcclusionTextureStrength: number;
123
+ /**
124
+ * Configures clear coat for PBR material
125
+ */
126
+ configureCoat(): void;
127
+ /**
128
+ * Sets/gets the coat weight (OpenPBR: coatWeight, PBR: clearCoat.intensity)
129
+ */
130
+ coatWeight: number;
131
+ /**
132
+ * Sets/gets the coat weight texture (OpenPBR: coatWeightTexture, PBR: clearCoat.texture)
133
+ */
134
+ coatWeightTexture: Nullable<BaseTexture>;
135
+ /**
136
+ * Sets the coat color (OpenPBR: coatColor, no PBR equivalent)
137
+ */
138
+ coatColor: Color3;
139
+ /**
140
+ * Sets the coat color texture (OpenPBR: coatColorTexture, no PBR equivalent)
141
+ */
142
+ coatColorTexture: Nullable<BaseTexture>;
143
+ /**
144
+ * Sets/gets the coat roughness (OpenPBR: coatRoughness, PBR: clearCoat.roughness)
145
+ */
146
+ coatRoughness: number;
147
+ /**
148
+ * Sets/gets the coat roughness texture (OpenPBR: coatRoughnessTexture, PBR: clearCoat.textureRoughness)
149
+ */
150
+ coatRoughnessTexture: Nullable<BaseTexture>;
151
+ /**
152
+ * Sets the coat darkening (OpenPBR: coatDarkening, no PBR equivalent)
153
+ */
154
+ coatDarkening: number;
155
+ /**
156
+ * Sets the coat darkening texture (OpenPBR: coatDarkeningTexture, no PBR equivalent)
157
+ */
158
+ coatDarkeningTexture: Nullable<BaseTexture>;
159
+ /**
160
+ * Sets/gets the coat roughness anisotropy (OpenPBR: coatRoughnessAnisotropy, PBR: clearCoat.anisotropy.intensity)
161
+ */
162
+ coatRoughnessAnisotropy: number;
163
+ /**
164
+ * Sets the coat tangent angle for anisotropy (OpenPBR: geometryCoatTangentAngle, PBR: clearCoat.anisotropy.angle)
165
+ */
166
+ geometryCoatTangentAngle: number;
167
+ /**
168
+ * Sets the coat tangent texture for anisotropy (OpenPBR: geometryCoatTangentTexture, PBR: clearCoat.anisotropy.texture)
169
+ */
170
+ geometryCoatTangentTexture: Nullable<BaseTexture>;
171
+ /**
172
+ * Sets the transmission weight (OpenPBR: transmissionWeight, PBR: subSurface.refractionIntensity)
173
+ */
174
+ transmissionWeight: number;
175
+ /**
176
+ * Sets the transmission weight texture (OpenPBR: transmissionWeightTexture, PBR: subSurface.refractionIntensityTexture)
177
+ */
178
+ transmissionWeightTexture: Nullable<BaseTexture>;
179
+ /**
180
+ * Sets the attenuation distance (OpenPBR: attenuationDistance, PBR: subSurface.volumeIndexOfRefraction)
181
+ */
182
+ transmissionDepth: number;
183
+ /**
184
+ * Sets the attenuation color (OpenPBR: attenuationColor, PBR: subSurface.tintColor)
185
+ */
186
+ transmissionColor: Color3;
187
+ /**
188
+ * Sets the dispersion Abbe number
189
+ */
190
+ transmissionDispersionAbbeNumber: number;
191
+ /**
192
+ * Configures transmission for thin-surface transmission (KHR_materials_transmission)
193
+ */
194
+ configureTransmission(): void;
195
+ /**
196
+ * Sets the thickness texture (OpenPBR: thicknessTexture, PBR: subSurface.thicknessTexture)
197
+ */
198
+ volumeThicknessTexture: Nullable<BaseTexture>;
199
+ /**
200
+ * Sets the thickness factor (OpenPBR: thickness, PBR: subSurface.maximumThickness)
201
+ */
202
+ volumeThickness: number;
203
+ /**
204
+ * Configures subsurface properties for PBR material
205
+ */
206
+ configureSubsurface(): void;
207
+ /**
208
+ * Sets/gets the subsurface weight
209
+ */
210
+ subsurfaceWeight: number;
211
+ /**
212
+ * Sets/gets the subsurface weight texture
213
+ */
214
+ subsurfaceWeightTexture: Nullable<BaseTexture>;
215
+ /**
216
+ * Sets/gets the subsurface color (OpenPBR: subsurfaceColor, PBR: subSurface.tintColor)
217
+ */
218
+ subsurfaceColor: Color3;
219
+ /**
220
+ * Sets/gets the subsurface color texture (OpenPBR: subsurfaceColorTexture, PBR: subSurface.tintColorTexture)
221
+ */
222
+ subsurfaceColorTexture: Nullable<BaseTexture>;
223
+ /**
224
+ * Configures initial settings for fuzz for material.
225
+ */
226
+ configureFuzz(): void;
227
+ /**
228
+ * Sets the fuzz weight (OpenPBR: fuzzWeight, PBR: fuzz.intensity)
229
+ */
230
+ fuzzWeight: number;
231
+ /**
232
+ * Sets the fuzz color (OpenPBR: fuzzColor, PBR: fuzz.color)
233
+ */
234
+ fuzzColor: Color3;
235
+ /**
236
+ * Sets the fuzz color texture (OpenPBR: fuzzColorTexture, PBR: fuzz.texture)
237
+ */
238
+ fuzzColorTexture: Nullable<BaseTexture>;
239
+ /**
240
+ * Sets the fuzz roughness (OpenPBR: fuzzRoughness, PBR: fuzz.roughness)
241
+ */
242
+ fuzzRoughness: number;
243
+ /**
244
+ * Sets the fuzz roughness texture (OpenPBR: fuzzRoughnessTexture, PBR: fuzz.textureRoughness)
245
+ */
246
+ fuzzRoughnessTexture: Nullable<BaseTexture>;
247
+ /**
248
+ * Sets/gets the specular roughness anisotropy (OpenPBR: specularRoughnessAnisotropy, PBR: anisotropy.intensity)
249
+ */
250
+ specularRoughnessAnisotropy: number;
251
+ /**
252
+ * Sets the anisotropy rotation (OpenPBR: anisotropyRotation, PBR: anisotropy.angle)
253
+ */
254
+ geometryTangentAngle: number;
255
+ /**
256
+ * Sets/gets the anisotropy texture (OpenPBR: geometryTangentTexture, PBR: anisotropy.texture)
257
+ */
258
+ geometryTangentTexture: Nullable<BaseTexture>;
259
+ /**
260
+ * Configures glTF-style anisotropy for OpenPBR materials
261
+ * @param useGltfStyle - Whether to use glTF-style anisotropy (default: true)
262
+ */
263
+ configureGltfStyleAnisotropy(useGltfStyle?: boolean): void;
264
+ /**
265
+ * Sets the iridescence weight (OpenPBR: iridescenceWeight, PBR: iridescence.intensity)
266
+ */
267
+ iridescenceWeight: number;
268
+ /**
269
+ * Sets the iridescence IOR (OpenPBR: iridescenceIor, PBR: iridescence.indexOfRefraction)
270
+ */
271
+ iridescenceIor: number;
272
+ /**
273
+ * Sets the iridescence thickness minimum (OpenPBR: iridescenceThicknessMinimum, PBR: iridescence.minimumThickness)
274
+ */
275
+ iridescenceThicknessMinimum: number;
276
+ /**
277
+ * Sets the iridescence thickness maximum (OpenPBR: iridescenceThicknessMaximum, PBR: iridescence.maximumThickness)
278
+ */
279
+ iridescenceThicknessMaximum: number;
280
+ /**
281
+ * Sets the iridescence texture (OpenPBR: iridescenceTexture, PBR: iridescence.intensityTexture)
282
+ */
283
+ iridescenceTexture: Nullable<BaseTexture>;
284
+ /**
285
+ * Sets the iridescence thickness texture (OpenPBR: iridescenceThicknessTexture, PBR: iridescence.thicknessTexture)
286
+ */
287
+ iridescenceThicknessTexture: Nullable<BaseTexture>;
288
+ /**
289
+ * Sets the unlit flag (OpenPBR: unlit, PBR: unlit)
290
+ */
291
+ unlit: boolean;
292
+ /**
293
+ * Sets/gets the geometry opacity (OpenPBR: geometryOpacity, PBR: alpha)
294
+ */
295
+ geometryOpacity: number;
296
+ /**
297
+ * Sets/gets the geometry normal texture (OpenPBR: geometryNormalTexture, PBR: bumpTexture)
298
+ */
299
+ geometryNormalTexture: Nullable<BaseTexture>;
300
+ /**
301
+ * Sets the normal map inversions for PBR material only
302
+ * @param invertX - Whether to invert the normal map on the X axis
303
+ * @param invertY - Whether to invert the normal map on the Y axis
304
+ */
305
+ setNormalMapInversions(invertX: boolean, invertY: boolean): void;
306
+ /**
307
+ * Sets/gets the coat normal texture (OpenPBR: geometryCoatNormalTexture, PBR: clearCoat.bumpTexture)
308
+ */
309
+ geometryCoatNormalTexture: Nullable<BaseTexture>;
310
+ /**
311
+ * Sets the coat normal texture scale
312
+ */
313
+ geometryCoatNormalTextureScale: number;
314
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=materialLoadingAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"materialLoadingAdapter.js","sourceRoot":"","sources":["../../../../../dev/loaders/src/glTF/2.0/materialLoadingAdapter.ts"],"names":[],"mappings":"","sourcesContent":["import type { Material } from \"core/Materials/material\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { Color3 } from \"core/Maths/math.color\";\r\n\r\n/**\r\n * Interface for material loading adapters that provides a unified OpenPBR-like interface\r\n * for both OpenPBR and PBR materials, eliminating conditional branches in extensions.\r\n */\r\nexport interface IMaterialLoadingAdapter {\r\n /**\r\n * Gets the underlying material\r\n */\r\n readonly material: Material;\r\n\r\n /**\r\n * Whether the material should be treated as unlit\r\n */\r\n isUnlit: boolean;\r\n\r\n // ========================================\r\n // CULLING PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the back face culling\r\n */\r\n backFaceCulling: boolean;\r\n\r\n /**\r\n * Sets/gets the two sided lighting\r\n */\r\n twoSidedLighting: boolean;\r\n\r\n // ========================================\r\n // ALPHA PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the alpha cutoff value (used for alpha test mode)\r\n */\r\n alphaCutOff: number;\r\n\r\n /**\r\n * Sets/gets whether to use alpha from albedo/base color texture\r\n */\r\n useAlphaFromBaseColorTexture: boolean;\r\n\r\n /**\r\n * Sets/Gets whether the transparency is treated as alpha coverage\r\n */\r\n transparencyAsAlphaCoverage: boolean;\r\n\r\n // ========================================\r\n // BASE PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the base color (OpenPBR: baseColor, PBR: albedoColor)\r\n */\r\n baseColor: Color3;\r\n\r\n /**\r\n * Sets/gets the base color texture (OpenPBR: baseColorTexture, PBR: albedoTexture)\r\n */\r\n baseColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the base diffuse roughness (OpenPBR: baseDiffuseRoughness, PBR: baseDiffuseRoughness)\r\n */\r\n baseDiffuseRoughness: number;\r\n\r\n /**\r\n * Sets/gets the base diffuse roughness texture (OpenPBR: baseDiffuseRoughnessTexture, PBR: baseDiffuseRoughnessTexture)\r\n */\r\n baseDiffuseRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the base metalness (OpenPBR: baseMetalness, PBR: metallic)\r\n */\r\n baseMetalness: number;\r\n\r\n /**\r\n * Sets/gets the base metalness texture (OpenPBR: baseMetalnessTexture, PBR: metallicTexture)\r\n */\r\n baseMetalnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets whether to use roughness from metallic texture green channel\r\n */\r\n useRoughnessFromMetallicTextureGreen: boolean;\r\n\r\n /**\r\n * Sets whether to use metallic from metallic texture blue channel\r\n */\r\n useMetallicFromMetallicTextureBlue: boolean;\r\n\r\n // ========================================\r\n // SPECULAR PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures specular properties and enables OpenPBR BRDF model for edge color support\r\n * @param enableEdgeColor - Whether to enable edge color support\r\n */\r\n enableSpecularEdgeColor(enableEdgeColor?: boolean): void;\r\n\r\n /**\r\n * Sets/gets the specular weight (OpenPBR: specularWeight, PBR: metallicF0Factor)\r\n */\r\n specularWeight: number;\r\n\r\n /**\r\n * Sets/gets the specular weight texture (OpenPBR: specularWeightTexture, PBR: metallicReflectanceTexture)\r\n */\r\n specularWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the specular color (OpenPBR: specularColor, PBR: reflectance)\r\n */\r\n specularColor: Color3;\r\n\r\n /**\r\n * Sets/gets the specular color texture (OpenPBR: specularColorTexture, PBR: reflectanceTexture)\r\n */\r\n specularColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the specular roughness (OpenPBR: specularRoughness, PBR: roughness)\r\n */\r\n specularRoughness: number;\r\n\r\n /**\r\n * Sets/gets the specular roughness texture\r\n */\r\n specularRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the specular IOR (OpenPBR: specularIor, PBR: indexOfRefraction)\r\n */\r\n specularIor: number;\r\n\r\n // ========================================\r\n // EMISSION PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the emissive color (OpenPBR: emissionColor, PBR: emissiveColor)\r\n */\r\n emissionColor: Color3;\r\n\r\n /**\r\n * Sets/gets the emissive luminance (OpenPBR: emissionLuminance, PBR: emissiveIntensity)\r\n */\r\n emissionLuminance: number;\r\n\r\n /**\r\n * Sets/gets the emissive texture\r\n */\r\n emissionColorTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // AMBIENT OCCLUSION\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the ambient occlusion texture (OpenPBR: ambientOcclusionTexture, PBR: ambientTexture)\r\n */\r\n ambientOcclusionTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the ambient occlusion texture strength/level\r\n */\r\n ambientOcclusionTextureStrength: number;\r\n\r\n // ========================================\r\n // COAT PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures clear coat for PBR material\r\n */\r\n configureCoat(): void;\r\n\r\n /**\r\n * Sets/gets the coat weight (OpenPBR: coatWeight, PBR: clearCoat.intensity)\r\n */\r\n coatWeight: number;\r\n\r\n /**\r\n * Sets/gets the coat weight texture (OpenPBR: coatWeightTexture, PBR: clearCoat.texture)\r\n */\r\n coatWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the coat color (OpenPBR: coatColor, no PBR equivalent)\r\n */\r\n coatColor: Color3;\r\n\r\n /**\r\n * Sets the coat color texture (OpenPBR: coatColorTexture, no PBR equivalent)\r\n */\r\n coatColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the coat roughness (OpenPBR: coatRoughness, PBR: clearCoat.roughness)\r\n */\r\n coatRoughness: number;\r\n\r\n /**\r\n * Sets/gets the coat roughness texture (OpenPBR: coatRoughnessTexture, PBR: clearCoat.textureRoughness)\r\n */\r\n coatRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the coat darkening (OpenPBR: coatDarkening, no PBR equivalent)\r\n */\r\n coatDarkening: number;\r\n\r\n /**\r\n * Sets the coat darkening texture (OpenPBR: coatDarkeningTexture, no PBR equivalent)\r\n */\r\n coatDarkeningTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the coat roughness anisotropy (OpenPBR: coatRoughnessAnisotropy, PBR: clearCoat.anisotropy.intensity)\r\n */\r\n coatRoughnessAnisotropy: number;\r\n\r\n /**\r\n * Sets the coat tangent angle for anisotropy (OpenPBR: geometryCoatTangentAngle, PBR: clearCoat.anisotropy.angle)\r\n */\r\n geometryCoatTangentAngle: number;\r\n\r\n /**\r\n * Sets the coat tangent texture for anisotropy (OpenPBR: geometryCoatTangentTexture, PBR: clearCoat.anisotropy.texture)\r\n */\r\n geometryCoatTangentTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // TRANSMISSION LAYER\r\n // ========================================\r\n\r\n /**\r\n * Sets the transmission weight (OpenPBR: transmissionWeight, PBR: subSurface.refractionIntensity)\r\n */\r\n transmissionWeight: number;\r\n\r\n /**\r\n * Sets the transmission weight texture (OpenPBR: transmissionWeightTexture, PBR: subSurface.refractionIntensityTexture)\r\n */\r\n transmissionWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the attenuation distance (OpenPBR: attenuationDistance, PBR: subSurface.volumeIndexOfRefraction)\r\n */\r\n transmissionDepth: number;\r\n\r\n /**\r\n * Sets the attenuation color (OpenPBR: attenuationColor, PBR: subSurface.tintColor)\r\n */\r\n transmissionColor: Color3;\r\n\r\n /**\r\n * Sets the dispersion Abbe number\r\n */\r\n transmissionDispersionAbbeNumber: number;\r\n\r\n /**\r\n * Configures transmission for thin-surface transmission (KHR_materials_transmission)\r\n */\r\n configureTransmission(): void;\r\n\r\n // ========================================\r\n // VOLUME PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets the thickness texture (OpenPBR: thicknessTexture, PBR: subSurface.thicknessTexture)\r\n */\r\n volumeThicknessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the thickness factor (OpenPBR: thickness, PBR: subSurface.maximumThickness)\r\n */\r\n volumeThickness: number;\r\n\r\n // ========================================\r\n // SUBSURFACE PROPERTIES (Subsurface Scattering)\r\n // ========================================\r\n\r\n /**\r\n * Configures subsurface properties for PBR material\r\n */\r\n configureSubsurface(): void;\r\n\r\n /**\r\n * Sets/gets the subsurface weight\r\n */\r\n subsurfaceWeight: number;\r\n\r\n /**\r\n * Sets/gets the subsurface weight texture\r\n */\r\n subsurfaceWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the subsurface color (OpenPBR: subsurfaceColor, PBR: subSurface.tintColor)\r\n */\r\n subsurfaceColor: Color3;\r\n\r\n /**\r\n * Sets/gets the subsurface color texture (OpenPBR: subsurfaceColorTexture, PBR: subSurface.tintColorTexture)\r\n */\r\n subsurfaceColorTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // FUZZ LAYER (Sheen)\r\n // ========================================\r\n\r\n /**\r\n * Configures initial settings for fuzz for material.\r\n */\r\n configureFuzz(): void;\r\n\r\n /**\r\n * Sets the fuzz weight (OpenPBR: fuzzWeight, PBR: fuzz.intensity)\r\n */\r\n fuzzWeight: number;\r\n\r\n /**\r\n * Sets the fuzz color (OpenPBR: fuzzColor, PBR: fuzz.color)\r\n */\r\n fuzzColor: Color3;\r\n\r\n /**\r\n * Sets the fuzz color texture (OpenPBR: fuzzColorTexture, PBR: fuzz.texture)\r\n */\r\n fuzzColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the fuzz roughness (OpenPBR: fuzzRoughness, PBR: fuzz.roughness)\r\n */\r\n fuzzRoughness: number;\r\n\r\n /**\r\n * Sets the fuzz roughness texture (OpenPBR: fuzzRoughnessTexture, PBR: fuzz.textureRoughness)\r\n */\r\n fuzzRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // ANISOTROPY\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the specular roughness anisotropy (OpenPBR: specularRoughnessAnisotropy, PBR: anisotropy.intensity)\r\n */\r\n specularRoughnessAnisotropy: number;\r\n\r\n /**\r\n * Sets the anisotropy rotation (OpenPBR: anisotropyRotation, PBR: anisotropy.angle)\r\n */\r\n geometryTangentAngle: number;\r\n\r\n /**\r\n * Sets/gets the anisotropy texture (OpenPBR: geometryTangentTexture, PBR: anisotropy.texture)\r\n */\r\n geometryTangentTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Configures glTF-style anisotropy for OpenPBR materials\r\n * @param useGltfStyle - Whether to use glTF-style anisotropy (default: true)\r\n */\r\n configureGltfStyleAnisotropy(useGltfStyle?: boolean): void;\r\n\r\n // ========================================\r\n // THIN FILM IRIDESCENCE\r\n // ========================================\r\n\r\n /**\r\n * Sets the iridescence weight (OpenPBR: iridescenceWeight, PBR: iridescence.intensity)\r\n */\r\n iridescenceWeight: number;\r\n\r\n /**\r\n * Sets the iridescence IOR (OpenPBR: iridescenceIor, PBR: iridescence.indexOfRefraction)\r\n */\r\n iridescenceIor: number;\r\n\r\n /**\r\n * Sets the iridescence thickness minimum (OpenPBR: iridescenceThicknessMinimum, PBR: iridescence.minimumThickness)\r\n */\r\n iridescenceThicknessMinimum: number;\r\n\r\n /**\r\n * Sets the iridescence thickness maximum (OpenPBR: iridescenceThicknessMaximum, PBR: iridescence.maximumThickness)\r\n */\r\n iridescenceThicknessMaximum: number;\r\n\r\n /**\r\n * Sets the iridescence texture (OpenPBR: iridescenceTexture, PBR: iridescence.intensityTexture)\r\n */\r\n iridescenceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the iridescence thickness texture (OpenPBR: iridescenceThicknessTexture, PBR: iridescence.thicknessTexture)\r\n */\r\n iridescenceThicknessTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // UNLIT MATERIALS\r\n // ========================================\r\n\r\n /**\r\n * Sets the unlit flag (OpenPBR: unlit, PBR: unlit)\r\n */\r\n unlit: boolean;\r\n\r\n // ========================================\r\n // GEOMETRY PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the geometry opacity (OpenPBR: geometryOpacity, PBR: alpha)\r\n */\r\n geometryOpacity: number;\r\n\r\n /**\r\n * Sets/gets the geometry normal texture (OpenPBR: geometryNormalTexture, PBR: bumpTexture)\r\n */\r\n geometryNormalTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the normal map inversions for PBR material only\r\n * @param invertX - Whether to invert the normal map on the X axis\r\n * @param invertY - Whether to invert the normal map on the Y axis\r\n */\r\n setNormalMapInversions(invertX: boolean, invertY: boolean): void;\r\n\r\n /**\r\n * Sets/gets the coat normal texture (OpenPBR: geometryCoatNormalTexture, PBR: clearCoat.bumpTexture)\r\n */\r\n geometryCoatNormalTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the coat normal texture scale\r\n */\r\n geometryCoatNormalTextureScale: number;\r\n}\r\n"]}