@roomle/web-sdk 3.6.0-alpha.2 → 3.6.0-alpha.4

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 (341) hide show
  1. package/lib/BufferGeometry-DLEagG41.mjs +1022 -0
  2. package/lib/BufferGeometry-DLEagG41.mjs.map +1 -0
  3. package/lib/ConfiguratorKernel.js +2 -2
  4. package/lib/ConfiguratorKernel.wasm +0 -0
  5. package/lib/GLTFExporter-D8qsdwDK.mjs +1092 -0
  6. package/lib/GLTFExporter-D8qsdwDK.mjs.map +1 -0
  7. package/lib/Object3D-DSjIOhON.mjs +1713 -0
  8. package/lib/Object3D-DSjIOhON.mjs.map +1 -0
  9. package/lib/PointLightHelper-BnjxGaOG.mjs +257 -0
  10. package/lib/PointLightHelper-BnjxGaOG.mjs.map +1 -0
  11. package/lib/RoomleCore.js +4 -4
  12. package/lib/RoomleCore.wasm +0 -0
  13. package/lib/RoomleToolsCore.wasm +0 -0
  14. package/lib/SpotLightHelper-DqsfqCrs.mjs +154 -0
  15. package/lib/SpotLightHelper-DqsfqCrs.mjs.map +1 -0
  16. package/lib/USDZExporter-DxIqi8St.mjs +296 -0
  17. package/lib/USDZExporter-DxIqi8St.mjs.map +1 -0
  18. package/lib/Vector4-DGmBYfpK.mjs +204 -0
  19. package/lib/Vector4-DGmBYfpK.mjs.map +1 -0
  20. package/lib/api-CNoIBuvr.mjs +55 -0
  21. package/lib/api-CNoIBuvr.mjs.map +1 -0
  22. package/lib/asset-loader.worker.js +1 -1
  23. package/lib/banana-for-scale-C_iNmlCT.mjs +36 -0
  24. package/lib/banana-for-scale-C_iNmlCT.mjs.map +1 -0
  25. package/lib/common-utils-DMSTohiS.mjs +187 -0
  26. package/lib/common-utils-DMSTohiS.mjs.map +1 -0
  27. package/lib/component-dimensioning-CvRmUja4.mjs +162 -0
  28. package/lib/component-dimensioning-CvRmUja4.mjs.map +1 -0
  29. package/lib/component-raycast-helper-CEp7wy9c.mjs +97 -0
  30. package/lib/component-raycast-helper-CEp7wy9c.mjs.map +1 -0
  31. package/lib/configurator-B_5XVG2O.mjs +45 -0
  32. package/lib/configurator-B_5XVG2O.mjs.map +1 -0
  33. package/lib/configurator-DCdvMM0o.mjs +2 -0
  34. package/lib/continuous-drawing-helper-v_5UAM9A.mjs +42 -0
  35. package/lib/continuous-drawing-helper-v_5UAM9A.mjs.map +1 -0
  36. package/lib/decorate-C1QnXPYw.mjs +35 -0
  37. package/lib/decorate-C1QnXPYw.mjs.map +1 -0
  38. package/lib/dimensioning-helper-DTcW85Oq.mjs +2 -0
  39. package/lib/dimensioning-helper-Fwpt1HTT.mjs +268 -0
  40. package/lib/dimensioning-helper-Fwpt1HTT.mjs.map +1 -0
  41. package/lib/fflate.module-dFNj5UPI.mjs +536 -0
  42. package/lib/fflate.module-dFNj5UPI.mjs.map +1 -0
  43. package/lib/glb-viewer-cP8g6bcm.mjs +315 -0
  44. package/lib/glb-viewer-cP8g6bcm.mjs.map +1 -0
  45. package/lib/glb-viewer-dZThmlwM.mjs +2 -0
  46. package/lib/homag-intelligence-LoOJ7roM.mjs +381 -0
  47. package/lib/homag-intelligence-LoOJ7roM.mjs.map +1 -0
  48. package/lib/imos-ix-poc-export-helper-CQh94HsO.mjs +161 -0
  49. package/lib/imos-ix-poc-export-helper-CQh94HsO.mjs.map +1 -0
  50. package/lib/kernel-BAQSG9r5.mjs +46 -0
  51. package/lib/kernel-BAQSG9r5.mjs.map +1 -0
  52. package/lib/kernel-utils-H74uNY1h.mjs +44 -0
  53. package/lib/kernel-utils-H74uNY1h.mjs.map +1 -0
  54. package/lib/layer-C_JtkhdO.mjs +8 -0
  55. package/lib/layer-C_JtkhdO.mjs.map +1 -0
  56. package/lib/main-BxEZ11ag.mjs +20461 -0
  57. package/lib/main-BxEZ11ag.mjs.map +1 -0
  58. package/lib/material-viewer-njBFF0Zg.mjs +292 -0
  59. package/lib/material-viewer-njBFF0Zg.mjs.map +1 -0
  60. package/lib/planner-Cr495Cyn.mjs +2 -0
  61. package/lib/planner-DY73rplC.mjs +44 -0
  62. package/lib/planner-DY73rplC.mjs.map +1 -0
  63. package/lib/plugin-system-D9K46xJk.mjs +55 -0
  64. package/lib/plugin-system-D9K46xJk.mjs.map +1 -0
  65. package/lib/roomle-sdk.d.ts +302 -134
  66. package/lib/roomle-sdk.js +7 -36
  67. package/lib/scene-renderer-D8HkTFeZ.mjs +3826 -0
  68. package/lib/scene-renderer-D8HkTFeZ.mjs.map +1 -0
  69. package/lib/script-loader-KBq8SjP6.mjs +45 -0
  70. package/lib/script-loader-KBq8SjP6.mjs.map +1 -0
  71. package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_decoder.js +34 -0
  72. package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_decoder.wasm +0 -0
  73. package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_encoder.js +33 -0
  74. package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_wasm_wrapper.js +117 -0
  75. package/lib/static/packages/workers/generated/asset-loader.worker.js +1 -0
  76. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -0
  77. package/lib/static/roomle-core-hsc/{configuratorCore.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorCore.d.ts} +1 -2
  78. package/lib/static/roomle-core-hsc/{configuratorCoreInterface.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts} +22 -29
  79. package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/embind/plannerCore.d.ts +1 -2
  80. package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/embind/plannerCoreCallback.d.ts +1 -1
  81. package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCoreCallback.js +1 -1
  82. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreCallback.js.map +1 -0
  83. package/lib/static/roomle-core-hsc/{plannerCoreInterface.d.ts → node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts} +76 -81
  84. package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCoreInterface.js +1 -6
  85. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -0
  86. package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/configurableObject.d.ts +2 -2
  87. package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/loader/configurableObject.js +6 -6
  88. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/configurableObject.js.map +1 -0
  89. package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/loader/configurationLoader.js +1 -5
  90. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/configurationLoader.js.map +1 -0
  91. package/lib/static/roomle-core-hsc/{configurationManager.d.ts → node_modules/roomle-core-hsc/src/loader/configurationManager.d.ts} +1 -0
  92. package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/configurationManager.js +6 -0
  93. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/configurationManager.js.map +1 -0
  94. package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/loader/planElementManager.d.ts +2 -2
  95. package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/planElementManager.js.map +1 -1
  96. package/lib/static/roomle-core-hsc/{wasm_modern → node_modules/roomle-core-hsc/wasm_modern}/ConfiguratorKernel.js +2 -2
  97. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  98. package/lib/static/roomle-core-hsc/{wasm_modern → node_modules/roomle-core-hsc/wasm_modern}/RoomleCore.js +4 -4
  99. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  100. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  101. package/lib/stats-helper-HM0TaIM5.mjs +95 -0
  102. package/lib/stats-helper-HM0TaIM5.mjs.map +1 -0
  103. package/lib/three.core-CLIofecG.mjs +7629 -0
  104. package/lib/three.core-CLIofecG.mjs.map +1 -0
  105. package/lib/three.module-C4Q1skJQ.mjs +5795 -0
  106. package/lib/three.module-C4Q1skJQ.mjs.map +1 -0
  107. package/lib/three.webgpu-dFspy2yF.mjs +16057 -0
  108. package/lib/three.webgpu-dFspy2yF.mjs.map +1 -0
  109. package/lib/threejs-utils-jEzvlJF1.mjs +2233 -0
  110. package/lib/threejs-utils-jEzvlJF1.mjs.map +1 -0
  111. package/lib/tools-core-CZbPygRC.mjs +30 -0
  112. package/lib/tools-core-CZbPygRC.mjs.map +1 -0
  113. package/package.json +3 -3
  114. package/lib/BufferGeometry-BZdSmtHt.mjs +0 -2064
  115. package/lib/BufferGeometry-BZdSmtHt.mjs.map +0 -1
  116. package/lib/GLTFExporter-DiE_HuI6.mjs +0 -1286
  117. package/lib/GLTFExporter-DiE_HuI6.mjs.map +0 -1
  118. package/lib/PointLightHelper-BvRpTX7D.mjs +0 -522
  119. package/lib/PointLightHelper-BvRpTX7D.mjs.map +0 -1
  120. package/lib/SpotLightHelper-Byg39thi.mjs +0 -222
  121. package/lib/SpotLightHelper-Byg39thi.mjs.map +0 -1
  122. package/lib/USDZExporter-VBx9xybH.mjs +0 -545
  123. package/lib/USDZExporter-VBx9xybH.mjs.map +0 -1
  124. package/lib/banana-for-scale-C9_AyZkI.mjs +0 -50
  125. package/lib/banana-for-scale-C9_AyZkI.mjs.map +0 -1
  126. package/lib/component-dimensioning-DHTSa-If.mjs +0 -229
  127. package/lib/component-dimensioning-DHTSa-If.mjs.map +0 -1
  128. package/lib/continuous-drawing-helper-BNHRsd4B.mjs +0 -48
  129. package/lib/continuous-drawing-helper-BNHRsd4B.mjs.map +0 -1
  130. package/lib/homag-intelligence-BraN723F.mjs +0 -545
  131. package/lib/homag-intelligence-BraN723F.mjs.map +0 -1
  132. package/lib/imos-ix-poc-export-helper-D7ubISCJ.mjs +0 -180
  133. package/lib/imos-ix-poc-export-helper-D7ubISCJ.mjs.map +0 -1
  134. package/lib/index-C-Prfui2.mjs +0 -73502
  135. package/lib/index-C-Prfui2.mjs.map +0 -1
  136. package/lib/material-viewer-DyVGp6Xm.mjs +0 -450
  137. package/lib/material-viewer-DyVGp6Xm.mjs.map +0 -1
  138. package/lib/roomle-sdk.js.map +0 -1
  139. package/lib/static/asset-loader.worker.js +0 -1
  140. package/lib/static/draco/gltf/draco_decoder.js +0 -33
  141. package/lib/static/draco/gltf/draco_decoder.wasm +0 -0
  142. package/lib/static/draco/gltf/draco_encoder.js +0 -33
  143. package/lib/static/draco/gltf/draco_wasm_wrapper.js +0 -116
  144. package/lib/static/roomle-core-hsc/ConfiguratorKernel.js +0 -74
  145. package/lib/static/roomle-core-hsc/ConfiguratorKernel.wasm +0 -0
  146. package/lib/static/roomle-core-hsc/RoomleCore.js +0 -79
  147. package/lib/static/roomle-core-hsc/RoomleCore.wasm +0 -0
  148. package/lib/static/roomle-core-hsc/RoomleToolsCore.wasm +0 -0
  149. package/lib/static/roomle-core-hsc/configurableObject.d.ts +0 -30
  150. package/lib/static/roomle-core-hsc/configurableObject.js +0 -111
  151. package/lib/static/roomle-core-hsc/configurableObject.js.map +0 -1
  152. package/lib/static/roomle-core-hsc/configurationLoader.js +0 -349
  153. package/lib/static/roomle-core-hsc/configurationLoader.js.map +0 -1
  154. package/lib/static/roomle-core-hsc/configurationManager.js +0 -141
  155. package/lib/static/roomle-core-hsc/configurationManager.js.map +0 -1
  156. package/lib/static/roomle-core-hsc/embind/configuratorCallback.d.ts +0 -82
  157. package/lib/static/roomle-core-hsc/embind/configuratorCallback.js +0 -355
  158. package/lib/static/roomle-core-hsc/embind/configuratorCallback.js.map +0 -1
  159. package/lib/static/roomle-core-hsc/embind/configuratorCore.d.ts +0 -20
  160. package/lib/static/roomle-core-hsc/embind/configuratorCore.js +0 -50
  161. package/lib/static/roomle-core-hsc/embind/configuratorCore.js.map +0 -1
  162. package/lib/static/roomle-core-hsc/embind/configuratorCoreInterface.d.ts +0 -753
  163. package/lib/static/roomle-core-hsc/embind/configuratorCoreInterface.js +0 -99
  164. package/lib/static/roomle-core-hsc/embind/configuratorCoreInterface.js.map +0 -1
  165. package/lib/static/roomle-core-hsc/embind/configuratorUtils.d.ts +0 -3
  166. package/lib/static/roomle-core-hsc/embind/configuratorUtils.js +0 -52
  167. package/lib/static/roomle-core-hsc/embind/configuratorUtils.js.map +0 -1
  168. package/lib/static/roomle-core-hsc/embind/coreModue.d.ts +0 -4
  169. package/lib/static/roomle-core-hsc/embind/coreModue.js +0 -3
  170. package/lib/static/roomle-core-hsc/embind/coreModue.js.map +0 -1
  171. package/lib/static/roomle-core-hsc/embind/coreModule.d.ts +0 -11
  172. package/lib/static/roomle-core-hsc/embind/coreModule.js +0 -19
  173. package/lib/static/roomle-core-hsc/embind/coreModule.js.map +0 -1
  174. package/lib/static/roomle-core-hsc/embind/plannerCore.d.ts +0 -32
  175. package/lib/static/roomle-core-hsc/embind/plannerCoreCallback.d.ts +0 -39
  176. package/lib/static/roomle-core-hsc/embind/plannerCoreCallback.js.map +0 -1
  177. package/lib/static/roomle-core-hsc/embind/plannerCoreInterface.d.ts +0 -858
  178. package/lib/static/roomle-core-hsc/embind/plannerCoreInterface.js.map +0 -1
  179. package/lib/static/roomle-core-hsc/loader/configurableObject.js +0 -111
  180. package/lib/static/roomle-core-hsc/loader/configurableObject.js.map +0 -1
  181. package/lib/static/roomle-core-hsc/loader/configurationGeometryConstructor.d.ts +0 -21
  182. package/lib/static/roomle-core-hsc/loader/configurationGeometryConstructor.js +0 -90
  183. package/lib/static/roomle-core-hsc/loader/configurationGeometryConstructor.js.map +0 -1
  184. package/lib/static/roomle-core-hsc/loader/configurationLoader.d.ts +0 -116
  185. package/lib/static/roomle-core-hsc/loader/configurationLoader.js +0 -349
  186. package/lib/static/roomle-core-hsc/loader/configurationLoader.js.map +0 -1
  187. package/lib/static/roomle-core-hsc/loader/configurationManager.d.ts +0 -40
  188. package/lib/static/roomle-core-hsc/loader/configurationManager.js.map +0 -1
  189. package/lib/static/roomle-core-hsc/loader/planElementManager.d.ts +0 -96
  190. package/lib/static/roomle-core-hsc/loaderUtility.d.ts +0 -81
  191. package/lib/static/roomle-core-hsc/loaderUtility.js +0 -141
  192. package/lib/static/roomle-core-hsc/loaderUtility.js.map +0 -1
  193. package/lib/static/roomle-core-hsc/logger.d.ts +0 -29
  194. package/lib/static/roomle-core-hsc/logger.js +0 -61
  195. package/lib/static/roomle-core-hsc/logger.js.map +0 -1
  196. package/lib/static/roomle-core-hsc/package.json +0 -1
  197. package/lib/static/roomle-core-hsc/planElementManager.d.ts +0 -96
  198. package/lib/static/roomle-core-hsc/planElementManager.js +0 -300
  199. package/lib/static/roomle-core-hsc/planElementManager.js.map +0 -1
  200. package/lib/static/roomle-core-hsc/plannerCore.d.ts +0 -32
  201. package/lib/static/roomle-core-hsc/plannerCore.js +0 -111
  202. package/lib/static/roomle-core-hsc/plannerCore.js.map +0 -1
  203. package/lib/static/roomle-core-hsc/plannerCoreCallback.d.ts +0 -39
  204. package/lib/static/roomle-core-hsc/plannerCoreCallback.js +0 -116
  205. package/lib/static/roomle-core-hsc/plannerCoreCallback.js.map +0 -1
  206. package/lib/static/roomle-core-hsc/plannerCoreInterface.js +0 -98
  207. package/lib/static/roomle-core-hsc/plannerCoreInterface.js.map +0 -1
  208. package/lib/static/roomle-core-hsc/rapiAccess.d.ts +0 -70
  209. package/lib/static/roomle-core-hsc/rapiAccess.js +0 -227
  210. package/lib/static/roomle-core-hsc/rapiAccess.js.map +0 -1
  211. package/lib/static/roomle-core-hsc/serviceCore.d.ts +0 -20
  212. package/lib/static/roomle-core-hsc/serviceCore.js +0 -54
  213. package/lib/static/roomle-core-hsc/serviceCore.js.map +0 -1
  214. package/lib/static/roomle-core-hsc/serviceCoreInterface.d.ts +0 -13
  215. package/lib/static/roomle-core-hsc/serviceCoreInterface.js +0 -3
  216. package/lib/static/roomle-core-hsc/serviceCoreInterface.js.map +0 -1
  217. package/lib/static/roomle-core-hsc/src/embind/configuratorCallback.d.ts +0 -82
  218. package/lib/static/roomle-core-hsc/src/embind/configuratorCallback.js +0 -355
  219. package/lib/static/roomle-core-hsc/src/embind/configuratorCallback.js.map +0 -1
  220. package/lib/static/roomle-core-hsc/src/embind/configuratorCore.d.ts +0 -20
  221. package/lib/static/roomle-core-hsc/src/embind/configuratorCore.js +0 -50
  222. package/lib/static/roomle-core-hsc/src/embind/configuratorCore.js.map +0 -1
  223. package/lib/static/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +0 -753
  224. package/lib/static/roomle-core-hsc/src/embind/configuratorCoreInterface.js +0 -99
  225. package/lib/static/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map +0 -1
  226. package/lib/static/roomle-core-hsc/src/embind/configuratorUtils.d.ts +0 -3
  227. package/lib/static/roomle-core-hsc/src/embind/configuratorUtils.js +0 -52
  228. package/lib/static/roomle-core-hsc/src/embind/configuratorUtils.js.map +0 -1
  229. package/lib/static/roomle-core-hsc/src/embind/coreModue.d.ts +0 -4
  230. package/lib/static/roomle-core-hsc/src/embind/coreModue.js +0 -3
  231. package/lib/static/roomle-core-hsc/src/embind/coreModue.js.map +0 -1
  232. package/lib/static/roomle-core-hsc/src/embind/coreModule.d.ts +0 -11
  233. package/lib/static/roomle-core-hsc/src/embind/coreModule.js +0 -19
  234. package/lib/static/roomle-core-hsc/src/embind/coreModule.js.map +0 -1
  235. package/lib/static/roomle-core-hsc/src/embind/plannerCore.js +0 -111
  236. package/lib/static/roomle-core-hsc/src/embind/plannerCore.js.map +0 -1
  237. package/lib/static/roomle-core-hsc/src/embind/plannerCoreCallback.js +0 -116
  238. package/lib/static/roomle-core-hsc/src/embind/plannerCoreCallback.js.map +0 -1
  239. package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +0 -858
  240. package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.js +0 -98
  241. package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +0 -1
  242. package/lib/static/roomle-core-hsc/src/embind/serviceCore.d.ts +0 -20
  243. package/lib/static/roomle-core-hsc/src/embind/serviceCore.js +0 -54
  244. package/lib/static/roomle-core-hsc/src/embind/serviceCore.js.map +0 -1
  245. package/lib/static/roomle-core-hsc/src/embind/serviceCoreInterface.d.ts +0 -13
  246. package/lib/static/roomle-core-hsc/src/embind/serviceCoreInterface.js +0 -3
  247. package/lib/static/roomle-core-hsc/src/embind/serviceCoreInterface.js.map +0 -1
  248. package/lib/static/roomle-core-hsc/src/embind/toolsCore.d.ts +0 -17
  249. package/lib/static/roomle-core-hsc/src/embind/toolsCore.js +0 -75
  250. package/lib/static/roomle-core-hsc/src/embind/toolsCore.js.map +0 -1
  251. package/lib/static/roomle-core-hsc/src/embind/toolsCoreInterface.d.ts +0 -40
  252. package/lib/static/roomle-core-hsc/src/embind/toolsCoreInterface.js +0 -8
  253. package/lib/static/roomle-core-hsc/src/embind/toolsCoreInterface.js.map +0 -1
  254. package/lib/static/roomle-core-hsc/src/loader/configurableObject.d.ts +0 -30
  255. package/lib/static/roomle-core-hsc/src/loader/configurableObject.js.map +0 -1
  256. package/lib/static/roomle-core-hsc/src/loader/configurationGeometryConstructor.d.ts +0 -21
  257. package/lib/static/roomle-core-hsc/src/loader/configurationGeometryConstructor.js +0 -90
  258. package/lib/static/roomle-core-hsc/src/loader/configurationGeometryConstructor.js.map +0 -1
  259. package/lib/static/roomle-core-hsc/src/loader/configurationLoader.d.ts +0 -116
  260. package/lib/static/roomle-core-hsc/src/loader/configurationLoader.js.map +0 -1
  261. package/lib/static/roomle-core-hsc/src/loader/configurationManager.d.ts +0 -40
  262. package/lib/static/roomle-core-hsc/src/loader/configurationManager.js +0 -141
  263. package/lib/static/roomle-core-hsc/src/loader/configurationManager.js.map +0 -1
  264. package/lib/static/roomle-core-hsc/src/loader/loaderUtility.d.ts +0 -81
  265. package/lib/static/roomle-core-hsc/src/loader/loaderUtility.js +0 -141
  266. package/lib/static/roomle-core-hsc/src/loader/loaderUtility.js.map +0 -1
  267. package/lib/static/roomle-core-hsc/src/loader/logger.d.ts +0 -29
  268. package/lib/static/roomle-core-hsc/src/loader/logger.js +0 -61
  269. package/lib/static/roomle-core-hsc/src/loader/logger.js.map +0 -1
  270. package/lib/static/roomle-core-hsc/src/loader/planElementManager.js +0 -300
  271. package/lib/static/roomle-core-hsc/src/loader/planElementManager.js.map +0 -1
  272. package/lib/static/roomle-core-hsc/src/loader/rapiAccess.d.ts +0 -70
  273. package/lib/static/roomle-core-hsc/src/loader/rapiAccess.js +0 -227
  274. package/lib/static/roomle-core-hsc/src/loader/rapiAccess.js.map +0 -1
  275. package/lib/static/roomle-core-hsc/toolsCore.d.ts +0 -17
  276. package/lib/static/roomle-core-hsc/toolsCore.js +0 -75
  277. package/lib/static/roomle-core-hsc/toolsCore.js.map +0 -1
  278. package/lib/static/roomle-core-hsc/toolsCoreInterface.d.ts +0 -40
  279. package/lib/static/roomle-core-hsc/toolsCoreInterface.js +0 -8
  280. package/lib/static/roomle-core-hsc/toolsCoreInterface.js.map +0 -1
  281. package/lib/static/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  282. package/lib/static/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  283. package/lib/static/roomle-core-hsc/wasm_modern/RoomleToolsCore.js +0 -74
  284. package/lib/static/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  285. package/lib/stats-helper-UQlUyOTj.mjs +0 -108
  286. package/lib/stats-helper-UQlUyOTj.mjs.map +0 -1
  287. package/lib/three.webgpu-sHJcp001.mjs +0 -27625
  288. package/lib/three.webgpu-sHJcp001.mjs.map +0 -1
  289. package/lib/tools-core-wkPFRdnH.mjs +0 -36
  290. package/lib/tools-core-wkPFRdnH.mjs.map +0 -1
  291. /package/lib/static/draco/{README.md → node_modules/three/examples/jsm/libs/draco/README.md} +0 -0
  292. /package/lib/static/draco/{draco_decoder.js → node_modules/three/examples/jsm/libs/draco/gltf/draco_decoder.js} +0 -0
  293. /package/lib/static/draco/{draco_decoder.wasm → node_modules/three/examples/jsm/libs/draco/gltf/draco_decoder.wasm} +0 -0
  294. /package/lib/static/draco/{draco_encoder.js → node_modules/three/examples/jsm/libs/draco/gltf/draco_encoder.js} +0 -0
  295. /package/lib/static/draco/{draco_wasm_wrapper.js → node_modules/three/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.js} +0 -0
  296. /package/lib/static/{budgeteer.sw.js → packages/workers/generated/budgeteer.sw.js} +0 -0
  297. /package/lib/static/roomle-core-hsc/{configuratorCallback.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorCallback.d.ts} +0 -0
  298. /package/lib/static/roomle-core-hsc/{configuratorCallback.js → node_modules/roomle-core-hsc/src/embind/configuratorCallback.js} +0 -0
  299. /package/lib/static/roomle-core-hsc/{configuratorCallback.js.map → node_modules/roomle-core-hsc/src/embind/configuratorCallback.js.map} +0 -0
  300. /package/lib/static/roomle-core-hsc/{configuratorCore.js → node_modules/roomle-core-hsc/src/embind/configuratorCore.js} +0 -0
  301. /package/lib/static/roomle-core-hsc/{configuratorCore.js.map → node_modules/roomle-core-hsc/src/embind/configuratorCore.js.map} +0 -0
  302. /package/lib/static/roomle-core-hsc/{configuratorCoreInterface.js → node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js} +0 -0
  303. /package/lib/static/roomle-core-hsc/{configuratorCoreInterface.js.map → node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map} +0 -0
  304. /package/lib/static/roomle-core-hsc/{configuratorUtils.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorUtils.d.ts} +0 -0
  305. /package/lib/static/roomle-core-hsc/{configuratorUtils.js → node_modules/roomle-core-hsc/src/embind/configuratorUtils.js} +0 -0
  306. /package/lib/static/roomle-core-hsc/{configuratorUtils.js.map → node_modules/roomle-core-hsc/src/embind/configuratorUtils.js.map} +0 -0
  307. /package/lib/static/roomle-core-hsc/{coreModue.d.ts → node_modules/roomle-core-hsc/src/embind/coreModue.d.ts} +0 -0
  308. /package/lib/static/roomle-core-hsc/{coreModue.js → node_modules/roomle-core-hsc/src/embind/coreModue.js} +0 -0
  309. /package/lib/static/roomle-core-hsc/{coreModue.js.map → node_modules/roomle-core-hsc/src/embind/coreModue.js.map} +0 -0
  310. /package/lib/static/roomle-core-hsc/{coreModule.d.ts → node_modules/roomle-core-hsc/src/embind/coreModule.d.ts} +0 -0
  311. /package/lib/static/roomle-core-hsc/{coreModule.js → node_modules/roomle-core-hsc/src/embind/coreModule.js} +0 -0
  312. /package/lib/static/roomle-core-hsc/{coreModule.js.map → node_modules/roomle-core-hsc/src/embind/coreModule.js.map} +0 -0
  313. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCore.js +0 -0
  314. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCore.js.map +0 -0
  315. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCore.d.ts +0 -0
  316. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCore.js +0 -0
  317. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCore.js.map +0 -0
  318. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCoreInterface.d.ts +0 -0
  319. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCoreInterface.js +0 -0
  320. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCoreInterface.js.map +0 -0
  321. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCore.d.ts +0 -0
  322. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCore.js +0 -0
  323. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCore.js.map +0 -0
  324. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCoreInterface.d.ts +0 -0
  325. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCoreInterface.js +0 -0
  326. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCoreInterface.js.map +0 -0
  327. /package/lib/static/roomle-core-hsc/{configurationGeometryConstructor.d.ts → node_modules/roomle-core-hsc/src/loader/configurationGeometryConstructor.d.ts} +0 -0
  328. /package/lib/static/roomle-core-hsc/{configurationGeometryConstructor.js → node_modules/roomle-core-hsc/src/loader/configurationGeometryConstructor.js} +0 -0
  329. /package/lib/static/roomle-core-hsc/{configurationGeometryConstructor.js.map → node_modules/roomle-core-hsc/src/loader/configurationGeometryConstructor.js.map} +0 -0
  330. /package/lib/static/roomle-core-hsc/{configurationLoader.d.ts → node_modules/roomle-core-hsc/src/loader/configurationLoader.d.ts} +0 -0
  331. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/loaderUtility.d.ts +0 -0
  332. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/loaderUtility.js +0 -0
  333. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/loaderUtility.js.map +0 -0
  334. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/logger.d.ts +0 -0
  335. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/logger.js +0 -0
  336. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/logger.js.map +0 -0
  337. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/planElementManager.js +0 -0
  338. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/rapiAccess.d.ts +0 -0
  339. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/rapiAccess.js +0 -0
  340. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/rapiAccess.js.map +0 -0
  341. /package/lib/static/roomle-core-hsc/{RoomleToolsCore.js → node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.js} +0 -0
@@ -0,0 +1,1092 @@
1
+ import { $ as e, $n as t, At as n, Ct as r, Gt as i, Jt as a, Kt as o, Nt as s, Rr as c, St as l, _r as u, an as d, c as f, h as p, lr as m, on as h, p as g, qt as _, ut as v, v as y, wt as b } from "./three.core-CLIofecG.mjs";
2
+ //#region ../../node_modules/three/examples/jsm/exporters/GLTFExporter.js
3
+ var x = {
4
+ POSITION: [
5
+ "byte",
6
+ "byte normalized",
7
+ "unsigned byte",
8
+ "unsigned byte normalized",
9
+ "short",
10
+ "short normalized",
11
+ "unsigned short",
12
+ "unsigned short normalized"
13
+ ],
14
+ NORMAL: ["byte normalized", "short normalized"],
15
+ TANGENT: ["byte normalized", "short normalized"],
16
+ TEXCOORD: [
17
+ "byte",
18
+ "byte normalized",
19
+ "unsigned byte",
20
+ "short",
21
+ "short normalized",
22
+ "unsigned short"
23
+ ]
24
+ }, S = class {
25
+ constructor() {
26
+ this.textureUtils = null, this.pluginCallbacks = [], this.register(function(e) {
27
+ return new U(e);
28
+ }), this.register(function(e) {
29
+ return new W(e);
30
+ }), this.register(function(e) {
31
+ return new J(e);
32
+ }), this.register(function(e) {
33
+ return new Y(e);
34
+ }), this.register(function(e) {
35
+ return new X(e);
36
+ }), this.register(function(e) {
37
+ return new Z(e);
38
+ }), this.register(function(e) {
39
+ return new G(e);
40
+ }), this.register(function(e) {
41
+ return new K(e);
42
+ }), this.register(function(e) {
43
+ return new q(e);
44
+ }), this.register(function(e) {
45
+ return new Q(e);
46
+ }), this.register(function(e) {
47
+ return new $(e);
48
+ }), this.register(function(e) {
49
+ return new ee(e);
50
+ }), this.register(function(e) {
51
+ return new te(e);
52
+ }), this.register(function(e) {
53
+ return new ne(e);
54
+ });
55
+ }
56
+ register(e) {
57
+ return this.pluginCallbacks.indexOf(e) === -1 && this.pluginCallbacks.push(e), this;
58
+ }
59
+ unregister(e) {
60
+ return this.pluginCallbacks.indexOf(e) !== -1 && this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e), 1), this;
61
+ }
62
+ setTextureUtils(e) {
63
+ return this.textureUtils = e, this;
64
+ }
65
+ parse(e, t, n, r) {
66
+ let i = new H(), a = [];
67
+ for (let e = 0, t = this.pluginCallbacks.length; e < t; e++) a.push(this.pluginCallbacks[e](i));
68
+ i.setPlugins(a), i.setTextureUtils(this.textureUtils), i.writeAsync(e, t, r).catch(n);
69
+ }
70
+ parseAsync(e, t) {
71
+ let n = this;
72
+ return new Promise(function(r, i) {
73
+ n.parse(e, r, i, t);
74
+ });
75
+ }
76
+ }, C = {
77
+ POINTS: 0,
78
+ LINES: 1,
79
+ LINE_LOOP: 2,
80
+ LINE_STRIP: 3,
81
+ TRIANGLES: 4,
82
+ TRIANGLE_STRIP: 5,
83
+ TRIANGLE_FAN: 6,
84
+ BYTE: 5120,
85
+ UNSIGNED_BYTE: 5121,
86
+ SHORT: 5122,
87
+ UNSIGNED_SHORT: 5123,
88
+ INT: 5124,
89
+ UNSIGNED_INT: 5125,
90
+ FLOAT: 5126,
91
+ ARRAY_BUFFER: 34962,
92
+ ELEMENT_ARRAY_BUFFER: 34963,
93
+ NEAREST: 9728,
94
+ LINEAR: 9729,
95
+ NEAREST_MIPMAP_NEAREST: 9984,
96
+ LINEAR_MIPMAP_NEAREST: 9985,
97
+ NEAREST_MIPMAP_LINEAR: 9986,
98
+ LINEAR_MIPMAP_LINEAR: 9987,
99
+ CLAMP_TO_EDGE: 33071,
100
+ MIRRORED_REPEAT: 33648,
101
+ REPEAT: 10497
102
+ }, w = "KHR_mesh_quantization", T = {};
103
+ T[o] = C.NEAREST, T[a] = C.NEAREST_MIPMAP_NEAREST, T[_] = C.NEAREST_MIPMAP_LINEAR, T[l] = C.LINEAR, T[b] = C.LINEAR_MIPMAP_NEAREST, T[r] = C.LINEAR_MIPMAP_LINEAR, T[g] = C.CLAMP_TO_EDGE, T[t] = C.REPEAT, T[i] = C.MIRRORED_REPEAT;
104
+ var E = {
105
+ scale: "scale",
106
+ position: "translation",
107
+ quaternion: "rotation",
108
+ morphTargetInfluences: "weights"
109
+ }, D = new p(), O = 12, k = 1179937895, A = 2, j = 8, M = 1313821514, N = 5130562;
110
+ function P(e, t) {
111
+ return e.length === t.length && e.every(function(e, n) {
112
+ return e === t[n];
113
+ });
114
+ }
115
+ function F(e) {
116
+ return new TextEncoder().encode(e).buffer;
117
+ }
118
+ function I(e) {
119
+ return P(e.elements, [
120
+ 1,
121
+ 0,
122
+ 0,
123
+ 0,
124
+ 0,
125
+ 1,
126
+ 0,
127
+ 0,
128
+ 0,
129
+ 0,
130
+ 1,
131
+ 0,
132
+ 0,
133
+ 0,
134
+ 0,
135
+ 1
136
+ ]);
137
+ }
138
+ function L(e, t, r) {
139
+ let i = {
140
+ min: Array(e.itemSize).fill(Infinity),
141
+ max: Array(e.itemSize).fill(-Infinity)
142
+ };
143
+ for (let a = t; a < t + r; a++) for (let t = 0; t < e.itemSize; t++) {
144
+ let r;
145
+ e.itemSize > 4 ? r = e.array[a * e.itemSize + t] : (t === 0 ? r = e.getX(a) : t === 1 ? r = e.getY(a) : t === 2 ? r = e.getZ(a) : t === 3 && (r = e.getW(a)), e.normalized === !0 && (r = n.normalize(r, e.array))), i.min[t] = Math.min(i.min[t], r), i.max[t] = Math.max(i.max[t], r);
146
+ }
147
+ return i;
148
+ }
149
+ function R(e) {
150
+ return Math.ceil(e / 4) * 4;
151
+ }
152
+ function z(e, t = 0) {
153
+ let n = R(e.byteLength);
154
+ if (n !== e.byteLength) {
155
+ let r = new Uint8Array(n);
156
+ if (r.set(new Uint8Array(e)), t !== 0) for (let i = e.byteLength; i < n; i++) r[i] = t;
157
+ return r.buffer;
158
+ }
159
+ return e;
160
+ }
161
+ function B() {
162
+ return typeof document > "u" && typeof OffscreenCanvas < "u" ? new OffscreenCanvas(1, 1) : document.createElement("canvas");
163
+ }
164
+ function V(e, t) {
165
+ if (typeof OffscreenCanvas < "u" && e instanceof OffscreenCanvas) {
166
+ let n;
167
+ return t === "image/jpeg" ? n = .92 : t === "image/webp" && (n = .8), e.convertToBlob({
168
+ type: t,
169
+ quality: n
170
+ });
171
+ } else return new Promise((n) => e.toBlob(n, t));
172
+ }
173
+ var H = class {
174
+ constructor() {
175
+ this.plugins = [], this.options = {}, this.pending = [], this.buffers = [], this.byteOffset = 0, this.buffers = [], this.nodeMap = /* @__PURE__ */ new Map(), this.skins = [], this.extensionsUsed = {}, this.extensionsRequired = {}, this.uids = /* @__PURE__ */ new Map(), this.uid = 0, this.json = { asset: {
176
+ version: "2.0",
177
+ generator: "THREE.GLTFExporter r183"
178
+ } }, this.cache = {
179
+ meshes: /* @__PURE__ */ new Map(),
180
+ attributes: /* @__PURE__ */ new Map(),
181
+ attributesNormalized: /* @__PURE__ */ new Map(),
182
+ materials: /* @__PURE__ */ new Map(),
183
+ textures: /* @__PURE__ */ new Map(),
184
+ images: /* @__PURE__ */ new Map()
185
+ }, this.textureUtils = null;
186
+ }
187
+ setPlugins(e) {
188
+ this.plugins = e;
189
+ }
190
+ setTextureUtils(e) {
191
+ this.textureUtils = e;
192
+ }
193
+ async writeAsync(e, t, n = {}) {
194
+ this.options = Object.assign({
195
+ binary: !1,
196
+ trs: !1,
197
+ onlyVisible: !0,
198
+ maxTextureSize: Infinity,
199
+ animations: [],
200
+ includeCustomExtensions: !1
201
+ }, n), this.options.animations.length > 0 && (this.options.trs = !0), await this.processInputAsync(e), await Promise.all(this.pending);
202
+ let r = this, i = r.buffers, a = r.json;
203
+ n = r.options;
204
+ let o = r.extensionsUsed, s = r.extensionsRequired, c = new Blob(i, { type: "application/octet-stream" }), l = Object.keys(o), u = Object.keys(s);
205
+ if (l.length > 0 && (a.extensionsUsed = l), u.length > 0 && (a.extensionsRequired = u), a.buffers && a.buffers.length > 0 && (a.buffers[0].byteLength = c.size), n.binary === !0) {
206
+ let e = new FileReader();
207
+ e.readAsArrayBuffer(c), e.onloadend = function() {
208
+ let n = z(e.result), r = new DataView(new ArrayBuffer(j));
209
+ r.setUint32(0, n.byteLength, !0), r.setUint32(4, N, !0);
210
+ let i = z(F(JSON.stringify(a)), 32), o = new DataView(new ArrayBuffer(j));
211
+ o.setUint32(0, i.byteLength, !0), o.setUint32(4, M, !0);
212
+ let s = new ArrayBuffer(O), c = new DataView(s);
213
+ c.setUint32(0, k, !0), c.setUint32(4, A, !0);
214
+ let l = O + o.byteLength + i.byteLength + r.byteLength + n.byteLength;
215
+ c.setUint32(8, l, !0);
216
+ let u = new Blob([
217
+ s,
218
+ o,
219
+ i,
220
+ r,
221
+ n
222
+ ], { type: "application/octet-stream" }), d = new FileReader();
223
+ d.readAsArrayBuffer(u), d.onloadend = function() {
224
+ t(d.result);
225
+ };
226
+ };
227
+ } else if (a.buffers && a.buffers.length > 0) {
228
+ let e = new FileReader();
229
+ e.readAsDataURL(c), e.onloadend = function() {
230
+ let n = e.result;
231
+ a.buffers[0].uri = n, t(a);
232
+ };
233
+ } else t(a);
234
+ }
235
+ serializeUserData(e, t) {
236
+ if (Object.keys(e.userData).length === 0) return;
237
+ let n = this.options, r = this.extensionsUsed;
238
+ try {
239
+ let i = JSON.parse(JSON.stringify(e.userData));
240
+ if (n.includeCustomExtensions && i.gltfExtensions) {
241
+ t.extensions === void 0 && (t.extensions = {});
242
+ for (let e in i.gltfExtensions) t.extensions[e] = i.gltfExtensions[e], r[e] = !0;
243
+ delete i.gltfExtensions;
244
+ }
245
+ Object.keys(i).length > 0 && (t.extras = i);
246
+ } catch (t) {
247
+ console.warn("THREE.GLTFExporter: userData of '" + e.name + "' won't be serialized because of JSON.stringify error - " + t.message);
248
+ }
249
+ }
250
+ getUID(e, t = !1) {
251
+ if (this.uids.has(e) === !1) {
252
+ let t = /* @__PURE__ */ new Map();
253
+ t.set(!0, this.uid++), t.set(!1, this.uid++), this.uids.set(e, t);
254
+ }
255
+ return this.uids.get(e).get(t);
256
+ }
257
+ isNormalizedNormalAttribute(e) {
258
+ if (this.cache.attributesNormalized.has(e)) return !1;
259
+ let t = new c();
260
+ for (let n = 0, r = e.count; n < r; n++) if (Math.abs(t.fromBufferAttribute(e, n).length() - 1) > 5e-4) return !1;
261
+ return !0;
262
+ }
263
+ createNormalizedNormalAttribute(e) {
264
+ let t = this.cache;
265
+ if (t.attributesNormalized.has(e)) return t.attributesNormalized.get(e);
266
+ let n = e.clone(), r = new c();
267
+ for (let e = 0, t = n.count; e < t; e++) r.fromBufferAttribute(n, e), r.x === 0 && r.y === 0 && r.z === 0 ? r.setX(1) : r.normalize(), n.setXYZ(e, r.x, r.y, r.z);
268
+ return t.attributesNormalized.set(e, n), n;
269
+ }
270
+ applyTextureTransform(e, t) {
271
+ let n = !1, r = {};
272
+ (t.offset.x !== 0 || t.offset.y !== 0) && (r.offset = t.offset.toArray(), n = !0), t.rotation !== 0 && (r.rotation = t.rotation, n = !0), (t.repeat.x !== 1 || t.repeat.y !== 1) && (r.scale = t.repeat.toArray(), n = !0), n && (e.extensions = e.extensions || {}, e.extensions.KHR_texture_transform = r, this.extensionsUsed.KHR_texture_transform = !0);
273
+ }
274
+ async buildMetalRoughTextureAsync(e, t) {
275
+ if (e === t) return e;
276
+ function n(e) {
277
+ return e.colorSpace === "srgb" ? function(e) {
278
+ return e < .04045 ? e * .0773993808 : (e * .9478672986 + .0521327014) ** 2.4;
279
+ } : function(e) {
280
+ return e;
281
+ };
282
+ }
283
+ e instanceof y && (e = await this.decompressTextureAsync(e)), t instanceof y && (t = await this.decompressTextureAsync(t));
284
+ let r = e ? e.image : null, i = t ? t.image : null, a = Math.max(r ? r.width : 0, i ? i.width : 0), o = Math.max(r ? r.height : 0, i ? i.height : 0), s = B();
285
+ s.width = a, s.height = o;
286
+ let c = s.getContext("2d", { willReadFrequently: !0 });
287
+ c.fillStyle = "#00ffff", c.fillRect(0, 0, a, o);
288
+ let l = c.getImageData(0, 0, a, o);
289
+ if (r) {
290
+ c.drawImage(r, 0, 0, a, o);
291
+ let t = n(e), i = c.getImageData(0, 0, a, o).data;
292
+ for (let e = 2; e < i.length; e += 4) l.data[e] = t(i[e] / 256) * 256;
293
+ }
294
+ if (i) {
295
+ c.drawImage(i, 0, 0, a, o);
296
+ let e = n(t), r = c.getImageData(0, 0, a, o).data;
297
+ for (let t = 1; t < r.length; t += 4) l.data[t] = e(r[t] / 256) * 256;
298
+ }
299
+ c.putImageData(l, 0, 0);
300
+ let d = (e || t).clone();
301
+ return d.source = new u(s), d.colorSpace = "", d.channel = (e || t).channel, e && t && e.channel !== t.channel && console.warn("THREE.GLTFExporter: UV channels for metalnessMap and roughnessMap textures must match."), console.warn("THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures."), d;
302
+ }
303
+ async decompressTextureAsync(e, t = Infinity) {
304
+ if (this.textureUtils === null) throw Error("THREE.GLTFExporter: setTextureUtils() must be called to process compressed textures.");
305
+ return await this.textureUtils.decompress(e, t);
306
+ }
307
+ processBuffer(e) {
308
+ let t = this.json, n = this.buffers;
309
+ return t.buffers ||= [{ byteLength: 0 }], n.push(e), 0;
310
+ }
311
+ processBufferView(e, t, r, i, a) {
312
+ let o = this.json;
313
+ o.bufferViews ||= [];
314
+ let s;
315
+ switch (t) {
316
+ case C.BYTE:
317
+ case C.UNSIGNED_BYTE:
318
+ s = 1;
319
+ break;
320
+ case C.SHORT:
321
+ case C.UNSIGNED_SHORT:
322
+ s = 2;
323
+ break;
324
+ default: s = 4;
325
+ }
326
+ let c = e.itemSize * s;
327
+ a === C.ARRAY_BUFFER && (c = Math.ceil(c / 4) * 4);
328
+ let l = R(i * c), u = new DataView(new ArrayBuffer(l)), d = 0;
329
+ for (let a = r; a < r + i; a++) {
330
+ for (let r = 0; r < e.itemSize; r++) {
331
+ let i;
332
+ e.itemSize > 4 ? i = e.array[a * e.itemSize + r] : (r === 0 ? i = e.getX(a) : r === 1 ? i = e.getY(a) : r === 2 ? i = e.getZ(a) : r === 3 && (i = e.getW(a)), e.normalized === !0 && (i = n.normalize(i, e.array))), t === C.FLOAT ? u.setFloat32(d, i, !0) : t === C.INT ? u.setInt32(d, i, !0) : t === C.UNSIGNED_INT ? u.setUint32(d, i, !0) : t === C.SHORT ? u.setInt16(d, i, !0) : t === C.UNSIGNED_SHORT ? u.setUint16(d, i, !0) : t === C.BYTE ? u.setInt8(d, i) : t === C.UNSIGNED_BYTE && u.setUint8(d, i), d += s;
333
+ }
334
+ d % c !== 0 && (d += c - d % c);
335
+ }
336
+ let f = {
337
+ buffer: this.processBuffer(u.buffer),
338
+ byteOffset: this.byteOffset,
339
+ byteLength: l
340
+ };
341
+ return a !== void 0 && (f.target = a), a === C.ARRAY_BUFFER && (f.byteStride = c), this.byteOffset += l, o.bufferViews.push(f), {
342
+ id: o.bufferViews.length - 1,
343
+ byteLength: 0
344
+ };
345
+ }
346
+ processBufferViewImage(e) {
347
+ let t = this, n = t.json;
348
+ return n.bufferViews ||= [], new Promise(function(r) {
349
+ let i = new FileReader();
350
+ i.readAsArrayBuffer(e), i.onloadend = function() {
351
+ let e = z(i.result), a = {
352
+ buffer: t.processBuffer(e),
353
+ byteOffset: t.byteOffset,
354
+ byteLength: e.byteLength
355
+ };
356
+ t.byteOffset += e.byteLength, r(n.bufferViews.push(a) - 1);
357
+ };
358
+ });
359
+ }
360
+ processAccessor(e, t, n, r) {
361
+ let i = this.json, a = {
362
+ 1: "SCALAR",
363
+ 2: "VEC2",
364
+ 3: "VEC3",
365
+ 4: "VEC4",
366
+ 9: "MAT3",
367
+ 16: "MAT4"
368
+ }, o;
369
+ if (e.array.constructor === Float32Array) o = C.FLOAT;
370
+ else if (e.array.constructor === Int32Array) o = C.INT;
371
+ else if (e.array.constructor === Uint32Array) o = C.UNSIGNED_INT;
372
+ else if (e.array.constructor === Int16Array) o = C.SHORT;
373
+ else if (e.array.constructor === Uint16Array) o = C.UNSIGNED_SHORT;
374
+ else if (e.array.constructor === Int8Array) o = C.BYTE;
375
+ else if (e.array.constructor === Uint8Array) o = C.UNSIGNED_BYTE;
376
+ else throw Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: " + e.array.constructor.name);
377
+ if (n === void 0 && (n = 0), (r === void 0 || r === Infinity) && (r = e.count), r === 0) return null;
378
+ let s = L(e, n, r), c;
379
+ t !== void 0 && (c = e === t.index ? C.ELEMENT_ARRAY_BUFFER : C.ARRAY_BUFFER);
380
+ let l = this.processBufferView(e, o, n, r, c), u = {
381
+ bufferView: l.id,
382
+ byteOffset: l.byteOffset,
383
+ componentType: o,
384
+ count: r,
385
+ max: s.max,
386
+ min: s.min,
387
+ type: a[e.itemSize]
388
+ };
389
+ return e.normalized === !0 && (u.normalized = !0), i.accessors ||= [], i.accessors.push(u) - 1;
390
+ }
391
+ processImage(t, n, r, i = "image/png") {
392
+ if (t !== null) {
393
+ let a = this, o = a.cache, s = a.json, c = a.options, l = a.pending;
394
+ o.images.has(t) || o.images.set(t, {});
395
+ let u = o.images.get(t), d = i + ":flipY/" + r.toString();
396
+ if (u[d] !== void 0) return u[d];
397
+ s.images ||= [];
398
+ let f = { mimeType: i }, p = B();
399
+ p.width = Math.min(t.width, c.maxTextureSize), p.height = Math.min(t.height, c.maxTextureSize);
400
+ let m = p.getContext("2d", { willReadFrequently: !0 });
401
+ if (r === !0 && (m.translate(0, p.height), m.scale(1, -1)), t.data !== void 0) {
402
+ n !== 1023 && console.error("GLTFExporter: Only RGBAFormat is supported.", n), (t.width > c.maxTextureSize || t.height > c.maxTextureSize) && console.warn("GLTFExporter: Image size is bigger than maxTextureSize", t);
403
+ let e = new Uint8ClampedArray(t.height * t.width * 4);
404
+ for (let n = 0; n < e.length; n += 4) e[n + 0] = t.data[n + 0], e[n + 1] = t.data[n + 1], e[n + 2] = t.data[n + 2], e[n + 3] = t.data[n + 3];
405
+ m.putImageData(new ImageData(e, t.width, t.height), 0, 0);
406
+ } else if (typeof HTMLImageElement < "u" && t instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && t instanceof ImageBitmap || typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas) m.drawImage(t, 0, 0, p.width, p.height);
407
+ else throw Error("THREE.GLTFExporter: Invalid image type. Use HTMLImageElement, HTMLCanvasElement, ImageBitmap or OffscreenCanvas.");
408
+ c.binary === !0 ? l.push(V(p, i).then((e) => a.processBufferViewImage(e)).then((e) => {
409
+ f.bufferView = e;
410
+ })) : f.uri = e.getDataURL(p, i);
411
+ let h = s.images.push(f) - 1;
412
+ return u[d] = h, h;
413
+ } else throw Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.");
414
+ }
415
+ processSampler(e) {
416
+ let t = this.json;
417
+ t.samplers ||= [];
418
+ let n = {
419
+ magFilter: T[e.magFilter],
420
+ minFilter: T[e.minFilter],
421
+ wrapS: T[e.wrapS],
422
+ wrapT: T[e.wrapT]
423
+ };
424
+ return t.samplers.push(n) - 1;
425
+ }
426
+ async processTextureAsync(e) {
427
+ let t = this.options, n = this.cache, r = this.json;
428
+ if (n.textures.has(e)) return n.textures.get(e);
429
+ r.textures ||= [], e instanceof y && (e = await this.decompressTextureAsync(e, t.maxTextureSize));
430
+ let i = e.userData.mimeType;
431
+ i === "image/webp" && (i = "image/png");
432
+ let a = {
433
+ sampler: this.processSampler(e),
434
+ source: this.processImage(e.image, e.format, e.flipY, i)
435
+ };
436
+ e.name && (a.name = e.name), await this._invokeAllAsync(async function(t) {
437
+ t.writeTexture && await t.writeTexture(e, a);
438
+ });
439
+ let o = r.textures.push(a) - 1;
440
+ return n.textures.set(e, o), o;
441
+ }
442
+ async processMaterialAsync(e) {
443
+ let t = this.cache, n = this.json;
444
+ if (t.materials.has(e)) return t.materials.get(e);
445
+ if (e.isShaderMaterial) return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."), null;
446
+ n.materials ||= [];
447
+ let r = { pbrMetallicRoughness: {} };
448
+ e.isMeshStandardMaterial !== !0 && e.isMeshBasicMaterial !== !0 && console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");
449
+ let i = e.color.toArray().concat([e.opacity]);
450
+ if (P(i, [
451
+ 1,
452
+ 1,
453
+ 1,
454
+ 1
455
+ ]) || (r.pbrMetallicRoughness.baseColorFactor = i), e.isMeshStandardMaterial ? (r.pbrMetallicRoughness.metallicFactor = e.metalness, r.pbrMetallicRoughness.roughnessFactor = e.roughness) : (r.pbrMetallicRoughness.metallicFactor = 0, r.pbrMetallicRoughness.roughnessFactor = 1), e.metalnessMap || e.roughnessMap) {
456
+ let t = await this.buildMetalRoughTextureAsync(e.metalnessMap, e.roughnessMap), n = {
457
+ index: await this.processTextureAsync(t),
458
+ texCoord: t.channel
459
+ };
460
+ this.applyTextureTransform(n, t), r.pbrMetallicRoughness.metallicRoughnessTexture = n;
461
+ }
462
+ if (e.map) {
463
+ let t = {
464
+ index: await this.processTextureAsync(e.map),
465
+ texCoord: e.map.channel
466
+ };
467
+ this.applyTextureTransform(t, e.map), r.pbrMetallicRoughness.baseColorTexture = t;
468
+ }
469
+ if (e.emissive) {
470
+ let t = e.emissive;
471
+ if (Math.max(t.r, t.g, t.b) > 0 && (r.emissiveFactor = e.emissive.toArray()), e.emissiveMap) {
472
+ let t = {
473
+ index: await this.processTextureAsync(e.emissiveMap),
474
+ texCoord: e.emissiveMap.channel
475
+ };
476
+ this.applyTextureTransform(t, e.emissiveMap), r.emissiveTexture = t;
477
+ }
478
+ }
479
+ if (e.normalMap) {
480
+ let t = {
481
+ index: await this.processTextureAsync(e.normalMap),
482
+ texCoord: e.normalMap.channel
483
+ };
484
+ e.normalScale && e.normalScale.x !== 1 && (t.scale = e.normalScale.x), this.applyTextureTransform(t, e.normalMap), r.normalTexture = t;
485
+ }
486
+ if (e.aoMap) {
487
+ let t = {
488
+ index: await this.processTextureAsync(e.aoMap),
489
+ texCoord: e.aoMap.channel
490
+ };
491
+ e.aoMapIntensity !== 1 && (t.strength = e.aoMapIntensity), this.applyTextureTransform(t, e.aoMap), r.occlusionTexture = t;
492
+ }
493
+ e.transparent ? r.alphaMode = "BLEND" : e.alphaTest > 0 && (r.alphaMode = "MASK", r.alphaCutoff = e.alphaTest), e.side === 2 && (r.doubleSided = !0), e.name !== "" && (r.name = e.name), this.serializeUserData(e, r), await this._invokeAllAsync(async function(t) {
494
+ t.writeMaterialAsync && await t.writeMaterialAsync(e, r);
495
+ });
496
+ let a = n.materials.push(r) - 1;
497
+ return t.materials.set(e, a), a;
498
+ }
499
+ async processMeshAsync(e) {
500
+ let t = this.cache, n = this.json, r = [e.geometry.uuid];
501
+ if (Array.isArray(e.material)) for (let t = 0, n = e.material.length; t < n; t++) r.push(e.material[t].uuid);
502
+ else r.push(e.material.uuid);
503
+ let i = r.join(":");
504
+ if (t.meshes.has(i)) return t.meshes.get(i);
505
+ let a = e.geometry, o;
506
+ o = e.isLineSegments ? C.LINES : e.isLineLoop ? C.LINE_LOOP : e.isLine ? C.LINE_STRIP : e.isPoints ? C.POINTS : e.material.wireframe ? C.LINES : C.TRIANGLES;
507
+ let s = {}, c = {}, l = [], u = [], d = {
508
+ uv: "TEXCOORD_0",
509
+ uv1: "TEXCOORD_1",
510
+ uv2: "TEXCOORD_2",
511
+ uv3: "TEXCOORD_3",
512
+ color: "COLOR_0",
513
+ skinWeight: "WEIGHTS_0",
514
+ skinIndex: "JOINTS_0"
515
+ }, f = a.getAttribute("normal");
516
+ f !== void 0 && !this.isNormalizedNormalAttribute(f) && (console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."), a.setAttribute("normal", this.createNormalizedNormalAttribute(f)));
517
+ let p = null;
518
+ for (let e in a.attributes) {
519
+ if (e.slice(0, 5) === "morph") continue;
520
+ let n = a.attributes[e];
521
+ if (e = d[e] || e.toUpperCase(), /^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(e) || (e = "_" + e), t.attributes.has(this.getUID(n))) {
522
+ c[e] = t.attributes.get(this.getUID(n));
523
+ continue;
524
+ }
525
+ p = null;
526
+ let r = n.array;
527
+ e === "JOINTS_0" && !(r instanceof Uint16Array) && !(r instanceof Uint8Array) ? (console.warn("GLTFExporter: Attribute \"skinIndex\" converted to type UNSIGNED_SHORT."), p = S.Utils.toTypedBufferAttribute(n, Uint16Array)) : (r instanceof Uint32Array || r instanceof Int32Array) && !e.startsWith("_") && (console.warn(`GLTFExporter: Attribute "${e}" converted to type FLOAT.`), p = S.Utils.toTypedBufferAttribute(n, Float32Array));
528
+ let i = this.processAccessor(p || n, a);
529
+ i !== null && (e.startsWith("_") || this.detectMeshQuantization(e, n), c[e] = i, t.attributes.set(this.getUID(n), i));
530
+ }
531
+ if (f !== void 0 && a.setAttribute("normal", f), Object.keys(c).length === 0) return null;
532
+ if (e.morphTargetInfluences !== void 0 && e.morphTargetInfluences.length > 0) {
533
+ let n = [], r = [], i = {};
534
+ if (e.morphTargetDictionary !== void 0) for (let t in e.morphTargetDictionary) i[e.morphTargetDictionary[t]] = t;
535
+ for (let o = 0; o < e.morphTargetInfluences.length; ++o) {
536
+ let s = {}, c = !1;
537
+ for (let e in a.morphAttributes) {
538
+ if (e !== "position" && e !== "normal") {
539
+ c ||= (console.warn("GLTFExporter: Only POSITION and NORMAL morph are supported."), !0);
540
+ continue;
541
+ }
542
+ let n = a.morphAttributes[e][o], r = e.toUpperCase(), i = a.attributes[e];
543
+ if (t.attributes.has(this.getUID(n, !0))) {
544
+ s[r] = t.attributes.get(this.getUID(n, !0));
545
+ continue;
546
+ }
547
+ let l = n.clone();
548
+ if (!a.morphTargetsRelative) for (let e = 0, t = n.count; e < t; e++) for (let t = 0; t < n.itemSize; t++) t === 0 && l.setX(e, n.getX(e) - i.getX(e)), t === 1 && l.setY(e, n.getY(e) - i.getY(e)), t === 2 && l.setZ(e, n.getZ(e) - i.getZ(e)), t === 3 && l.setW(e, n.getW(e) - i.getW(e));
549
+ s[r] = this.processAccessor(l, a), t.attributes.set(this.getUID(i, !0), s[r]);
550
+ }
551
+ u.push(s), n.push(e.morphTargetInfluences[o]), e.morphTargetDictionary !== void 0 && r.push(i[o]);
552
+ }
553
+ s.weights = n, r.length > 0 && (s.extras = {}, s.extras.targetNames = r);
554
+ }
555
+ let m = Array.isArray(e.material);
556
+ if (m && a.groups.length === 0) return null;
557
+ let h = !1;
558
+ if (m && a.index === null) {
559
+ let e = [];
560
+ for (let t = 0, n = a.attributes.position.count; t < n; t++) e[t] = t;
561
+ a.setIndex(e), h = !0;
562
+ }
563
+ let g = m ? e.material : [e.material], _ = m ? a.groups : [{
564
+ materialIndex: 0,
565
+ start: void 0,
566
+ count: void 0
567
+ }];
568
+ for (let e = 0, n = _.length; e < n; e++) {
569
+ let n = {
570
+ mode: o,
571
+ attributes: c
572
+ };
573
+ if (this.serializeUserData(a, n), u.length > 0 && (n.targets = u), a.index !== null) {
574
+ let r = this.getUID(a.index);
575
+ (_[e].start !== void 0 || _[e].count !== void 0) && (r += ":" + _[e].start + ":" + _[e].count), t.attributes.has(r) ? n.indices = t.attributes.get(r) : (n.indices = this.processAccessor(a.index, a, _[e].start, _[e].count), t.attributes.set(r, n.indices)), n.indices === null && delete n.indices;
576
+ }
577
+ let r = await this.processMaterialAsync(g[_[e].materialIndex]);
578
+ r !== null && (n.material = r), l.push(n);
579
+ }
580
+ h === !0 && a.setIndex(null), s.primitives = l, n.meshes ||= [], await this._invokeAllAsync(function(t) {
581
+ t.writeMesh && t.writeMesh(e, s);
582
+ });
583
+ let v = n.meshes.push(s) - 1;
584
+ return t.meshes.set(i, v), v;
585
+ }
586
+ detectMeshQuantization(e, t) {
587
+ if (this.extensionsUsed[w]) return;
588
+ let n;
589
+ switch (t.array.constructor) {
590
+ case Int8Array:
591
+ n = "byte";
592
+ break;
593
+ case Uint8Array:
594
+ n = "unsigned byte";
595
+ break;
596
+ case Int16Array:
597
+ n = "short";
598
+ break;
599
+ case Uint16Array:
600
+ n = "unsigned short";
601
+ break;
602
+ default: return;
603
+ }
604
+ t.normalized && (n += " normalized");
605
+ let r = e.split("_", 1)[0];
606
+ x[r] && x[r].includes(n) && (this.extensionsUsed[w] = !0, this.extensionsRequired[w] = !0);
607
+ }
608
+ processCamera(e) {
609
+ let t = this.json;
610
+ t.cameras ||= [];
611
+ let r = e.isOrthographicCamera, i = { type: r ? "orthographic" : "perspective" };
612
+ return r ? i.orthographic = {
613
+ xmag: e.right * 2,
614
+ ymag: e.top * 2,
615
+ zfar: e.far <= 0 ? .001 : e.far,
616
+ znear: e.near < 0 ? 0 : e.near
617
+ } : i.perspective = {
618
+ aspectRatio: e.aspect,
619
+ yfov: n.degToRad(e.fov),
620
+ zfar: e.far <= 0 ? .001 : e.far,
621
+ znear: e.near < 0 ? 0 : e.near
622
+ }, e.name !== "" && (i.name = e.type), t.cameras.push(i) - 1;
623
+ }
624
+ processAnimation(e, t) {
625
+ let n = this.json, r = this.nodeMap;
626
+ n.animations ||= [], e = S.Utils.mergeMorphTargetTracks(e.clone(), t);
627
+ let i = e.tracks, a = [], o = [];
628
+ for (let e = 0; e < i.length; ++e) {
629
+ let n = i[e], s = d.parseTrackName(n.name), c = d.findNode(t, s.nodeName), l = E[s.propertyName];
630
+ if (s.objectName === "bones" && (c = c.isSkinnedMesh === !0 ? c.skeleton.getBoneByName(s.objectIndex) : void 0), !c || !l) {
631
+ console.warn("THREE.GLTFExporter: Could not export animation track \"%s\".", n.name);
632
+ continue;
633
+ }
634
+ let u = n.values.length / n.times.length;
635
+ l === E.morphTargetInfluences && (u /= c.morphTargetInfluences.length);
636
+ let p;
637
+ n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (p = "CUBICSPLINE", u /= 3) : p = n.getInterpolation() === 2300 ? "STEP" : "LINEAR", o.push({
638
+ input: this.processAccessor(new f(n.times, 1)),
639
+ output: this.processAccessor(new f(n.values, u)),
640
+ interpolation: p
641
+ }), a.push({
642
+ sampler: o.length - 1,
643
+ target: {
644
+ node: r.get(c),
645
+ path: l
646
+ }
647
+ });
648
+ }
649
+ let s = {
650
+ name: e.name || "clip_" + n.animations.length,
651
+ samplers: o,
652
+ channels: a
653
+ };
654
+ return this.serializeUserData(e, s), n.animations.push(s), n.animations.length - 1;
655
+ }
656
+ processSkin(e) {
657
+ let t = this.json, n = this.nodeMap, r = t.nodes[n.get(e)], i = e.skeleton;
658
+ if (i === void 0) return null;
659
+ let a = e.skeleton.bones[0];
660
+ if (a === void 0) return null;
661
+ let o = [], c = new Float32Array(i.bones.length * 16), l = new s();
662
+ for (let t = 0; t < i.bones.length; ++t) o.push(n.get(i.bones[t])), l.copy(i.boneInverses[t]), l.multiply(e.bindMatrix).toArray(c, t * 16);
663
+ return t.skins === void 0 && (t.skins = []), t.skins.push({
664
+ inverseBindMatrices: this.processAccessor(new f(c, 16)),
665
+ joints: o,
666
+ skeleton: n.get(a)
667
+ }), r.skin = t.skins.length - 1;
668
+ }
669
+ async processNodeAsync(e) {
670
+ let t = this.json, n = this.options, r = this.nodeMap;
671
+ if (t.nodes ||= [], e.pivot !== null) return await this._processNodeWithPivotAsync(e);
672
+ let i = {};
673
+ if (n.trs) {
674
+ let t = e.quaternion.toArray(), n = e.position.toArray(), r = e.scale.toArray();
675
+ P(t, [
676
+ 0,
677
+ 0,
678
+ 0,
679
+ 1
680
+ ]) || (i.rotation = t), P(n, [
681
+ 0,
682
+ 0,
683
+ 0
684
+ ]) || (i.translation = n), P(r, [
685
+ 1,
686
+ 1,
687
+ 1
688
+ ]) || (i.scale = r);
689
+ } else e.matrixAutoUpdate && e.updateMatrix(), I(e.matrix) === !1 && (i.matrix = e.matrix.elements);
690
+ if (e.name !== "" && (i.name = String(e.name)), this.serializeUserData(e, i), e.isMesh || e.isLine || e.isPoints) {
691
+ let t = await this.processMeshAsync(e);
692
+ t !== null && (i.mesh = t);
693
+ } else e.isCamera && (i.camera = this.processCamera(e));
694
+ e.isSkinnedMesh && this.skins.push(e);
695
+ let a = t.nodes.push(i) - 1;
696
+ if (r.set(e, a), e.children.length > 0) {
697
+ let t = [];
698
+ for (let r = 0, i = e.children.length; r < i; r++) {
699
+ let i = e.children[r];
700
+ if (i.visible || n.onlyVisible === !1) {
701
+ let e = await this.processNodeAsync(i);
702
+ e !== null && t.push(e);
703
+ }
704
+ }
705
+ t.length > 0 && (i.children = t);
706
+ }
707
+ return await this._invokeAllAsync(function(t) {
708
+ t.writeNode && t.writeNode(e, i);
709
+ }), a;
710
+ }
711
+ async _processNodeWithPivotAsync(e) {
712
+ let t = this.json, n = this.options, r = this.nodeMap, i = e.pivot, a = {}, o = e.quaternion.toArray(), s = [
713
+ e.position.x + i.x,
714
+ e.position.y + i.y,
715
+ e.position.z + i.z
716
+ ], c = e.scale.toArray();
717
+ P(o, [
718
+ 0,
719
+ 0,
720
+ 0,
721
+ 1
722
+ ]) || (a.rotation = o), P(s, [
723
+ 0,
724
+ 0,
725
+ 0
726
+ ]) || (a.translation = s), P(c, [
727
+ 1,
728
+ 1,
729
+ 1
730
+ ]) || (a.scale = c), a.extras = { pivot: i.toArray() }, e.name !== "" && (a.name = String(e.name)), this.serializeUserData(e, a);
731
+ let l = t.nodes.push(a) - 1;
732
+ r.set(e, l);
733
+ let u = {}, d = [
734
+ -i.x,
735
+ -i.y,
736
+ -i.z
737
+ ];
738
+ if (P(d, [
739
+ 0,
740
+ 0,
741
+ 0
742
+ ]) || (u.translation = d), e.isMesh || e.isLine || e.isPoints) {
743
+ let t = await this.processMeshAsync(e);
744
+ t !== null && (u.mesh = t);
745
+ } else e.isCamera && (u.camera = this.processCamera(e));
746
+ e.isSkinnedMesh && this.skins.push(e);
747
+ let f = [t.nodes.push(u) - 1];
748
+ if (e.children.length > 0) {
749
+ let t = [];
750
+ for (let r = 0, i = e.children.length; r < i; r++) {
751
+ let i = e.children[r];
752
+ if (i.visible || n.onlyVisible === !1) {
753
+ let e = await this.processNodeAsync(i);
754
+ e !== null && t.push(e);
755
+ }
756
+ }
757
+ t.length > 0 && (u.children = t);
758
+ }
759
+ return a.children = f, await this._invokeAllAsync(function(t) {
760
+ t.writeNode && t.writeNode(e, a);
761
+ }), l;
762
+ }
763
+ async processSceneAsync(e) {
764
+ let t = this.json, n = this.options;
765
+ t.scenes || (t.scenes = [], t.scene = 0);
766
+ let r = {};
767
+ e.name !== "" && (r.name = e.name), t.scenes.push(r);
768
+ let i = [];
769
+ for (let t = 0, r = e.children.length; t < r; t++) {
770
+ let r = e.children[t];
771
+ if (r.visible || n.onlyVisible === !1) {
772
+ let e = await this.processNodeAsync(r);
773
+ e !== null && i.push(e);
774
+ }
775
+ }
776
+ i.length > 0 && (r.nodes = i), this.serializeUserData(e, r);
777
+ }
778
+ async processObjectsAsync(e) {
779
+ let t = new m();
780
+ t.name = "AuxScene";
781
+ for (let n = 0; n < e.length; n++) t.children.push(e[n]);
782
+ await this.processSceneAsync(t);
783
+ }
784
+ async processInputAsync(e) {
785
+ let t = this.options;
786
+ e = e instanceof Array ? e : [e], await this._invokeAllAsync(function(t) {
787
+ t.beforeParse && t.beforeParse(e);
788
+ });
789
+ let n = [];
790
+ for (let t = 0; t < e.length; t++) e[t] instanceof m ? await this.processSceneAsync(e[t]) : n.push(e[t]);
791
+ n.length > 0 && await this.processObjectsAsync(n);
792
+ for (let e = 0; e < this.skins.length; ++e) this.processSkin(this.skins[e]);
793
+ for (let n = 0; n < t.animations.length; ++n) this.processAnimation(t.animations[n], e[0]);
794
+ await this._invokeAllAsync(function(t) {
795
+ t.afterParse && t.afterParse(e);
796
+ });
797
+ }
798
+ async _invokeAllAsync(e) {
799
+ for (let t = 0, n = this.plugins.length; t < n; t++) await e(this.plugins[t]);
800
+ }
801
+ }, U = class {
802
+ constructor(e) {
803
+ this.writer = e, this.name = "KHR_lights_punctual";
804
+ }
805
+ writeNode(e, t) {
806
+ if (!e.isLight) return;
807
+ if (!e.isDirectionalLight && !e.isPointLight && !e.isSpotLight) {
808
+ console.warn("THREE.GLTFExporter: Only directional, point, and spot lights are supported.", e);
809
+ return;
810
+ }
811
+ let n = this.writer, r = n.json, i = n.extensionsUsed, a = {};
812
+ e.name && (a.name = e.name), a.color = e.color.toArray(), a.intensity = e.intensity, e.isDirectionalLight ? a.type = "directional" : e.isPointLight ? (a.type = "point", e.distance > 0 && (a.range = e.distance)) : e.isSpotLight && (a.type = "spot", e.distance > 0 && (a.range = e.distance), a.spot = {}, a.spot.innerConeAngle = (1 - e.penumbra) * e.angle, a.spot.outerConeAngle = e.angle), e.decay !== void 0 && e.decay !== 2 && console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."), e.target && (e.target.parent !== e || e.target.position.x !== 0 || e.target.position.y !== 0 || e.target.position.z !== -1) && console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."), i[this.name] || (r.extensions = r.extensions || {}, r.extensions[this.name] = { lights: [] }, i[this.name] = !0);
813
+ let o = r.extensions[this.name].lights;
814
+ o.push(a), t.extensions = t.extensions || {}, t.extensions[this.name] = { light: o.length - 1 };
815
+ }
816
+ }, W = class {
817
+ constructor(e) {
818
+ this.writer = e, this.name = "KHR_materials_unlit";
819
+ }
820
+ async writeMaterialAsync(e, t) {
821
+ if (!e.isMeshBasicMaterial) return;
822
+ let n = this.writer.extensionsUsed;
823
+ t.extensions = t.extensions || {}, t.extensions[this.name] = {}, n[this.name] = !0, t.pbrMetallicRoughness.metallicFactor = 0, t.pbrMetallicRoughness.roughnessFactor = .9;
824
+ }
825
+ }, G = class {
826
+ constructor(e) {
827
+ this.writer = e, this.name = "KHR_materials_clearcoat";
828
+ }
829
+ async writeMaterialAsync(e, t) {
830
+ if (!e.isMeshPhysicalMaterial || e.clearcoat === 0) return;
831
+ let n = this.writer, r = n.extensionsUsed, i = {};
832
+ if (i.clearcoatFactor = e.clearcoat, e.clearcoatMap) {
833
+ let t = {
834
+ index: await n.processTextureAsync(e.clearcoatMap),
835
+ texCoord: e.clearcoatMap.channel
836
+ };
837
+ n.applyTextureTransform(t, e.clearcoatMap), i.clearcoatTexture = t;
838
+ }
839
+ if (i.clearcoatRoughnessFactor = e.clearcoatRoughness, e.clearcoatRoughnessMap) {
840
+ let t = {
841
+ index: await n.processTextureAsync(e.clearcoatRoughnessMap),
842
+ texCoord: e.clearcoatRoughnessMap.channel
843
+ };
844
+ n.applyTextureTransform(t, e.clearcoatRoughnessMap), i.clearcoatRoughnessTexture = t;
845
+ }
846
+ if (e.clearcoatNormalMap) {
847
+ let t = {
848
+ index: await n.processTextureAsync(e.clearcoatNormalMap),
849
+ texCoord: e.clearcoatNormalMap.channel
850
+ };
851
+ e.clearcoatNormalScale.x !== 1 && (t.scale = e.clearcoatNormalScale.x), n.applyTextureTransform(t, e.clearcoatNormalMap), i.clearcoatNormalTexture = t;
852
+ }
853
+ t.extensions = t.extensions || {}, t.extensions[this.name] = i, r[this.name] = !0;
854
+ }
855
+ }, K = class {
856
+ constructor(e) {
857
+ this.writer = e, this.name = "KHR_materials_dispersion";
858
+ }
859
+ async writeMaterialAsync(e, t) {
860
+ if (!e.isMeshPhysicalMaterial || e.dispersion === 0) return;
861
+ let n = this.writer.extensionsUsed, r = {};
862
+ r.dispersion = e.dispersion, t.extensions = t.extensions || {}, t.extensions[this.name] = r, n[this.name] = !0;
863
+ }
864
+ }, q = class {
865
+ constructor(e) {
866
+ this.writer = e, this.name = "KHR_materials_iridescence";
867
+ }
868
+ async writeMaterialAsync(e, t) {
869
+ if (!e.isMeshPhysicalMaterial || e.iridescence === 0) return;
870
+ let n = this.writer, r = n.extensionsUsed, i = {};
871
+ if (i.iridescenceFactor = e.iridescence, e.iridescenceMap) {
872
+ let t = {
873
+ index: await n.processTextureAsync(e.iridescenceMap),
874
+ texCoord: e.iridescenceMap.channel
875
+ };
876
+ n.applyTextureTransform(t, e.iridescenceMap), i.iridescenceTexture = t;
877
+ }
878
+ if (i.iridescenceIor = e.iridescenceIOR, i.iridescenceThicknessMinimum = e.iridescenceThicknessRange[0], i.iridescenceThicknessMaximum = e.iridescenceThicknessRange[1], e.iridescenceThicknessMap) {
879
+ let t = {
880
+ index: await n.processTextureAsync(e.iridescenceThicknessMap),
881
+ texCoord: e.iridescenceThicknessMap.channel
882
+ };
883
+ n.applyTextureTransform(t, e.iridescenceThicknessMap), i.iridescenceThicknessTexture = t;
884
+ }
885
+ t.extensions = t.extensions || {}, t.extensions[this.name] = i, r[this.name] = !0;
886
+ }
887
+ }, J = class {
888
+ constructor(e) {
889
+ this.writer = e, this.name = "KHR_materials_transmission";
890
+ }
891
+ async writeMaterialAsync(e, t) {
892
+ if (!e.isMeshPhysicalMaterial || e.transmission === 0) return;
893
+ let n = this.writer, r = n.extensionsUsed, i = {};
894
+ if (i.transmissionFactor = e.transmission, e.transmissionMap) {
895
+ let t = {
896
+ index: await n.processTextureAsync(e.transmissionMap),
897
+ texCoord: e.transmissionMap.channel
898
+ };
899
+ n.applyTextureTransform(t, e.transmissionMap), i.transmissionTexture = t;
900
+ }
901
+ t.extensions = t.extensions || {}, t.extensions[this.name] = i, r[this.name] = !0;
902
+ }
903
+ }, Y = class {
904
+ constructor(e) {
905
+ this.writer = e, this.name = "KHR_materials_volume";
906
+ }
907
+ async writeMaterialAsync(e, t) {
908
+ if (!e.isMeshPhysicalMaterial || e.transmission === 0) return;
909
+ let n = this.writer, r = n.extensionsUsed, i = {};
910
+ if (i.thicknessFactor = e.thickness, e.thicknessMap) {
911
+ let t = {
912
+ index: await n.processTextureAsync(e.thicknessMap),
913
+ texCoord: e.thicknessMap.channel
914
+ };
915
+ n.applyTextureTransform(t, e.thicknessMap), i.thicknessTexture = t;
916
+ }
917
+ e.attenuationDistance !== Infinity && (i.attenuationDistance = e.attenuationDistance), i.attenuationColor = e.attenuationColor.toArray(), t.extensions = t.extensions || {}, t.extensions[this.name] = i, r[this.name] = !0;
918
+ }
919
+ }, X = class {
920
+ constructor(e) {
921
+ this.writer = e, this.name = "KHR_materials_ior";
922
+ }
923
+ async writeMaterialAsync(e, t) {
924
+ if (!e.isMeshPhysicalMaterial || e.ior === 1.5) return;
925
+ let n = this.writer.extensionsUsed, r = {};
926
+ r.ior = e.ior, t.extensions = t.extensions || {}, t.extensions[this.name] = r, n[this.name] = !0;
927
+ }
928
+ }, Z = class {
929
+ constructor(e) {
930
+ this.writer = e, this.name = "KHR_materials_specular";
931
+ }
932
+ async writeMaterialAsync(e, t) {
933
+ if (!e.isMeshPhysicalMaterial || e.specularIntensity === 1 && e.specularColor.equals(D) && !e.specularIntensityMap && !e.specularColorMap) return;
934
+ let n = this.writer, r = n.extensionsUsed, i = {};
935
+ if (e.specularIntensityMap) {
936
+ let t = {
937
+ index: await n.processTextureAsync(e.specularIntensityMap),
938
+ texCoord: e.specularIntensityMap.channel
939
+ };
940
+ n.applyTextureTransform(t, e.specularIntensityMap), i.specularTexture = t;
941
+ }
942
+ if (e.specularColorMap) {
943
+ let t = {
944
+ index: await n.processTextureAsync(e.specularColorMap),
945
+ texCoord: e.specularColorMap.channel
946
+ };
947
+ n.applyTextureTransform(t, e.specularColorMap), i.specularColorTexture = t;
948
+ }
949
+ i.specularFactor = e.specularIntensity, i.specularColorFactor = e.specularColor.toArray(), t.extensions = t.extensions || {}, t.extensions[this.name] = i, r[this.name] = !0;
950
+ }
951
+ }, Q = class {
952
+ constructor(e) {
953
+ this.writer = e, this.name = "KHR_materials_sheen";
954
+ }
955
+ async writeMaterialAsync(e, t) {
956
+ if (!e.isMeshPhysicalMaterial || e.sheen == 0) return;
957
+ let n = this.writer, r = n.extensionsUsed, i = {};
958
+ if (e.sheenRoughnessMap) {
959
+ let t = {
960
+ index: await n.processTextureAsync(e.sheenRoughnessMap),
961
+ texCoord: e.sheenRoughnessMap.channel
962
+ };
963
+ n.applyTextureTransform(t, e.sheenRoughnessMap), i.sheenRoughnessTexture = t;
964
+ }
965
+ if (e.sheenColorMap) {
966
+ let t = {
967
+ index: await n.processTextureAsync(e.sheenColorMap),
968
+ texCoord: e.sheenColorMap.channel
969
+ };
970
+ n.applyTextureTransform(t, e.sheenColorMap), i.sheenColorTexture = t;
971
+ }
972
+ i.sheenRoughnessFactor = e.sheenRoughness, i.sheenColorFactor = e.sheenColor.toArray(), t.extensions = t.extensions || {}, t.extensions[this.name] = i, r[this.name] = !0;
973
+ }
974
+ }, $ = class {
975
+ constructor(e) {
976
+ this.writer = e, this.name = "KHR_materials_anisotropy";
977
+ }
978
+ async writeMaterialAsync(e, t) {
979
+ if (!e.isMeshPhysicalMaterial || e.anisotropy == 0) return;
980
+ let n = this.writer, r = n.extensionsUsed, i = {};
981
+ if (e.anisotropyMap) {
982
+ let t = { index: await n.processTextureAsync(e.anisotropyMap) };
983
+ n.applyTextureTransform(t, e.anisotropyMap), i.anisotropyTexture = t;
984
+ }
985
+ i.anisotropyStrength = e.anisotropy, i.anisotropyRotation = e.anisotropyRotation, t.extensions = t.extensions || {}, t.extensions[this.name] = i, r[this.name] = !0;
986
+ }
987
+ }, ee = class {
988
+ constructor(e) {
989
+ this.writer = e, this.name = "KHR_materials_emissive_strength";
990
+ }
991
+ async writeMaterialAsync(e, t) {
992
+ if (!e.isMeshStandardMaterial || e.emissiveIntensity === 1) return;
993
+ let n = this.writer.extensionsUsed, r = {};
994
+ r.emissiveStrength = e.emissiveIntensity, t.extensions = t.extensions || {}, t.extensions[this.name] = r, n[this.name] = !0;
995
+ }
996
+ }, te = class {
997
+ constructor(e) {
998
+ this.writer = e, this.name = "EXT_materials_bump";
999
+ }
1000
+ async writeMaterialAsync(e, t) {
1001
+ if (!e.isMeshStandardMaterial || e.bumpScale === 1 && !e.bumpMap) return;
1002
+ let n = this.writer, r = n.extensionsUsed, i = {};
1003
+ if (e.bumpMap) {
1004
+ let t = {
1005
+ index: await n.processTextureAsync(e.bumpMap),
1006
+ texCoord: e.bumpMap.channel
1007
+ };
1008
+ n.applyTextureTransform(t, e.bumpMap), i.bumpTexture = t;
1009
+ }
1010
+ i.bumpFactor = e.bumpScale, t.extensions = t.extensions || {}, t.extensions[this.name] = i, r[this.name] = !0;
1011
+ }
1012
+ }, ne = class {
1013
+ constructor(e) {
1014
+ this.writer = e, this.name = "EXT_mesh_gpu_instancing";
1015
+ }
1016
+ writeNode(e, t) {
1017
+ if (!e.isInstancedMesh) return;
1018
+ let n = this.writer, r = e, i = new Float32Array(r.count * 3), a = new Float32Array(r.count * 4), o = new Float32Array(r.count * 3), l = new s(), u = new c(), d = new h(), p = new c();
1019
+ for (let e = 0; e < r.count; e++) r.getMatrixAt(e, l), l.decompose(u, d, p), u.toArray(i, e * 3), d.toArray(a, e * 4), p.toArray(o, e * 3);
1020
+ let m = {
1021
+ TRANSLATION: n.processAccessor(new f(i, 3)),
1022
+ ROTATION: n.processAccessor(new f(a, 4)),
1023
+ SCALE: n.processAccessor(new f(o, 3))
1024
+ };
1025
+ r.instanceColor && (m._COLOR_0 = n.processAccessor(r.instanceColor)), t.extensions = t.extensions || {}, t.extensions[this.name] = { attributes: m }, n.extensionsUsed[this.name] = !0, n.extensionsRequired[this.name] = !0;
1026
+ }
1027
+ };
1028
+ S.Utils = {
1029
+ insertKeyframe: function(e, t) {
1030
+ let n = .001, r = e.getValueSize(), i = new e.TimeBufferType(e.times.length + 1), a = new e.ValueBufferType(e.values.length + r), o = e.createInterpolant(new e.ValueBufferType(r)), s;
1031
+ if (e.times.length === 0) {
1032
+ i[0] = t;
1033
+ for (let e = 0; e < r; e++) a[e] = 0;
1034
+ s = 0;
1035
+ } else if (t < e.times[0]) {
1036
+ if (Math.abs(e.times[0] - t) < n) return 0;
1037
+ i[0] = t, i.set(e.times, 1), a.set(o.evaluate(t), 0), a.set(e.values, r), s = 0;
1038
+ } else if (t > e.times[e.times.length - 1]) {
1039
+ if (Math.abs(e.times[e.times.length - 1] - t) < n) return e.times.length - 1;
1040
+ i[i.length - 1] = t, i.set(e.times, 0), a.set(e.values, 0), a.set(o.evaluate(t), e.values.length), s = i.length - 1;
1041
+ } else for (let c = 0; c < e.times.length; c++) {
1042
+ if (Math.abs(e.times[c] - t) < n) return c;
1043
+ if (e.times[c] < t && e.times[c + 1] > t) {
1044
+ i.set(e.times.slice(0, c + 1), 0), i[c + 1] = t, i.set(e.times.slice(c + 1), c + 2), a.set(e.values.slice(0, (c + 1) * r), 0), a.set(o.evaluate(t), (c + 1) * r), a.set(e.values.slice((c + 1) * r), (c + 2) * r), s = c + 1;
1045
+ break;
1046
+ }
1047
+ }
1048
+ return e.times = i, e.values = a, s;
1049
+ },
1050
+ mergeMorphTargetTracks: function(e, t) {
1051
+ let n = [], r = {}, i = e.tracks;
1052
+ for (let e = 0; e < i.length; ++e) {
1053
+ let a = i[e], o = d.parseTrackName(a.name), s = d.findNode(t, o.nodeName);
1054
+ if (o.propertyName !== "morphTargetInfluences" || o.propertyIndex === void 0) {
1055
+ n.push(a);
1056
+ continue;
1057
+ }
1058
+ if (a.createInterpolant !== a.InterpolantFactoryMethodDiscrete && a.createInterpolant !== a.InterpolantFactoryMethodLinear) {
1059
+ if (a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) throw Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");
1060
+ console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."), a = a.clone(), a.setInterpolation(v);
1061
+ }
1062
+ let c = s.morphTargetInfluences.length, l = s.morphTargetDictionary[o.propertyIndex];
1063
+ if (l === void 0) throw Error("THREE.GLTFExporter: Morph target name not found: " + o.propertyIndex);
1064
+ let u;
1065
+ if (r[s.uuid] === void 0) {
1066
+ u = a.clone();
1067
+ let e = new u.ValueBufferType(c * u.times.length);
1068
+ for (let t = 0; t < u.times.length; t++) e[t * c + l] = u.values[t];
1069
+ u.name = (o.nodeName || "") + ".morphTargetInfluences", u.values = e, r[s.uuid] = u, n.push(u);
1070
+ continue;
1071
+ }
1072
+ let f = a.createInterpolant(new a.ValueBufferType(1));
1073
+ u = r[s.uuid];
1074
+ for (let e = 0; e < u.times.length; e++) u.values[e * c + l] = f.evaluate(u.times[e]);
1075
+ for (let e = 0; e < a.times.length; e++) {
1076
+ let t = this.insertKeyframe(u, a.times[e]);
1077
+ u.values[t * c + l] = a.values[e];
1078
+ }
1079
+ }
1080
+ return e.tracks = n, e;
1081
+ },
1082
+ toTypedBufferAttribute: function(e, t) {
1083
+ let n = new f(new t(e.count * e.itemSize), e.itemSize, !1);
1084
+ if (!e.normalized && !e.isInterleavedBufferAttribute) return n.array.set(e.array), n;
1085
+ for (let t = 0, r = e.count; t < r; t++) for (let r = 0; r < e.itemSize; r++) n.setComponent(t, r, e.getComponent(t, r));
1086
+ return n;
1087
+ }
1088
+ };
1089
+ //#endregion
1090
+ export { S as GLTFExporter };
1091
+
1092
+ //# sourceMappingURL=GLTFExporter-D8qsdwDK.mjs.map