@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,18 @@
1
+ import { b0 as r } from "./index-CS3Icp_r.js";
2
+ const a = "harmonicsFunctions", e = `#ifdef USESPHERICALFROMREFLECTIONMAP
3
+ #ifdef SPHERICAL_HARMONICS
4
+ fn computeEnvironmentIrradiance(normal: vec3f)->vec3f {return uniforms.vSphericalL00
5
+ + uniforms.vSphericalL1_1*(normal.y)
6
+ + uniforms.vSphericalL10*(normal.z)
7
+ + uniforms.vSphericalL11*(normal.x)
8
+ + uniforms.vSphericalL2_2*(normal.y*normal.x)
9
+ + uniforms.vSphericalL2_1*(normal.y*normal.z)
10
+ + uniforms.vSphericalL20*((3.0*normal.z*normal.z)-1.0)
11
+ + uniforms.vSphericalL21*(normal.z*normal.x)
12
+ + uniforms.vSphericalL22*(normal.x*normal.x-(normal.y*normal.y));}
13
+ #else
14
+ fn computeEnvironmentIrradiance(normal: vec3f)->vec3f {var Nx: f32=normal.x;var Ny: f32=normal.y;var Nz: f32=normal.z;var C1: vec3f=uniforms.vSphericalZZ.rgb;var Cx: vec3f=uniforms.vSphericalX.rgb;var Cy: vec3f=uniforms.vSphericalY.rgb;var Cz: vec3f=uniforms.vSphericalZ.rgb;var Cxx_zz: vec3f=uniforms.vSphericalXX_ZZ.rgb;var Cyy_zz: vec3f=uniforms.vSphericalYY_ZZ.rgb;var Cxy: vec3f=uniforms.vSphericalXY.rgb;var Cyz: vec3f=uniforms.vSphericalYZ.rgb;var Czx: vec3f=uniforms.vSphericalZX.rgb;var a1: vec3f=Cyy_zz*Ny+Cy;var a2: vec3f=Cyz*Nz+a1;var b1: vec3f=Czx*Nz+Cx;var b2: vec3f=Cxy*Ny+b1;var b3: vec3f=Cxx_zz*Nx+b2;var t1: vec3f=Cz *Nz+C1;var t2: vec3f=a2 *Ny+t1;var t3: vec3f=b3 *Nx+t2;return t3;}
15
+ #endif
16
+ #endif
17
+ `;
18
+ r.IncludesShadersStoreWGSL[a] || (r.IncludesShadersStoreWGSL[a] = e);
@@ -0,0 +1,112 @@
1
+ import "./index-CS3Icp_r.js";
2
+ function m(t, e) {
3
+ return e > 1023 ? t * Math.pow(2, 1023) * Math.pow(2, e - 1023) : e < -1074 ? t * Math.pow(2, -1074) * Math.pow(2, e + 1074) : t * Math.pow(2, e);
4
+ }
5
+ function p(t, e, s, r, i, n) {
6
+ i > 0 ? (i = m(1, i - 136), t[n + 0] = e * i, t[n + 1] = s * i, t[n + 2] = r * i) : (t[n + 0] = 0, t[n + 1] = 0, t[n + 2] = 0);
7
+ }
8
+ function g(t, e) {
9
+ let s = "", r;
10
+ for (let i = e; i < t.length - e && (r = String.fromCharCode(t[i]), r != `
11
+ `); i++)
12
+ s += r;
13
+ return s;
14
+ }
15
+ function D(t) {
16
+ let e = g(t, 0);
17
+ if (e[0] != "#" || e[1] != "?")
18
+ throw "Bad HDR Format.";
19
+ let s = !1, r = !1, i = 0;
20
+ do
21
+ i += e.length + 1, e = g(t, i), e == "FORMAT=32-bit_rle_rgbe" ? r = !0 : e.length == 0 && (s = !0);
22
+ while (!s);
23
+ if (!r)
24
+ throw "HDR Bad header format, unsupported FORMAT";
25
+ i += e.length + 1, e = g(t, i);
26
+ const o = /^-Y (.*) \+X (.*)$/g.exec(e);
27
+ if (!o || o.length < 3)
28
+ throw "HDR Bad header format, no size";
29
+ const h = parseInt(o[2]), l = parseInt(o[1]);
30
+ if (h < 8 || h > 32767)
31
+ throw "HDR Bad header format, unsupported size";
32
+ return i += e.length + 1, {
33
+ height: l,
34
+ width: h,
35
+ dataPosition: i
36
+ };
37
+ }
38
+ function b(t, e) {
39
+ return H(t, e);
40
+ }
41
+ function H(t, e) {
42
+ let s = e.height;
43
+ const r = e.width;
44
+ let i, n, o, h, l, a = e.dataPosition, f, d, c;
45
+ const B = new ArrayBuffer(r * 4), w = new Uint8Array(B), A = new ArrayBuffer(e.width * e.height * 4 * 3), u = new Float32Array(A);
46
+ for (; s > 0; ) {
47
+ if (i = t[a++], n = t[a++], o = t[a++], h = t[a++], i != 2 || n != 2 || o & 128 || e.width < 8 || e.width > 32767)
48
+ return F(t, e);
49
+ if ((o << 8 | h) != r)
50
+ throw "HDR Bad header format, wrong scan line width";
51
+ for (f = 0, c = 0; c < 4; c++)
52
+ for (d = (c + 1) * r; f < d; )
53
+ if (i = t[a++], n = t[a++], i > 128) {
54
+ if (l = i - 128, l == 0 || l > d - f)
55
+ throw "HDR Bad Format, bad scanline data (run)";
56
+ for (; l-- > 0; )
57
+ w[f++] = n;
58
+ } else {
59
+ if (l = i, l == 0 || l > d - f)
60
+ throw "HDR Bad Format, bad scanline data (non-run)";
61
+ if (w[f++] = n, --l > 0)
62
+ for (let R = 0; R < l; R++)
63
+ w[f++] = t[a++];
64
+ }
65
+ for (c = 0; c < r; c++)
66
+ i = w[c], n = w[c + r], o = w[c + 2 * r], h = w[c + 3 * r], p(u, i, n, o, h, (e.height - s) * r * 3 + c * 3);
67
+ s--;
68
+ }
69
+ return u;
70
+ }
71
+ function F(t, e) {
72
+ let s = e.height;
73
+ const r = e.width;
74
+ let i, n, o, h, l, a = e.dataPosition;
75
+ const f = new ArrayBuffer(e.width * e.height * 4 * 3), d = new Float32Array(f);
76
+ for (; s > 0; ) {
77
+ for (l = 0; l < e.width; l++)
78
+ i = t[a++], n = t[a++], o = t[a++], h = t[a++], p(d, i, n, o, h, (e.height - s) * r * 3 + l * 3);
79
+ s--;
80
+ }
81
+ return d;
82
+ }
83
+ class L {
84
+ constructor() {
85
+ this.supportCascades = !1;
86
+ }
87
+ /**
88
+ * Uploads the cube texture data to the WebGL texture. It has already been bound.
89
+ * Cube texture are not supported by .hdr files
90
+ */
91
+ loadCubeData() {
92
+ throw ".hdr not supported in Cube.";
93
+ }
94
+ /**
95
+ * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.
96
+ * @param data contains the texture data
97
+ * @param texture defines the BabylonJS internal texture
98
+ * @param callback defines the method to call once ready to upload
99
+ */
100
+ loadData(e, s, r) {
101
+ const i = new Uint8Array(e.buffer, e.byteOffset, e.byteLength), n = D(i), o = b(i, n), h = n.width * n.height, l = new Float32Array(h * 4);
102
+ for (let a = 0; a < h; a += 1)
103
+ l[a * 4] = o[a * 3], l[a * 4 + 1] = o[a * 3 + 1], l[a * 4 + 2] = o[a * 3 + 2], l[a * 4 + 3] = 1;
104
+ r(n.width, n.height, s.generateMipMaps, !1, () => {
105
+ const a = s.getEngine();
106
+ s.type = 1, s.format = 5, s._gammaSpace = !1, a._uploadDataToTextureDirectly(s, l);
107
+ });
108
+ }
109
+ }
110
+ export {
111
+ L as _HDRTextureLoader
112
+ };
@@ -0,0 +1,89 @@
1
+ import { b0 as e } from "./index-CS3Icp_r.js";
2
+ const r = "helperFunctions", t = `const PI: f32=3.1415926535897932384626433832795;const TWO_PI: f32=6.283185307179586;const HALF_PI: f32=1.5707963267948966;const RECIPROCAL_PI: f32=0.3183098861837907;const RECIPROCAL_PI2: f32=0.15915494309189535;const RECIPROCAL_PI4: f32=0.07957747154594767;const HALF_MIN: f32=5.96046448e-08;
3
+ const LinearEncodePowerApprox: f32=2.2;const GammaEncodePowerApprox: f32=1.0/LinearEncodePowerApprox;const LuminanceEncodeApprox: vec3f=vec3f(0.2126,0.7152,0.0722);const Epsilon:f32=0.0000001;fn square(x: f32)->f32 {return x*x;}
4
+ fn saturate(x: f32)->f32 {return clamp(x,0.0,1.0);}
5
+ fn saturateVec3(x: vec3f)->vec3f {return clamp(x,vec3f(),vec3f(1.0));}
6
+ fn saturateEps(x: f32)->f32 {return clamp(x,Epsilon,1.0);}
7
+ fn maxEps(x: f32)->f32 {return max(x,Epsilon);}
8
+ fn maxEpsVec3(x: vec3f)->vec3f {return max(x,vec3f(Epsilon));}
9
+ fn absEps(x: f32)->f32 {return abs(x)+Epsilon;}
10
+ fn transposeMat3(inMatrix: mat3x3f)->mat3x3f {let i0: vec3f=inMatrix[0];let i1: vec3f=inMatrix[1];let i2: vec3f=inMatrix[2];let outMatrix:mat3x3f=mat3x3f(
11
+ vec3(i0.x,i1.x,i2.x),
12
+ vec3(i0.y,i1.y,i2.y),
13
+ vec3(i0.z,i1.z,i2.z)
14
+ );return outMatrix;}
15
+ fn inverseMat3(inMatrix: mat3x3f)->mat3x3f {let a00: f32=inMatrix[0][0];let a01: f32=inMatrix[0][1];let a02: f32=inMatrix[0][2];let a10: f32=inMatrix[1][0];let a11: f32=inMatrix[1][1];let a12: f32=inMatrix[1][2];let a20: f32=inMatrix[2][0];let a21: f32=inMatrix[2][1];let a22: f32=inMatrix[2][2];let b01: f32=a22*a11-a12*a21;let b11: f32=-a22*a10+a12*a20;let b21: f32=a21*a10-a11*a20;let det: f32=a00*b01+a01*b11+a02*b21;return mat3x3f(b01/det,(-a22*a01+a02*a21)/det,(a12*a01-a02*a11)/det,
16
+ b11/det,(a22*a00-a02*a20)/det,(-a12*a00+a02*a10)/det,
17
+ b21/det,(-a21*a00+a01*a20)/det,(a11*a00-a01*a10)/det);}
18
+ #if USE_EXACT_SRGB_CONVERSIONS
19
+ fn toLinearSpaceExact(color: vec3f)->vec3f
20
+ {let nearZeroSection: vec3f=0.0773993808*color;let remainingSection: vec3f=pow(0.947867299*(color+vec3f(0.055)),vec3f(2.4));return mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3f(0.04045)));}
21
+ fn toGammaSpaceExact(color: vec3f)->vec3f
22
+ {let nearZeroSection: vec3f=12.92*color;let remainingSection: vec3f=1.055*pow(color,vec3f(0.41666))-vec3f(0.055);return mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3f(0.0031308)));}
23
+ #endif
24
+ fn toLinearSpace(color: f32)->f32
25
+ {
26
+ #if USE_EXACT_SRGB_CONVERSIONS
27
+ var nearZeroSection=0.0773993808*color;var remainingSection=pow(0.947867299*(color+0.055),2.4);return select(remainingSection,nearZeroSection,color<=0.04045);
28
+ #else
29
+ return pow(color,LinearEncodePowerApprox);
30
+ #endif
31
+ }
32
+ fn toLinearSpaceVec3(color: vec3f)->vec3f
33
+ {
34
+ #if USE_EXACT_SRGB_CONVERSIONS
35
+ return toLinearSpaceExact(color);
36
+ #else
37
+ return pow(color,vec3f(LinearEncodePowerApprox));
38
+ #endif
39
+ }
40
+ fn toLinearSpaceVec4(color: vec4<f32>)->vec4<f32>
41
+ {
42
+ #if USE_EXACT_SRGB_CONVERSIONS
43
+ return vec4f(toLinearSpaceExact(color.rgb),color.a);
44
+ #else
45
+ return vec4f(pow(color.rgb,vec3f(LinearEncodePowerApprox)),color.a);
46
+ #endif
47
+ }
48
+ fn toGammaSpace(color: vec4<f32>)->vec4<f32>
49
+ {
50
+ #if USE_EXACT_SRGB_CONVERSIONS
51
+ return vec4<f32>(toGammaSpaceExact(color.rgb),color.a);
52
+ #else
53
+ return vec4<f32>(pow(color.rgb,vec3f(GammaEncodePowerApprox)),color.a);
54
+ #endif
55
+ }
56
+ fn toGammaSpaceVec3(color: vec3f)->vec3f
57
+ {
58
+ #if USE_EXACT_SRGB_CONVERSIONS
59
+ return toGammaSpaceExact(color);
60
+ #else
61
+ return pow(color,vec3f(GammaEncodePowerApprox));
62
+ #endif
63
+ }
64
+ fn squareVec3(value: vec3f)->vec3f
65
+ {return value*value;}
66
+ fn pow5(value: f32)->f32 {let sq: f32=value*value;return sq*sq*value;}
67
+ fn double_refract(I: vec3f,N: vec3f,eta: f32)->vec3f {let Tfront: vec3f=refract(I,N,1.0/eta);let Nback: vec3f=normalize(reflect(N,Tfront));return refract(Tfront,-Nback,eta);}
68
+ fn getLuminanceUnclamped(color: vec3f)->f32
69
+ {return dot(color,LuminanceEncodeApprox);}
70
+ fn getLuminance(color: vec3f)->f32
71
+ {return saturate(getLuminanceUnclamped(color));}
72
+ fn getRand(seed: vec2<f32>)->f32 {return fract(sin(dot(seed.xy ,vec2<f32>(12.9898,78.233)))*43758.5453);}
73
+ fn dither(seed: vec2<f32>,varianceAmount: f32)->f32 {let rand: f32=getRand(seed);let normVariance: f32=varianceAmount/255.0;let dither: f32=mix(-normVariance,normVariance,rand);return dither;}
74
+ const rgbdMaxRange: f32=255.0;fn toRGBD(color: vec3f)->vec4<f32> {let maxRGB: f32=max(max(color.r,max(color.g,color.b)),Epsilon);var D: f32 =max(rgbdMaxRange/maxRGB,1.);D =clamp(floor(D)/255.0,0.,1.);var rgb: vec3f =color.rgb*D;rgb=toGammaSpaceVec3(rgb);return vec4<f32>(saturateVec3(rgb),D);}
75
+ fn fromRGBD(rgbd: vec4<f32>)->vec3f {let rgb=toLinearSpaceVec3(rgbd.rgb);return rgb/rgbd.a;}
76
+ fn parallaxCorrectNormal(vertexPos: vec3f,origVec: vec3f,cubeSize: vec3f,cubePos: vec3f)->vec3f {let invOrigVec: vec3f=vec3f(1.)/origVec;let halfSize: vec3f=cubeSize*0.5;let intersecAtMaxPlane: vec3f=(cubePos+halfSize-vertexPos)*invOrigVec;let intersecAtMinPlane: vec3f=(cubePos-halfSize-vertexPos)*invOrigVec;let largestIntersec: vec3f=max(intersecAtMaxPlane,intersecAtMinPlane);let distance: f32=min(min(largestIntersec.x,largestIntersec.y),largestIntersec.z);let intersectPositionWS: vec3f=vertexPos+origVec*distance;return intersectPositionWS-cubePos;}
77
+ fn equirectangularToCubemapDirection(uv : vec2f)->vec3f {var longitude : f32=uv.x*TWO_PI-PI;var latitude : f32=HALF_PI-uv.y*PI;var direction : vec3f;direction.x=cos(latitude)*sin(longitude);direction.y=sin(latitude);direction.z=cos(latitude)*cos(longitude);return direction;}
78
+ fn sqrtClamped(value: f32)->f32 {return sqrt(max(value,0.));}
79
+ fn avg(value: vec3f)->f32 {return dot(value,vec3f(0.333333333));}
80
+ fn singleScatterToMultiScatterAlbedo(rho_ss: vec3f)->vec3f {let s: vec3f=sqrt(max(vec3f(1.0)-rho_ss,vec3f(0.0)));return (vec3f(1.0)-s)*(vec3f(1.0)-vec3f(0.139)*s)/(vec3f(1.0)+vec3f(1.17)*s);}
81
+ fn multiScatterToSingleScatterAlbedo(rho_ms: vec3f)->vec3f {let s: vec3f=4.09712f+4.20863f*rho_ms-sqrt(9.59217f+41.6808f*rho_ms+17.7126f*rho_ms*rho_ms);return 1.0f-s*s;}
82
+ fn multiScatterToSingleScatterAlbedoWithAniso(rho_ms: vec3f,aniso: f32)->vec3f {let s: vec3f=4.09712+4.20863f*rho_ms-sqrt(9.59217f+41.6808f*rho_ms+17.7126f*rho_ms*rho_ms);return (vec3f(1.0f)-s*s)/maxEpsVec3(vec3f(1.0f)-vec3f(aniso)*s*s);}
83
+ fn min3(v: vec3f)->f32 {return min(v.x,min(v.y,v.z));}
84
+ fn max3(v: vec3f)->f32 {return max(v.x,max(v.y,v.z));}
85
+ fn uint2float(i: u32)->f32 {return bitcast<f32>(0x3F800000u | (i>>9u))-1.0;}
86
+ fn plasticSequence(rstate: u32)->vec2f {return vec2f(uint2float(rstate*3242174889u),
87
+ uint2float(rstate*2447445414u));}
88
+ `;
89
+ e.IncludesShadersStoreWGSL[r] || (e.IncludesShadersStoreWGSL[r] = t);
@@ -0,0 +1,121 @@
1
+ import { b0 as e } from "./index-CS3Icp_r.js";
2
+ const o = "helperFunctions", r = `const float PI=3.1415926535897932384626433832795;const float TWO_PI=6.283185307179586;const float HALF_PI=1.5707963267948966;const float RECIPROCAL_PI=0.3183098861837907;const float RECIPROCAL_PI2=0.15915494309189535;const float RECIPROCAL_PI4=0.07957747154594767;const float HALF_MIN=5.96046448e-08;
3
+ const float LinearEncodePowerApprox=2.2;const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox;const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722);const float Epsilon=0.0000001;
4
+ #define saturate(x) clamp(x,0.0,1.0)
5
+ #define absEps(x) abs(x)+Epsilon
6
+ #define maxEps(x) max(x,Epsilon)
7
+ #define saturateEps(x) clamp(x,Epsilon,1.0)
8
+ mat3 transposeMat3(mat3 inMatrix) {vec3 i0=inMatrix[0];vec3 i1=inMatrix[1];vec3 i2=inMatrix[2];mat3 outMatrix=mat3(
9
+ vec3(i0.x,i1.x,i2.x),
10
+ vec3(i0.y,i1.y,i2.y),
11
+ vec3(i0.z,i1.z,i2.z)
12
+ );return outMatrix;}
13
+ mat3 inverseMat3(mat3 inMatrix) {float a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2];float a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2];float a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2];float b01=a22*a11-a12*a21;float b11=-a22*a10+a12*a20;float b21=a21*a10-a11*a20;float det=a00*b01+a01*b11+a02*b21;return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11),
14
+ b11,(a22*a00-a02*a20),(-a12*a00+a02*a10),
15
+ b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det;}
16
+ #if USE_EXACT_SRGB_CONVERSIONS
17
+ vec3 toLinearSpaceExact(vec3 color)
18
+ {vec3 nearZeroSection=0.0773993808*color;vec3 remainingSection=pow(0.947867299*(color+vec3(0.055)),vec3(2.4));
19
+ #if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
20
+ return mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3(0.04045)));
21
+ #else
22
+ return
23
+ vec3(
24
+ color.r<=0.04045 ? nearZeroSection.r : remainingSection.r,
25
+ color.g<=0.04045 ? nearZeroSection.g : remainingSection.g,
26
+ color.b<=0.04045 ? nearZeroSection.b : remainingSection.b);
27
+ #endif
28
+ }
29
+ vec3 toGammaSpaceExact(vec3 color)
30
+ {vec3 nearZeroSection=12.92*color;vec3 remainingSection=1.055*pow(color,vec3(0.41666))-vec3(0.055);
31
+ #if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
32
+ return mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3(0.0031308)));
33
+ #else
34
+ return
35
+ vec3(
36
+ color.r<=0.0031308 ? nearZeroSection.r : remainingSection.r,
37
+ color.g<=0.0031308 ? nearZeroSection.g : remainingSection.g,
38
+ color.b<=0.0031308 ? nearZeroSection.b : remainingSection.b);
39
+ #endif
40
+ }
41
+ #endif
42
+ float toLinearSpace(float color)
43
+ {
44
+ #if USE_EXACT_SRGB_CONVERSIONS
45
+ float nearZeroSection=0.0773993808*color;float remainingSection=pow(0.947867299*(color+0.055),2.4);return color<=0.04045 ? nearZeroSection : remainingSection;
46
+ #else
47
+ return pow(color,LinearEncodePowerApprox);
48
+ #endif
49
+ }
50
+ vec3 toLinearSpace(vec3 color)
51
+ {
52
+ #if USE_EXACT_SRGB_CONVERSIONS
53
+ return toLinearSpaceExact(color);
54
+ #else
55
+ return pow(color,vec3(LinearEncodePowerApprox));
56
+ #endif
57
+ }
58
+ vec4 toLinearSpace(vec4 color)
59
+ {
60
+ #if USE_EXACT_SRGB_CONVERSIONS
61
+ return vec4(toLinearSpaceExact(color.rgb),color.a);
62
+ #else
63
+ return vec4(pow(color.rgb,vec3(LinearEncodePowerApprox)),color.a);
64
+ #endif
65
+ }
66
+ float toGammaSpace(float color)
67
+ {
68
+ #if USE_EXACT_SRGB_CONVERSIONS
69
+ float nearZeroSection=12.92*color;float remainingSection=1.055*pow(color,0.41666)-0.055;return color<=0.0031308 ? nearZeroSection : remainingSection;
70
+ #else
71
+ return pow(color,GammaEncodePowerApprox);
72
+ #endif
73
+ }
74
+ vec3 toGammaSpace(vec3 color)
75
+ {
76
+ #if USE_EXACT_SRGB_CONVERSIONS
77
+ return toGammaSpaceExact(color);
78
+ #else
79
+ return pow(color,vec3(GammaEncodePowerApprox));
80
+ #endif
81
+ }
82
+ vec4 toGammaSpace(vec4 color)
83
+ {
84
+ #if USE_EXACT_SRGB_CONVERSIONS
85
+ return vec4(toGammaSpaceExact(color.rgb),color.a);
86
+ #else
87
+ return vec4(pow(color.rgb,vec3(GammaEncodePowerApprox)),color.a);
88
+ #endif
89
+ }
90
+ float square(float value)
91
+ {return value*value;}
92
+ vec3 square(vec3 value)
93
+ {return value*value;}
94
+ float pow5(float value) {float sq=value*value;return sq*sq*value;}
95
+ vec3 double_refract(vec3 I,vec3 N,float eta) {vec3 Tfront=refract(I,N,1.0/eta);vec3 Nback=normalize(reflect(N,Tfront));return refract(Tfront,-Nback,eta);}
96
+ float getLuminanceUnclamped(vec3 color)
97
+ {return dot(color,LuminanceEncodeApprox);}
98
+ float getLuminance(vec3 color)
99
+ {return saturate(getLuminanceUnclamped(color));}
100
+ float getRand(vec2 seed) {return fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453);}
101
+ float dither(vec2 seed,float varianceAmount) {float rand=getRand(seed);float normVariance=varianceAmount/255.0;float dither=mix(-normVariance,normVariance,rand);return dither;}
102
+ const float rgbdMaxRange=255.;vec4 toRGBD(vec3 color) {float maxRGB=maxEps(max(color.r,max(color.g,color.b)));float D =max(rgbdMaxRange/maxRGB,1.);D =saturate(floor(D)/255.);vec3 rgb=color.rgb*D;rgb=toGammaSpace(rgb);return vec4(saturate(rgb),D);}
103
+ vec3 fromRGBD(vec4 rgbd) {rgbd.rgb=toLinearSpace(rgbd.rgb);return rgbd.rgb/rgbd.a;}
104
+ vec3 parallaxCorrectNormal( vec3 vertexPos,vec3 origVec,vec3 cubeSize,vec3 cubePos ) {vec3 invOrigVec=vec3(1.)/origVec;vec3 halfSize=cubeSize*0.5;vec3 intersecAtMaxPlane=(cubePos+halfSize-vertexPos)*invOrigVec;vec3 intersecAtMinPlane=(cubePos-halfSize-vertexPos)*invOrigVec;vec3 largestIntersec=max(intersecAtMaxPlane,intersecAtMinPlane);float distance=min(min(largestIntersec.x,largestIntersec.y),largestIntersec.z);vec3 intersectPositionWS=vertexPos+origVec*distance;return intersectPositionWS-cubePos;}
105
+ vec3 equirectangularToCubemapDirection(vec2 uv) {float longitude=uv.x*TWO_PI-PI;float latitude=HALF_PI-uv.y*PI;vec3 direction;direction.x=cos(latitude)*sin(longitude);direction.y=sin(latitude);direction.z=cos(latitude)*cos(longitude);return direction;}
106
+ float sqrtClamped(float value) {return sqrt(max(value,0.));}
107
+ float avg(vec3 value) {return dot(value,vec3(0.333333333));}
108
+ #if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
109
+ uint extractBits(uint value,int offset,int width) {return (value>>offset) & ((1u<<width)-1u);}
110
+ int onlyBitPosition(uint value) {return (floatBitsToInt(float(value))>>23)-0x7f;}
111
+ vec3 singleScatterToMultiScatterAlbedo(vec3 rho_ss) {vec3 s=sqrt(max(vec3(1.0)-rho_ss,vec3(0.0)));return (vec3(1.0)-s)*(vec3(1.0)-vec3(0.139)*s)/(vec3(1.0)+vec3(1.17)*s);}
112
+ vec3 multiScatterToSingleScatterAlbedo(vec3 rho_ms) {vec3 s=4.09712+4.20863*rho_ms-sqrt(9.59217+41.6808*rho_ms+17.7126*rho_ms*rho_ms);return 1.0-s*s;}
113
+ vec3 multiScatterToSingleScatterAlbedo(vec3 rho_ms,float aniso) {vec3 s=4.09712+4.20863*rho_ms-sqrt(9.59217+41.6808*rho_ms+17.7126*rho_ms*rho_ms);return (1.0-s*s)/maxEps(1.0-aniso*s*s);}
114
+ float min3(vec3 v) {return min(v.x,min(v.y,v.z));}
115
+ float max3(vec3 v) {return max(v.x,max(v.y,v.z));}
116
+ float uint2float(uint i) {return uintBitsToFloat(0x3F800000u | (i>>9u))-1.0;}
117
+ vec2 plasticSequence(const uint rstate) {return vec2(uint2float(rstate*3242174889u),
118
+ uint2float(rstate*2447445414u));}
119
+ #endif
120
+ `;
121
+ e.IncludesShadersStore[o] || (e.IncludesShadersStore[o] = r);
@@ -0,0 +1,93 @@
1
+ import { a5 as p } from "./index-CS3Icp_r.js";
2
+ function O(t) {
3
+ return t.split(" ").filter((r) => r !== "").map((r) => parseFloat(r));
4
+ }
5
+ function x(t, r, o) {
6
+ for (; o.length !== r; ) {
7
+ const n = O(t.lines[t.index++]);
8
+ o.push(...n);
9
+ }
10
+ }
11
+ function V(t, r, o) {
12
+ let n = 0, e = 0, i = 0, u = 0, f = 0, h = 0;
13
+ for (let s = 0; s < t.numberOfHorizontalAngles - 1; s++)
14
+ if (o < t.horizontalAngles[s + 1] || s === t.numberOfHorizontalAngles - 2) {
15
+ e = s, i = t.horizontalAngles[s], u = t.horizontalAngles[s + 1];
16
+ break;
17
+ }
18
+ for (let s = 0; s < t.numberOfVerticalAngles - 1; s++)
19
+ if (r < t.verticalAngles[s + 1] || s === t.numberOfVerticalAngles - 2) {
20
+ n = s, f = t.verticalAngles[s], h = t.verticalAngles[s + 1];
21
+ break;
22
+ }
23
+ const c = u - i, A = h - f;
24
+ if (A === 0)
25
+ return 0;
26
+ const g = c === 0 ? 0 : (o - i) / c, b = (r - f) / A, d = c === 0 ? e : e + 1, l = p(t.candelaValues[e][n], t.candelaValues[d][n], g), a = p(t.candelaValues[e][n + 1], t.candelaValues[d][n + 1], g);
27
+ return p(l, a, b);
28
+ }
29
+ function z(t) {
30
+ const n = {
31
+ lines: new TextDecoder("utf-8").decode(t).split(`
32
+ `),
33
+ index: 0
34
+ }, e = { version: n.lines[0], candelaValues: [], horizontalAngles: [], verticalAngles: [], numberOfHorizontalAngles: 0, numberOfVerticalAngles: 0 };
35
+ for (n.index = 1; n.lines.length > 0 && !n.lines[n.index].includes("TILT="); )
36
+ n.index++;
37
+ n.lines[n.index].includes("INCLUDE"), n.index++;
38
+ const i = O(n.lines[n.index++]);
39
+ e.numberOfLights = i[0], e.lumensPerLamp = i[1], e.candelaMultiplier = i[2], e.numberOfVerticalAngles = i[3], e.numberOfHorizontalAngles = i[4], e.photometricType = i[5], e.unitsType = i[6], e.width = i[7], e.length = i[8], e.height = i[9];
40
+ const u = O(n.lines[n.index++]);
41
+ e.ballastFactor = u[0], e.fileGenerationType = u[1], e.inputWatts = u[2];
42
+ for (let l = 0; l < e.numberOfHorizontalAngles; l++)
43
+ e.candelaValues[l] = [];
44
+ x(n, e.numberOfVerticalAngles, e.verticalAngles), x(n, e.numberOfHorizontalAngles, e.horizontalAngles);
45
+ for (let l = 0; l < e.numberOfHorizontalAngles; l++)
46
+ x(n, e.numberOfVerticalAngles, e.candelaValues[l]);
47
+ let f = -1;
48
+ for (let l = 0; l < e.numberOfHorizontalAngles; l++)
49
+ for (let a = 0; a < e.numberOfVerticalAngles; a++)
50
+ e.candelaValues[l][a] *= e.candelaValues[l][a] * e.candelaMultiplier * e.ballastFactor * e.fileGenerationType, f = Math.max(f, e.candelaValues[l][a]);
51
+ if (f > 0)
52
+ for (let l = 0; l < e.numberOfHorizontalAngles; l++)
53
+ for (let a = 0; a < e.numberOfVerticalAngles; a++)
54
+ e.candelaValues[l][a] /= f;
55
+ const h = 180, c = h * 2, A = c * h, g = new Float32Array(c * h), b = e.horizontalAngles[0], d = e.horizontalAngles[e.numberOfHorizontalAngles - 1];
56
+ for (let l = 0; l < A; l++) {
57
+ let a = l % c;
58
+ const m = Math.floor(l / c);
59
+ d - b !== 0 && (a < b || a >= d) && (a %= d * 2, a > d && (a = d * 2 - a)), g[m + a * h] = V(e, m, a);
60
+ }
61
+ return {
62
+ width: c / 2,
63
+ height: 1,
64
+ data: g
65
+ };
66
+ }
67
+ class y {
68
+ constructor() {
69
+ this.supportCascades = !1;
70
+ }
71
+ /**
72
+ * Uploads the cube texture data to the WebGL texture. It has already been bound.
73
+ */
74
+ loadCubeData() {
75
+ throw ".ies not supported in Cube.";
76
+ }
77
+ /**
78
+ * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.
79
+ * @param data contains the texture data
80
+ * @param texture defines the BabylonJS internal texture
81
+ * @param callback defines the method to call once ready to upload
82
+ */
83
+ loadData(r, o, n) {
84
+ const e = new Uint8Array(r.buffer, r.byteOffset, r.byteLength), i = z(e);
85
+ n(i.width, i.height, !!o.useMipMaps, !1, () => {
86
+ const u = o.getEngine();
87
+ o.type = 1, o.format = 6, o._gammaSpace = !1, u._uploadDataToTextureDirectly(o, i.data);
88
+ });
89
+ }
90
+ }
91
+ export {
92
+ y as _IESTextureLoader
93
+ };