@vived/component-abb-6700 1.0.0

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 (203) hide show
  1. package/.todo.md +13 -0
  2. package/README.md +122 -0
  3. package/dist/.gitkeep +0 -0
  4. package/dist/Adapters/aBB6700PMAdapter.d.ts +10 -0
  5. package/dist/Adapters/aBB6700PMAdapter.d.ts.map +1 -0
  6. package/dist/Controllers/createABB6700.d.ts +12 -0
  7. package/dist/Controllers/createABB6700.d.ts.map +1 -0
  8. package/dist/Controllers/getPose.d.ts +11 -0
  9. package/dist/Controllers/getPose.d.ts.map +1 -0
  10. package/dist/Controllers/setJointAngle.d.ts +12 -0
  11. package/dist/Controllers/setJointAngle.d.ts.map +1 -0
  12. package/dist/Controllers/setPose.d.ts +11 -0
  13. package/dist/Controllers/setPose.d.ts.map +1 -0
  14. package/dist/Entities/ABB6700Entity.d.ts +35 -0
  15. package/dist/Entities/ABB6700Entity.d.ts.map +1 -0
  16. package/dist/Entities/ABB6700Repo.d.ts +32 -0
  17. package/dist/Entities/ABB6700Repo.d.ts.map +1 -0
  18. package/dist/Factory/ABB6700FeatureFactory.d.ts +26 -0
  19. package/dist/Factory/ABB6700FeatureFactory.d.ts.map +1 -0
  20. package/dist/Mocks/MockABB6700PM.d.ts +11 -0
  21. package/dist/Mocks/MockABB6700PM.d.ts.map +1 -0
  22. package/dist/Mocks/MockSetJointAngleUC.d.ts +7 -0
  23. package/dist/Mocks/MockSetJointAngleUC.d.ts.map +1 -0
  24. package/dist/Mocks/MockSetPoseUC.d.ts +7 -0
  25. package/dist/Mocks/MockSetPoseUC.d.ts.map +1 -0
  26. package/dist/PMs/ABB6700PM.d.ts +32 -0
  27. package/dist/PMs/ABB6700PM.d.ts.map +1 -0
  28. package/dist/UCs/CalcStabilizerUC.d.ts +7 -0
  29. package/dist/UCs/CalcStabilizerUC.d.ts.map +1 -0
  30. package/dist/UCs/SetJointAngleUC.d.ts +15 -0
  31. package/dist/UCs/SetJointAngleUC.d.ts.map +1 -0
  32. package/dist/UCs/SetPoseUC.d.ts +22 -0
  33. package/dist/UCs/SetPoseUC.d.ts.map +1 -0
  34. package/dist/Views/ABB6700BabylonView.d.ts +27 -0
  35. package/dist/Views/ABB6700BabylonView.d.ts.map +1 -0
  36. package/dist/abb_6700.glb +0 -0
  37. package/dist/abstractAudioBus-CyBWsmuN.js +14 -0
  38. package/dist/animationGroup-BhNThqQe.js +1454 -0
  39. package/dist/basisTextureLoader-BT391BsV.js +310 -0
  40. package/dist/brdfTextureTools-DUyKBAXf.js +79 -0
  41. package/dist/bumpFragment-Dd-ojPA1.js +134 -0
  42. package/dist/bumpFragment-KE1_PuMl.js +287 -0
  43. package/dist/bumpVertex-BcdvVFVx.js +8 -0
  44. package/dist/bumpVertexDeclaration-B5Uvs-RS.js +8 -0
  45. package/dist/bumpVertexDeclaration-ixSg-yGI.js +8 -0
  46. package/dist/clipPlaneFragment-DJwQynjA.js +136 -0
  47. package/dist/clipPlaneVertex-D4Wk50XG.js +376 -0
  48. package/dist/clipPlaneVertex-eQ147Tn2.js +350 -0
  49. package/dist/component.config.d.ts +17 -0
  50. package/dist/component.config.d.ts.map +1 -0
  51. package/dist/ddsTextureLoader-DeoF3iGO.js +331 -0
  52. package/dist/default.fragment-DKnTR9nY.js +548 -0
  53. package/dist/default.fragment-rIGWrUS5.js +486 -0
  54. package/dist/default.vertex-Bt5y1VyA.js +212 -0
  55. package/dist/default.vertex-Dext1liJ.js +224 -0
  56. package/dist/defaultUboDeclaration-BwslQZX8.js +11 -0
  57. package/dist/defaultUboDeclaration-DSXACgip.js +9 -0
  58. package/dist/easing-BAt0SO-B.js +163 -0
  59. package/dist/envTextureLoader-CBiW_Q-U.js +40 -0
  60. package/dist/exrTextureLoader-5SC6PKIA.js +740 -0
  61. package/dist/flowGraphApplyForceBlock-6e8-wcaw.js +32 -0
  62. package/dist/flowGraphApplyImpulseBlock-B27EZQow.js +32 -0
  63. package/dist/flowGraphArrayIndexBlock-DIUn5e4i.js +31 -0
  64. package/dist/flowGraphBezierCurveEasingBlock-BJmiHk40.js +25 -0
  65. package/dist/flowGraphBinaryOperationBlock-Bj7TANCc.js +25 -0
  66. package/dist/flowGraphBranchBlock-7CRvIKWc.js +19 -0
  67. package/dist/flowGraphCachedOperationBlock-CP1ZiuIB.js +26 -0
  68. package/dist/flowGraphCancelDelayBlock-DqtgzBGm.js +20 -0
  69. package/dist/flowGraphCodeExecutionBlock-CaYXCGqo.js +23 -0
  70. package/dist/flowGraphConditionalDataBlock-DJ7evX8_.js +28 -0
  71. package/dist/flowGraphConsoleLogBlock-cMkpqLzO.js +68 -0
  72. package/dist/flowGraphConstantBlock-JWybwT0A.js +28 -0
  73. package/dist/flowGraphContextBlock-CFDXHcbn.js +19 -0
  74. package/dist/flowGraphCounterBlock-B0uPkgw9.js +24 -0
  75. package/dist/flowGraphDataSwitchBlock-B0GSifvJ.js +27 -0
  76. package/dist/flowGraphDebounceBlock-CSw8zKym.js +24 -0
  77. package/dist/flowGraphDebugBlock-DiSR6Ahn.js +65 -0
  78. package/dist/flowGraphDoNBlock-C-48oQ2H.js +24 -0
  79. package/dist/flowGraphEasingBlock-DKUaE7Rp.js +50 -0
  80. package/dist/flowGraphFlipFlopBlock-DX5BGhMV.js +20 -0
  81. package/dist/flowGraphForLoopBlock-Di-Qwg23.js +27 -0
  82. package/dist/flowGraphFunctionReferenceBlock-D8X5TFsO.js +20 -0
  83. package/dist/flowGraphGLTFDataProvider-C4j7nPQv.js +16 -0
  84. package/dist/flowGraphGetAngularVelocityBlock-Cq-yTQ4D.js +31 -0
  85. package/dist/flowGraphGetAssetBlock-B36eioor.js +21 -0
  86. package/dist/flowGraphGetLinearVelocityBlock-MdrV0eUD.js +31 -0
  87. package/dist/flowGraphGetPhysicsMassPropertiesBlock-wXDZP1wM.js +30 -0
  88. package/dist/flowGraphGetPropertyBlock-eP0badwf.js +46 -0
  89. package/dist/flowGraphGetSoundVolumeBlock-D3gXGHXa.js +29 -0
  90. package/dist/flowGraphGetVariableBlock-C7-qZAec.js +31 -0
  91. package/dist/flowGraphIndexOfBlock-CC5l9n9P.js +31 -0
  92. package/dist/flowGraphInterpolationBlock-B6922jzt.js +50 -0
  93. package/dist/flowGraphIsKeyPressedBlock-X_iuiUOX.js +31 -0
  94. package/dist/flowGraphIsSoundPlayingBlock-DONQX8N8.js +29 -0
  95. package/dist/flowGraphJsonPointerParserBlock-DBH_gN8I.js +95 -0
  96. package/dist/flowGraphKeyDownEventBlock-D5T1Uyfv.js +26 -0
  97. package/dist/flowGraphKeyUpEventBlock-BPY_Kgkm.js +21 -0
  98. package/dist/flowGraphKeyboardEventBlock-C49fx3TC.js +20 -0
  99. package/dist/flowGraphMathBlocks-CkvrN3VJ.js +864 -0
  100. package/dist/flowGraphMathCombineExtractBlocks-QSjGlnoz.js +248 -0
  101. package/dist/flowGraphMatrixMathBlocks-B3D7Cz9p.js +117 -0
  102. package/dist/flowGraphMeshPickEventBlock-BBTz-taa.js +35 -0
  103. package/dist/flowGraphMultiGateBlock-BhY1y5BG.js +50 -0
  104. package/dist/flowGraphPauseAnimationBlock-CHZZXMbg.js +19 -0
  105. package/dist/flowGraphPauseSoundBlock-B7hMmJ0c.js +31 -0
  106. package/dist/flowGraphPhysicsCollisionEventBlock-CxoPpT-q.js +56 -0
  107. package/dist/flowGraphPlayAnimationBlock-DVAvIFux.js +99 -0
  108. package/dist/flowGraphPlaySoundBlock-DjHGrqbC.js +32 -0
  109. package/dist/flowGraphPointerDownEventBlock-qI-H0JST.js +31 -0
  110. package/dist/flowGraphPointerMoveEventBlock-DAi4VUyy.js +31 -0
  111. package/dist/flowGraphPointerOutEventBlock-CFtj68aC.js +21 -0
  112. package/dist/flowGraphPointerOverEventBlock-VxdHhFuu.js +23 -0
  113. package/dist/flowGraphPointerUpEventBlock-DRR1f07q.js +31 -0
  114. package/dist/flowGraphReceiveCustomEventBlock-B3bwdB66.js +52 -0
  115. package/dist/flowGraphSceneReadyEventBlock-Dy6lDT3j.js +23 -0
  116. package/dist/flowGraphSceneTickEventBlock-Bl9BF_Xw.js +32 -0
  117. package/dist/flowGraphSendCustomEventBlock-BAR4PGFq.js +35 -0
  118. package/dist/flowGraphSequenceBlock-veqU32ZZ.js +32 -0
  119. package/dist/flowGraphSetAngularVelocityBlock-Dj9b-zu6.js +31 -0
  120. package/dist/flowGraphSetDelayBlock-CMjudtvk.js +131 -0
  121. package/dist/flowGraphSetLinearVelocityBlock-DVDhhJBd.js +31 -0
  122. package/dist/flowGraphSetPhysicsMotionTypeBlock-CL3cxNCO.js +36 -0
  123. package/dist/flowGraphSetPropertyBlock-D3sWL3Ss.js +47 -0
  124. package/dist/flowGraphSetSoundVolumeBlock-CxVk45yR.js +32 -0
  125. package/dist/flowGraphSetVariableBlock-D1oJiwLj.js +47 -0
  126. package/dist/flowGraphSoundEndedEventBlock-CubEwii0.js +47 -0
  127. package/dist/flowGraphStopAnimationBlock-B9inwIQx.js +48 -0
  128. package/dist/flowGraphStopSoundBlock-BijIX2jC.js +31 -0
  129. package/dist/flowGraphSwitchBlock-BMhPb4OX.js +54 -0
  130. package/dist/flowGraphThrottleBlock-C7vrnkb1.js +37 -0
  131. package/dist/flowGraphTransformCoordinatesSystemBlock-DoISqaUG.js +29 -0
  132. package/dist/flowGraphTypeToTypeBlocks-CSML6QWx.js +57 -0
  133. package/dist/flowGraphUnaryOperationBlock-B0Shf-lJ.js +24 -0
  134. package/dist/flowGraphVectorMathBlocks-DoTRR_E0.js +178 -0
  135. package/dist/flowGraphWaitAllBlock-BvmDMc24.js +54 -0
  136. package/dist/flowGraphWhileLoopBlock-BaIq4-K2.js +27 -0
  137. package/dist/geometry.fragment-Bsis3UG2.js +275 -0
  138. package/dist/geometry.vertex-DskQ5b8j.js +222 -0
  139. package/dist/harmonicsFunctions-CtNrRfir.js +193 -0
  140. package/dist/harmonicsFunctions-PEz6APC7.js +18 -0
  141. package/dist/hdrTextureLoader-D9rYxJ9q.js +112 -0
  142. package/dist/helperFunctions-Bt7Zfkrp.js +89 -0
  143. package/dist/helperFunctions-CPmRxd37.js +121 -0
  144. package/dist/iesTextureLoader-BGUFjVhI.js +93 -0
  145. package/dist/index-CS3Icp_r.js +67657 -0
  146. package/dist/index.d.ts +23 -0
  147. package/dist/index.d.ts.map +1 -0
  148. package/dist/index.js +27 -0
  149. package/dist/ktxTextureLoader-cUaGg9_L.js +459 -0
  150. package/dist/lightFragment-BRDibDKG.js +404 -0
  151. package/dist/lightFragment-DCqtGMp_.js +402 -0
  152. package/dist/logDepthDeclaration-Bwm-3KyB.js +16 -0
  153. package/dist/logDepthDeclaration-gUfeSnXX.js +20 -0
  154. package/dist/logDepthVertex-CKeuJ6ae.js +213 -0
  155. package/dist/logDepthVertex-CXkmZels.js +459 -0
  156. package/dist/mesh.vertexData.functions-Bc9lJlrU.js +74 -0
  157. package/dist/oitFragment-B8zuQigp.js +792 -0
  158. package/dist/oitFragment-DH3h3T6x.js +657 -0
  159. package/dist/openpbr.fragment-BglYS6LA.js +1405 -0
  160. package/dist/openpbr.fragment-DrOTZs4m.js +1553 -0
  161. package/dist/openpbr.vertex-B-PaLFOR.js +384 -0
  162. package/dist/openpbr.vertex-DMdFRTnX.js +268 -0
  163. package/dist/openpbrMaterial-HCU0aOca.js +2880 -0
  164. package/dist/openpbrMaterialLoadingAdapter-CWRAa-7S.js +1122 -0
  165. package/dist/openpbrTransmissionLayerData-CfDVObj5.js +352 -0
  166. package/dist/openpbrUboDeclaration-CA2pvSbt.js +9 -0
  167. package/dist/openpbrUboDeclaration-xU8VOaib.js +10 -0
  168. package/dist/pass.fragment-1mMP54bb.js +10 -0
  169. package/dist/pass.fragment-DzaUp_jk.js +10 -0
  170. package/dist/passCube.fragment-CQaXS7g3.js +29 -0
  171. package/dist/passCube.fragment-QJGPwAXI.js +29 -0
  172. package/dist/pbr.fragment-BnaAAGxb.js +2775 -0
  173. package/dist/pbr.fragment-CYZk_EGU.js +2619 -0
  174. package/dist/pbr.vertex-CyvdCw91.js +372 -0
  175. package/dist/pbr.vertex-DJMAkDxs.js +270 -0
  176. package/dist/pbrBRDFFunctions-EugoWm6O.js +175 -0
  177. package/dist/pbrDebug-Bk3sPoEG.js +719 -0
  178. package/dist/pbrDebug-Cdalzb1I.js +614 -0
  179. package/dist/pbrIBLFunctions-B0bVAXCF.js +47 -0
  180. package/dist/pbrIBLFunctions-C06z-ouZ.js +51 -0
  181. package/dist/pbrMaterial-C4FCKBZQ.js +1660 -0
  182. package/dist/pbrMaterialLoadingAdapter-BGHlS_ZN.js +1032 -0
  183. package/dist/pbrUboDeclaration-1lN5_-Bw.js +9 -0
  184. package/dist/pbrUboDeclaration-BJOUUOZ2.js +10 -0
  185. package/dist/procedural.vertex-CFPKczKj.js +14 -0
  186. package/dist/procedural.vertex-DUW7bYZt.js +13 -0
  187. package/dist/rgbdDecode.fragment-CEGgE4tL.js +8 -0
  188. package/dist/rgbdDecode.fragment-FT0wkgah.js +8 -0
  189. package/dist/rgbdEncode.fragment-CLnJJf6E.js +8 -0
  190. package/dist/rgbdEncode.fragment-CaAcMsY9.js +8 -0
  191. package/dist/sceneUboDeclaration-B6oxsfcj.js +8 -0
  192. package/dist/sceneUboDeclaration-JByfVKik.js +13 -0
  193. package/dist/setupABB6700InstanceFactory.d.ts +7 -0
  194. package/dist/setupABB6700InstanceFactory.d.ts.map +1 -0
  195. package/dist/studio.env +0 -0
  196. package/dist/textureProcessor.fragment-BYPw6SMQ.js +152 -0
  197. package/dist/textureProcessor.fragment-Ciw9-F3w.js +157 -0
  198. package/dist/textureTools-Cct_bGgp.js +40 -0
  199. package/dist/tgaTextureLoader-BJOIdnFr.js +198 -0
  200. package/dist/thinEngine-Bt9FW4dD.js +2425 -0
  201. package/dist/webAudioBus-BUzRHSxr.js +88 -0
  202. package/dist/webAudioMainBus-Dds1TgJG.js +49 -0
  203. package/package.json +49 -0
@@ -0,0 +1,1122 @@
1
+ import { y as c, b5 as s, a2 as D, C as _, b6 as i, L as z, E as t, z as r, M as B, a6 as l, ah as G } from "./index-CS3Icp_r.js";
2
+ class I {
3
+ /**
4
+ * Creates a new instance of the OpenPBRMaterialLoadingAdapter.
5
+ * @param material - The OpenPBR material to adapt.
6
+ */
7
+ constructor(e) {
8
+ this._specWorkflow = !1, this._diffuseTransmissionTint = c.White(), this._diffuseTransmissionTintTexture = null, this._material = e;
9
+ }
10
+ /**
11
+ * Gets the underlying material
12
+ */
13
+ get material() {
14
+ return this._material;
15
+ }
16
+ /**
17
+ * Whether the material should be treated as unlit
18
+ */
19
+ get isUnlit() {
20
+ return this._material.unlit;
21
+ }
22
+ /**
23
+ * Sets whether the material should be treated as unlit
24
+ */
25
+ set isUnlit(e) {
26
+ this._material.unlit = e;
27
+ }
28
+ // ========================================
29
+ // CULLING PROPERTIES
30
+ // ========================================
31
+ /**
32
+ * Sets whether back face culling is enabled.
33
+ * @param value True to enable back face culling
34
+ */
35
+ set backFaceCulling(e) {
36
+ this._material.backFaceCulling = e;
37
+ }
38
+ /**
39
+ * Gets whether back face culling is enabled.
40
+ * @returns True if back face culling is enabled
41
+ */
42
+ get backFaceCulling() {
43
+ return this._material.backFaceCulling;
44
+ }
45
+ /**
46
+ * Sets whether two-sided lighting is enabled.
47
+ * @param value True to enable two-sided lighting
48
+ */
49
+ set twoSidedLighting(e) {
50
+ this._material.twoSidedLighting = e;
51
+ }
52
+ /**
53
+ * Gets whether two-sided lighting is enabled.
54
+ * @returns True if two-sided lighting is enabled
55
+ */
56
+ get twoSidedLighting() {
57
+ return this._material.twoSidedLighting;
58
+ }
59
+ // ========================================
60
+ // ALPHA PROPERTIES
61
+ // ========================================
62
+ /**
63
+ * Sets the alpha cutoff value for alpha testing.
64
+ * Note: OpenPBR doesn't have a direct equivalent, so this is a no-op.
65
+ * @param value The alpha cutoff threshold (ignored for OpenPBR)
66
+ */
67
+ set alphaCutOff(e) {
68
+ }
69
+ /**
70
+ * Gets the alpha cutoff value.
71
+ * @returns Default value of 0.5 (OpenPBR doesn't support this directly)
72
+ */
73
+ get alphaCutOff() {
74
+ return 0.5;
75
+ }
76
+ /**
77
+ * Sets whether to use alpha from the base color texture.
78
+ * Note: OpenPBR handles this differently through the baseColorTexture alpha channel.
79
+ * @param value True to use alpha from base color texture (handled automatically in OpenPBR)
80
+ */
81
+ set useAlphaFromBaseColorTexture(e) {
82
+ this._material._useAlphaFromBaseColorTexture = e;
83
+ }
84
+ /**
85
+ * Gets whether alpha is used from the base color texture.
86
+ * @returns Always false for OpenPBR as it's handled automatically
87
+ */
88
+ get useAlphaFromBaseColorTexture() {
89
+ return !1;
90
+ }
91
+ /**
92
+ * Gets whether the transparency is treated as alpha coverage.
93
+ */
94
+ get transparencyAsAlphaCoverage() {
95
+ return !1;
96
+ }
97
+ /**
98
+ * Sets/Gets whether the transparency is treated as alpha coverage
99
+ */
100
+ set transparencyAsAlphaCoverage(e) {
101
+ }
102
+ // ========================================
103
+ // BASE PARAMETERS
104
+ // ========================================
105
+ /**
106
+ * Sets the base color of the OpenPBR material.
107
+ * @param value The base color as a Color3
108
+ */
109
+ set baseColor(e) {
110
+ this._material.baseColor = e;
111
+ }
112
+ /**
113
+ * Gets the base color of the OpenPBR material.
114
+ * @returns The base color as a Color3
115
+ */
116
+ get baseColor() {
117
+ return this._material.baseColor;
118
+ }
119
+ /**
120
+ * Sets the base color texture of the OpenPBR material.
121
+ * @param value The base color texture or null
122
+ */
123
+ set baseColorTexture(e) {
124
+ this._material.baseColorTexture = e;
125
+ }
126
+ /**
127
+ * Gets the base color texture of the OpenPBR material.
128
+ * @returns The base color texture or null
129
+ */
130
+ get baseColorTexture() {
131
+ return this._material.baseColorTexture;
132
+ }
133
+ /**
134
+ * Sets the base diffuse roughness of the OpenPBR material.
135
+ * @param value The diffuse roughness value (0-1)
136
+ */
137
+ set baseDiffuseRoughness(e) {
138
+ this._material.baseDiffuseRoughness = e;
139
+ }
140
+ /**
141
+ * Gets the base diffuse roughness of the OpenPBR material.
142
+ * @returns The diffuse roughness value (0-1)
143
+ */
144
+ get baseDiffuseRoughness() {
145
+ return this._material.baseDiffuseRoughness;
146
+ }
147
+ /**
148
+ * Sets the base diffuse roughness texture of the OpenPBR material.
149
+ * @param value The diffuse roughness texture or null
150
+ */
151
+ set baseDiffuseRoughnessTexture(e) {
152
+ this._material.baseDiffuseRoughnessTexture = e;
153
+ }
154
+ /**
155
+ * Gets the base diffuse roughness texture of the OpenPBR material.
156
+ * @returns The diffuse roughness texture or null
157
+ */
158
+ get baseDiffuseRoughnessTexture() {
159
+ return this._material.baseDiffuseRoughnessTexture;
160
+ }
161
+ /**
162
+ * Sets the base metalness value of the OpenPBR material.
163
+ * @param value The metalness value (0-1)
164
+ */
165
+ set baseMetalness(e) {
166
+ this._material.baseMetalness = e;
167
+ }
168
+ /**
169
+ * Gets the base metalness value of the OpenPBR material.
170
+ * @returns The metalness value (0-1)
171
+ */
172
+ get baseMetalness() {
173
+ return this._material.baseMetalness;
174
+ }
175
+ /**
176
+ * Sets the base metalness texture of the OpenPBR material.
177
+ * @param value The metalness texture or null
178
+ */
179
+ set baseMetalnessTexture(e) {
180
+ this._material.baseMetalnessTexture = e;
181
+ }
182
+ /**
183
+ * Gets the base metalness texture of the OpenPBR material.
184
+ * @returns The metalness texture or null
185
+ */
186
+ get baseMetalnessTexture() {
187
+ return this._material.baseMetalnessTexture;
188
+ }
189
+ /**
190
+ * Sets whether to use roughness from the metallic texture's green channel.
191
+ * @param value True to use green channel for roughness
192
+ */
193
+ set useRoughnessFromMetallicTextureGreen(e) {
194
+ this._material._useRoughnessFromMetallicTextureGreen = e;
195
+ }
196
+ /**
197
+ * Sets whether to use metalness from the metallic texture's blue channel.
198
+ * @param value True to use blue channel for metalness
199
+ */
200
+ set useMetallicFromMetallicTextureBlue(e) {
201
+ this._material._useMetallicFromMetallicTextureBlue = e;
202
+ }
203
+ // ========================================
204
+ // SPECULAR PARAMETERS
205
+ // ========================================
206
+ /**
207
+ * Configures specular properties for OpenPBR material.
208
+ * @param _enableEdgeColor Whether to enable edge color support (ignored for OpenPBR)
209
+ */
210
+ enableSpecularEdgeColor(e = !1) {
211
+ }
212
+ configureSpecularGlossiness() {
213
+ this._specWorkflow = !0;
214
+ }
215
+ /**
216
+ * Sets the specular weight of the OpenPBR material.
217
+ * @param value The specular weight value (0-1)
218
+ */
219
+ set specularWeight(e) {
220
+ this._material.specularWeight = e;
221
+ }
222
+ /**
223
+ * Gets the specular weight of the OpenPBR material.
224
+ * @returns The specular weight value (0-1)
225
+ */
226
+ get specularWeight() {
227
+ return this._material.specularWeight;
228
+ }
229
+ /**
230
+ * Sets the specular weight texture of the OpenPBR material.
231
+ * If the same texture is used for specular color, optimizes by using alpha channel for weight.
232
+ * @param value The specular weight texture or null
233
+ */
234
+ set specularWeightTexture(e) {
235
+ this._material.specularColorTexture === e ? (this._material.specularWeightTexture = null, this._material._useSpecularWeightFromSpecularColorTexture = !0, this._material._useSpecularWeightFromAlpha = !0) : this._material.specularWeightTexture = e;
236
+ }
237
+ /**
238
+ * Gets the specular weight texture of the OpenPBR material.
239
+ * @returns The specular weight texture or null
240
+ */
241
+ get specularWeightTexture() {
242
+ return this._material.specularWeightTexture;
243
+ }
244
+ /**
245
+ * Sets the specular color of the OpenPBR material.
246
+ * @param value The specular color as a Color3
247
+ */
248
+ set specularColor(e) {
249
+ this._material.specularColor = e;
250
+ }
251
+ /**
252
+ * Gets the specular color of the OpenPBR material.
253
+ * @returns The specular color as a Color3
254
+ */
255
+ get specularColor() {
256
+ return this._material.specularColor;
257
+ }
258
+ /**
259
+ * Sets the specular color texture of the OpenPBR material.
260
+ * If the same texture is used for specular weight, optimizes by using alpha channel for weight.
261
+ * @param value The specular color texture or null
262
+ */
263
+ set specularColorTexture(e) {
264
+ this._material.specularColorTexture = e, this._material.specularWeightTexture === this._material.specularColorTexture && (this._material.specularWeightTexture = null, this._material._useSpecularWeightFromSpecularColorTexture = !0, this._material._useSpecularWeightFromAlpha = !0);
265
+ }
266
+ /**
267
+ * Gets the specular color texture of the OpenPBR material.
268
+ * @returns The specular color texture or null
269
+ */
270
+ get specularColorTexture() {
271
+ return this._material.specularColorTexture;
272
+ }
273
+ /**
274
+ * Sets the specular roughness of the OpenPBR material.
275
+ * @param value The roughness value (0-1)
276
+ */
277
+ set specularRoughness(e) {
278
+ this._material.specularRoughness = e;
279
+ }
280
+ /**
281
+ * Gets the specular roughness of the OpenPBR material.
282
+ * @returns The roughness value (0-1)
283
+ */
284
+ get specularRoughness() {
285
+ return this._material.specularRoughness;
286
+ }
287
+ /**
288
+ * Sets the specular roughness texture of the OpenPBR material.
289
+ * @param value The roughness texture or null
290
+ */
291
+ set specularRoughnessTexture(e) {
292
+ this._material.specularRoughnessTexture = e;
293
+ }
294
+ /**
295
+ * Gets the specular roughness texture of the OpenPBR material.
296
+ * @returns The roughness texture or null
297
+ */
298
+ get specularRoughnessTexture() {
299
+ return this._material.specularRoughnessTexture;
300
+ }
301
+ /**
302
+ * Sets the specular index of refraction (IOR) of the OpenPBR material.
303
+ * @param value The IOR value
304
+ */
305
+ set specularIor(e) {
306
+ this._material.specularIor = e;
307
+ }
308
+ /**
309
+ * Gets the specular index of refraction (IOR) of the OpenPBR material.
310
+ * @returns The IOR value
311
+ */
312
+ get specularIor() {
313
+ return this._material.specularIor;
314
+ }
315
+ /**
316
+ * Sets the glossiness (inverted roughness) of the OpenPBR material.
317
+ */
318
+ set glossiness(e) {
319
+ this._material.specularRoughness = Math.max(1 - e, 0);
320
+ }
321
+ get glossiness() {
322
+ return 1 - this._material.specularRoughness;
323
+ }
324
+ // ========================================
325
+ // EMISSION PARAMETERS
326
+ // ========================================
327
+ /**
328
+ * Sets the emission color of the OpenPBR material.
329
+ * @param value The emission color as a Color3
330
+ */
331
+ set emissionColor(e) {
332
+ this._material.emissionColor = e;
333
+ }
334
+ /**
335
+ * Gets the emission color of the OpenPBR material.
336
+ * @returns The emission color as a Color3
337
+ */
338
+ get emissionColor() {
339
+ return this._material.emissionColor;
340
+ }
341
+ /**
342
+ * Sets the emission luminance of the OpenPBR material.
343
+ * @param value The emission luminance value
344
+ */
345
+ set emissionLuminance(e) {
346
+ this._material.emissionLuminance = e;
347
+ }
348
+ /**
349
+ * Gets the emission luminance of the OpenPBR material.
350
+ * @returns The emission luminance value
351
+ */
352
+ get emissionLuminance() {
353
+ return this._material.emissionLuminance;
354
+ }
355
+ /**
356
+ * Sets the emission color texture of the OpenPBR material.
357
+ * @param value The emission texture or null
358
+ */
359
+ set emissionColorTexture(e) {
360
+ this._material.emissionColorTexture = e;
361
+ }
362
+ /**
363
+ * Gets the emission color texture of the OpenPBR material.
364
+ * @returns The emission texture or null
365
+ */
366
+ get emissionColorTexture() {
367
+ return this._material.emissionColorTexture;
368
+ }
369
+ // ========================================
370
+ // AMBIENT OCCLUSION
371
+ // ========================================
372
+ /**
373
+ * Sets the ambient occlusion texture of the OpenPBR material.
374
+ * @param value The ambient occlusion texture or null
375
+ */
376
+ set ambientOcclusionTexture(e) {
377
+ this._material.ambientOcclusionTexture = e;
378
+ }
379
+ /**
380
+ * Gets the ambient occlusion texture of the OpenPBR material.
381
+ * @returns The ambient occlusion texture or null
382
+ */
383
+ get ambientOcclusionTexture() {
384
+ return this._material.ambientOcclusionTexture;
385
+ }
386
+ /**
387
+ * Sets the ambient occlusion texture strength by modifying the texture's level.
388
+ * @param value The strength value (typically 0-1)
389
+ */
390
+ set ambientOcclusionTextureStrength(e) {
391
+ const o = this._material.ambientOcclusionTexture;
392
+ o && (o.level = e);
393
+ }
394
+ /**
395
+ * Gets the ambient occlusion texture strength from the texture's level property.
396
+ * @returns The strength value, defaults to 1.0 if no texture or level is set
397
+ */
398
+ get ambientOcclusionTextureStrength() {
399
+ return this._material.ambientOcclusionTexture?.level ?? 1;
400
+ }
401
+ // ========================================
402
+ // COAT PARAMETERS
403
+ // ========================================
404
+ /**
405
+ * Configures coat parameters for OpenPBR material.
406
+ * OpenPBR coat is already built-in, so no configuration is needed.
407
+ */
408
+ configureCoat() {
409
+ }
410
+ /**
411
+ * Sets the coat weight of the OpenPBR material.
412
+ * @param value The coat weight value (0-1)
413
+ */
414
+ set coatWeight(e) {
415
+ this._material.coatWeight = e;
416
+ }
417
+ /**
418
+ * Gets the coat weight of the OpenPBR material.
419
+ * @returns The coat weight value (0-1)
420
+ */
421
+ get coatWeight() {
422
+ return this._material.coatWeight;
423
+ }
424
+ /**
425
+ * Sets the coat weight texture of the OpenPBR material.
426
+ * @param value The coat weight texture or null
427
+ */
428
+ set coatWeightTexture(e) {
429
+ this._material.coatWeightTexture = e;
430
+ }
431
+ /**
432
+ * Gets the coat weight texture of the OpenPBR material.
433
+ * @returns The coat weight texture or null
434
+ */
435
+ get coatWeightTexture() {
436
+ return this._material.coatWeightTexture;
437
+ }
438
+ /**
439
+ * Sets the coat color of the OpenPBR material.
440
+ * @param value The coat color as a Color3
441
+ */
442
+ set coatColor(e) {
443
+ this._material.coatColor = e;
444
+ }
445
+ /**
446
+ * Gets the coat color of the OpenPBR material.
447
+ */
448
+ get coatColor() {
449
+ return this._material.coatColor;
450
+ }
451
+ /**
452
+ * Sets the coat color texture of the OpenPBR material.
453
+ * @param value The coat color texture or null
454
+ */
455
+ set coatColorTexture(e) {
456
+ this._material.coatColorTexture = e;
457
+ }
458
+ /**
459
+ * Sets the coat roughness of the OpenPBR material.
460
+ * @param value The coat roughness value (0-1)
461
+ */
462
+ set coatRoughness(e) {
463
+ this._material.coatRoughness = e;
464
+ }
465
+ /**
466
+ * Gets the coat roughness of the OpenPBR material.
467
+ * @returns The coat roughness value (0-1)
468
+ */
469
+ get coatRoughness() {
470
+ return this._material.coatRoughness;
471
+ }
472
+ /**
473
+ * Sets the coat roughness texture of the OpenPBR material.
474
+ * @param value The coat roughness texture or null
475
+ */
476
+ set coatRoughnessTexture(e) {
477
+ this._material.coatRoughnessTexture = e, e && (this._material._useCoatRoughnessFromGreenChannel = !0);
478
+ }
479
+ /**
480
+ * Gets the coat roughness texture of the OpenPBR material.
481
+ * @returns The coat roughness texture or null
482
+ */
483
+ get coatRoughnessTexture() {
484
+ return this._material.coatRoughnessTexture;
485
+ }
486
+ /**
487
+ * Sets the coat index of refraction (IOR) of the OpenPBR material.
488
+ */
489
+ set coatIor(e) {
490
+ this._material.coatIor = e;
491
+ }
492
+ get coatIor() {
493
+ return this._material.coatIor;
494
+ }
495
+ /**
496
+ * Sets the coat darkening value of the OpenPBR material.
497
+ * @param value The coat darkening value
498
+ */
499
+ set coatDarkening(e) {
500
+ this._material.coatDarkening = e;
501
+ }
502
+ get coatDarkening() {
503
+ return this._material.coatDarkening;
504
+ }
505
+ /**
506
+ * Sets the coat darkening texture (OpenPBR: coatDarkeningTexture, no PBR equivalent)
507
+ */
508
+ set coatDarkeningTexture(e) {
509
+ this._material.coatDarkeningTexture = e;
510
+ }
511
+ /**
512
+ * Sets the coat roughness anisotropy.
513
+ * TODO: Implementation pending OpenPBR coat anisotropy feature availability.
514
+ * @param value The coat anisotropy intensity value
515
+ */
516
+ set coatRoughnessAnisotropy(e) {
517
+ this._material.coatRoughnessAnisotropy = e;
518
+ }
519
+ /**
520
+ * Gets the coat roughness anisotropy.
521
+ * TODO: Implementation pending OpenPBR coat anisotropy feature availability.
522
+ * @returns Currently returns 0 as coat anisotropy is not yet available
523
+ */
524
+ get coatRoughnessAnisotropy() {
525
+ return this._material.coatRoughnessAnisotropy;
526
+ }
527
+ /**
528
+ * Sets the coat tangent angle for anisotropy.
529
+ * TODO: Implementation pending OpenPBR coat anisotropy feature availability.
530
+ * @param value The coat anisotropy rotation angle in radians
531
+ */
532
+ set geometryCoatTangentAngle(e) {
533
+ this._material.geometryCoatTangentAngle = e;
534
+ }
535
+ /**
536
+ * Sets the coat tangent texture for anisotropy.
537
+ * TODO: Implementation pending OpenPBR coat anisotropy feature availability.
538
+ * @param value The coat anisotropy texture or null
539
+ */
540
+ set geometryCoatTangentTexture(e) {
541
+ this._material.geometryCoatTangentTexture = e, e && (this._material._useCoatRoughnessAnisotropyFromTangentTexture = !0);
542
+ }
543
+ /**
544
+ * Gets the coat tangent texture for anisotropy.
545
+ * TODO: Implementation pending OpenPBR coat anisotropy feature availability.
546
+ * @returns Currently returns null as coat anisotropy is not yet available
547
+ */
548
+ get geometryCoatTangentTexture() {
549
+ return this._material.geometryCoatTangentTexture;
550
+ }
551
+ // ========================================
552
+ // TRANSMISSION LAYER
553
+ // ========================================
554
+ /**
555
+ * Configures transmission for OpenPBR material.
556
+ */
557
+ configureTransmission() {
558
+ this._material.geometryThinWalled = 1, this._material.transmissionDepth = 0;
559
+ }
560
+ /**
561
+ * Sets the transmission weight.
562
+ * @param value The transmission weight value (0-1)
563
+ */
564
+ set transmissionWeight(e) {
565
+ this._material.transmissionWeight = e;
566
+ }
567
+ /**
568
+ * Sets the transmission weight texture.
569
+ * @param value The transmission weight texture or null
570
+ */
571
+ set transmissionWeightTexture(e) {
572
+ this._material.transmissionWeightTexture = e;
573
+ }
574
+ get transmissionWeightTexture() {
575
+ return this._material.transmissionWeightTexture;
576
+ }
577
+ /**
578
+ * Gets the transmission weight.
579
+ * @returns Currently returns 0 as transmission is not yet available
580
+ */
581
+ get transmissionWeight() {
582
+ return this._material.transmissionWeight;
583
+ }
584
+ /**
585
+ * Sets the transmission scatter coefficient.
586
+ * @param value The scatter coefficient as a Vector3
587
+ */
588
+ set transmissionScatter(e) {
589
+ this._material.transmissionScatter = e;
590
+ }
591
+ /**
592
+ * Gets the transmission scatter coefficient.
593
+ * @returns The scatter coefficient as a Vector3
594
+ */
595
+ get transmissionScatter() {
596
+ return this._material.transmissionScatter;
597
+ }
598
+ /**
599
+ * Sets the transmission scatter texture.
600
+ * @param value The transmission scatter texture or null
601
+ */
602
+ set transmissionScatterTexture(e) {
603
+ this._material.transmissionScatterTexture = e;
604
+ }
605
+ /**
606
+ * Gets the transmission scatter texture.
607
+ * @returns The transmission scatter texture or null
608
+ */
609
+ get transmissionScatterTexture() {
610
+ return this._material.transmissionScatterTexture;
611
+ }
612
+ /**
613
+ * Sets the transmission scattering anisotropy.
614
+ * @param value The anisotropy intensity value (-1 to 1)
615
+ */
616
+ set transmissionScatterAnisotropy(e) {
617
+ this._material.transmissionScatterAnisotropy = e;
618
+ }
619
+ /**
620
+ * Sets the transmission dispersion Abbe number.
621
+ * @param value The Abbe number value
622
+ */
623
+ set transmissionDispersionAbbeNumber(e) {
624
+ this._material.transmissionDispersionAbbeNumber = e;
625
+ }
626
+ /**
627
+ * Sets the transmission dispersion scale.
628
+ * @param value The dispersion scale value
629
+ */
630
+ set transmissionDispersionScale(e) {
631
+ this._material.transmissionDispersionScale = e;
632
+ }
633
+ /**
634
+ * Sets the attenuation distance.
635
+ * @param value The attenuation distance value
636
+ */
637
+ set transmissionDepth(e) {
638
+ e !== Number.MAX_VALUE || this._material.transmissionDepth !== 0 ? this._material.transmissionDepth = e : this._material.transmissionDepth = 0;
639
+ }
640
+ /**
641
+ * Gets the attenuation distance.
642
+ */
643
+ get transmissionDepth() {
644
+ return this._material.transmissionDepth;
645
+ }
646
+ /**
647
+ * Sets the attenuation color.
648
+ * @param value The attenuation color as a Color3
649
+ */
650
+ set transmissionColor(e) {
651
+ e.equals(c.White()) || (this._material.transmissionColor = e);
652
+ }
653
+ /**
654
+ * Gets the attenuation color.
655
+ */
656
+ get transmissionColor() {
657
+ return this._material.transmissionColor;
658
+ }
659
+ /**
660
+ * Gets the refraction background texture
661
+ * @returns The refraction background texture or null
662
+ */
663
+ get refractionBackgroundTexture() {
664
+ return this._material.backgroundRefractionTexture;
665
+ }
666
+ /**
667
+ * Sets the refraction background texture
668
+ * @param value The refraction background texture or null
669
+ */
670
+ set refractionBackgroundTexture(e) {
671
+ this._material.backgroundRefractionTexture = e;
672
+ }
673
+ // ========================================
674
+ // VOLUME PROPERTIES
675
+ // ========================================
676
+ /**
677
+ * Configures volume properties for OpenPBR material.
678
+ */
679
+ configureVolume() {
680
+ this._material.geometryThinWalled = 0;
681
+ }
682
+ /**
683
+ * Sets whether the material is thin-walled (i.e. non-volumetric) or not.
684
+ */
685
+ set geometryThinWalled(e) {
686
+ this._material.geometryThinWalled = e ? 1 : 0;
687
+ }
688
+ /**
689
+ * Gets whether the material is thin-walled (i.e. non-volumetric) or not.
690
+ */
691
+ get geometryThinWalled() {
692
+ return !!this._material.geometryThinWalled;
693
+ }
694
+ /**
695
+ * Sets the thickness texture.
696
+ * @param value The thickness texture or null
697
+ */
698
+ set volumeThicknessTexture(e) {
699
+ this._material.geometryThicknessTexture = e, this._material._useGeometryThicknessFromGreenChannel = !0;
700
+ }
701
+ /**
702
+ * Sets the thickness factor.
703
+ * @param value The thickness value
704
+ */
705
+ set volumeThickness(e) {
706
+ this._material.geometryThickness = e;
707
+ }
708
+ // ========================================
709
+ // SUBSURFACE PROPERTIES (Subsurface Scattering)
710
+ // ========================================
711
+ /**
712
+ * Configures subsurface properties for PBR material
713
+ */
714
+ configureSubsurface() {
715
+ this._material.geometryThinWalled = 1, this._material.subsurfaceScatterAnisotropy = 1;
716
+ }
717
+ /**
718
+ * Sets the subsurface weight
719
+ */
720
+ set subsurfaceWeight(e) {
721
+ this._material.subsurfaceWeight = e;
722
+ }
723
+ get subsurfaceWeight() {
724
+ return this._material.subsurfaceWeight;
725
+ }
726
+ /**
727
+ * Sets the subsurface weight texture
728
+ */
729
+ set subsurfaceWeightTexture(e) {
730
+ this._material.subsurfaceWeightTexture = e, this._material._useSubsurfaceWeightFromTextureAlpha = !0;
731
+ }
732
+ get subsurfaceWeightTexture() {
733
+ return this._material.subsurfaceWeightTexture;
734
+ }
735
+ /**
736
+ * Sets the subsurface color.
737
+ * @param value The subsurface tint color as a Color3
738
+ */
739
+ set subsurfaceColor(e) {
740
+ this._material.subsurfaceColor = e;
741
+ }
742
+ /**
743
+ * Sets the subsurface color texture.
744
+ * @param value The subsurface tint texture or null
745
+ */
746
+ set subsurfaceColorTexture(e) {
747
+ this._material.subsurfaceColorTexture = e;
748
+ }
749
+ /**
750
+ * Sets the diffuse transmission tint of the material
751
+ */
752
+ set diffuseTransmissionTint(e) {
753
+ this._diffuseTransmissionTint = e;
754
+ }
755
+ /**
756
+ * Gets the diffuse transmission tint of the material
757
+ */
758
+ get diffuseTransmissionTint() {
759
+ return this._diffuseTransmissionTint;
760
+ }
761
+ /**
762
+ * Sets the diffuse transmission tint texture of the material
763
+ */
764
+ set diffuseTransmissionTintTexture(e) {
765
+ this._diffuseTransmissionTintTexture = e;
766
+ }
767
+ /**
768
+ * Gets the subsurface radius for subsurface scattering.
769
+ * subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
770
+ */
771
+ get subsurfaceRadius() {
772
+ return this._material.subsurfaceRadius;
773
+ }
774
+ /**
775
+ * Sets the subsurface radius for subsurface scattering.
776
+ * subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
777
+ * @param value The subsurface radius value
778
+ */
779
+ set subsurfaceRadius(e) {
780
+ this._material.subsurfaceRadius = e;
781
+ }
782
+ /**
783
+ * Gets the subsurface radius scale for subsurface scattering.
784
+ * subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
785
+ */
786
+ get subsurfaceRadiusScale() {
787
+ return this._material.subsurfaceRadiusScale;
788
+ }
789
+ /**
790
+ * Sets the subsurface radius scale for subsurface scattering.
791
+ * subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
792
+ * @param value The subsurface radius scale as a Color3
793
+ */
794
+ set subsurfaceRadiusScale(e) {
795
+ this._material.subsurfaceRadiusScale = e;
796
+ }
797
+ /**
798
+ * Sets the subsurface scattering anisotropy.
799
+ * @param value The anisotropy intensity value
800
+ */
801
+ set subsurfaceScatterAnisotropy(e) {
802
+ this._material.subsurfaceScatterAnisotropy = e;
803
+ }
804
+ /**
805
+ * Does this material have a translucent surface (i.e. either transmission or subsurface)?
806
+ * @returns True if the material is translucent, false otherwise
807
+ */
808
+ isTranslucent() {
809
+ return this.transmissionWeight > 0 || this.subsurfaceWeight > 0;
810
+ }
811
+ // ========================================
812
+ // FUZZ LAYER (Sheen)
813
+ // ========================================
814
+ /**
815
+ * Configures fuzz for OpenPBR.
816
+ * Enables fuzz and sets up proper configuration.
817
+ */
818
+ configureFuzz() {
819
+ }
820
+ /**
821
+ * Sets the fuzz weight.
822
+ * @param value The fuzz weight value
823
+ */
824
+ set fuzzWeight(e) {
825
+ this._material.fuzzWeight = e;
826
+ }
827
+ /**
828
+ * Sets the fuzz weight texture.
829
+ * @param value The fuzz weight texture or null
830
+ */
831
+ set fuzzWeightTexture(e) {
832
+ this._material.fuzzWeightTexture = e;
833
+ }
834
+ /**
835
+ * Sets the fuzz color.
836
+ * @param value The fuzz color as a Color3
837
+ */
838
+ set fuzzColor(e) {
839
+ this._material.fuzzColor = e;
840
+ }
841
+ /**
842
+ * Sets the fuzz color texture.
843
+ * @param value The fuzz color texture or null
844
+ */
845
+ set fuzzColorTexture(e) {
846
+ this._material.fuzzColorTexture = e;
847
+ }
848
+ /**
849
+ * Sets the fuzz roughness.
850
+ * @param value The fuzz roughness value (0-1)
851
+ */
852
+ set fuzzRoughness(e) {
853
+ this._material.fuzzRoughness = e;
854
+ }
855
+ /**
856
+ * Sets the fuzz roughness texture.
857
+ * @param value The fuzz roughness texture or null
858
+ */
859
+ set fuzzRoughnessTexture(e) {
860
+ this._material.fuzzRoughnessTexture = e, this._material._useFuzzRoughnessFromTextureAlpha = !0;
861
+ }
862
+ // ========================================
863
+ // ANISOTROPY
864
+ // ========================================
865
+ /**
866
+ * Sets the specular roughness anisotropy of the OpenPBR material.
867
+ * @param value The anisotropy intensity value
868
+ */
869
+ set specularRoughnessAnisotropy(e) {
870
+ this._material.specularRoughnessAnisotropy = e;
871
+ }
872
+ /**
873
+ * Gets the specular roughness anisotropy of the OpenPBR material.
874
+ * @returns The anisotropy intensity value
875
+ */
876
+ get specularRoughnessAnisotropy() {
877
+ return this._material.specularRoughnessAnisotropy;
878
+ }
879
+ /**
880
+ * Sets the anisotropy rotation angle.
881
+ * @param value The anisotropy rotation angle in radians
882
+ */
883
+ set geometryTangentAngle(e) {
884
+ this._material.geometryTangentAngle = e;
885
+ }
886
+ /**
887
+ * Sets the geometry tangent texture for anisotropy.
888
+ * Automatically enables using anisotropy from the tangent texture.
889
+ * @param value The anisotropy texture or null
890
+ */
891
+ set geometryTangentTexture(e) {
892
+ this._material.geometryTangentTexture = e, this._material._useSpecularRoughnessAnisotropyFromTangentTexture = !0;
893
+ }
894
+ /**
895
+ * Gets the geometry tangent texture for anisotropy.
896
+ * @returns The anisotropy texture or null
897
+ */
898
+ get geometryTangentTexture() {
899
+ return this._material.geometryTangentTexture;
900
+ }
901
+ /**
902
+ * Configures glTF-style anisotropy for the OpenPBR material.
903
+ * @param useGltfStyle Whether to use glTF-style anisotropy
904
+ */
905
+ configureGltfStyleAnisotropy(e = !0) {
906
+ this._material._useGltfStyleAnisotropy = e;
907
+ }
908
+ // ========================================
909
+ // THIN FILM IRIDESCENCE
910
+ // ========================================
911
+ /**
912
+ * Sets the thin film weight.
913
+ * @param value The thin film weight value
914
+ */
915
+ set thinFilmWeight(e) {
916
+ this._material.thinFilmWeight = e;
917
+ }
918
+ /**
919
+ * Sets the thin film IOR.
920
+ * @param value The thin film IOR value
921
+ */
922
+ set thinFilmIor(e) {
923
+ this._material.thinFilmIor = e;
924
+ }
925
+ /**
926
+ * Sets the thin film thickness minimum.
927
+ * @param value The minimum thickness value in nanometers
928
+ */
929
+ set thinFilmThicknessMinimum(e) {
930
+ this._material.thinFilmThicknessMin = e / 1e3;
931
+ }
932
+ /**
933
+ * Sets the thin film thickness maximum.
934
+ * @param value The maximum thickness value in nanometers
935
+ */
936
+ set thinFilmThicknessMaximum(e) {
937
+ this._material.thinFilmThickness = e / 1e3;
938
+ }
939
+ /**
940
+ * Sets the thin film weight texture.
941
+ * @param value The thin film weight texture or null
942
+ */
943
+ set thinFilmWeightTexture(e) {
944
+ this._material.thinFilmWeightTexture = e;
945
+ }
946
+ /**
947
+ * Sets the thin film thickness texture.
948
+ * @param value The thin film thickness texture or null
949
+ */
950
+ set thinFilmThicknessTexture(e) {
951
+ this._material.thinFilmThicknessTexture = e, this._material._useThinFilmThicknessFromTextureGreen = !0;
952
+ }
953
+ // ========================================
954
+ // UNLIT MATERIALS
955
+ // ========================================
956
+ /**
957
+ * Sets whether the OpenPBR material is unlit.
958
+ * @param value True to make the material unlit
959
+ */
960
+ set unlit(e) {
961
+ this._material.unlit = e;
962
+ }
963
+ // ========================================
964
+ // GEOMETRY PARAMETERS
965
+ // ========================================
966
+ /**
967
+ * Sets the geometry opacity of the OpenPBR material.
968
+ * @param value The opacity value (0-1)
969
+ */
970
+ set geometryOpacity(e) {
971
+ this._material.geometryOpacity = e;
972
+ }
973
+ /**
974
+ * Gets the geometry opacity of the OpenPBR material.
975
+ * @returns The opacity value (0-1)
976
+ */
977
+ get geometryOpacity() {
978
+ return this._material.geometryOpacity;
979
+ }
980
+ /**
981
+ * Sets the geometry normal texture of the OpenPBR material.
982
+ * @param value The normal texture or null
983
+ */
984
+ set geometryNormalTexture(e) {
985
+ this._material.geometryNormalTexture = e;
986
+ }
987
+ /**
988
+ * Gets the geometry normal texture of the OpenPBR material.
989
+ * @returns The normal texture or null
990
+ */
991
+ get geometryNormalTexture() {
992
+ return this._material.geometryNormalTexture;
993
+ }
994
+ /**
995
+ * Sets the normal map inversions for the OpenPBR material.
996
+ * Note: OpenPBR may handle normal map inversions differently or may not need them.
997
+ * @param invertX Whether to invert the normal map on the X axis (may be ignored)
998
+ * @param invertY Whether to invert the normal map on the Y axis (may be ignored)
999
+ */
1000
+ setNormalMapInversions(e, o) {
1001
+ }
1002
+ /**
1003
+ * Sets the geometry coat normal texture of the OpenPBR material.
1004
+ * @param value The coat normal texture or null
1005
+ */
1006
+ set geometryCoatNormalTexture(e) {
1007
+ this._material.geometryCoatNormalTexture = e;
1008
+ }
1009
+ /**
1010
+ * Gets the geometry coat normal texture of the OpenPBR material.
1011
+ * @returns The coat normal texture or null
1012
+ */
1013
+ get geometryCoatNormalTexture() {
1014
+ return this._material.geometryCoatNormalTexture;
1015
+ }
1016
+ /**
1017
+ * Sets the geometry coat normal texture scale.
1018
+ * @param value The scale value for the coat normal texture
1019
+ */
1020
+ set geometryCoatNormalTextureScale(e) {
1021
+ this._material.geometryCoatNormalTexture && (this._material.geometryCoatNormalTexture.level = e);
1022
+ }
1023
+ /**
1024
+ * Finalizes material properties after all loading is complete.
1025
+ * @param signal An AbortSignal that fires when the loader is disposed. Intermediate
1026
+ * textures are disposed and the method returns early when aborted.
1027
+ */
1028
+ async finalizeAsync(e) {
1029
+ if (this._diffuseTransmissionTint && !this._diffuseTransmissionTint.equals(c.White()) || this._diffuseTransmissionTintTexture) {
1030
+ if (this._material.geometryThinWalled)
1031
+ this.subsurfaceColor = this._diffuseTransmissionTint, this.subsurfaceColorTexture = this._diffuseTransmissionTintTexture;
1032
+ else if (await this.copySurfaceToCoatAsync(this.subsurfaceWeight, this.subsurfaceWeightTexture, s.A, this._diffuseTransmissionTint, this._diffuseTransmissionTintTexture, !0, e), e.aborted)
1033
+ return;
1034
+ }
1035
+ if (this.transmissionWeight > 0) {
1036
+ if (this._material.geometryThinWalled || this._material.transmissionDepth === 0)
1037
+ this._material.transmissionColor = this._material.baseColor, this._material.transmissionColorTexture = this._material.baseColorTexture;
1038
+ else if ((!this.baseColor.equals(c.White()) || this.baseColorTexture !== null) && (await this.copySurfaceToCoatAsync(this.transmissionWeight, this.transmissionWeightTexture, s.R, this.baseColor, this.baseColorTexture, !1, e), e.aborted))
1039
+ return;
1040
+ }
1041
+ if (this._specWorkflow) {
1042
+ const o = await D("newRoughnessTexture (" + this._material.name + ")", await z("glossiness (" + this._material.name + ")", t(this.specularColorTexture, new r(this.specularColor.r, this.specularColor.g, this.specularColor.b, this.glossiness), s.A, i.Linear), s.A, this._material.getScene(), i.Linear, _.R), this._material.getScene(), _.R, i.Linear, _.R);
1043
+ if (e.aborted) {
1044
+ o.texture?.dispose();
1045
+ return;
1046
+ }
1047
+ this.specularRoughnessTexture = o.texture, this.specularRoughness = o.factor ? o.factor.r : 1;
1048
+ const u = await B("metallicTexture (" + this._material.name + ")", t(this.specularColorTexture, this.specularColor.toColor4(), s.RGBA, i.Linear), this._material.getScene(), !1, i.SRGB, _.RGB);
1049
+ if (e.aborted) {
1050
+ u.texture?.dispose();
1051
+ return;
1052
+ }
1053
+ this.baseMetalnessTexture = u.texture, this.baseMetalness = u.factor ? u.factor.r : 1;
1054
+ const n = await l("newBaseColor (" + this._material.name + ")", t(this.baseColorTexture, this.baseColor.toColor4(), s.RGBA, i.Linear), t(this.specularColorTexture, this.specularColor.toColor4(), s.RGBA, i.Linear), { ...u, dispose: void 0, colorSpace: i.Linear }, this._material.getScene(), i.SRGB, _.RGB);
1055
+ if (e.aborted) {
1056
+ n.texture?.dispose();
1057
+ return;
1058
+ }
1059
+ this.baseColorTexture?.dispose(), this.baseColorTexture = n.texture, this.baseColor = n.factor ? new c(n.factor.r, n.factor.g, n.factor.b) : c.White(), this.specularColorTexture?.dispose(), this.specularColorTexture = null;
1060
+ }
1061
+ }
1062
+ async copySurfaceToCoatAsync(e, o, u, n, d, y = !1, h = new AbortController().signal) {
1063
+ const x = this._material.coatWeight, g = this._material.coatWeightTexture, F = this._material.coatColor.clone(), k = this._material.coatColorTexture, C = this._material.geometryCoatNormalTexture, T = new r(x, x, x, x), W = new r(e, e, e, e);
1064
+ this.coatWeightTexture = null, this.coatWeight = 1;
1065
+ const p = await Promise.allSettled([
1066
+ l("lerpExistingCoat", t(null, new r(1, 1, 1, 1)), t(k, F.toColor4(), s.RGBA, i.SRGB), t(g, T, s.R), this._material.getScene(), i.SRGB),
1067
+ l("lerpSurfaceColor", t(null, new r(1, 1, 1, 1)), t(d, n.toColor4(), s.RGBA, i.SRGB), t(o, W, u), this._material.getScene(), i.SRGB)
1068
+ ]), S = p.find((a) => a.status === "rejected");
1069
+ if (S) {
1070
+ for (const a of p)
1071
+ a.status === "fulfilled" && a.value.texture?.dispose();
1072
+ throw S.reason;
1073
+ }
1074
+ const [A, w] = p.map((a) => a.value);
1075
+ if (h.aborted) {
1076
+ A.texture?.dispose(), w.texture?.dispose();
1077
+ return;
1078
+ }
1079
+ const m = await G("newCoatColor (" + this._material.name + ")", A, w, this._material.getScene(), i.SRGB);
1080
+ if (h.aborted) {
1081
+ m.texture?.dispose();
1082
+ return;
1083
+ }
1084
+ m.texture ? (this.coatColorTexture = m.texture, this.coatColor = c.White()) : m.factor && (this.coatColorTexture = null, this.coatColor.fromArray([m.factor.r, m.factor.g, m.factor.b]));
1085
+ const R = await l("newCoatIor (" + this._material.name + ")", t(null, new r(this._material.specularIor, this._material.specularIor, this._material.specularIor, 1), s.R), t(null, new r(this.coatIor, this.coatIor, this.coatIor, 1), s.R), t(g, T, s.R), this._material.getScene());
1086
+ if (h.aborted) {
1087
+ R.texture?.dispose();
1088
+ return;
1089
+ }
1090
+ this.coatIor = R.factor ? R.factor.r : this.coatIor;
1091
+ const f = await l("newCoatRoughness (" + this._material.name + ")", t(this.specularRoughnessTexture, new r(this.specularRoughness, this.specularRoughness, this.specularRoughness, 1), s.G), t(this.coatRoughnessTexture, new r(this.coatRoughness, this.coatRoughness, this.coatRoughness, 1), s.G), t(g, T, s.R), this._material.getScene());
1092
+ if (h.aborted) {
1093
+ f.texture?.dispose();
1094
+ return;
1095
+ }
1096
+ this.coatRoughness = f.factor ? f.factor.r : 1, this.coatRoughnessTexture = f.texture;
1097
+ const b = await l("newCoatDarkening (" + this._material.name + ")", t(null, new r(0, 0, 0, 1), s.R), t(null, new r(this.coatDarkening, this.coatDarkening, this.coatDarkening, 1), s.R), t(g, T, s.R), this._material.getScene());
1098
+ if (h.aborted) {
1099
+ b.texture?.dispose();
1100
+ return;
1101
+ }
1102
+ if (this.coatDarkening = b.factor ? b.factor.r : this.coatDarkening, y) {
1103
+ const a = await l("newSpecularRoughness (" + this._material.name + ")", t(this.specularRoughnessTexture, new r(this._material.specularRoughness, this._material.specularRoughness, this._material.specularRoughness, 1), s.G), t(null, new r(1, 1, 1, 1), s.R), t(o, W, u), this._material.getScene());
1104
+ if (h.aborted) {
1105
+ a.texture?.dispose();
1106
+ return;
1107
+ }
1108
+ this.specularRoughness = a.factor ? a.factor.r : 1, this.specularRoughnessTexture = a.texture;
1109
+ }
1110
+ if (C || this.geometryNormalTexture) {
1111
+ const a = await l("newCoatNormal (" + this._material.name + ")", t(this.geometryNormalTexture, this.geometryNormalTexture ? new r(1, 1, 1, 1) : new r(0.5, 0.5, 1, 1), s.RGBA), t(C, C ? new r(1, 1, 1, 1) : new r(0.5, 0.5, 1, 1), s.RGBA), t(g, T, s.R), this._material.getScene());
1112
+ if (h.aborted) {
1113
+ a.texture?.dispose();
1114
+ return;
1115
+ }
1116
+ a.texture && (this.geometryCoatNormalTexture = a.texture);
1117
+ }
1118
+ }
1119
+ }
1120
+ export {
1121
+ I as OpenPBRMaterialLoadingAdapter
1122
+ };