@volter/game-editor 0.5.65 → 0.5.66

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 (544) hide show
  1. package/BUNDLED_NOTICES +1962 -363
  2. package/catalog/entries/bake.json +0 -1
  3. package/catalog/entries/blender.json +2 -2
  4. package/catalog/entries/reflections.json +2 -4
  5. package/catalog/project-source/src/lib/bake/asset-seed.ts +1 -2
  6. package/catalog/project-source/src/lib/bake/clip-layering.ts +3 -4
  7. package/catalog/project-source/src/lib/bake/gltf-bake.ts +1 -1
  8. package/catalog/project-source/src/lib/bake/params.ts +3 -5
  9. package/catalog/project-source/src/lib/bake/rest-relative-animation.ts +2 -3
  10. package/dist/.vite/manifest.json +2406 -2182
  11. package/dist/assets/{AssetBudgetPanel-J9--TZPU.js → AssetBudgetPanel-csYWK2H4.js} +8 -8
  12. package/dist/assets/{AudioViewer-CR7333fe.js → AudioViewer-BH_LUYs5.js} +1 -1
  13. package/dist/assets/{BVHLoader-6bQIXhMX.js → BVHLoader-Jkzh8hMf.js} +1 -1
  14. package/dist/assets/BufferGeometryUtils-CAbuTPOA.js +1 -0
  15. package/dist/assets/{CCDIKSolver-CD7vLpsK.js → CCDIKSolver-D4NvkJ8d.js} +1 -1
  16. package/dist/assets/{CSS3DRenderer-CL7ABLVK.js → CSS3DRenderer-CAS2WZZy.js} +1 -1
  17. package/dist/assets/CanvasSceneViewport-BlsRTk-X.js +1 -0
  18. package/dist/assets/ColladaLoader-DxYB89DA.js +3 -0
  19. package/dist/assets/{ColorInput-DQBNrW-K.js → ColorInput-CPQNsDf1.js} +1 -1
  20. package/dist/assets/{ConvexGeometry-CAzXlPVG.js → ConvexGeometry-Dinf-sev.js} +1 -1
  21. package/dist/assets/{ConvexHull-BINCESFp.js → ConvexHull-CrJ8FY-w.js} +1 -1
  22. package/dist/assets/{DecalGeometry-160KRdfg.js → DecalGeometry-owkbefLa.js} +1 -1
  23. package/dist/assets/EffectComposer-BHDH-NLz.js +1 -0
  24. package/dist/assets/EntityModelDocument-DuQivdvc.js +1 -0
  25. package/dist/assets/EnvironmentAssetDocument-CnTEMn3A.js +1 -0
  26. package/dist/assets/FBXLoader-BMUbIhtE.js +1 -0
  27. package/dist/assets/Fbo-DrK7CWlB.js +1 -0
  28. package/dist/assets/{FontLoader-CvGoVI5a.js → FontLoader-BR_K6Baw.js} +2 -2
  29. package/dist/assets/GLTFExporter-BZqAQJbw.js +1 -0
  30. package/dist/assets/{GameplaySessionTimeline-B52W3FVZ.js → GameplaySessionTimeline-Crqwv2fP.js} +1 -1
  31. package/dist/assets/Gltf-7cVbZUzT.js +2 -0
  32. package/dist/assets/ImageViewer-BkFie7Hm.js +1 -0
  33. package/dist/assets/InspectorObjectPreview-Dl3tyJBn.js +1 -0
  34. package/dist/assets/JsonAssetDocument-BUFzubHM.js +2 -0
  35. package/dist/assets/{LineSegments2-CsOpKSiM.js → LineSegments2-Cicm_Hu1.js} +2 -2
  36. package/dist/assets/LiveModuleDocument-C3OQxiba.js +1 -0
  37. package/dist/assets/LutAssetDocument-DVzd1RZ9.js +1 -0
  38. package/dist/assets/{MTLLoader-_Xzd4_0p.js → MTLLoader-Bg_grNiT.js} +2 -2
  39. package/dist/assets/{MarchingCubes-Bsp4wrzd.js → MarchingCubes-a78AL3HB.js} +1 -1
  40. package/dist/assets/MeshBVH-BCSLNEeP.js +1 -0
  41. package/dist/assets/ModelAssetDocument-pN84goRT.js +1 -0
  42. package/dist/assets/{NonThreeAuthoringBootstrap-C3woOMxX.js → NonThreeAuthoringBootstrap-BKNejRiW.js} +1 -1
  43. package/dist/assets/{OBJLoader-BhIC6Hwo.js → OBJLoader-BiwzVj5b.js} +2 -2
  44. package/dist/assets/Object3DDocumentToolbar-D5Bg5FEf.js +1 -0
  45. package/dist/assets/Object3DDocumentViewport-DFHqru3a.js +2 -0
  46. package/dist/assets/Object3DPreview-BTtZ-41z.js +2 -0
  47. package/dist/assets/OnlineAssetDetail-BAqozdAp.js +1 -0
  48. package/dist/assets/{OrbitControls-DLpayAaK.js → OrbitControls-CzKVCORl.js} +1 -1
  49. package/dist/assets/{OrbitControls-CM3bPray.js → OrbitControls-CzTRRI7x.js} +1 -1
  50. package/dist/assets/{OrthographicCamera-bQozawrh.js → OrthographicCamera-CSDDsvu7.js} +1 -1
  51. package/dist/assets/{PLYLoader-DYQqs5Ik.js → PLYLoader-QxrxxMpE.js} +2 -2
  52. package/dist/assets/{PerspectiveCamera-CQ2lh01o.js → PerspectiveCamera-DzD_NfVh.js} +1 -1
  53. package/dist/assets/PlayBar-qVJpgwJt.js +2 -0
  54. package/dist/assets/QuarksAssetDocument-B4vBlUsS.js +2 -0
  55. package/dist/assets/RGBELoader-WQ7xZofE.js +1 -0
  56. package/dist/assets/RectAreaLightUniformsLib-CwcuoVqt.js +1 -0
  57. package/dist/assets/{RenderPass-DPrn-Uky.js → RenderPass-C_CeQNdh.js} +1 -1
  58. package/dist/assets/{ResolutionPicker-C67vs1F3.js → ResolutionPicker-DpHVJxn5.js} +1 -1
  59. package/dist/assets/RootSelectionOverlay-BxvsunO4.js +1 -0
  60. package/dist/assets/{RoundedBox-BDGBg6QZ.js → RoundedBox-B_cZ0NFy.js} +1 -1
  61. package/dist/assets/{RoundedBoxGeometry-CyUuYPfW.js → RoundedBoxGeometry-Y4rcSIvX.js} +1 -1
  62. package/dist/assets/STLLoader-Bej_Nkpr.js +1 -0
  63. package/dist/assets/{SelectionBox-D_75KrNW.js → SelectionBox-Cn9vm7f9.js} +1 -1
  64. package/dist/assets/ShaderAssetDocument-Dx2x8CLr.js +12 -0
  65. package/dist/assets/{ShaderPass-QYRpPuFJ.js → ShaderPass-qtkA7CQ8.js} +1 -1
  66. package/dist/assets/{ShadowEditor-DkImwu1Y.js → ShadowEditor-BEIUkrHL.js} +1 -1
  67. package/dist/assets/SimplifyModifier-D2EesGr2.js +1 -0
  68. package/dist/assets/{SkeletonUtils-Cps8GOC6.js → SkeletonUtils-C8ayciDc.js} +1 -1
  69. package/dist/assets/{Sky-CQKCgYDs.js → Sky-BBpnAJZV.js} +1 -1
  70. package/dist/assets/SourceAssetViewer-BpMbbuy6.js +1 -0
  71. package/dist/assets/StageHost-lB8f---y.js +2 -0
  72. package/dist/assets/{StoryPreviewMount-DjyxRCXu.js → StoryPreviewMount-BIfxmkYh.js} +1 -1
  73. package/dist/assets/{TDSLoader-D_T8XJ81.js → TDSLoader-rHl5Uwc0.js} +1 -1
  74. package/dist/assets/{TextGeometry-DOWAEUV0.js → TextGeometry-BRHSufuM.js} +1 -1
  75. package/dist/assets/ThreeBoardDocument-BHV92Ia3.js +2 -0
  76. package/dist/assets/{ThreeIsolationSceneContent-C8C8whSF.js → ThreeIsolationSceneContent-BqtgDHBK.js} +1 -1
  77. package/dist/assets/{ToolObject3DPreview-BRoDWe4Q.js → ToolObject3DPreview-CcaPJTyH.js} +1 -1
  78. package/dist/assets/Toolbar-keHcSvDD.js +1 -0
  79. package/dist/assets/{TrackballControls-DfznuQTh.js → TrackballControls-Cce-6Ff5.js} +1 -1
  80. package/dist/assets/{TransientHint-BB1fwrvK.js → TransientHint-Dlslh3oX.js} +1 -1
  81. package/dist/assets/{UnrealBloomPass-CR-cS_K5.js → UnrealBloomPass-DiseEiFK.js} +2 -2
  82. package/dist/assets/{VideoViewer-C6kocgIU.js → VideoViewer-naGSXHd6.js} +1 -1
  83. package/dist/assets/ViewportShadingMenu-C7Hdhtca.js +1 -0
  84. package/dist/assets/{active-ingest-CT6jSGhr.js → active-ingest-DEgq9JiA.js} +3 -3
  85. package/dist/assets/{animation-clock-CnjZqfJp.js → animation-clock-lTIb6nk3.js} +1 -1
  86. package/dist/assets/animation-mixers.service-2O2rVwQf.js +1 -0
  87. package/dist/assets/asset-budget-asset.menu-9NhdHAC9.js +1 -0
  88. package/dist/assets/asset-budget.action-yg6-luUJ.js +1 -0
  89. package/dist/assets/asset-budget.document-B46_VFqa.js +1 -0
  90. package/dist/assets/asset-budget.menu-DuH07N-e.js +1 -0
  91. package/dist/assets/{asset-editor-persistence-BBaONOJt.js → asset-editor-persistence-BVtzjadu.js} +1 -1
  92. package/dist/assets/{asset-loaders-BOy5Ss8k.js → asset-loaders-BxG1LykH.js} +2 -2
  93. package/dist/assets/{assets-BuSoGjBX.js → assets-Do88ZdV_.js} +1 -1
  94. package/dist/assets/{audio-unlock.service-CfUgUQVy.js → audio-unlock.service-BJH0mWvX.js} +1 -1
  95. package/dist/assets/{audio.utility-C6K6jem8.js → audio.utility-Cp4aVYFU.js} +1 -1
  96. package/dist/assets/autoplay.service-FxpRy7Ev.js +1 -0
  97. package/dist/assets/{babylon-authoring-adapter-CL02gWDn.js → babylon-authoring-adapter-B_8iE8fK.js} +1 -1
  98. package/dist/assets/{binding-resolver-Dsh-6Vor.js → binding-resolver-BWwG10zJ.js} +2 -2
  99. package/dist/assets/blender-emscripten-engine-CEsWgnR7.js +2 -0
  100. package/dist/assets/{blender-node-editor.document-iIDkB9sI.js → blender-node-editor.document-DTgwy8KC.js} +1 -1
  101. package/dist/assets/blender-properties-tab-DWSJpkxq.js +3 -0
  102. package/dist/assets/blender-runtime-host-OGjPjTrG.js +4 -0
  103. package/dist/assets/{blender-runtime-skin-DyQ9B6CR.js → blender-runtime-skin-DymtXlpt.js} +37 -39
  104. package/dist/assets/blender-runtime.document-CzH2ohHR.js +8 -0
  105. package/dist/assets/{blender-timeline.document-77fx96N7.js → blender-timeline.document-BRy_QPHt.js} +1 -1
  106. package/dist/assets/{blender-uv-editor.document-fsT7B4gV.js → blender-uv-editor.document-D-AbUCqz.js} +1 -1
  107. package/dist/assets/{blender-version.status-o6dBm3n6.js → blender-version.status-B7flzX_7.js} +1 -1
  108. package/dist/assets/{blender-wali-engine-wTOcrOMC.js → blender-wali-engine-D3iKpzn9.js} +1 -1
  109. package/dist/assets/blender.command-BVHtgTQy.js +1 -0
  110. package/dist/assets/blender.environment-CG-pC7sk.js +1 -0
  111. package/dist/assets/{blender.style-Dcem5f_T.js → blender.style-CxfbTFcE.js} +1 -1
  112. package/dist/assets/{board-guides-DziKSTss.js → board-guides-C3usUZZk.js} +1 -1
  113. package/dist/assets/body-marks-D8iaje6y.js +1 -0
  114. package/dist/assets/bridge.command-BF9u6r0A.js +3 -0
  115. package/dist/assets/browserAll-38aBu-cf.js +1 -0
  116. package/dist/assets/{build-profiles.document-kW8iw8Xj.js → build-profiles.document-DO7oNRuo.js} +2 -2
  117. package/dist/assets/{build-progress.status-BNRLytg2.js → build-progress.status-COeNVhYd.js} +1 -1
  118. package/dist/assets/{build-session-C_sg3CEn.js → build-session-IWIriS5P.js} +1 -1
  119. package/dist/assets/{build.action-lYjTLb7K.js → build.action-DlkFvZf6.js} +1 -1
  120. package/dist/assets/{build.command-DIGgUPU_.js → build.command-DPqQIYj_.js} +1 -1
  121. package/dist/assets/{build.header-CKajx5U3.js → build.header-CNLG-pV8.js} +1 -1
  122. package/dist/assets/{build.menu-BdU0QXny.js → build.menu-hUlH6loi.js} +1 -1
  123. package/dist/assets/{build.service-CbBAyeu3.js → build.service-C86Td3_9.js} +1 -1
  124. package/dist/assets/{camera-KEsKvOL7.js → camera-CKbyBXMe.js} +1 -1
  125. package/dist/assets/camera-authoring-Ci3KnE-W.js +1 -0
  126. package/dist/assets/{camera-runtime.inspector-B7unX4g1.js → camera-runtime.inspector-DdR3P2BF.js} +1 -1
  127. package/dist/assets/canvas-entry-runtime-E5YjSgre.js +2 -0
  128. package/dist/assets/canvas-preview-frames-CiAx7dpV.js +1 -0
  129. package/dist/assets/{capability-coverage-Czas4C18.js → capability-coverage-CfUeULDN.js} +5 -5
  130. package/dist/assets/city-EkhAOo5s.exr +0 -0
  131. package/dist/assets/{collaboration-presence-DLoZ7EA3.js → collaboration-presence-CSLFNT7m.js} +1 -1
  132. package/dist/assets/{collider-Bw0mXlsW.js → collider-DRSaLRM9.js} +1 -1
  133. package/dist/assets/{component-board.service-DCwcUssB.js → component-board.service-B7Sv8b7m.js} +2 -2
  134. package/dist/assets/component-board.service-B8UHw8dn.js +2 -0
  135. package/dist/assets/component-contracts.service-LFGekycZ.js +1 -0
  136. package/dist/assets/{component-verbs.command-7xzfjGMZ.js → component-verbs.command-D4SvFjfG.js} +1 -1
  137. package/dist/assets/component-verbs.service-TGvWxf2b.js +1 -0
  138. package/dist/assets/{config-CEZk921y.js → config-DB_RH-hO.js} +3 -3
  139. package/dist/assets/{configurations-DTBMdaTL.js → configurations-C2qgJNnW.js} +1 -1
  140. package/dist/assets/{connection.status-BifnQdOs.js → connection.status-CG7X2brL.js} +1 -1
  141. package/dist/assets/{console-bridge-CHcb-xk5.js → console-bridge-B5Ltae37.js} +1 -1
  142. package/dist/assets/{constraint-De8f1Uiq.js → constraint-C_Jj7dXy.js} +1 -1
  143. package/dist/assets/constraints.inspector-D6QZJS4b.js +1 -0
  144. package/dist/assets/courtyard-DqlebbpC.exr +0 -0
  145. package/dist/assets/coverage.service-Clo86874.js +3 -0
  146. package/dist/assets/{create-runtime-CVCc1BDx.js → create-runtime-lmA910XT.js} +1 -1
  147. package/dist/assets/{curve-7Q79VgU4.js → curve-6-TR6dNb.js} +1 -1
  148. package/dist/assets/{data-asset-4hjS642k.js → data-asset-BNbd309U.js} +1 -1
  149. package/dist/assets/{data-ref-CQI28C0D.js → data-ref-Dvmd7eb1.js} +1 -1
  150. package/dist/assets/{debug-bridge-CCohG-d-.js → debug-bridge-BUNhgyY6.js} +1 -1
  151. package/dist/assets/{debug-registry-Dgvitx8M.js → debug-registry-B3Cnne3x.js} +1 -1
  152. package/dist/assets/deferred-ingest-play-7V8OrW3e.js +2 -0
  153. package/dist/assets/design-time-layers-g9VS6amb.js +1 -0
  154. package/dist/assets/design-time-mount.service-HtMr_vBd.js +2 -0
  155. package/dist/assets/design-time-react-mount-Dx6fJ-Hg.js +1 -0
  156. package/dist/assets/{directional-shadow-fit-BVkOKAv2.js → directional-shadow-fit-Cjz_Eg2b.js} +1 -1
  157. package/dist/assets/{document-preview-three-Kbg2GCLm.js → document-preview-three-C3y0syYQ.js} +1 -1
  158. package/dist/assets/{dom-authoring-adapter-CY8C7f4T.js → dom-authoring-adapter-CEeFyatF.js} +1 -1
  159. package/dist/assets/{draco3d-BBUTcNkz.js → draco3d-FKy0apkb.js} +1 -1
  160. package/dist/assets/drei-asset-caches-jJoHXbTj.js +2 -0
  161. package/dist/assets/{edit-mode-audio.service-Bzetwd5B.js → edit-mode-audio.service-DZTnrW6t.js} +1 -1
  162. package/dist/assets/edit-mode-authoring-D_BiHCQj.js +1 -0
  163. package/dist/assets/{edit-mode-networking.service-YCX6RRb_.js → edit-mode-networking.service-BzMI2VxO.js} +1 -1
  164. package/dist/assets/editor-api-Bzmo0o8_.js +1 -0
  165. package/dist/assets/{entry-adjudication-Cq8Yeb74.js → entry-adjudication-BYy7TXOB.js} +1 -1
  166. package/dist/assets/{events-156d8d12.esm-ErOhDXXB.js → events-156d8d12.esm-C734MYnx.js} +7 -7
  167. package/dist/assets/{extend-B-eOccUm.js → extend-CLG0ymiX.js} +1 -1
  168. package/dist/assets/forest-P_CQY3b_.exr +0 -0
  169. package/dist/assets/fork-menu-De7HU6_H.js +1 -0
  170. package/dist/assets/{frame-debugger-store-D1Mf_5up.js → frame-debugger-store-BZgIOlU6.js} +1 -1
  171. package/dist/assets/{game-DHOZVb-7.js → game-D5EJoILQ.js} +1 -1
  172. package/dist/assets/{game-contract-seams-a5YXejOu.js → game-contract-seams-TCpIMmHP.js} +1 -1
  173. package/dist/assets/{game-css-scope-transform-Eng4wS8E.js → game-css-scope-transform-NbpajQr-.js} +1 -1
  174. package/dist/assets/game-document.service-6eRlrI-d.js +1 -0
  175. package/dist/assets/game-eval.command-hKnSMlX0.js +2 -0
  176. package/dist/assets/{game-input-seams-CIQdetRw.js → game-input-seams-BC6xhZy3.js} +1 -1
  177. package/dist/assets/{game-module-access-B2mFxv-i.js → game-module-access-ry3xb1Ix.js} +1 -1
  178. package/dist/assets/{gameplay-export-BoKXm51x.js → gameplay-export-DiLQuPpn.js} +1 -1
  179. package/dist/assets/gameplay-replay-Bsre-1K8.js +1 -0
  180. package/dist/assets/{gameplay-rng-trap-CTNhm-UW.js → gameplay-rng-trap-BhRx_CtU.js} +1 -1
  181. package/dist/assets/gameplay.command-BqiyGn-I.js +1 -0
  182. package/dist/assets/{generation-jobs-BQrXbGp_.js → generation-jobs-BYcpgeGk.js} +1 -1
  183. package/dist/assets/generation.service-O81IqA-6.js +1 -0
  184. package/dist/assets/{generations-DzUogZsM.js → generations-CsGQ3twi.js} +1 -1
  185. package/dist/assets/{generations.status-CgOUBCum.js → generations.status-C3YU0_ml.js} +1 -1
  186. package/dist/assets/godot.style-DxJaFWOP.js +1 -0
  187. package/dist/assets/godot.view-BFsHk8b2.js +1 -0
  188. package/dist/assets/{hosted-asset-materialization-CiIvWkGU.js → hosted-asset-materialization-Bk-plQF6.js} +2 -2
  189. package/dist/assets/{ibl-override-material-BlmCxFKq.js → ibl-override-material-BhbGwgS1.js} +1 -1
  190. package/dist/assets/{index-mjWQmGhM.js → index-0n9eSzwT.js} +1 -1
  191. package/dist/assets/index-B4bmKkgY.css +1 -0
  192. package/dist/assets/index-BLo2LE8C.js +3404 -0
  193. package/dist/assets/index-BWW4-DBH.js +1 -0
  194. package/dist/assets/index-CLcsjKUs.js +1 -0
  195. package/dist/assets/index-CU5YUq-x.js +134 -0
  196. package/dist/assets/{index-DUpHH6JR.js → index-Cb6o_Td_.js} +1 -1
  197. package/dist/assets/index-Ckxb31Yz.js +1500 -0
  198. package/dist/assets/index-CnpsJMao.js +1 -0
  199. package/dist/assets/index-Cr23XhNm.js +1 -0
  200. package/dist/assets/index-DO1rWQ_r.js +487 -0
  201. package/dist/assets/{index-BcCBqgM_.js → index-DUh02lTr.js} +1 -1
  202. package/dist/assets/index-DXEHfb0b.js +1 -0
  203. package/dist/assets/{index-V1R-e5Bd.js → index-wRCvCebM.js} +1 -1
  204. package/dist/assets/{inference-diagnostics-Dhmtfbq_.js → inference-diagnostics-YW0yJkKx.js} +1 -1
  205. package/dist/assets/{ingest-BbYMC2vQ.js → ingest-BlQnR7s3.js} +1 -1
  206. package/dist/assets/ingest-boot-viewport-uG9jQ1zm.js +1 -0
  207. package/dist/assets/ingest-siblings-DRQXSWax.js +1 -0
  208. package/dist/assets/{ingest-source-persistence-C_6Hiyra.js → ingest-source-persistence-DH6ioCOu.js} +1 -1
  209. package/dist/assets/{ingest.service-BTDnQfM1.js → ingest.service-GeaWMaZX.js} +1 -1
  210. package/dist/assets/{input-manager-DH_hGW6d.js → input-manager-Cxx3RJgG.js} +1 -1
  211. package/dist/assets/{input-router-BNQvtIqw.js → input-router-FzxO5ld6.js} +1 -1
  212. package/dist/assets/{inspect-BZfi3mmo.js → inspect-BRgDdtVk.js} +1 -1
  213. package/dist/assets/instances.command-CFOMPSj3.js +1 -0
  214. package/dist/assets/{instruments-CKR02Y8I.js → instruments-IKn-vvNb.js} +1 -1
  215. package/dist/assets/interior-Bo_lba15.exr +0 -0
  216. package/dist/assets/{json-history-resource-BbxllWfV.js → json-history-resource-r-9q_hxP.js} +1 -1
  217. package/dist/assets/{light-D-_wsKTq.js → light-CFAor97k.js} +1 -1
  218. package/dist/assets/light-camera-factory-D1sgz3YB.js +1 -0
  219. package/dist/assets/live-mixers-BRkRHd6g.js +1 -0
  220. package/dist/assets/{loader-CaF_I7Yt.js → loader-BbMsvIxP.js} +1 -1
  221. package/dist/assets/machine.document-CgmsOh-s.js +24 -0
  222. package/dist/assets/machines.finder-nxiCgQc2.js +1 -0
  223. package/dist/assets/matcap-texture-Dh65bX5V.js +1 -0
  224. package/dist/assets/{material-CpAdjDxn.js → material-D5kXEZWQ.js} +1 -1
  225. package/dist/assets/{material-factory-Bz6h__6g.js → material-factory-0Qb0VuZ5.js} +1 -1
  226. package/dist/assets/material-preview.view-DqNcpd_b.js +1 -0
  227. package/dist/assets/{mesh-B3WPtNKO.js → mesh-BKPgNTwh.js} +1 -1
  228. package/dist/assets/{mesh-shadow-CZnXrw_l.js → mesh-shadow-BDQP4mHs.js} +1 -1
  229. package/dist/assets/model-asset-sections.service-DWPLmkqa.js +1 -0
  230. package/dist/assets/model-inspection-Cxfg_Fei.js +1 -0
  231. package/dist/assets/model.layout-BpZE1W9V.js +1 -0
  232. package/dist/assets/{models.finder-G2jQgIRu.js → models.finder-DHW17ZEa.js} +1 -1
  233. package/dist/assets/module-mode-CRfHyIMS.js +2 -0
  234. package/dist/assets/mount-canvas-ingest-root-BZZ8M3Lu.js +2 -0
  235. package/dist/assets/mount-dom-ingest-root-D1GV6Jjt.js +2 -0
  236. package/dist/assets/{mount-game-6t9cKNo4.js → mount-game-F9e76auh.js} +1 -1
  237. package/dist/assets/mount-ingest-root-B5D-Lmmk.js +2 -0
  238. package/dist/assets/{mount-manifest-CGVxhmAw.js → mount-manifest-cYRhgHfo.js} +1 -1
  239. package/dist/assets/mount-three-ingest-root-BNnouaBn.js +1 -0
  240. package/dist/assets/{mounted-authoring-Dmg5xmhP.js → mounted-authoring-TIN5EnCb.js} +1 -1
  241. package/dist/assets/{mounted-story-viewport-source-DjP6RA9U.js → mounted-story-viewport-source-CAlEmE0_.js} +1 -1
  242. package/dist/assets/{native-debug-module-CWicoSGD.js → native-debug-module-j-MekcLS.js} +1 -1
  243. package/dist/assets/{navigation-CIiCx-SM.js → navigation-DmR1BDVo.js} +1 -1
  244. package/dist/assets/{navmesh.menu-CAKiH8PW.js → navmesh.menu-FhL1pGx1.js} +1 -1
  245. package/dist/assets/{navmesh.service-jgDWlgj1.js → navmesh.service-usyDeJlm.js} +1 -1
  246. package/dist/assets/{network.utility-CEu5nHf7.js → network.utility-BPh4hTmh.js} +1 -1
  247. package/dist/assets/night-CvV4Gybt.exr +0 -0
  248. package/dist/assets/{object3d-authoring-subject-CH5sI2oP.js → object3d-authoring-subject-CyE4rQ2A.js} +1 -1
  249. package/dist/assets/oid-transform-BOqL6YH6.js +2 -0
  250. package/dist/assets/{particles-Y626p22p.js → particles-C47L-dda.js} +1 -1
  251. package/dist/assets/particles-factory-CRqPLdS7.js +1 -0
  252. package/dist/assets/pixi-authoring-adapter-C5Ikqj5-.js +1 -0
  253. package/dist/assets/{pixi-live-write-target-DuWydlWb.js → pixi-live-write-target-OWBk79dp.js} +1 -1
  254. package/dist/assets/pixi-primitive-D5igywJ_.js +1 -0
  255. package/dist/assets/pixi-react-root-factory-9lZ0Yz-n.js +1 -0
  256. package/dist/assets/play-mode-DomOvQie.js +22 -0
  257. package/dist/assets/play.command-DoqjH-Pp.js +2 -0
  258. package/dist/assets/{playtest-BXIL1JEF.js → playtest-BnFenMBW.js} +1 -1
  259. package/dist/assets/{pose-guard-6Osb2cFu.js → pose-guard-Bb3gZOzk.js} +1 -1
  260. package/dist/assets/{product-DFhyARJj.js → product-CTDJoVo5.js} +1 -1
  261. package/dist/assets/{profiler.action-CaXJDp3t.js → profiler.action-C_OFGkDw.js} +1 -1
  262. package/dist/assets/{profiler.menu-BIMF6Bi4.js → profiler.menu-BJbnVoo4.js} +1 -1
  263. package/dist/assets/{profiler.utility-BExw9wBO.js → profiler.utility-qpfhuwRw.js} +1 -1
  264. package/dist/assets/project-authoring-session-BV-MM8Fl.js +2 -0
  265. package/dist/assets/{project-provenance-BoP3nrle.js → project-provenance-4ldz-EOG.js} +1 -1
  266. package/dist/assets/{properties-bone-constraints.inspector-ByT6p7S-.js → properties-bone-constraints.inspector-C-ByIdg1.js} +1 -1
  267. package/dist/assets/{properties-bone.inspector-z4qJwKO5.js → properties-bone.inspector-CXY0xCQB.js} +1 -1
  268. package/dist/assets/{properties-collection.inspector-D0_3ijWU.js → properties-collection.inspector-DIfkZAel.js} +1 -1
  269. package/dist/assets/{properties-constraints.inspector-CESzjuls.js → properties-constraints.inspector-BaunL5nT.js} +1 -1
  270. package/dist/assets/{properties-data.inspector-hG8Wgyzb.js → properties-data.inspector-DQD-jfO2.js} +1 -1
  271. package/dist/assets/{properties-material.inspector-CzY0JCQ6.js → properties-material.inspector-A0HZ4SX6.js} +1 -1
  272. package/dist/assets/{properties-modifiers.inspector-3dDhwf7g.js → properties-modifiers.inspector-GUnVhVwZ.js} +1 -1
  273. package/dist/assets/{properties-object.inspector-CiarfxkT.js → properties-object.inspector-Chsfa4Xa.js} +1 -1
  274. package/dist/assets/{properties-output.inspector-DKJxmKSD.js → properties-output.inspector-U7ZmD0Me.js} +1 -1
  275. package/dist/assets/{properties-particles.inspector-CCEdYWGm.js → properties-particles.inspector-umkW-OlI.js} +1 -1
  276. package/dist/assets/{properties-physics.inspector-B2c0KUyA.js → properties-physics.inspector-CLVBlWwL.js} +1 -1
  277. package/dist/assets/{properties-render.inspector-Bcm0HLRW.js → properties-render.inspector-D0u9taKy.js} +1 -1
  278. package/dist/assets/{properties-scene.inspector-PIM_eTb_.js → properties-scene.inspector-JwGCZQAx.js} +1 -1
  279. package/dist/assets/{properties-texture.inspector-CgFlnyr8.js → properties-texture.inspector-B1vC28pw.js} +1 -1
  280. package/dist/assets/{properties-view-layer.inspector-DGjF_Aqo.js → properties-view-layer.inspector-BuUKyBFp.js} +1 -1
  281. package/dist/assets/{properties-world.inspector-CrMvaRvB.js → properties-world.inspector-VXUj4dT4.js} +1 -1
  282. package/dist/assets/r3f-design-session-qJ2v5SrB.js +2 -0
  283. package/dist/assets/r3f-physics-binding-C8OqNRG2.js +1 -0
  284. package/dist/assets/{r3f-root-factory-z9llD1OU.js → r3f-root-factory-DjGnbU4n.js} +1 -1
  285. package/dist/assets/r3f-source-authoring-adapter-CG9heazM.js +12 -0
  286. package/dist/assets/{rapier-physics-bridge-CMoeVo3Y.js → rapier-physics-bridge-B-EK7KYV.js} +1 -1
  287. package/dist/assets/react-inspector.service-DWeXDHJq.js +1 -0
  288. package/dist/assets/{react-root-CEz5NTck.js → react-root-DGLRLr-F.js} +1 -1
  289. package/dist/assets/react-story-board-CSqHY0Cg.js +1 -0
  290. package/dist/assets/{react-three-fiber.esm-CycrbDlA.js → react-three-fiber.esm-BxIoqVh1.js} +1 -1
  291. package/dist/assets/{react-three-rapier.esm-CEfKpvxT.js → react-three-rapier.esm-BYzLhdSV.js} +1 -1
  292. package/dist/assets/react-world-authoring-adapter-BMT9kLWU.js +1 -0
  293. package/dist/assets/{realm-services-CobQsq_X.js → realm-services-D25JHoqD.js} +1 -1
  294. package/dist/assets/{reflection-probe-Don-M3Fj.js → reflection-probe-CqXWlicu.js} +1 -1
  295. package/dist/assets/{reflection-probe-capture.inspector-CmFUoJCx.js → reflection-probe-capture.inspector-B7Qa30vB.js} +1 -1
  296. package/dist/assets/regions-DWeEBnE2.js +1 -0
  297. package/dist/assets/{register-render-vitals-BiZk29b2.js → register-render-vitals-BO7x64kR.js} +1 -1
  298. package/dist/assets/{registry-02YZjMNp.js → registry-DlTluc4x.js} +1 -1
  299. package/dist/assets/{render-audio-control-vMRlePWb.js → render-audio-control-DCa_bOBI.js} +1 -1
  300. package/dist/assets/{render-batch-system-0vq7p0VC.js → render-batch-system-CzCp9YKM.js} +1 -1
  301. package/dist/assets/{render-control-Df3yTiyr.js → render-control-BNQr1eNO.js} +1 -1
  302. package/dist/assets/{render-env-D2IV2x5k.js → render-env-emvlfeTG.js} +1 -1
  303. package/dist/assets/{render-features-CPQ_e568.js → render-features-COF7MSQ9.js} +1 -1
  304. package/dist/assets/{render-settings-Bw4W9SYF.js → render-settings-C_kIMq8Y.js} +1 -1
  305. package/dist/assets/{resolve-three-SZE_WWUM.js → resolve-three-C-nx-QdA.js} +13 -13
  306. package/dist/assets/{root-seam-contract-Z0VWX3Bk.js → root-seam-contract-C7GOxf5x.js} +1 -1
  307. package/dist/assets/{run-ticks-settled-C4ksViyA.js → run-ticks-settled-B0cTtmhQ.js} +1 -1
  308. package/dist/assets/{scene-capture-CGYF-Viw.js → scene-capture-CLOc7GXc.js} +1 -1
  309. package/dist/assets/{scene-capture-BQKzU0NT.js → scene-capture-D10Nxkvp.js} +1 -1
  310. package/dist/assets/scene-document.service-B7kAVTko.js +2 -0
  311. package/dist/assets/{scene-framing-Cat0GtyJ.js → scene-framing-50N7SKuX.js} +1 -1
  312. package/dist/assets/{scene-index-B6BZOHMk.js → scene-index-Bce459yu.js} +1 -1
  313. package/dist/assets/{scene-query-C7_N-TpI.js → scene-query-IUZhw6pA.js} +1 -1
  314. package/dist/assets/{schema-kl9-2B_J.js → schema-Iy-mbzll.js} +1 -1
  315. package/dist/assets/sculpt.layout-D-K5cLw6.js +1 -0
  316. package/dist/assets/{seeded-random-i3mtgBKZ.js → seeded-random-CN0scLZj.js} +1 -1
  317. package/dist/assets/{session-CZ5JPg-z.js → session-CsR0lApe.js} +24 -15
  318. package/dist/assets/{setup-audio-S8GQF91f.js → setup-audio-BJ18gvXZ.js} +1 -1
  319. package/dist/assets/setup-particles-B6H-GbAA.js +1 -0
  320. package/dist/assets/{setup-physics-BeZ7-LKD.js → setup-physics-GugbTT0J.js} +1 -1
  321. package/dist/assets/{setup-renderer-DVXaSGin.js → setup-renderer-wt_a-p8r.js} +20 -20
  322. package/dist/assets/shading.layout-CZZHKBer.js +1 -0
  323. package/dist/assets/{sim-clock-CLflx7kg.js → sim-clock-DEfbb_-P.js} +1 -1
  324. package/dist/assets/{soft-particle-depth-DGvfQDi1.js → soft-particle-depth-CKUS1j0Y.js} +1 -1
  325. package/dist/assets/source-object3d-authoring-adapter-CfHQLFAL.js +1 -0
  326. package/dist/assets/{source-persistence-backend-C-aR-B_Y.js → source-persistence-backend-_-JMEXxE.js} +1 -1
  327. package/dist/assets/{spark-renderer-lifecycle-ynWESJcv.js → spark-renderer-lifecycle-9mnMW3Z4.js} +1 -1
  328. package/dist/assets/{spark.module-4pXQoz5d.js → spark.module-CXth-y_a.js} +1 -1
  329. package/dist/assets/stage-keyboard-C0FdDLOQ.js +1 -0
  330. package/dist/assets/stage-overlay-set-CwhCzbOy.js +1 -0
  331. package/dist/assets/stage-presence-markers-DVMDKiB-.js +1 -0
  332. package/dist/assets/stage-transform-tools-B09Z7v0o.js +1 -0
  333. package/dist/assets/standard-viewport-dressing-GUUr6GuK.js +20 -0
  334. package/dist/assets/{state-watch.action-BOvQR2qt.js → state-watch.action-CgF8qoFC.js} +1 -1
  335. package/dist/assets/{state-watch.menu-CNLvDeeY.js → state-watch.menu-CIMncESW.js} +1 -1
  336. package/dist/assets/{state-watch.utility-Bg1tTTQU.js → state-watch.utility-zTHkUALC.js} +1 -1
  337. package/dist/assets/static-batch-advisor-DqfXWRUq.js +1 -0
  338. package/dist/assets/story-capture-COQgezzl.js +1 -0
  339. package/dist/assets/story-documents-DQ0KORmd.js +3 -0
  340. package/dist/assets/story-documents.service-DOSaqPqv.js +1 -0
  341. package/dist/assets/story-documents.service-Gb7oUkbg.js +1 -0
  342. package/dist/assets/{story-media-presence-BHzk2IV5.js → story-media-presence-nW3zJqKv.js} +1 -1
  343. package/dist/assets/story-pixi-preview-COPTEsHo.js +1 -0
  344. package/dist/assets/story-presentation-CxADj5oz.js +1 -0
  345. package/dist/assets/{story-three-preview-BHEDZzcl.js → story-three-preview-C9W__8Or.js} +2 -2
  346. package/dist/assets/{structural-ids-Dc-7rEwi.js → structural-ids-CblajJQK.js} +1 -1
  347. package/dist/assets/studio-CysTBGIb.exr +0 -0
  348. package/dist/assets/sunrise-Dj0psFrf.exr +0 -0
  349. package/dist/assets/sunset-Bw3x2Bot.exr +0 -0
  350. package/dist/assets/{surface-state-DaxyruCj.js → surface-state-BAUJu6GY.js} +1 -1
  351. package/dist/assets/{system-runner-DkOjxEBt.js → system-runner-D_DtVrer.js} +1 -1
  352. package/dist/assets/team-playtest.service--79O6xkx.js +1 -0
  353. package/dist/assets/{three-CDSueJyJ.js → three-DSsr_Lvp.js} +1 -1
  354. package/dist/assets/{three-authoring-adapter-CmSQ3Vui.js → three-authoring-adapter-Yqsank46.js} +1 -1
  355. package/dist/assets/three-authoring.service-BDos-bRt.js +2 -0
  356. package/dist/assets/{three-ingest-runtime-QzDYk6tU.js → three-ingest-runtime-DWijtqQ8.js} +1 -1
  357. package/dist/assets/{three-projection-core-BmKMZ-nf.js → three-projection-core-kubBTx0s.js} +1 -1
  358. package/dist/assets/three-story-model-BraQFA9h.js +1 -0
  359. package/dist/assets/three-viewport-presentation-BL7Uc2i6.js +1 -0
  360. package/dist/assets/{three.module-D396a9Mn.js → three.module-IFn-4i31.js} +1 -1
  361. package/dist/assets/three.quarks.esm-CRKGjKAH.js +1039 -0
  362. package/dist/assets/transform-mode-request-Cu7ewbtr.js +1 -0
  363. package/dist/assets/{transform-writer-BhBBTx33.js → transform-writer-DXxrI4t7.js} +1 -1
  364. package/dist/assets/transport.header-CeND8Vzh.js +1 -0
  365. package/dist/assets/{trigger-volume-BNK2XzPL.js → trigger-volume-BCVRS3NM.js} +1 -1
  366. package/dist/assets/{tuples-CIQ4Bn1U.js → tuples-DKDGrN1t.js} +1 -1
  367. package/dist/assets/ui-board-document-DD2CAEAo.js +2 -0
  368. package/dist/assets/unity.style-vCmLw4gI.js +1 -0
  369. package/dist/assets/unity.view-DIn2S6Do.js +1 -0
  370. package/dist/assets/unreal.style-BQn-HhOX.js +1 -0
  371. package/dist/assets/unreal.view-adNBETZK.js +1 -0
  372. package/dist/assets/user-data-CZqsJDk-.js +1 -0
  373. package/dist/assets/{utility-view-state-BHypxA33.js → utility-view-state-DYJY8V8O.js} +1 -1
  374. package/dist/assets/uv-editing.layout-A8RA-cbM.js +1 -0
  375. package/dist/assets/{vgai-shared-three-Bc5PvpLM.js → vgai-shared-three-D_RAEumG.js} +1 -1
  376. package/dist/assets/{viewport-root-presentation-CWsE56K6.js → viewport-root-presentation-C9M98VNM.js} +1 -1
  377. package/dist/assets/{viewport-shading-BuA88e_A.js → viewport-shading-BzcvgJhK.js} +1 -1
  378. package/dist/assets/viewport-shading-boundary-CBvvzS-p.js +84 -0
  379. package/dist/assets/{viewport-surface-status-B3om4Kcf.js → viewport-surface-status-BFmnWp7z.js} +1 -1
  380. package/dist/assets/voxel-surface-ROWYug7H.js +1 -0
  381. package/dist/assets/webgl-frame-capture-CRKX73E9.js +1 -0
  382. package/dist/assets/webworkerAll-CehoCtFb.js +1 -0
  383. package/dist/assets/{worker-UrMcrc5_.js → worker-B7zhIsFh.js} +2 -2
  384. package/dist/assets/world-documents-DErHq15h.js +1 -0
  385. package/dist/assets/world-root-stage-binding-BIymcQ4K.js +1 -0
  386. package/dist/assets/{world-state-BWG-IcOd.js → world-state-ZGDGY_Xl.js} +1 -1
  387. package/dist/assets/{writer-B-KovzkA.js → writer-BPbm4_my.js} +5 -5
  388. package/dist/assets/xstate-animation-binding-Cvd4JbEY.js +1 -0
  389. package/dist/assets/{xstate-animation-meta-Q3u9zh_m.js → xstate-animation-meta-B3OZR8Q2.js} +1 -1
  390. package/dist/vgai-shared-three.json +1 -1
  391. package/dist-node/cli.js +317 -73
  392. package/dist-node/create.js +59 -19
  393. package/package.json +16 -13
  394. package/src/index.ts +6 -0
  395. package/template/.agents/skills/vgai-3d-models/SKILL.md +3 -3
  396. package/template/.agents/skills/vgai-threejs-authoring/SKILL.md +4 -9
  397. package/template/.claude/skills/vgai-3d-models/SKILL.md +3 -3
  398. package/template/.claude/skills/vgai-threejs-authoring/SKILL.md +4 -9
  399. package/template/.github/skills/vgai-3d-models/SKILL.md +3 -3
  400. package/template/.github/skills/vgai-threejs-authoring/SKILL.md +4 -9
  401. package/template/AGENTS.md +1 -1
  402. package/template/check-idioms.ts +4 -5
  403. package/template/package.json +9 -9
  404. package/template/tsconfig.json +1 -0
  405. package/template/vgai.adapter.ts +1 -0
  406. package/template-dotfiles/gitignore +2 -0
  407. package/workbench/src/media/game-cover.css +1 -1
  408. package/catalog/project-source/src/lib/bake/mesh-slice.ts +0 -157
  409. package/dist/assets/BufferGeometryUtils-Nz37EVXf.js +0 -1
  410. package/dist/assets/CanvasSceneViewport-Bpi6gVTC.js +0 -1
  411. package/dist/assets/ColladaLoader-aVOPIsCh.js +0 -3
  412. package/dist/assets/EXRLoader-Cdans_oJ.js +0 -1
  413. package/dist/assets/EffectComposer-DQxfsXBZ.js +0 -1
  414. package/dist/assets/EntityModelDocument-Ccvw66N9.js +0 -1
  415. package/dist/assets/EnvironmentAssetDocument-Dg-Qq6O6.js +0 -1
  416. package/dist/assets/FBXLoader-B4MoUtAn.js +0 -1
  417. package/dist/assets/Fbo-Dz-Soul3.js +0 -1
  418. package/dist/assets/GLTFExporter-HgrCle4L.js +0 -1
  419. package/dist/assets/Gltf-UHVWKz65.js +0 -2
  420. package/dist/assets/HDRLoader-THU88oVD.js +0 -5
  421. package/dist/assets/ImageViewer-Tn7s_MnW.js +0 -1
  422. package/dist/assets/InspectorObjectPreview-CVejvLRg.js +0 -1
  423. package/dist/assets/JsonAssetDocument-C7VGcLhu.js +0 -3
  424. package/dist/assets/MeshBVH-BiDHDcu-.js +0 -1
  425. package/dist/assets/ModelAssetDocument-F5GACirk.js +0 -1
  426. package/dist/assets/Object3DDocumentViewport-DB7T0NTl.js +0 -2
  427. package/dist/assets/Object3DPreview-DL8oi7Xs.js +0 -2
  428. package/dist/assets/OnlineAssetDetail-C6z9RvYK.js +0 -2
  429. package/dist/assets/PlayBar-BR-Vg3Jb.js +0 -2
  430. package/dist/assets/RGBELoader-BgBcQv8j.js +0 -1
  431. package/dist/assets/RectAreaLightUniformsLib-CMMoWfll.js +0 -1
  432. package/dist/assets/RootSelectionOverlay-BZPlxmXU.js +0 -1
  433. package/dist/assets/STLLoader-Dyv3lsxY.js +0 -1
  434. package/dist/assets/SimplifyModifier-C8ayvRzd.js +0 -1
  435. package/dist/assets/SourceAssetViewer-2SWQoUut.js +0 -12
  436. package/dist/assets/StageHost-BN-IoTef.js +0 -2
  437. package/dist/assets/ThreeBoardDocument-CVncZyIq.js +0 -2
  438. package/dist/assets/asset-budget-asset.menu-Di3KiQCd.js +0 -1
  439. package/dist/assets/asset-budget.action-DCzzcuTh.js +0 -1
  440. package/dist/assets/asset-budget.document-BWU8wnVW.js +0 -1
  441. package/dist/assets/asset-budget.menu-BGZpT_31.js +0 -1
  442. package/dist/assets/autoplay.service-BZBGNSvt.js +0 -1
  443. package/dist/assets/blender-emscripten-engine-9ZIRYNhe.js +0 -2
  444. package/dist/assets/blender-properties-tab-C5CyPydi.js +0 -3
  445. package/dist/assets/blender-runtime-host-BpBwGv7r.js +0 -4
  446. package/dist/assets/blender-runtime.document-lIYhhPtv.js +0 -8
  447. package/dist/assets/blender.command-BtJeWk-A.js +0 -1
  448. package/dist/assets/body-marks-h_xDxiDE.js +0 -1
  449. package/dist/assets/bridge.command-o5gDNEwa.js +0 -3
  450. package/dist/assets/browserAll-DeWblVez.js +0 -1
  451. package/dist/assets/canvas-entry-runtime-SfBxaR9M.js +0 -2
  452. package/dist/assets/component-board.service-DidCyM4O.js +0 -2
  453. package/dist/assets/component-verbs.service-Bv9jId3q.js +0 -1
  454. package/dist/assets/constraints.inspector-B9U9Yj-u.js +0 -1
  455. package/dist/assets/coverage.service-VTX5Mcsx.js +0 -3
  456. package/dist/assets/deferred-ingest-play-DCJi_Pgu.js +0 -2
  457. package/dist/assets/design-time-layers-wYgOTgni.js +0 -1
  458. package/dist/assets/design-time-mount.service-BzY21e1F.js +0 -2
  459. package/dist/assets/design-time-react-mount-DM9WLrF2.js +0 -1
  460. package/dist/assets/edit-mode-authoring-B47TfLqu.js +0 -1
  461. package/dist/assets/editor-api-BoJIcyZG.js +0 -1
  462. package/dist/assets/fflate.module-DPuTF8aG.js +0 -6
  463. package/dist/assets/fork-menu-BoVyw2Wu.js +0 -1
  464. package/dist/assets/game-document.service-DbRfx2V0.js +0 -1
  465. package/dist/assets/game-eval.command-D-7Dxbj_.js +0 -2
  466. package/dist/assets/gameplay-replay-e5umMlXv.js +0 -1
  467. package/dist/assets/gameplay.command-DxcVYX6F.js +0 -1
  468. package/dist/assets/generation.service-CDIgObuw.js +0 -1
  469. package/dist/assets/index-96FBF1Oj.js +0 -1
  470. package/dist/assets/index-BAWkB0dv.js +0 -1
  471. package/dist/assets/index-BDnS2b6S.js +0 -1
  472. package/dist/assets/index-BjTCPEQ7.js +0 -134
  473. package/dist/assets/index-CVCb_ImQ.js +0 -1
  474. package/dist/assets/index-CZd9o7Lu.js +0 -1
  475. package/dist/assets/index-D2fNXpHa.css +0 -1
  476. package/dist/assets/index-GIL7oGEO.js +0 -4894
  477. package/dist/assets/index-OrYXPk3Z.js +0 -487
  478. package/dist/assets/ingest-boot-viewport-D5rI_Kk_.js +0 -1
  479. package/dist/assets/ingest-siblings-Bop2kqVl.js +0 -1
  480. package/dist/assets/instances.command-D6UkZNO8.js +0 -1
  481. package/dist/assets/light-camera-factory-CWbbe9gI.js +0 -1
  482. package/dist/assets/live-behaviors-Bxq49Maz.js +0 -1
  483. package/dist/assets/matcap-texture-CVfalpWT.js +0 -1
  484. package/dist/assets/model-asset-sections.service-CHhFS3ZX.js +0 -1
  485. package/dist/assets/model.layout-BJUEQYUI.js +0 -1
  486. package/dist/assets/module-mode-DVBLT9d-.js +0 -2
  487. package/dist/assets/mount-canvas-ingest-root-DDuAWf_C.js +0 -2
  488. package/dist/assets/mount-dom-ingest-root-D_EiBgpn.js +0 -2
  489. package/dist/assets/mount-ingest-root-glv2SSWf.js +0 -2
  490. package/dist/assets/mount-three-ingest-root-hrUt9VVU.js +0 -1
  491. package/dist/assets/particles-factory-DnLOHXT8.js +0 -1
  492. package/dist/assets/pasteboard-materialize-BqSS4QzV.js +0 -20
  493. package/dist/assets/pasteboard.action-DU3UHtJG.js +0 -2
  494. package/dist/assets/pixi-authoring-adapter-CjibysC3.js +0 -1
  495. package/dist/assets/pixi-primitive-DlWbUPN9.js +0 -1
  496. package/dist/assets/pixi-react-root-factory-DYsznYRQ.js +0 -1
  497. package/dist/assets/play-mode-BFU2PCkG.js +0 -22
  498. package/dist/assets/play.command-BpqqLqkq.js +0 -2
  499. package/dist/assets/project-authoring-session-Bnt6icLr.js +0 -2
  500. package/dist/assets/r3f-design-session-D-4yyDO9.js +0 -2
  501. package/dist/assets/r3f-physics-binding-BBo8oma9.js +0 -1
  502. package/dist/assets/r3f-source-authoring-adapter-w6Bc60K-.js +0 -13
  503. package/dist/assets/react-inspector.service-B_neRnSK.js +0 -1
  504. package/dist/assets/react-story-board-BDDwiE2H.js +0 -1
  505. package/dist/assets/react-world-authoring-adapter-DmrwM3py.js +0 -1
  506. package/dist/assets/runtime-inspection-l2iFQSsg.js +0 -1
  507. package/dist/assets/scene-document.service-qkDjUrlP.js +0 -2
  508. package/dist/assets/sculpt.layout-zJF55yCR.js +0 -1
  509. package/dist/assets/setup-particles-GCXlnkj_.js +0 -1
  510. package/dist/assets/shading.layout-DULYZV6M.js +0 -1
  511. package/dist/assets/source-object3d-authoring-adapter-B-L6Ha6f.js +0 -1
  512. package/dist/assets/stage-invalidation-DBg3C3Ta.js +0 -1
  513. package/dist/assets/stage-keyboard-n-5kKH-m.js +0 -1
  514. package/dist/assets/stage-overlay-set-B9zp2sLB.js +0 -1
  515. package/dist/assets/stage-presence-markers-DiGI6A45.js +0 -1
  516. package/dist/assets/standard-viewport-dressing-CzjAe_0A.js +0 -7
  517. package/dist/assets/static-batch-advisor-B13QEH7d.js +0 -1
  518. package/dist/assets/story-capture-_gC8dXV-.js +0 -1
  519. package/dist/assets/story-documents--TDLaPeL.js +0 -3
  520. package/dist/assets/story-documents.service-BiS_YbNQ.js +0 -1
  521. package/dist/assets/story-documents.service-CxOPYJ2j.js +0 -1
  522. package/dist/assets/story-pixi-preview-BUrOJZXS.js +0 -1
  523. package/dist/assets/story-presentation-j2AVN-mK.js +0 -1
  524. package/dist/assets/team-playtest.service-DqOinFVA.js +0 -1
  525. package/dist/assets/three-authoring.service-iuHLwtf1.js +0 -2
  526. package/dist/assets/three-viewport-presentation-QBQpSdMh.js +0 -1
  527. package/dist/assets/three.quarks.esm-B1C61jGo.js +0 -1039
  528. package/dist/assets/transport.header-B-6HQlU2.js +0 -1
  529. package/dist/assets/ui-board-document-Bwtt--xp.js +0 -2
  530. package/dist/assets/use-live-actor-state-DErbWQWF.js +0 -1
  531. package/dist/assets/user-data-BB2Of6Ht.js +0 -1
  532. package/dist/assets/uv-editing.layout-BEKHxmHw.js +0 -1
  533. package/dist/assets/viewport-shading-boundary-B_-_gABg.js +0 -82
  534. package/dist/assets/voxel-surface-DtcsSWRL.js +0 -1
  535. package/dist/assets/webgl-frame-capture-FlF9zQmW.js +0 -1
  536. package/dist/assets/webworkerAll-CM2o_dnz.js +0 -1
  537. package/dist/assets/world-documents-147tiFZe.js +0 -1
  538. package/dist/assets/world-root-stage-binding-vwTrtBz6.js +0 -1
  539. package/dist/assets/xstate-animation-binding-Brd0NST6.js +0 -1
  540. package/dist/assets/xstate-behavior.action-B8UluFBK.js +0 -1
  541. package/dist/assets/xstate-behavior.document-CKAsE45I.js +0 -1
  542. package/dist/assets/xstate-behavior.inspector-vJJyuifc.js +0 -1
  543. package/dist/assets/xstate-behavior.menu-BXbPICIh.js +0 -1
  544. package/dist/assets/xstate-inspection-BsZv8LS9.js +0 -1
@@ -0,0 +1 @@
1
+ import{v as $,a as J,V as v,Q as ee,ay as S,_ as se,bq as D,br as te,a6 as ne,o as k,ab as ie,bs as re,al as oe,i as z,bt as ae,t as K,r as ce,K as ue,bu as le,bv as fe,a0 as he,bw as pe,ar as de,ag as xe,I as ye,bx as ge,by as Te}from"./three.module-IFn-4i31.js";const Y={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]};class H{constructor(){this.textureUtils=null,this.pluginCallbacks=[],this.register(function(e){return new Le(e)}),this.register(function(e){return new _e(e)}),this.register(function(e){return new Oe(e)}),this.register(function(e){return new ve(e)}),this.register(function(e){return new ze(e)}),this.register(function(e){return new Be(e)}),this.register(function(e){return new Ce(e)}),this.register(function(e){return new Ue(e)}),this.register(function(e){return new Fe(e)}),this.register(function(e){return new De(e)}),this.register(function(e){return new Ge(e)}),this.register(function(e){return new Pe(e)}),this.register(function(e){return new ke(e)}),this.register(function(e){return new He(e)})}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}setTextureUtils(e){return this.textureUtils=e,this}parse(e,s,n,t){const i=new Se,r=[];for(let o=0,c=this.pluginCallbacks.length;o<c;o++)r.push(this.pluginCallbacks[o](i));i.setPlugins(r),i.setTextureUtils(this.textureUtils),i.writeAsync(e,s,t).catch(n)}parseAsync(e,s){const n=this;return new Promise(function(t,i){n.parse(e,t,i,s)})}}const g={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,REPEAT:10497},G="KHR_mesh_quantization",R={};R[ue]=g.NEAREST;R[le]=g.NEAREST_MIPMAP_NEAREST;R[fe]=g.NEAREST_MIPMAP_LINEAR;R[he]=g.LINEAR;R[pe]=g.LINEAR_MIPMAP_NEAREST;R[de]=g.LINEAR_MIPMAP_LINEAR;R[xe]=g.CLAMP_TO_EDGE;R[ye]=g.REPEAT;R[ge]=g.MIRRORED_REPEAT;const j={scale:"scale",position:"translation",quaternion:"rotation",morphTargetInfluences:"weights"},we=new $,q=12,me=1179937895,Me=2,W=8,Ae=1313821514,Ee=5130562;function F(a,e){return a.length===e.length&&a.every(function(s,n){return s===e[n]})}function Ie(a){return new TextEncoder().encode(a).buffer}function Re(a){return F(a.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}function be(a,e,s){const n={min:new Array(a.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(a.itemSize).fill(Number.NEGATIVE_INFINITY)};for(let t=e;t<e+s;t++)for(let i=0;i<a.itemSize;i++){let r;a.itemSize>4?r=a.array[t*a.itemSize+i]:(i===0?r=a.getX(t):i===1?r=a.getY(t):i===2?r=a.getZ(t):i===3&&(r=a.getW(t)),a.normalized===!0&&(r=k.normalize(r,a.array))),n.min[i]=Math.min(n.min[i],r),n.max[i]=Math.max(n.max[i],r)}return n}function Z(a){return Math.ceil(a/4)*4}function P(a,e=0){const s=Z(a.byteLength);if(s!==a.byteLength){const n=new Uint8Array(s);if(n.set(new Uint8Array(a)),e!==0)for(let t=a.byteLength;t<s;t++)n[t]=e;return n.buffer}return a}function X(){return typeof document>"u"&&typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function Ne(a,e){if(typeof OffscreenCanvas<"u"&&a instanceof OffscreenCanvas){let s;return e==="image/jpeg"?s=.92:e==="image/webp"&&(s=.8),a.convertToBlob({type:e,quality:s})}else return new Promise(s=>a.toBlob(s,e))}class Se{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter r"+se}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map},this.textureUtils=null}setPlugins(e){this.plugins=e}setTextureUtils(e){this.textureUtils=e}async writeAsync(e,s,n={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},n),this.options.animations.length>0&&(this.options.trs=!0),await this.processInputAsync(e),await Promise.all(this.pending);const t=this,i=t.buffers,r=t.json;n=t.options;const o=t.extensionsUsed,c=t.extensionsRequired,l=new Blob(i,{type:"application/octet-stream"}),h=Object.keys(o),u=Object.keys(c);if(h.length>0&&(r.extensionsUsed=h),u.length>0&&(r.extensionsRequired=u),r.buffers&&r.buffers.length>0&&(r.buffers[0].byteLength=l.size),n.binary===!0){const T=new FileReader;T.readAsArrayBuffer(l),T.onloadend=function(){const f=P(T.result),d=new DataView(new ArrayBuffer(W));d.setUint32(0,f.byteLength,!0),d.setUint32(4,Ee,!0);const x=P(Ie(JSON.stringify(r)),32),y=new DataView(new ArrayBuffer(W));y.setUint32(0,x.byteLength,!0),y.setUint32(4,Ae,!0);const M=new ArrayBuffer(q),b=new DataView(M);b.setUint32(0,me,!0),b.setUint32(4,Me,!0);const O=q+y.byteLength+x.byteLength+d.byteLength+f.byteLength;b.setUint32(8,O,!0);const p=new Blob([M,y,x,d,f],{type:"application/octet-stream"}),w=new FileReader;w.readAsArrayBuffer(p),w.onloadend=function(){s(w.result)}}}else if(r.buffers&&r.buffers.length>0){const T=new FileReader;T.readAsDataURL(l),T.onloadend=function(){const f=T.result;r.buffers[0].uri=f,s(r)}}else s(r)}serializeUserData(e,s){if(Object.keys(e.userData).length===0)return;const n=this.options,t=this.extensionsUsed;try{const i=JSON.parse(JSON.stringify(e.userData));if(n.includeCustomExtensions&&i.gltfExtensions){s.extensions===void 0&&(s.extensions={});for(const r in i.gltfExtensions)s.extensions[r]=i.gltfExtensions[r],t[r]=!0;delete i.gltfExtensions}Object.keys(i).length>0&&(s.extras=i)}catch(i){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+i.message)}}getUID(e,s=!1){if(this.uids.has(e)===!1){const t=new Map;t.set(!0,this.uid++),t.set(!1,this.uid++),this.uids.set(e,t)}return this.uids.get(e).get(s)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;const n=new v;for(let t=0,i=e.count;t<i;t++)if(Math.abs(n.fromBufferAttribute(e,t).length()-1)>5e-4)return!1;return!0}createNormalizedNormalAttribute(e){const s=this.cache;if(s.attributesNormalized.has(e))return s.attributesNormalized.get(e);const n=e.clone(),t=new v;for(let i=0,r=n.count;i<r;i++)t.fromBufferAttribute(n,i),t.x===0&&t.y===0&&t.z===0?t.setX(1):t.normalize(),n.setXYZ(i,t.x,t.y,t.z);return s.attributesNormalized.set(e,n),n}applyTextureTransform(e,s){let n=!1;const t={};(s.offset.x!==0||s.offset.y!==0)&&(t.offset=s.offset.toArray(),n=!0),s.rotation!==0&&(t.rotation=s.rotation,n=!0),(s.repeat.x!==1||s.repeat.y!==1)&&(t.scale=s.repeat.toArray(),n=!0),n&&(e.extensions=e.extensions||{},e.extensions.KHR_texture_transform=t,this.extensionsUsed.KHR_texture_transform=!0)}async buildMetalRoughTextureAsync(e,s){if(e===s)return e;function n(f){return f.colorSpace===ce?function(x){return x<.04045?x*.0773993808:Math.pow(x*.9478672986+.0521327014,2.4)}:function(x){return x}}e instanceof D&&(e=await this.decompressTextureAsync(e)),s instanceof D&&(s=await this.decompressTextureAsync(s));const t=e?e.image:null,i=s?s.image:null,r=Math.max(t?t.width:0,i?i.width:0),o=Math.max(t?t.height:0,i?i.height:0),c=X();c.width=r,c.height=o;const l=c.getContext("2d",{willReadFrequently:!0});l.fillStyle="#00ffff",l.fillRect(0,0,r,o);const h=l.getImageData(0,0,r,o);if(t){l.drawImage(t,0,0,r,o);const f=n(e),d=l.getImageData(0,0,r,o).data;for(let x=2;x<d.length;x+=4)h.data[x]=f(d[x]/256)*256}if(i){l.drawImage(i,0,0,r,o);const f=n(s),d=l.getImageData(0,0,r,o).data;for(let x=1;x<d.length;x+=4)h.data[x]=f(d[x]/256)*256}l.putImageData(h,0,0);const T=(e||s).clone();return T.source=new te(c),T.colorSpace=ne,T.channel=(e||s).channel,e&&s&&e.channel!==s.channel&&console.warn("THREE.GLTFExporter: UV channels for metalnessMap and roughnessMap textures must match."),console.warn("THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures."),T}async decompressTextureAsync(e,s=1/0){if(this.textureUtils===null)throw new Error("THREE.GLTFExporter: setTextureUtils() must be called to process compressed textures.");return await this.textureUtils.decompress(e,s)}processBuffer(e){const s=this.json,n=this.buffers;return s.buffers||(s.buffers=[{byteLength:0}]),n.push(e),0}processBufferView(e,s,n,t,i){const r=this.json;r.bufferViews||(r.bufferViews=[]);let o;switch(s){case g.BYTE:case g.UNSIGNED_BYTE:o=1;break;case g.SHORT:case g.UNSIGNED_SHORT:o=2;break;default:o=4}let c=e.itemSize*o;i===g.ARRAY_BUFFER&&(c=Math.ceil(c/4)*4);const l=Z(t*c),h=new DataView(new ArrayBuffer(l));let u=0;for(let d=n;d<n+t;d++){for(let x=0;x<e.itemSize;x++){let y;e.itemSize>4?y=e.array[d*e.itemSize+x]:(x===0?y=e.getX(d):x===1?y=e.getY(d):x===2?y=e.getZ(d):x===3&&(y=e.getW(d)),e.normalized===!0&&(y=k.normalize(y,e.array))),s===g.FLOAT?h.setFloat32(u,y,!0):s===g.INT?h.setInt32(u,y,!0):s===g.UNSIGNED_INT?h.setUint32(u,y,!0):s===g.SHORT?h.setInt16(u,y,!0):s===g.UNSIGNED_SHORT?h.setUint16(u,y,!0):s===g.BYTE?h.setInt8(u,y):s===g.UNSIGNED_BYTE&&h.setUint8(u,y),u+=o}u%c!==0&&(u+=c-u%c)}const T={buffer:this.processBuffer(h.buffer),byteOffset:this.byteOffset,byteLength:l};return i!==void 0&&(T.target=i),i===g.ARRAY_BUFFER&&(T.byteStride=c),this.byteOffset+=l,r.bufferViews.push(T),{id:r.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){const s=this,n=s.json;return n.bufferViews||(n.bufferViews=[]),new Promise(function(t){const i=new FileReader;i.readAsArrayBuffer(e),i.onloadend=function(){const r=P(i.result),o={buffer:s.processBuffer(r),byteOffset:s.byteOffset,byteLength:r.byteLength};s.byteOffset+=r.byteLength,t(n.bufferViews.push(o)-1)}})}processAccessor(e,s,n,t){const i=this.json,r={1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"};let o;if(e.array.constructor===Float32Array)o=g.FLOAT;else if(e.array.constructor===Int32Array)o=g.INT;else if(e.array.constructor===Uint32Array)o=g.UNSIGNED_INT;else if(e.array.constructor===Int16Array)o=g.SHORT;else if(e.array.constructor===Uint16Array)o=g.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)o=g.BYTE;else if(e.array.constructor===Uint8Array)o=g.UNSIGNED_BYTE;else throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+e.array.constructor.name);if(n===void 0&&(n=0),(t===void 0||t===1/0)&&(t=e.count),t===0)return null;const c=be(e,n,t);let l;s!==void 0&&(l=e===s.index?g.ELEMENT_ARRAY_BUFFER:g.ARRAY_BUFFER);const h=this.processBufferView(e,o,n,t,l),u={bufferView:h.id,byteOffset:h.byteOffset,componentType:o,count:t,max:c.max,min:c.min,type:r[e.itemSize]};return e.normalized===!0&&(u.normalized=!0),i.accessors||(i.accessors=[]),i.accessors.push(u)-1}processImage(e,s,n,t="image/png"){if(e!==null){const i=this,r=i.cache,o=i.json,c=i.options,l=i.pending;r.images.has(e)||r.images.set(e,{});const h=r.images.get(e),u=t+":flipY/"+n.toString();if(h[u]!==void 0)return h[u];o.images||(o.images=[]);const T={mimeType:t},f=X();f.width=Math.min(e.width,c.maxTextureSize),f.height=Math.min(e.height,c.maxTextureSize);const d=f.getContext("2d",{willReadFrequently:!0});if(n===!0&&(d.translate(0,f.height),d.scale(1,-1)),e.data!==void 0){s!==ie&&console.error("GLTFExporter: Only RGBAFormat is supported.",s),(e.width>c.maxTextureSize||e.height>c.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);const y=new Uint8ClampedArray(e.height*e.width*4);for(let M=0;M<y.length;M+=4)y[M+0]=e.data[M+0],y[M+1]=e.data[M+1],y[M+2]=e.data[M+2],y[M+3]=e.data[M+3];d.putImageData(new ImageData(y,e.width,e.height),0,0)}else if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas)d.drawImage(e,0,0,f.width,f.height);else throw new Error("THREE.GLTFExporter: Invalid image type. Use HTMLImageElement, HTMLCanvasElement, ImageBitmap or OffscreenCanvas.");c.binary===!0?l.push(Ne(f,t).then(y=>i.processBufferViewImage(y)).then(y=>{T.bufferView=y})):T.uri=re.getDataURL(f,t);const x=o.images.push(T)-1;return h[u]=x,x}else throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){const s=this.json;s.samplers||(s.samplers=[]);const n={magFilter:R[e.magFilter],minFilter:R[e.minFilter],wrapS:R[e.wrapS],wrapT:R[e.wrapT]};return s.samplers.push(n)-1}async processTextureAsync(e){const n=this.options,t=this.cache,i=this.json;if(t.textures.has(e))return t.textures.get(e);i.textures||(i.textures=[]),e instanceof D&&(e=await this.decompressTextureAsync(e,n.maxTextureSize));let r=e.userData.mimeType;r==="image/webp"&&(r="image/png");const o={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,r)};e.name&&(o.name=e.name),await this._invokeAllAsync(async function(l){l.writeTexture&&await l.writeTexture(e,o)});const c=i.textures.push(o)-1;return t.textures.set(e,c),c}async processMaterialAsync(e){const s=this.cache,n=this.json;if(s.materials.has(e))return s.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;n.materials||(n.materials=[]);const t={pbrMetallicRoughness:{}};e.isMeshStandardMaterial!==!0&&e.isMeshBasicMaterial!==!0&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const i=e.color.toArray().concat([e.opacity]);if(F(i,[1,1,1,1])||(t.pbrMetallicRoughness.baseColorFactor=i),e.isMeshStandardMaterial?(t.pbrMetallicRoughness.metallicFactor=e.metalness,t.pbrMetallicRoughness.roughnessFactor=e.roughness):(t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=1),e.metalnessMap||e.roughnessMap){const o=await this.buildMetalRoughTextureAsync(e.metalnessMap,e.roughnessMap),c={index:await this.processTextureAsync(o),texCoord:o.channel};this.applyTextureTransform(c,o),t.pbrMetallicRoughness.metallicRoughnessTexture=c}if(e.map){const o={index:await this.processTextureAsync(e.map),texCoord:e.map.channel};this.applyTextureTransform(o,e.map),t.pbrMetallicRoughness.baseColorTexture=o}if(e.emissive){const o=e.emissive;if(Math.max(o.r,o.g,o.b)>0&&(t.emissiveFactor=e.emissive.toArray()),e.emissiveMap){const l={index:await this.processTextureAsync(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(l,e.emissiveMap),t.emissiveTexture=l}}if(e.normalMap){const o={index:await this.processTextureAsync(e.normalMap),texCoord:e.normalMap.channel};e.normalScale&&e.normalScale.x!==1&&(o.scale=e.normalScale.x),this.applyTextureTransform(o,e.normalMap),t.normalTexture=o}if(e.aoMap){const o={index:await this.processTextureAsync(e.aoMap),texCoord:e.aoMap.channel};e.aoMapIntensity!==1&&(o.strength=e.aoMapIntensity),this.applyTextureTransform(o,e.aoMap),t.occlusionTexture=o}e.transparent?t.alphaMode="BLEND":e.alphaTest>0&&(t.alphaMode="MASK",t.alphaCutoff=e.alphaTest),e.side===oe&&(t.doubleSided=!0),e.name!==""&&(t.name=e.name),this.serializeUserData(e,t),await this._invokeAllAsync(async function(o){o.writeMaterialAsync&&await o.writeMaterialAsync(e,t)});const r=n.materials.push(t)-1;return s.materials.set(e,r),r}async processMeshAsync(e){const s=this.cache,n=this.json,t=[e.geometry.uuid];if(Array.isArray(e.material))for(let p=0,w=e.material.length;p<w;p++)t.push(e.material[p].uuid);else t.push(e.material.uuid);const i=t.join(":");if(s.meshes.has(i))return s.meshes.get(i);const r=e.geometry;let o;e.isLineSegments?o=g.LINES:e.isLineLoop?o=g.LINE_LOOP:e.isLine?o=g.LINE_STRIP:e.isPoints?o=g.POINTS:o=e.material.wireframe?g.LINES:g.TRIANGLES;const c={},l={},h=[],u=[],T={uv:"TEXCOORD_0",uv1:"TEXCOORD_1",uv2:"TEXCOORD_2",uv3:"TEXCOORD_3",color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},f=r.getAttribute("normal");f!==void 0&&!this.isNormalizedNormalAttribute(f)&&(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),r.setAttribute("normal",this.createNormalizedNormalAttribute(f)));let d=null;for(let p in r.attributes){if(p.slice(0,5)==="morph")continue;const w=r.attributes[p];if(p=T[p]||p.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(p)||(p="_"+p),s.attributes.has(this.getUID(w))){l[p]=s.attributes.get(this.getUID(w));continue}d=null;const m=w.array;p==="JOINTS_0"&&!(m instanceof Uint16Array)&&!(m instanceof Uint8Array)?(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),d=new S(new Uint16Array(m),w.itemSize,w.normalized)):(m instanceof Uint32Array||m instanceof Int32Array)&&!p.startsWith("_")&&(console.warn(`GLTFExporter: Attribute "${p}" converted to type FLOAT.`),d=H.Utils.toFloat32BufferAttribute(w));const I=this.processAccessor(d||w,r);I!==null&&(p.startsWith("_")||this.detectMeshQuantization(p,w),l[p]=I,s.attributes.set(this.getUID(w),I))}if(f!==void 0&&r.setAttribute("normal",f),Object.keys(l).length===0)return null;if(e.morphTargetInfluences!==void 0&&e.morphTargetInfluences.length>0){const p=[],w=[],A={};if(e.morphTargetDictionary!==void 0)for(const m in e.morphTargetDictionary)A[e.morphTargetDictionary[m]]=m;for(let m=0;m<e.morphTargetInfluences.length;++m){const I={};let V=!1;for(const _ in r.morphAttributes){if(_!=="position"&&_!=="normal"){V||(console.warn("GLTFExporter: Only POSITION and NORMAL morph are supported."),V=!0);continue}const N=r.morphAttributes[_][m],B=_.toUpperCase(),C=r.attributes[_];if(s.attributes.has(this.getUID(N,!0))){I[B]=s.attributes.get(this.getUID(N,!0));continue}const U=N.clone();if(!r.morphTargetsRelative)for(let E=0,Q=N.count;E<Q;E++)for(let L=0;L<N.itemSize;L++)L===0&&U.setX(E,N.getX(E)-C.getX(E)),L===1&&U.setY(E,N.getY(E)-C.getY(E)),L===2&&U.setZ(E,N.getZ(E)-C.getZ(E)),L===3&&U.setW(E,N.getW(E)-C.getW(E));I[B]=this.processAccessor(U,r),s.attributes.set(this.getUID(C,!0),I[B])}u.push(I),p.push(e.morphTargetInfluences[m]),e.morphTargetDictionary!==void 0&&w.push(A[m])}c.weights=p,w.length>0&&(c.extras={},c.extras.targetNames=w)}const x=Array.isArray(e.material);if(x&&r.groups.length===0)return null;let y=!1;if(x&&r.index===null){const p=[];for(let w=0,A=r.attributes.position.count;w<A;w++)p[w]=w;r.setIndex(p),y=!0}const M=x?e.material:[e.material],b=x?r.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let p=0,w=b.length;p<w;p++){const A={mode:o,attributes:l};if(this.serializeUserData(r,A),u.length>0&&(A.targets=u),r.index!==null){let I=this.getUID(r.index);(b[p].start!==void 0||b[p].count!==void 0)&&(I+=":"+b[p].start+":"+b[p].count),s.attributes.has(I)?A.indices=s.attributes.get(I):(A.indices=this.processAccessor(r.index,r,b[p].start,b[p].count),s.attributes.set(I,A.indices)),A.indices===null&&delete A.indices}const m=await this.processMaterialAsync(M[b[p].materialIndex]);m!==null&&(A.material=m),h.push(A)}y===!0&&r.setIndex(null),c.primitives=h,n.meshes||(n.meshes=[]),await this._invokeAllAsync(function(p){p.writeMesh&&p.writeMesh(e,c)});const O=n.meshes.push(c)-1;return s.meshes.set(i,O),O}detectMeshQuantization(e,s){if(this.extensionsUsed[G])return;let n;switch(s.array.constructor){case Int8Array:n="byte";break;case Uint8Array:n="unsigned byte";break;case Int16Array:n="short";break;case Uint16Array:n="unsigned short";break;default:return}s.normalized&&(n+=" normalized");const t=e.split("_",1)[0];Y[t]&&Y[t].includes(n)&&(this.extensionsUsed[G]=!0,this.extensionsRequired[G]=!0)}processCamera(e){const s=this.json;s.cameras||(s.cameras=[]);const n=e.isOrthographicCamera,t={type:n?"orthographic":"perspective"};return n?t.orthographic={xmag:e.right*2,ymag:e.top*2,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:t.perspective={aspectRatio:e.aspect,yfov:k.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},e.name!==""&&(t.name=e.type),s.cameras.push(t)-1}processAnimation(e,s){const n=this.json,t=this.nodeMap;n.animations||(n.animations=[]),e=H.Utils.mergeMorphTargetTracks(e.clone(),s);const i=e.tracks,r=[],o=[];for(let l=0;l<i.length;++l){const h=i[l],u=z.parseTrackName(h.name);let T=z.findNode(s,u.nodeName);const f=j[u.propertyName];if(u.objectName==="bones"&&(T.isSkinnedMesh===!0?T=T.skeleton.getBoneByName(u.objectIndex):T=void 0),!T||!f){console.warn('THREE.GLTFExporter: Could not export animation track "%s".',h.name);continue}const d=1;let x=h.values.length/h.times.length;f===j.morphTargetInfluences&&(x/=T.morphTargetInfluences.length);let y;h.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline===!0?(y="CUBICSPLINE",x/=3):h.getInterpolation()===ae?y="STEP":y="LINEAR",o.push({input:this.processAccessor(new S(h.times,d)),output:this.processAccessor(new S(h.values,x)),interpolation:y}),r.push({sampler:o.length-1,target:{node:t.get(T),path:f}})}const c={name:e.name||"clip_"+n.animations.length,samplers:o,channels:r};return this.serializeUserData(e,c),n.animations.push(c),n.animations.length-1}processSkin(e){const s=this.json,n=this.nodeMap,t=s.nodes[n.get(e)],i=e.skeleton;if(i===void 0)return null;const r=e.skeleton.bones[0];if(r===void 0)return null;const o=[],c=new Float32Array(i.bones.length*16),l=new J;for(let u=0;u<i.bones.length;++u)o.push(n.get(i.bones[u])),l.copy(i.boneInverses[u]),l.multiply(e.bindMatrix).toArray(c,u*16);return s.skins===void 0&&(s.skins=[]),s.skins.push({inverseBindMatrices:this.processAccessor(new S(c,16)),joints:o,skeleton:n.get(r)}),t.skin=s.skins.length-1}async processNodeAsync(e){const s=this.json,n=this.options,t=this.nodeMap;s.nodes||(s.nodes=[]);const i={};if(n.trs){const o=e.quaternion.toArray(),c=e.position.toArray(),l=e.scale.toArray();F(o,[0,0,0,1])||(i.rotation=o),F(c,[0,0,0])||(i.translation=c),F(l,[1,1,1])||(i.scale=l)}else e.matrixAutoUpdate&&e.updateMatrix(),Re(e.matrix)===!1&&(i.matrix=e.matrix.elements);if(e.name!==""&&(i.name=String(e.name)),this.serializeUserData(e,i),e.isMesh||e.isLine||e.isPoints){const o=await this.processMeshAsync(e);o!==null&&(i.mesh=o)}else e.isCamera&&(i.camera=this.processCamera(e));e.isSkinnedMesh&&this.skins.push(e);const r=s.nodes.push(i)-1;if(t.set(e,r),e.children.length>0){const o=[];for(let c=0,l=e.children.length;c<l;c++){const h=e.children[c];if(h.visible||n.onlyVisible===!1){const u=await this.processNodeAsync(h);u!==null&&o.push(u)}}o.length>0&&(i.children=o)}return await this._invokeAllAsync(function(o){o.writeNode&&o.writeNode(e,i)}),r}async processSceneAsync(e){const s=this.json,n=this.options;s.scenes||(s.scenes=[],s.scene=0);const t={};e.name!==""&&(t.name=e.name),s.scenes.push(t);const i=[];for(let r=0,o=e.children.length;r<o;r++){const c=e.children[r];if(c.visible||n.onlyVisible===!1){const l=await this.processNodeAsync(c);l!==null&&i.push(l)}}i.length>0&&(t.nodes=i),this.serializeUserData(e,t)}async processObjectsAsync(e){const s=new K;s.name="AuxScene";for(let n=0;n<e.length;n++)s.children.push(e[n]);await this.processSceneAsync(s)}async processInputAsync(e){const s=this.options;e=e instanceof Array?e:[e],await this._invokeAllAsync(function(t){t.beforeParse&&t.beforeParse(e)});const n=[];for(let t=0;t<e.length;t++)e[t]instanceof K?await this.processSceneAsync(e[t]):n.push(e[t]);n.length>0&&await this.processObjectsAsync(n);for(let t=0;t<this.skins.length;++t)this.processSkin(this.skins[t]);for(let t=0;t<s.animations.length;++t)this.processAnimation(s.animations[t],e[0]);await this._invokeAllAsync(function(t){t.afterParse&&t.afterParse(e)})}async _invokeAllAsync(e){for(let s=0,n=this.plugins.length;s<n;s++)await e(this.plugins[s])}}class Le{constructor(e){this.writer=e,this.name="KHR_lights_punctual"}writeNode(e,s){if(!e.isLight)return;if(!e.isDirectionalLight&&!e.isPointLight&&!e.isSpotLight){console.warn("THREE.GLTFExporter: Only directional, point, and spot lights are supported.",e);return}const n=this.writer,t=n.json,i=n.extensionsUsed,r={};e.name&&(r.name=e.name),r.color=e.color.toArray(),r.intensity=e.intensity,e.isDirectionalLight?r.type="directional":e.isPointLight?(r.type="point",e.distance>0&&(r.range=e.distance)):e.isSpotLight&&(r.type="spot",e.distance>0&&(r.range=e.distance),r.spot={},r.spot.innerConeAngle=(1-e.penumbra)*e.angle,r.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]||(t.extensions=t.extensions||{},t.extensions[this.name]={lights:[]},i[this.name]=!0);const o=t.extensions[this.name].lights;o.push(r),s.extensions=s.extensions||{},s.extensions[this.name]={light:o.length-1}}}class _e{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}async writeMaterialAsync(e,s){if(!e.isMeshBasicMaterial)return;const t=this.writer.extensionsUsed;s.extensions=s.extensions||{},s.extensions[this.name]={},t[this.name]=!0,s.pbrMetallicRoughness.metallicFactor=0,s.pbrMetallicRoughness.roughnessFactor=.9}}class Ce{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}async writeMaterialAsync(e,s){if(!e.isMeshPhysicalMaterial||e.clearcoat===0)return;const n=this.writer,t=n.extensionsUsed,i={};if(i.clearcoatFactor=e.clearcoat,e.clearcoatMap){const r={index:await n.processTextureAsync(e.clearcoatMap),texCoord:e.clearcoatMap.channel};n.applyTextureTransform(r,e.clearcoatMap),i.clearcoatTexture=r}if(i.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){const r={index:await n.processTextureAsync(e.clearcoatRoughnessMap),texCoord:e.clearcoatRoughnessMap.channel};n.applyTextureTransform(r,e.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=r}if(e.clearcoatNormalMap){const r={index:await n.processTextureAsync(e.clearcoatNormalMap),texCoord:e.clearcoatNormalMap.channel};e.clearcoatNormalScale.x!==1&&(r.scale=e.clearcoatNormalScale.x),n.applyTextureTransform(r,e.clearcoatNormalMap),i.clearcoatNormalTexture=r}s.extensions=s.extensions||{},s.extensions[this.name]=i,t[this.name]=!0}}class Ue{constructor(e){this.writer=e,this.name="KHR_materials_dispersion"}async writeMaterialAsync(e,s){if(!e.isMeshPhysicalMaterial||e.dispersion===0)return;const t=this.writer.extensionsUsed,i={};i.dispersion=e.dispersion,s.extensions=s.extensions||{},s.extensions[this.name]=i,t[this.name]=!0}}class Fe{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}async writeMaterialAsync(e,s){if(!e.isMeshPhysicalMaterial||e.iridescence===0)return;const n=this.writer,t=n.extensionsUsed,i={};if(i.iridescenceFactor=e.iridescence,e.iridescenceMap){const r={index:await n.processTextureAsync(e.iridescenceMap),texCoord:e.iridescenceMap.channel};n.applyTextureTransform(r,e.iridescenceMap),i.iridescenceTexture=r}if(i.iridescenceIor=e.iridescenceIOR,i.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){const r={index:await n.processTextureAsync(e.iridescenceThicknessMap),texCoord:e.iridescenceThicknessMap.channel};n.applyTextureTransform(r,e.iridescenceThicknessMap),i.iridescenceThicknessTexture=r}s.extensions=s.extensions||{},s.extensions[this.name]=i,t[this.name]=!0}}class Oe{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}async writeMaterialAsync(e,s){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;const n=this.writer,t=n.extensionsUsed,i={};if(i.transmissionFactor=e.transmission,e.transmissionMap){const r={index:await n.processTextureAsync(e.transmissionMap),texCoord:e.transmissionMap.channel};n.applyTextureTransform(r,e.transmissionMap),i.transmissionTexture=r}s.extensions=s.extensions||{},s.extensions[this.name]=i,t[this.name]=!0}}class ve{constructor(e){this.writer=e,this.name="KHR_materials_volume"}async writeMaterialAsync(e,s){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;const n=this.writer,t=n.extensionsUsed,i={};if(i.thicknessFactor=e.thickness,e.thicknessMap){const r={index:await n.processTextureAsync(e.thicknessMap),texCoord:e.thicknessMap.channel};n.applyTextureTransform(r,e.thicknessMap),i.thicknessTexture=r}e.attenuationDistance!==1/0&&(i.attenuationDistance=e.attenuationDistance),i.attenuationColor=e.attenuationColor.toArray(),s.extensions=s.extensions||{},s.extensions[this.name]=i,t[this.name]=!0}}class ze{constructor(e){this.writer=e,this.name="KHR_materials_ior"}async writeMaterialAsync(e,s){if(!e.isMeshPhysicalMaterial||e.ior===1.5)return;const t=this.writer.extensionsUsed,i={};i.ior=e.ior,s.extensions=s.extensions||{},s.extensions[this.name]=i,t[this.name]=!0}}class Be{constructor(e){this.writer=e,this.name="KHR_materials_specular"}async writeMaterialAsync(e,s){if(!e.isMeshPhysicalMaterial||e.specularIntensity===1&&e.specularColor.equals(we)&&!e.specularIntensityMap&&!e.specularColorMap)return;const n=this.writer,t=n.extensionsUsed,i={};if(e.specularIntensityMap){const r={index:await n.processTextureAsync(e.specularIntensityMap),texCoord:e.specularIntensityMap.channel};n.applyTextureTransform(r,e.specularIntensityMap),i.specularTexture=r}if(e.specularColorMap){const r={index:await n.processTextureAsync(e.specularColorMap),texCoord:e.specularColorMap.channel};n.applyTextureTransform(r,e.specularColorMap),i.specularColorTexture=r}i.specularFactor=e.specularIntensity,i.specularColorFactor=e.specularColor.toArray(),s.extensions=s.extensions||{},s.extensions[this.name]=i,t[this.name]=!0}}class De{constructor(e){this.writer=e,this.name="KHR_materials_sheen"}async writeMaterialAsync(e,s){if(!e.isMeshPhysicalMaterial||e.sheen==0)return;const n=this.writer,t=n.extensionsUsed,i={};if(e.sheenRoughnessMap){const r={index:await n.processTextureAsync(e.sheenRoughnessMap),texCoord:e.sheenRoughnessMap.channel};n.applyTextureTransform(r,e.sheenRoughnessMap),i.sheenRoughnessTexture=r}if(e.sheenColorMap){const r={index:await n.processTextureAsync(e.sheenColorMap),texCoord:e.sheenColorMap.channel};n.applyTextureTransform(r,e.sheenColorMap),i.sheenColorTexture=r}i.sheenRoughnessFactor=e.sheenRoughness,i.sheenColorFactor=e.sheenColor.toArray(),s.extensions=s.extensions||{},s.extensions[this.name]=i,t[this.name]=!0}}class Ge{constructor(e){this.writer=e,this.name="KHR_materials_anisotropy"}async writeMaterialAsync(e,s){if(!e.isMeshPhysicalMaterial||e.anisotropy==0)return;const n=this.writer,t=n.extensionsUsed,i={};if(e.anisotropyMap){const r={index:await n.processTextureAsync(e.anisotropyMap)};n.applyTextureTransform(r,e.anisotropyMap),i.anisotropyTexture=r}i.anisotropyStrength=e.anisotropy,i.anisotropyRotation=e.anisotropyRotation,s.extensions=s.extensions||{},s.extensions[this.name]=i,t[this.name]=!0}}class Pe{constructor(e){this.writer=e,this.name="KHR_materials_emissive_strength"}async writeMaterialAsync(e,s){if(!e.isMeshStandardMaterial||e.emissiveIntensity===1)return;const t=this.writer.extensionsUsed,i={};i.emissiveStrength=e.emissiveIntensity,s.extensions=s.extensions||{},s.extensions[this.name]=i,t[this.name]=!0}}class ke{constructor(e){this.writer=e,this.name="EXT_materials_bump"}async writeMaterialAsync(e,s){if(!e.isMeshStandardMaterial||e.bumpScale===1&&!e.bumpMap)return;const n=this.writer,t=n.extensionsUsed,i={};if(e.bumpMap){const r={index:await n.processTextureAsync(e.bumpMap),texCoord:e.bumpMap.channel};n.applyTextureTransform(r,e.bumpMap),i.bumpTexture=r}i.bumpFactor=e.bumpScale,s.extensions=s.extensions||{},s.extensions[this.name]=i,t[this.name]=!0}}class He{constructor(e){this.writer=e,this.name="EXT_mesh_gpu_instancing"}writeNode(e,s){if(!e.isInstancedMesh)return;const n=this.writer,t=e,i=new Float32Array(t.count*3),r=new Float32Array(t.count*4),o=new Float32Array(t.count*3),c=new J,l=new v,h=new ee,u=new v;for(let f=0;f<t.count;f++)t.getMatrixAt(f,c),c.decompose(l,h,u),l.toArray(i,f*3),h.toArray(r,f*4),u.toArray(o,f*3);const T={TRANSLATION:n.processAccessor(new S(i,3)),ROTATION:n.processAccessor(new S(r,4)),SCALE:n.processAccessor(new S(o,3))};t.instanceColor&&(T._COLOR_0=n.processAccessor(t.instanceColor)),s.extensions=s.extensions||{},s.extensions[this.name]={attributes:T},n.extensionsUsed[this.name]=!0,n.extensionsRequired[this.name]=!0}}H.Utils={insertKeyframe:function(a,e){const n=a.getValueSize(),t=new a.TimeBufferType(a.times.length+1),i=new a.ValueBufferType(a.values.length+n),r=a.createInterpolant(new a.ValueBufferType(n));let o;if(a.times.length===0){t[0]=e;for(let c=0;c<n;c++)i[c]=0;o=0}else if(e<a.times[0]){if(Math.abs(a.times[0]-e)<.001)return 0;t[0]=e,t.set(a.times,1),i.set(r.evaluate(e),0),i.set(a.values,n),o=0}else if(e>a.times[a.times.length-1]){if(Math.abs(a.times[a.times.length-1]-e)<.001)return a.times.length-1;t[t.length-1]=e,t.set(a.times,0),i.set(a.values,0),i.set(r.evaluate(e),a.values.length),o=t.length-1}else for(let c=0;c<a.times.length;c++){if(Math.abs(a.times[c]-e)<.001)return c;if(a.times[c]<e&&a.times[c+1]>e){t.set(a.times.slice(0,c+1),0),t[c+1]=e,t.set(a.times.slice(c+1),c+2),i.set(a.values.slice(0,(c+1)*n),0),i.set(r.evaluate(e),(c+1)*n),i.set(a.values.slice((c+1)*n),(c+2)*n),o=c+1;break}}return a.times=t,a.values=i,o},mergeMorphTargetTracks:function(a,e){const s=[],n={},t=a.tracks;for(let i=0;i<t.length;++i){let r=t[i];const o=z.parseTrackName(r.name),c=z.findNode(e,o.nodeName);if(o.propertyName!=="morphTargetInfluences"||o.propertyIndex===void 0){s.push(r);continue}if(r.createInterpolant!==r.InterpolantFactoryMethodDiscrete&&r.createInterpolant!==r.InterpolantFactoryMethodLinear){if(r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline)throw new Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."),r=r.clone(),r.setInterpolation(Te)}const l=c.morphTargetInfluences.length,h=c.morphTargetDictionary[o.propertyIndex];if(h===void 0)throw new Error("THREE.GLTFExporter: Morph target name not found: "+o.propertyIndex);let u;if(n[c.uuid]===void 0){u=r.clone();const f=new u.ValueBufferType(l*u.times.length);for(let d=0;d<u.times.length;d++)f[d*l+h]=u.values[d];u.name=(o.nodeName||"")+".morphTargetInfluences",u.values=f,n[c.uuid]=u,s.push(u);continue}const T=r.createInterpolant(new r.ValueBufferType(1));u=n[c.uuid];for(let f=0;f<u.times.length;f++)u.values[f*l+h]=T.evaluate(u.times[f]);for(let f=0;f<r.times.length;f++){const d=this.insertKeyframe(u,r.times[f]);u.values[d*l+h]=r.values[f]}}return a.tracks=s,a},toFloat32BufferAttribute:function(a){const e=new S(new Float32Array(a.count*a.itemSize),a.itemSize,!1);if(!a.normalized&&!a.isInterleavedBufferAttribute)return e.array.set(a.array),e;for(let s=0,n=a.count;s<n;s++)for(let t=0;t<a.itemSize;t++)e.setComponent(s,t,a.getComponent(s,t));return e}};export{H as GLTFExporter};
@@ -1 +1 @@
1
- import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import{r as c}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{eT as d,eU as M,bE as f,ao as o,dR as F}from"./index-GIL7oGEO.js";import{c as $}from"./gameplay-replay-e5umMlXv.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-D396a9Mn.js";import"./rrweb-Cd2ifIRP.js";import"./output-DK8waum9.js";function T(t,u,p){return Math.max(0,t+p-(u??t))}function y(t){const u=Math.max(0,Math.floor(t/1e3)),p=Math.floor(u/60),i=u%60;return`${p}:${String(i).padStart(2,"0")}`}function K(){const t=c.useSyncExternalStore(d.subscribe,d.getSnapshot,d.getSnapshot),u=c.useRef(null),p=c.useRef(null),[i,j]=c.useState(null),v=c.useSyncExternalStore(M.subscribe,M.getSnapshot,M.getSnapshot),a=t.selectedSession,n=a?.recording?.finalized?a.recording:null,[b,S]=c.useState(null),A=c.useRef(Promise.resolve());c.useEffect(()=>{if(S(null),!n||n.format!=="canvas-dom"||!n.replay||!i)return;let e=!1;const s=n.replay,l=T(a?.startedAt??0,n.startedAt??a?.startedAt??0,i.ms),w=setTimeout(()=>{A.current=A.current.catch(()=>{}).then(async()=>{if(!e)try{const g=await $(s,l);e||S({src:`data:image/png;base64,${g.base64}`})}catch(g){e||S({error:g instanceof Error?g.message:String(g)})}})},180);return()=>{e=!0,clearTimeout(w)}},[n?.replay,n?.format,n?.startedAt,i?.ms,a?.startedAt]);const E=v?Date.parse(v.startedAt):Number.NaN,m=a?.status==="live"&&v&&Number.isFinite(E)&&E>=a.startedAt?v:null,h=a&&i?a.startedAt+i.ms:null,x=m&&h!==null?m.frames.reduce((e,s)=>{const l=Date.parse(s.capturedAt);return Number.isFinite(l)?e?Math.abs(l-h)<Math.abs(Date.parse(e.capturedAt)-h)?s:e:s:e},null)??null:null,k=x?Date.parse(x.capturedAt):Number.NaN,z=x&&h!==null&&Number.isFinite(k)&&Math.abs(k-h)<=Math.max(1e3,2e3/(m?.sampleFps??1))?x:null;function R(e,s){if(!Number.isFinite(e.duration))return;const l=a?.startedAt??0,w=T(l,n?.startedAt??l,s.ms);e.currentTime=Math.min(w/1e3,Math.max(0,e.duration-.01))}c.useEffect(()=>{const e=p.current;!e||!i||R(e,i)},[i,n?.startedAt,a?.startedAt]);function N(e){const s=u.current?.getBoundingClientRect();if(!s||s.width<=0)return{ms:0,x:0};const l=Math.max(0,Math.min(e-s.left,s.width));return{ms:l/s.width*t.liveEdgeMs,x:l}}return t.loading&&t.sessions.length===0?r.jsx("div",{style:{padding:`4px ${f[3]}`,fontSize:11},children:"Loading sessions…"}):t.error&&t.sessions.length===0?r.jsxs("div",{role:"alert",style:{padding:`4px ${f[3]}`,fontSize:11,color:o.semantic.danger},children:["Gameplay Sessions unavailable: ",t.error]}):r.jsxs("div",{style:{height:28,minHeight:28,display:"flex",alignItems:"center",gap:f[2],padding:`0 ${f[3]}`,borderBottom:`1px solid ${o.boundary.default}`,background:o.surface.inset,position:"relative",zIndex:2},children:[r.jsxs("select",{"aria-label":"Gameplay Session",value:t.selectedSessionId??"",onChange:e=>d.select(e.currentTarget.value),style:{maxWidth:180,height:20,fontSize:11},children:[t.sessions.length===0?r.jsx("option",{value:"",children:"No sessions yet"}):null,t.sessions.map((e,s)=>r.jsx("option",{value:e.id,children:e.status==="live"?"Live":e.run??`Session ${t.sessions.length-s}`},e.id))]}),r.jsx("span",{style:{width:34,fontVariantNumeric:"tabular-nums",fontSize:11},children:y(t.cursorMs)}),r.jsxs("div",{ref:u,role:"slider","aria-label":"Session time","aria-valuemin":0,"aria-valuemax":t.liveEdgeMs,"aria-valuenow":t.cursorMs,tabIndex:0,onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId),d.seek(N(e.clientX).ms)},onPointerMove:e=>{const s=N(e.clientX);j(s),e.currentTarget.hasPointerCapture(e.pointerId)&&d.seek(s.ms)},onPointerLeave:()=>j(null),onKeyDown:e=>{e.key==="ArrowLeft"&&d.seek(t.cursorMs-1e3),e.key==="ArrowRight"&&d.seek(t.cursorMs+1e3)},style:{flex:1,height:12,position:"relative",cursor:"ew-resize",outline:"none"},children:[r.jsx("div",{style:{position:"absolute",left:0,right:0,top:5,height:2,background:o.boundary.strong}}),r.jsx("div",{style:{position:"absolute",left:`${t.liveEdgeMs>0?t.cursorMs/t.liveEdgeMs*100:0}%`,top:1,width:2,height:10,background:o.accent.default}}),i&&(n||m)?r.jsxs("div",{style:{position:"absolute",left:Math.max(0,i.x-80),top:16,width:160,padding:3,background:o.surface.raised,border:`1px solid ${o.boundary.strong}`,boxShadow:"0 6px 18px rgba(0,0,0,.35)",pointerEvents:"none"},children:[n?.format==="canvas-dom"?b?.src?r.jsx("img",{src:b.src,alt:"Recorded gameplay with HUD",style:{width:"100%",display:"block"}}):r.jsx("div",{role:"status",style:{padding:f[4],fontSize:F.sm},children:b?.error??"Reconstructing frame…"}):n?r.jsx("video",{ref:p,src:n.url,muted:!0,preload:"metadata",onLoadedMetadata:e=>{i&&R(e.currentTarget,i)},style:{width:"100%",display:"block"}}):z?r.jsx("img",{src:z.src,alt:"Live gameplay recording preview",style:{width:"100%",display:"block"}}):r.jsx("div",{style:{padding:8,fontSize:10,color:o.content.muted},children:m?.frames.length===0?"Frame previews are available after recording stops.":`This point is outside the ${y(m?.retentionMs??0)} live preview window.`}),r.jsx("div",{style:{fontSize:10,textAlign:"center",paddingTop:2},children:y(i.ms)})]}):null]}),r.jsx("span",{style:{width:34,fontVariantNumeric:"tabular-nums",fontSize:11},children:y(t.liveEdgeMs)}),a?.status==="live"?r.jsxs("span",{style:{color:o.semantic.danger,fontSize:10},children:["● LIVE",m?" VIDEO":""]}):n?r.jsx("span",{style:{fontSize:10,color:o.content.muted},children:"VIDEO"}):null,t.error?r.jsx("span",{role:"status",title:t.error,style:{color:o.semantic.warning,fontSize:11},children:"⚠"}):null]})}export{K as GameplaySessionTimeline};
1
+ import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import{r as c}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{fL as d,fM as M,dU as f,ap as o,eH as F}from"./index-Ckxb31Yz.js";import{c as $}from"./gameplay-replay-Bsre-1K8.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-IFn-4i31.js";import"./rrweb-Cd2ifIRP.js";import"./output-DK8waum9.js";function T(t,u,m){return Math.max(0,t+m-(u??t))}function y(t){const u=Math.max(0,Math.floor(t/1e3)),m=Math.floor(u/60),i=u%60;return`${m}:${String(i).padStart(2,"0")}`}function K(){const t=c.useSyncExternalStore(d.subscribe,d.getSnapshot,d.getSnapshot),u=c.useRef(null),m=c.useRef(null),[i,j]=c.useState(null),v=c.useSyncExternalStore(M.subscribe,M.getSnapshot,M.getSnapshot),a=t.selectedSession,n=a?.recording?.finalized?a.recording:null,[b,S]=c.useState(null),A=c.useRef(Promise.resolve());c.useEffect(()=>{if(S(null),!n||n.format!=="canvas-dom"||!n.replay||!i)return;let e=!1;const s=n.replay,l=T(a?.startedAt??0,n.startedAt??a?.startedAt??0,i.ms),w=setTimeout(()=>{A.current=A.current.catch(()=>{}).then(async()=>{if(!e)try{const g=await $(s,l);e||S({src:`data:image/png;base64,${g.base64}`})}catch(g){e||S({error:g instanceof Error?g.message:String(g)})}})},180);return()=>{e=!0,clearTimeout(w)}},[n?.replay,n?.format,n?.startedAt,i?.ms,a?.startedAt]);const E=v?Date.parse(v.startedAt):Number.NaN,p=a?.status==="live"&&v&&Number.isFinite(E)&&E>=a.startedAt?v:null,h=a&&i?a.startedAt+i.ms:null,x=p&&h!==null?p.frames.reduce((e,s)=>{const l=Date.parse(s.capturedAt);return Number.isFinite(l)?e?Math.abs(l-h)<Math.abs(Date.parse(e.capturedAt)-h)?s:e:s:e},null)??null:null,k=x?Date.parse(x.capturedAt):Number.NaN,z=x&&h!==null&&Number.isFinite(k)&&Math.abs(k-h)<=Math.max(1e3,2e3/(p?.sampleFps??1))?x:null;function R(e,s){if(!Number.isFinite(e.duration))return;const l=a?.startedAt??0,w=T(l,n?.startedAt??l,s.ms);e.currentTime=Math.min(w/1e3,Math.max(0,e.duration-.01))}c.useEffect(()=>{const e=m.current;!e||!i||R(e,i)},[i,n?.startedAt,a?.startedAt]);function N(e){const s=u.current?.getBoundingClientRect();if(!s||s.width<=0)return{ms:0,x:0};const l=Math.max(0,Math.min(e-s.left,s.width));return{ms:l/s.width*t.liveEdgeMs,x:l}}return t.loading&&t.sessions.length===0?r.jsx("div",{style:{padding:`4px ${f[3]}`,fontSize:11},children:"Loading sessions…"}):t.error&&t.sessions.length===0?r.jsxs("div",{role:"alert",style:{padding:`4px ${f[3]}`,fontSize:11,color:o.semantic.danger},children:["Gameplay Sessions unavailable: ",t.error]}):r.jsxs("div",{style:{height:28,minHeight:28,display:"flex",alignItems:"center",gap:f[2],padding:`0 ${f[3]}`,borderBottom:`1px solid ${o.boundary.default}`,background:o.surface.inset,position:"relative",zIndex:2},children:[r.jsxs("select",{"aria-label":"Gameplay Session",value:t.selectedSessionId??"",onChange:e=>d.select(e.currentTarget.value),style:{maxWidth:180,height:20,fontSize:11},children:[t.sessions.length===0?r.jsx("option",{value:"",children:"No sessions yet"}):null,t.sessions.map((e,s)=>r.jsx("option",{value:e.id,children:e.status==="live"?"Live":e.run??`Session ${t.sessions.length-s}`},e.id))]}),r.jsx("span",{style:{width:34,fontVariantNumeric:"tabular-nums",fontSize:11},children:y(t.cursorMs)}),r.jsxs("div",{ref:u,role:"slider","aria-label":"Session time","aria-valuemin":0,"aria-valuemax":t.liveEdgeMs,"aria-valuenow":t.cursorMs,tabIndex:0,onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId),d.seek(N(e.clientX).ms)},onPointerMove:e=>{const s=N(e.clientX);j(s),e.currentTarget.hasPointerCapture(e.pointerId)&&d.seek(s.ms)},onPointerLeave:()=>j(null),onKeyDown:e=>{e.key==="ArrowLeft"&&d.seek(t.cursorMs-1e3),e.key==="ArrowRight"&&d.seek(t.cursorMs+1e3)},style:{flex:1,height:12,position:"relative",cursor:"ew-resize",outline:"none"},children:[r.jsx("div",{style:{position:"absolute",left:0,right:0,top:5,height:2,background:o.boundary.strong}}),r.jsx("div",{style:{position:"absolute",left:`${t.liveEdgeMs>0?t.cursorMs/t.liveEdgeMs*100:0}%`,top:1,width:2,height:10,background:o.accent.default}}),i&&(n||p)?r.jsxs("div",{style:{position:"absolute",left:Math.max(0,i.x-80),top:16,width:160,padding:3,background:o.surface.raised,border:`1px solid ${o.boundary.strong}`,boxShadow:"0 6px 18px rgba(0,0,0,.35)",pointerEvents:"none"},children:[n?.format==="canvas-dom"?b?.src?r.jsx("img",{src:b.src,alt:"Recorded gameplay with HUD",style:{width:"100%",display:"block"}}):r.jsx("div",{role:"status",style:{padding:f[4],fontSize:F.sm},children:b?.error??"Reconstructing frame…"}):n?r.jsx("video",{ref:m,src:n.url,muted:!0,preload:"metadata",onLoadedMetadata:e=>{i&&R(e.currentTarget,i)},style:{width:"100%",display:"block"}}):z?r.jsx("img",{src:z.src,alt:"Live gameplay recording preview",style:{width:"100%",display:"block"}}):r.jsx("div",{style:{padding:8,fontSize:10,color:o.content.muted},children:p?.frames.length===0?"Frame previews are available after recording stops.":`This point is outside the ${y(p?.retentionMs??0)} live preview window.`}),r.jsx("div",{style:{fontSize:10,textAlign:"center",paddingTop:2},children:y(i.ms)})]}):null]}),r.jsx("span",{style:{width:34,fontVariantNumeric:"tabular-nums",fontSize:11},children:y(t.liveEdgeMs)}),a?.status==="live"?r.jsxs("span",{style:{color:o.semantic.danger,fontSize:10},children:["● LIVE",p?" VIDEO":""]}):n?r.jsx("span",{style:{fontSize:10,color:o.content.muted},children:"VIDEO"}):null,t.error?r.jsx("span",{role:"status",title:t.error,style:{color:o.semantic.warning,fontSize:11},children:"⚠"}):null]})}export{K as GameplaySessionTimeline};
@@ -0,0 +1,2 @@
1
+ import{_ as U}from"./extends-CF3RwP-h.js";import{r as T}from"./index-nmcBqr7Y.js";import{_ as Pe,A as Ne,b as re,c as oe,d as Me,V as y,a as x,Q as ce,S as we,ae as Ee,a$ as Q,af as j,bH as g,g as Ie,v as K,bD as ve,bE as Qe,bA as _e,bp as ke,aR as Xe,O as De,e as Ye,co as je,ay as _,cp as Ze,ar as Re,bv as We,bw as Ve,bu as qe,a0 as Te,K as ze,I as ie,bx as $e,ag as et,aX as tt,aw as q,aW as st,y as ge,al as nt,x as v,i as rt,ax as He,bV as ot,M as Je,aZ as it,be as at,bS as At,a_ as Bt,aU as z,u as ct,o as lt,an as Ct,b2 as ut,b3 as dt,bt as ht,by as be,c3 as ft,ao as ue,ch as de,am as mt,cq as pt,j as Ft,p as Gt,b8 as Mt,b7 as Et}from"./three.module-IFn-4i31.js";import{a as he}from"./BufferGeometryUtils-CAbuTPOA.js";import{G as le}from"./events-156d8d12.esm-C734MYnx.js";const It=parseInt(Pe.replace(/\D+/g,""));function Le(C,t,e={}){const n=new y,s=new ce,r=new y,o=new x,a=new x,i=new x;e.preserveMatrix=e.preserveMatrix!==void 0?e.preserveMatrix:!0,e.preservePosition=e.preservePosition!==void 0?e.preservePosition:!0,e.preserveHipPosition=e.preserveHipPosition!==void 0?e.preserveHipPosition:!1,e.useTargetMatrix=e.useTargetMatrix!==void 0?e.useTargetMatrix:!1,e.hip=e.hip!==void 0?e.hip:"hip",e.names=e.names||{};const A=t.isObject3D?t.skeleton.bones:Z(t),B=C.isObject3D?C.skeleton.bones:Z(C);let c,l,u,d,f;if(C.isObject3D?C.skeleton.pose():(e.useTargetMatrix=!0,e.preserveMatrix=!1),e.preservePosition){f=[];for(let h=0;h<B.length;h++)f.push(B[h].position.clone())}if(e.preserveMatrix){C.updateMatrixWorld(),C.matrixWorld.identity();for(let h=0;h<C.children.length;++h)C.children[h].updateMatrixWorld(!0)}if(e.offsets){c=[];for(let h=0;h<B.length;++h)l=B[h],u=e.names[l.name]||l.name,e.offsets[u]&&(l.matrix.multiply(e.offsets[u]),l.matrix.decompose(l.position,l.quaternion,l.scale),l.updateMatrixWorld()),c.push(l.matrixWorld.clone())}for(let h=0;h<B.length;++h){if(l=B[h],u=e.names[l.name]||l.name,d=ye(u,A),i.copy(l.matrixWorld),d){if(d.updateMatrixWorld(),e.useTargetMatrix?a.copy(d.matrixWorld):(a.copy(C.matrixWorld).invert(),a.multiply(d.matrixWorld)),r.setFromMatrixScale(a),a.scale(r.set(1/r.x,1/r.y,1/r.z)),i.makeRotationFromQuaternion(s.setFromRotationMatrix(a)),C.isObject3D){const m=B.indexOf(l),p=c?c[m]:o.copy(C.skeleton.boneInverses[m]).invert();i.multiply(p)}i.copyPosition(a)}l.parent&&l.parent.isBone?(l.matrix.copy(l.parent.matrixWorld).invert(),l.matrix.multiply(i)):l.matrix.copy(i),e.preserveHipPosition&&u===e.hip&&l.matrix.setPosition(n.set(0,l.position.y,0)),l.matrix.decompose(l.position,l.quaternion,l.scale),l.updateMatrixWorld()}if(e.preservePosition)for(let h=0;h<B.length;++h)l=B[h],u=e.names[l.name]||l.name,u!==e.hip&&l.position.copy(f[h]);e.preserveMatrix&&C.updateMatrixWorld(!0)}function Dt(C,t,e,n={}){n.useFirstFramePosition=n.useFirstFramePosition!==void 0?n.useFirstFramePosition:!1,n.fps=n.fps!==void 0?n.fps:30,n.names=n.names||[],t.isObject3D||(t=Tt(t));const s=Math.round(e.duration*(n.fps/1e3)*1e3),r=1/n.fps,o=[],a=new Ne(t),i=Z(C.skeleton),A=[];let B,c,l,u,d;a.clipAction(e).play(),a.update(0),t.updateMatrixWorld();for(let f=0;f<s;++f){const h=f*r;Le(C,t,n);for(let m=0;m<i.length;++m)d=n.names[i[m].name]||i[m].name,l=ye(d,t.skeleton),l&&(c=i[m],u=A[m]=A[m]||{bone:c},n.hip===d&&(u.pos||(u.pos={times:new Float32Array(s),values:new Float32Array(s*3)}),n.useFirstFramePosition&&(f===0&&(B=c.position.clone()),c.position.sub(B)),u.pos.times[f]=h,c.position.toArray(u.pos.values,f*3)),u.quat||(u.quat={times:new Float32Array(s),values:new Float32Array(s*4)}),u.quat.times[f]=h,c.quaternion.toArray(u.quat.values,f*4));a.update(r),t.updateMatrixWorld()}for(let f=0;f<A.length;++f)u=A[f],u&&(u.pos&&o.push(new re(".bones["+u.bone.name+"].position",u.pos.times,u.pos.values)),o.push(new oe(".bones["+u.bone.name+"].quaternion",u.quat.times,u.quat.values)));return a.uncacheAction(e),new Me(e.name,-1,o)}function Rt(C){const t=new Map,e=new Map,n=C.clone();return Oe(C,n,function(s,r){t.set(r,s),e.set(s,r)}),n.traverse(function(s){if(!s.isSkinnedMesh)return;const r=s,o=t.get(s),a=o.skeleton.bones;r.skeleton=o.skeleton.clone(),r.bindMatrix.copy(o.bindMatrix),r.skeleton.bones=a.map(function(i){return e.get(i)}),r.bind(r.skeleton,r.bindMatrix)}),n}function ye(C,t){for(let e=0,n=Z(t);e<n.length;e++)if(C===n[e].name)return n[e]}function Z(C){return Array.isArray(C)?C:C.bones}function Tt(C){const t=new we(C.bones[0]);return t.skeleton=C,t}function Oe(C,t,e){e(C,t);for(let n=0;n<C.children.length;n++)Oe(C.children[n],t.children[n],e)}const gt={retarget:Le,retargetClip:Dt,clone:Rt};function W(C){if(typeof TextDecoder<"u")return new TextDecoder().decode(C);let t="";for(let e=0,n=C.length;e<n;e++)t+=String.fromCharCode(C[e]);try{return decodeURIComponent(escape(t))}catch{return t}}const S="srgb",J="srgb-linear",fe=3001,Ht=3e3;class Ce extends Ee{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new Ot(e)}),this.register(function(e){return new St(e)}),this.register(function(e){return new _t(e)}),this.register(function(e){return new kt(e)}),this.register(function(e){return new Xt(e)}),this.register(function(e){return new Kt(e)}),this.register(function(e){return new Ut(e)}),this.register(function(e){return new Pt(e)}),this.register(function(e){return new Nt(e)}),this.register(function(e){return new yt(e)}),this.register(function(e){return new wt(e)}),this.register(function(e){return new xt(e)}),this.register(function(e){return new Qt(e)}),this.register(function(e){return new vt(e)}),this.register(function(e){return new bt(e)}),this.register(function(e){return new Yt(e)}),this.register(function(e){return new jt(e)})}load(t,e,n,s){const r=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const A=Q.extractUrlBase(t);o=Q.resolveURL(A,this.path)}else o=Q.extractUrlBase(t);this.manager.itemStart(t);const a=function(A){s?s(A):console.error(A),r.manager.itemError(t),r.manager.itemEnd(t)},i=new j(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(t,function(A){try{r.parse(A,o,function(B){e(B),r.manager.itemEnd(t)},a)}catch(B){a(B)}},n,a)}setDRACOLoader(t){return this.dracoLoader=t,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,n,s){let r;const o={},a={};if(typeof t=="string")r=JSON.parse(t);else if(t instanceof ArrayBuffer)if(W(new Uint8Array(t.slice(0,4)))===Se){try{o[F.KHR_BINARY_GLTF]=new Zt(t)}catch(B){s&&s(B);return}r=JSON.parse(o[F.KHR_BINARY_GLTF].content)}else r=JSON.parse(W(new Uint8Array(t)));else r=t;if(r.asset===void 0||r.asset.version[0]<2){s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const i=new as(r,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});i.fileLoader.setRequestHeader(this.requestHeader);for(let A=0;A<this.pluginCallbacks.length;A++){const B=this.pluginCallbacks[A](i);B.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[B.name]=B,o[B.name]=!0}if(r.extensionsUsed)for(let A=0;A<r.extensionsUsed.length;++A){const B=r.extensionsUsed[A],c=r.extensionsRequired||[];switch(B){case F.KHR_MATERIALS_UNLIT:o[B]=new Lt;break;case F.KHR_DRACO_MESH_COMPRESSION:o[B]=new Wt(r,this.dracoLoader);break;case F.KHR_TEXTURE_TRANSFORM:o[B]=new Vt;break;case F.KHR_MESH_QUANTIZATION:o[B]=new qt;break;default:c.indexOf(B)>=0&&a[B]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+B+'".')}}i.setExtensions(o),i.setPlugins(a),i.parse(n,s)}parseAsync(t,e){const n=this;return new Promise(function(s,r){n.parse(t,e,s,r)})}}function Jt(){let C={};return{get:function(t){return C[t]},add:function(t,e){C[t]=e},remove:function(t){delete C[t]},removeAll:function(){C={}}}}const F={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class bt{constructor(t){this.parser=t,this.name=F.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let n=0,s=e.length;n<s;n++){const r=e[n];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&t._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(t){const e=this.parser,n="light:"+t;let s=e.cache.get(n);if(s)return s;const r=e.json,i=((r.extensions&&r.extensions[this.name]||{}).lights||[])[t];let A;const B=new K(16777215);i.color!==void 0&&B.setRGB(i.color[0],i.color[1],i.color[2],J);const c=i.range!==void 0?i.range:0;switch(i.type){case"directional":A=new _e(B),A.target.position.set(0,0,-1),A.add(A.target);break;case"point":A=new Qe(B),A.distance=c;break;case"spot":A=new ve(B),A.distance=c,i.spot=i.spot||{},i.spot.innerConeAngle=i.spot.innerConeAngle!==void 0?i.spot.innerConeAngle:0,i.spot.outerConeAngle=i.spot.outerConeAngle!==void 0?i.spot.outerConeAngle:Math.PI/4,A.angle=i.spot.outerConeAngle,A.penumbra=1-i.spot.innerConeAngle/i.spot.outerConeAngle,A.target.position.set(0,0,-1),A.add(A.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+i.type)}return A.position.set(0,0,0),A.decay=2,H(A,i),i.intensity!==void 0&&(A.intensity=i.intensity),A.name=e.createUniqueName(i.name||"light_"+t),s=Promise.resolve(A),e.cache.add(n,s),s}getDependency(t,e){if(t==="light")return this._loadLight(e)}createNodeAttachment(t){const e=this,n=this.parser,r=n.json.nodes[t],a=(r.extensions&&r.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(i){return n._getNodeRef(e.cache,a,i)})}}class Lt{constructor(){this.name=F.KHR_MATERIALS_UNLIT}getMaterialType(){return v}extendParams(t,e,n){const s=[];t.color=new K(1,1,1),t.opacity=1;const r=e.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){const o=r.baseColorFactor;t.color.setRGB(o[0],o[1],o[2],J),t.opacity=o[3]}r.baseColorTexture!==void 0&&s.push(n.assignTexture(t,"map",r.baseColorTexture,S))}return Promise.all(s)}}class yt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=s.extensions[this.name].emissiveStrength;return r!==void 0&&(e.emissiveIntensity=r),Promise.resolve()}}class Ot{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];if(o.clearcoatFactor!==void 0&&(e.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&r.push(n.assignTexture(e,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&r.push(n.assignTexture(e,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(r.push(n.assignTexture(e,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const a=o.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new Ie(a,a)}return Promise.all(r)}}class St{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_DISPERSION}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=s.extensions[this.name];return e.dispersion=r.dispersion!==void 0?r.dispersion:0,Promise.resolve()}}class xt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return o.iridescenceFactor!==void 0&&(e.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&r.push(n.assignTexture(e,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(e.iridescenceIOR=o.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&r.push(n.assignTexture(e,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(r)}}class Kt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_SHEEN}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[];e.sheenColor=new K(0,0,0),e.sheenRoughness=0,e.sheen=1;const o=s.extensions[this.name];if(o.sheenColorFactor!==void 0){const a=o.sheenColorFactor;e.sheenColor.setRGB(a[0],a[1],a[2],J)}return o.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&r.push(n.assignTexture(e,"sheenColorMap",o.sheenColorTexture,S)),o.sheenRoughnessTexture!==void 0&&r.push(n.assignTexture(e,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(r)}}class Ut{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return o.transmissionFactor!==void 0&&(e.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&r.push(n.assignTexture(e,"transmissionMap",o.transmissionTexture)),Promise.all(r)}}class Pt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_VOLUME}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];e.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&r.push(n.assignTexture(e,"thicknessMap",o.thicknessTexture)),e.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return e.attenuationColor=new K().setRGB(a[0],a[1],a[2],J),Promise.all(r)}}class Nt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_IOR}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=s.extensions[this.name];return e.ior=r.ior!==void 0?r.ior:1.5,Promise.resolve()}}class wt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_SPECULAR}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];e.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&r.push(n.assignTexture(e,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return e.specularColor=new K().setRGB(a[0],a[1],a[2],J),o.specularColorTexture!==void 0&&r.push(n.assignTexture(e,"specularColorMap",o.specularColorTexture,S)),Promise.all(r)}}class vt{constructor(t){this.parser=t,this.name=F.EXT_MATERIALS_BUMP}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return e.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&r.push(n.assignTexture(e,"bumpMap",o.bumpTexture)),Promise.all(r)}}class Qt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return o.anisotropyStrength!==void 0&&(e.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(e.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&r.push(n.assignTexture(e,"anisotropyMap",o.anisotropyTexture)),Promise.all(r)}}class _t{constructor(t){this.parser=t,this.name=F.KHR_TEXTURE_BASISU}loadTexture(t){const e=this.parser,n=e.json,s=n.textures[t];if(!s.extensions||!s.extensions[this.name])return null;const r=s.extensions[this.name],o=e.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,r.source,o)}}class kt{constructor(t){this.parser=t,this.name=F.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){const e=this.name,n=this.parser,s=n.json,r=s.textures[t];if(!r.extensions||!r.extensions[e])return null;const o=r.extensions[e],a=s.images[o.source];let i=n.textureLoader;if(a.uri){const A=n.options.manager.getHandler(a.uri);A!==null&&(i=A)}return this.detectSupport().then(function(A){if(A)return n.loadTextureImage(t,o.source,i);if(s.extensionsRequired&&s.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class Xt{constructor(t){this.parser=t,this.name=F.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){const e=this.name,n=this.parser,s=n.json,r=s.textures[t];if(!r.extensions||!r.extensions[e])return null;const o=r.extensions[e],a=s.images[o.source];let i=n.textureLoader;if(a.uri){const A=n.options.manager.getHandler(a.uri);A!==null&&(i=A)}return this.detectSupport().then(function(A){if(A)return n.loadTextureImage(t,o.source,i);if(s.extensionsRequired&&s.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class Yt{constructor(t){this.name=F.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,n=e.bufferViews[t];if(n.extensions&&n.extensions[this.name]){const s=n.extensions[this.name],r=this.parser.getDependency("buffer",s.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const i=s.byteOffset||0,A=s.byteLength||0,B=s.count,c=s.byteStride,l=new Uint8Array(a,i,A);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(B,c,l,s.mode,s.filter).then(function(u){return u.buffer}):o.ready.then(function(){const u=new ArrayBuffer(B*c);return o.decodeGltfBuffer(new Uint8Array(u),B,c,l,s.mode,s.filter),u})})}else return null}}class jt{constructor(t){this.name=F.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,n=e.nodes[t];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const s=e.meshes[n.mesh];for(const A of s.primitives)if(A.mode!==D.TRIANGLES&&A.mode!==D.TRIANGLE_STRIP&&A.mode!==D.TRIANGLE_FAN&&A.mode!==void 0)return null;const o=n.extensions[this.name].attributes,a=[],i={};for(const A in o)a.push(this.parser.getDependency("accessor",o[A]).then(B=>(i[A]=B,i[A])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(A=>{const B=A.pop(),c=B.isGroup?B.children:[B],l=A[0].count,u=[];for(const d of c){const f=new x,h=new y,m=new ce,p=new y(1,1,1),M=new ke(d.geometry,d.material,l);for(let G=0;G<l;G++)i.TRANSLATION&&h.fromBufferAttribute(i.TRANSLATION,G),i.ROTATION&&m.fromBufferAttribute(i.ROTATION,G),i.SCALE&&p.fromBufferAttribute(i.SCALE,G),M.setMatrixAt(G,f.compose(h,m,p));for(const G in i)if(G==="_COLOR_0"){const E=i[G];M.instanceColor=new Xe(E.array,E.itemSize,E.normalized)}else G!=="TRANSLATION"&&G!=="ROTATION"&&G!=="SCALE"&&d.geometry.setAttribute(G,i[G]);De.prototype.copy.call(M,d),this.parser.assignFinalMaterial(M),u.push(M)}return B.isGroup?(B.clear(),B.add(...u),B):u[0]}))}}const Se="glTF",w=12,me={JSON:1313821514,BIN:5130562};class Zt{constructor(t){this.name=F.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(t,0,w);if(this.header={magic:W(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Se)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-w,s=new DataView(t,w);let r=0;for(;r<n;){const o=s.getUint32(r,!0);r+=4;const a=s.getUint32(r,!0);if(r+=4,a===me.JSON){const i=new Uint8Array(t,w+r,o);this.content=W(i)}else if(a===me.BIN){const i=w+r;this.body=t.slice(i,i+o)}r+=o}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Wt{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=F.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){const n=this.json,s=this.dracoLoader,r=t.extensions[this.name].bufferView,o=t.extensions[this.name].attributes,a={},i={},A={};for(const B in o){const c=ae[B]||B.toLowerCase();a[c]=o[B]}for(const B in t.attributes){const c=ae[B]||B.toLowerCase();if(o[B]!==void 0){const l=n.accessors[t.attributes[B]],u=P[l.componentType];A[c]=u.name,i[c]=l.normalized===!0}}return e.getDependency("bufferView",r).then(function(B){return new Promise(function(c,l){s.decodeDracoFile(B,function(u){for(const d in u.attributes){const f=u.attributes[d],h=i[d];h!==void 0&&(f.normalized=h)}c(u)},a,A,J,l)})})}}class Vt{constructor(){this.name=F.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return(e.texCoord===void 0||e.texCoord===t.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(t=t.clone(),e.texCoord!==void 0&&(t.channel=e.texCoord),e.offset!==void 0&&t.offset.fromArray(e.offset),e.rotation!==void 0&&(t.rotation=e.rotation),e.scale!==void 0&&t.repeat.fromArray(e.scale),t.needsUpdate=!0),t}}class qt{constructor(){this.name=F.KHR_MESH_QUANTIZATION}}class xe extends pt{constructor(t,e,n,s){super(t,e,n,s)}copySampleValue_(t){const e=this.resultBuffer,n=this.sampleValues,s=this.valueSize,r=t*s*3+s;for(let o=0;o!==s;o++)e[o]=n[r+o];return e}interpolate_(t,e,n,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,i=a*2,A=a*3,B=s-e,c=(n-e)/B,l=c*c,u=l*c,d=t*A,f=d-A,h=-2*u+3*l,m=u-l,p=1-h,M=m-l+c;for(let G=0;G!==a;G++){const E=o[f+G+a],I=o[f+G+i]*B,R=o[d+G+a],N=o[d+G]*B;r[G]=p*E+M*I+h*R+m*N}return r}}const zt=new ce;class $t extends xe{interpolate_(t,e,n,s){const r=super.interpolate_(t,e,n,s);return zt.fromArray(r).normalize().toArray(r),r}}const D={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},P={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},pe={9728:ze,9729:Te,9984:qe,9985:Ve,9986:We,9987:Re},Fe={33071:et,33648:$e,10497:ie},$={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ae={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...It>=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},L={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},es={CUBICSPLINE:void 0,LINEAR:be,STEP:ht},ee={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function ts(C){return C.DefaultMaterial===void 0&&(C.DefaultMaterial=new ge({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:mt})),C.DefaultMaterial}function O(C,t,e){for(const n in e.extensions)C[n]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[n]=e.extensions[n])}function H(C,t){t.extras!==void 0&&(typeof t.extras=="object"?Object.assign(C.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function ss(C,t,e){let n=!1,s=!1,r=!1;for(let A=0,B=t.length;A<B;A++){const c=t[A];if(c.POSITION!==void 0&&(n=!0),c.NORMAL!==void 0&&(s=!0),c.COLOR_0!==void 0&&(r=!0),n&&s&&r)break}if(!n&&!s&&!r)return Promise.resolve(C);const o=[],a=[],i=[];for(let A=0,B=t.length;A<B;A++){const c=t[A];if(n){const l=c.POSITION!==void 0?e.getDependency("accessor",c.POSITION):C.attributes.position;o.push(l)}if(s){const l=c.NORMAL!==void 0?e.getDependency("accessor",c.NORMAL):C.attributes.normal;a.push(l)}if(r){const l=c.COLOR_0!==void 0?e.getDependency("accessor",c.COLOR_0):C.attributes.color;i.push(l)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(i)]).then(function(A){const B=A[0],c=A[1],l=A[2];return n&&(C.morphAttributes.position=B),s&&(C.morphAttributes.normal=c),r&&(C.morphAttributes.color=l),C.morphTargetsRelative=!0,C})}function ns(C,t){if(C.updateMorphTargets(),t.weights!==void 0)for(let e=0,n=t.weights.length;e<n;e++)C.morphTargetInfluences[e]=t.weights[e];if(t.extras&&Array.isArray(t.extras.targetNames)){const e=t.extras.targetNames;if(C.morphTargetInfluences.length===e.length){C.morphTargetDictionary={};for(let n=0,s=e.length;n<s;n++)C.morphTargetDictionary[e[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function rs(C){let t;const e=C.extensions&&C.extensions[F.KHR_DRACO_MESH_COMPRESSION];if(e?t="draco:"+e.bufferView+":"+e.indices+":"+te(e.attributes):t=C.indices+":"+te(C.attributes)+":"+C.mode,C.targets!==void 0)for(let n=0,s=C.targets.length;n<s;n++)t+=":"+te(C.targets[n]);return t}function te(C){let t="";const e=Object.keys(C).sort();for(let n=0,s=e.length;n<s;n++)t+=e[n]+":"+C[e[n]]+";";return t}function Ae(C){switch(C){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function os(C){return C.search(/\.jpe?g($|\?)/i)>0||C.search(/^data\:image\/jpeg/)===0?"image/jpeg":C.search(/\.webp($|\?)/i)>0||C.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const is=new x;class as{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new Jt,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,s=!1,r=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,s=navigator.userAgent.indexOf("Firefox")>-1,r=s?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||n||s&&r<98?this.textureLoader=new Ye(this.options.manager):this.textureLoader=new je(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new j(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const n=this,s=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(o){const a={scene:o[0][s.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:s.asset,parser:n,userData:{}};return O(r,a,s),H(a,s),Promise.all(n._invokeAll(function(i){return i.afterRoot&&i.afterRoot(a)})).then(function(){for(const i of a.scenes)i.updateMatrixWorld();t(a)})}).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[];for(let s=0,r=e.length;s<r;s++){const o=e[s].joints;for(let a=0,i=o.length;a<i;a++)t[o[a]].isBone=!0}for(let s=0,r=t.length;s<r;s++){const o=t[s];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(n[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(t,e){e!==void 0&&(t.refs[e]===void 0&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,n){if(t.refs[e]<=1)return n;const s=n.clone(),r=(o,a)=>{const i=this.associations.get(o);i!=null&&this.associations.set(a,i);for(const[A,B]of o.children.entries())r(B,a.children[A])};return r(n,s),s.name+="_instance_"+t.uses[e]++,s}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let n=0;n<e.length;n++){const s=t(e[n]);if(s)return s}return null}_invokeAll(t){const e=Object.values(this.plugins);e.unshift(this);const n=[];for(let s=0;s<e.length;s++){const r=t(e[s]);r&&n.push(r)}return n}getDependency(t,e){const n=t+":"+e;let s=this.cache.get(n);if(!s){switch(t){case"scene":s=this.loadScene(e);break;case"node":s=this._invokeOne(function(r){return r.loadNode&&r.loadNode(e)});break;case"mesh":s=this._invokeOne(function(r){return r.loadMesh&&r.loadMesh(e)});break;case"accessor":s=this.loadAccessor(e);break;case"bufferView":s=this._invokeOne(function(r){return r.loadBufferView&&r.loadBufferView(e)});break;case"buffer":s=this.loadBuffer(e);break;case"material":s=this._invokeOne(function(r){return r.loadMaterial&&r.loadMaterial(e)});break;case"texture":s=this._invokeOne(function(r){return r.loadTexture&&r.loadTexture(e)});break;case"skin":s=this.loadSkin(e);break;case"animation":s=this._invokeOne(function(r){return r.loadAnimation&&r.loadAnimation(e)});break;case"camera":s=this.loadCamera(e);break;default:if(s=this._invokeOne(function(r){return r!=this&&r.getDependency&&r.getDependency(t,e)}),!s)throw new Error("Unknown type: "+t);break}this.cache.add(n,s)}return s}getDependencies(t){let e=this.cache.get(t);if(!e){const n=this,s=this.json[t+(t==="mesh"?"es":"s")]||[];e=Promise.all(s.map(function(r,o){return n.getDependency(t,o)})),this.cache.add(t,e)}return e}loadBuffer(t){const e=this.json.buffers[t],n=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&t===0)return Promise.resolve(this.extensions[F.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(r,o){n.load(Q.resolveURL(e.uri,s.path),r,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(t){const e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(n){const s=e.byteLength||0,r=e.byteOffset||0;return n.slice(r,r+s)})}loadAccessor(t){const e=this,n=this.json,s=this.json.accessors[t];if(s.bufferView===void 0&&s.sparse===void 0){const o=$[s.type],a=P[s.componentType],i=s.normalized===!0,A=new a(s.count*o);return Promise.resolve(new _(A,o,i))}const r=[];return s.bufferView!==void 0?r.push(this.getDependency("bufferView",s.bufferView)):r.push(null),s.sparse!==void 0&&(r.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(r).then(function(o){const a=o[0],i=$[s.type],A=P[s.componentType],B=A.BYTES_PER_ELEMENT,c=B*i,l=s.byteOffset||0,u=s.bufferView!==void 0?n.bufferViews[s.bufferView].byteStride:void 0,d=s.normalized===!0;let f,h;if(u&&u!==c){const m=Math.floor(l/u),p="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+m+":"+s.count;let M=e.cache.get(p);M||(f=new A(a,m*u,s.count*u/B),M=new Ze(f,u/B),e.cache.add(p,M)),h=new ft(M,i,l%u/B,d)}else a===null?f=new A(s.count*i):f=new A(a,l,s.count*i),h=new _(f,i,d);if(s.sparse!==void 0){const m=$.SCALAR,p=P[s.sparse.indices.componentType],M=s.sparse.indices.byteOffset||0,G=s.sparse.values.byteOffset||0,E=new p(o[1],M,s.sparse.count*m),I=new A(o[2],G,s.sparse.count*i);a!==null&&(h=new _(h.array.slice(),h.itemSize,h.normalized));for(let R=0,N=E.length;R<N;R++){const b=E[R];if(h.setX(b,I[R*i]),i>=2&&h.setY(b,I[R*i+1]),i>=3&&h.setZ(b,I[R*i+2]),i>=4&&h.setW(b,I[R*i+3]),i>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return h})}loadTexture(t){const e=this.json,n=this.options,r=e.textures[t].source,o=e.images[r];let a=this.textureLoader;if(o.uri){const i=n.manager.getHandler(o.uri);i!==null&&(a=i)}return this.loadTextureImage(t,r,a)}loadTextureImage(t,e,n){const s=this,r=this.json,o=r.textures[t],a=r.images[e],i=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[i])return this.textureCache[i];const A=this.loadImageSource(e,n).then(function(B){B.flipY=!1,B.name=o.name||a.name||"",B.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(B.name=a.uri);const l=(r.samplers||{})[o.sampler]||{};return B.magFilter=pe[l.magFilter]||Te,B.minFilter=pe[l.minFilter]||Re,B.wrapS=Fe[l.wrapS]||ie,B.wrapT=Fe[l.wrapT]||ie,s.associations.set(B,{textures:t}),B}).catch(function(){return null});return this.textureCache[i]=A,A}loadImageSource(t,e){const n=this,s=this.json,r=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(c=>c.clone());const o=s.images[t],a=self.URL||self.webkitURL;let i=o.uri||"",A=!1;if(o.bufferView!==void 0)i=n.getDependency("bufferView",o.bufferView).then(function(c){A=!0;const l=new Blob([c],{type:o.mimeType});return i=a.createObjectURL(l),i});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const B=Promise.resolve(i).then(function(c){return new Promise(function(l,u){let d=l;e.isImageBitmapLoader===!0&&(d=function(f){const h=new ue(f);h.needsUpdate=!0,l(h)}),e.load(Q.resolveURL(c,r.path),d,void 0,u)})}).then(function(c){return A===!0&&a.revokeObjectURL(i),H(c,o),c.userData.mimeType=o.mimeType||os(o.uri),c}).catch(function(c){throw console.error("THREE.GLTFLoader: Couldn't load texture",i),c});return this.sourceCache[t]=B,B}assignTexture(t,e,n,s){const r=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(o=o.clone(),o.channel=n.texCoord),r.extensions[F.KHR_TEXTURE_TRANSFORM]){const a=n.extensions!==void 0?n.extensions[F.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const i=r.associations.get(o);o=r.extensions[F.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,i)}}return s!==void 0&&(typeof s=="number"&&(s=s===fe?S:J),"colorSpace"in o?o.colorSpace=s:o.encoding=s===S?fe:Ht),t[e]=o,o})}assignFinalMaterial(t){const e=t.geometry;let n=t.material;const s=e.attributes.tangent===void 0,r=e.attributes.color!==void 0,o=e.attributes.normal===void 0;if(t.isPoints){const a="PointsMaterial:"+n.uuid;let i=this.cache.get(a);i||(i=new tt,q.prototype.copy.call(i,n),i.color.copy(n.color),i.map=n.map,i.sizeAttenuation=!1,this.cache.add(a,i)),n=i}else if(t.isLine){const a="LineBasicMaterial:"+n.uuid;let i=this.cache.get(a);i||(i=new st,q.prototype.copy.call(i,n),i.color.copy(n.color),i.map=n.map,this.cache.add(a,i)),n=i}if(s||r||o){let a="ClonedMaterial:"+n.uuid+":";s&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let i=this.cache.get(a);i||(i=n.clone(),r&&(i.vertexColors=!0),o&&(i.flatShading=!0),s&&(i.normalScale&&(i.normalScale.y*=-1),i.clearcoatNormalScale&&(i.clearcoatNormalScale.y*=-1)),this.cache.add(a,i),this.associations.set(i,this.associations.get(n))),n=i}t.material=n}getMaterialType(){return ge}loadMaterial(t){const e=this,n=this.json,s=this.extensions,r=n.materials[t];let o;const a={},i=r.extensions||{},A=[];if(i[F.KHR_MATERIALS_UNLIT]){const c=s[F.KHR_MATERIALS_UNLIT];o=c.getMaterialType(),A.push(c.extendParams(a,r,e))}else{const c=r.pbrMetallicRoughness||{};if(a.color=new K(1,1,1),a.opacity=1,Array.isArray(c.baseColorFactor)){const l=c.baseColorFactor;a.color.setRGB(l[0],l[1],l[2],J),a.opacity=l[3]}c.baseColorTexture!==void 0&&A.push(e.assignTexture(a,"map",c.baseColorTexture,S)),a.metalness=c.metallicFactor!==void 0?c.metallicFactor:1,a.roughness=c.roughnessFactor!==void 0?c.roughnessFactor:1,c.metallicRoughnessTexture!==void 0&&(A.push(e.assignTexture(a,"metalnessMap",c.metallicRoughnessTexture)),A.push(e.assignTexture(a,"roughnessMap",c.metallicRoughnessTexture))),o=this._invokeOne(function(l){return l.getMaterialType&&l.getMaterialType(t)}),A.push(Promise.all(this._invokeAll(function(l){return l.extendMaterialParams&&l.extendMaterialParams(t,a)})))}r.doubleSided===!0&&(a.side=nt);const B=r.alphaMode||ee.OPAQUE;if(B===ee.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,B===ee.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==v&&(A.push(e.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new Ie(1,1),r.normalTexture.scale!==void 0)){const c=r.normalTexture.scale;a.normalScale.set(c,c)}if(r.occlusionTexture!==void 0&&o!==v&&(A.push(e.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==v){const c=r.emissiveFactor;a.emissive=new K().setRGB(c[0],c[1],c[2],J)}return r.emissiveTexture!==void 0&&o!==v&&A.push(e.assignTexture(a,"emissiveMap",r.emissiveTexture,S)),Promise.all(A).then(function(){const c=new o(a);return r.name&&(c.name=r.name),H(c,r),e.associations.set(c,{materials:t}),r.extensions&&O(s,c,r),c})}createUniqueName(t){const e=rt.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,n=this.extensions,s=this.primitiveCache;function r(a){return n[F.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(i){return Ge(i,a,e)})}const o=[];for(let a=0,i=t.length;a<i;a++){const A=t[a],B=rs(A),c=s[B];if(c)o.push(c.promise);else{let l;A.extensions&&A.extensions[F.KHR_DRACO_MESH_COMPRESSION]?l=r(A):l=Ge(new He,A,e),s[B]={primitive:A,promise:l},o.push(l)}}return Promise.all(o)}loadMesh(t){const e=this,n=this.json,s=this.extensions,r=n.meshes[t],o=r.primitives,a=[];for(let i=0,A=o.length;i<A;i++){const B=o[i].material===void 0?ts(this.cache):this.getDependency("material",o[i].material);a.push(B)}return a.push(e.loadGeometries(o)),Promise.all(a).then(function(i){const A=i.slice(0,i.length-1),B=i[i.length-1],c=[];for(let u=0,d=B.length;u<d;u++){const f=B[u],h=o[u];let m;const p=A[u];if(h.mode===D.TRIANGLES||h.mode===D.TRIANGLE_STRIP||h.mode===D.TRIANGLE_FAN||h.mode===void 0)m=r.isSkinnedMesh===!0?new ot(f,p):new Je(f,p),m.isSkinnedMesh===!0&&m.normalizeSkinWeights(),h.mode===D.TRIANGLE_STRIP?m.geometry=he(m.geometry,Mt):h.mode===D.TRIANGLE_FAN&&(m.geometry=he(m.geometry,Et));else if(h.mode===D.LINES)m=new it(f,p);else if(h.mode===D.LINE_STRIP)m=new at(f,p);else if(h.mode===D.LINE_LOOP)m=new At(f,p);else if(h.mode===D.POINTS)m=new Bt(f,p);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+h.mode);Object.keys(m.geometry.morphAttributes).length>0&&ns(m,r),m.name=e.createUniqueName(r.name||"mesh_"+t),H(m,r),h.extensions&&O(s,m,h),e.assignFinalMaterial(m),c.push(m)}for(let u=0,d=c.length;u<d;u++)e.associations.set(c[u],{meshes:t,primitives:u});if(c.length===1)return r.extensions&&O(s,c[0],r),c[0];const l=new z;r.extensions&&O(s,l,r),e.associations.set(l,{meshes:t});for(let u=0,d=c.length;u<d;u++)l.add(c[u]);return l})}loadCamera(t){let e;const n=this.json.cameras[t],s=n[n.type];if(!s){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?e=new ct(lt.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):n.type==="orthographic"&&(e=new Ct(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),n.name&&(e.name=this.createUniqueName(n.name)),H(e,n),Promise.resolve(e)}loadSkin(t){const e=this.json.skins[t],n=[];for(let s=0,r=e.joints.length;s<r;s++)n.push(this._loadNodeShallow(e.joints[s]));return e.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",e.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(s){const r=s.pop(),o=s,a=[],i=[];for(let A=0,B=o.length;A<B;A++){const c=o[A];if(c){a.push(c);const l=new x;r!==null&&l.fromArray(r.array,A*16),i.push(l)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[A])}return new ut(a,i)})}loadAnimation(t){const e=this.json,n=this,s=e.animations[t],r=s.name?s.name:"animation_"+t,o=[],a=[],i=[],A=[],B=[];for(let c=0,l=s.channels.length;c<l;c++){const u=s.channels[c],d=s.samplers[u.sampler],f=u.target,h=f.node,m=s.parameters!==void 0?s.parameters[d.input]:d.input,p=s.parameters!==void 0?s.parameters[d.output]:d.output;f.node!==void 0&&(o.push(this.getDependency("node",h)),a.push(this.getDependency("accessor",m)),i.push(this.getDependency("accessor",p)),A.push(d),B.push(f))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(i),Promise.all(A),Promise.all(B)]).then(function(c){const l=c[0],u=c[1],d=c[2],f=c[3],h=c[4],m=[];for(let p=0,M=l.length;p<M;p++){const G=l[p],E=u[p],I=d[p],R=f[p],N=h[p];if(G===void 0)continue;G.updateMatrix&&G.updateMatrix();const b=n._createAnimationTracks(G,E,I,R,N);if(b)for(let V=0;V<b.length;V++)m.push(b[V])}return new Me(r,void 0,m)})}createNodeMesh(t){const e=this.json,n=this,s=e.nodes[t];return s.mesh===void 0?null:n.getDependency("mesh",s.mesh).then(function(r){const o=n._getNodeRef(n.meshCache,s.mesh,r);return s.weights!==void 0&&o.traverse(function(a){if(a.isMesh)for(let i=0,A=s.weights.length;i<A;i++)a.morphTargetInfluences[i]=s.weights[i]}),o})}loadNode(t){const e=this.json,n=this,s=e.nodes[t],r=n._loadNodeShallow(t),o=[],a=s.children||[];for(let A=0,B=a.length;A<B;A++)o.push(n.getDependency("node",a[A]));const i=s.skin===void 0?Promise.resolve(null):n.getDependency("skin",s.skin);return Promise.all([r,Promise.all(o),i]).then(function(A){const B=A[0],c=A[1],l=A[2];l!==null&&B.traverse(function(u){u.isSkinnedMesh&&u.bind(l,is)});for(let u=0,d=c.length;u<d;u++)B.add(c[u]);return B})}_loadNodeShallow(t){const e=this.json,n=this.extensions,s=this;if(this.nodeCache[t]!==void 0)return this.nodeCache[t];const r=e.nodes[t],o=r.name?s.createUniqueName(r.name):"",a=[],i=s._invokeOne(function(A){return A.createNodeMesh&&A.createNodeMesh(t)});return i&&a.push(i),r.camera!==void 0&&a.push(s.getDependency("camera",r.camera).then(function(A){return s._getNodeRef(s.cameraCache,r.camera,A)})),s._invokeAll(function(A){return A.createNodeAttachment&&A.createNodeAttachment(t)}).forEach(function(A){a.push(A)}),this.nodeCache[t]=Promise.all(a).then(function(A){let B;if(r.isBone===!0?B=new dt:A.length>1?B=new z:A.length===1?B=A[0]:B=new De,B!==A[0])for(let c=0,l=A.length;c<l;c++)B.add(A[c]);if(r.name&&(B.userData.name=r.name,B.name=o),H(B,r),r.extensions&&O(n,B,r),r.matrix!==void 0){const c=new x;c.fromArray(r.matrix),B.applyMatrix4(c)}else r.translation!==void 0&&B.position.fromArray(r.translation),r.rotation!==void 0&&B.quaternion.fromArray(r.rotation),r.scale!==void 0&&B.scale.fromArray(r.scale);return s.associations.has(B)||s.associations.set(B,{}),s.associations.get(B).nodes=t,B}),this.nodeCache[t]}loadScene(t){const e=this.extensions,n=this.json.scenes[t],s=this,r=new z;n.name&&(r.name=s.createUniqueName(n.name)),H(r,n),n.extensions&&O(e,r,n);const o=n.nodes||[],a=[];for(let i=0,A=o.length;i<A;i++)a.push(s.getDependency("node",o[i]));return Promise.all(a).then(function(i){for(let B=0,c=i.length;B<c;B++)r.add(i[B]);const A=B=>{const c=new Map;for(const[l,u]of s.associations)(l instanceof q||l instanceof ue)&&c.set(l,u);return B.traverse(l=>{const u=s.associations.get(l);u!=null&&c.set(l,u)}),c};return s.associations=A(r),r})}_createAnimationTracks(t,e,n,s,r){const o=[],a=t.name?t.name:t.uuid,i=[];L[r.path]===L.weights?t.traverse(function(l){l.morphTargetInfluences&&i.push(l.name?l.name:l.uuid)}):i.push(a);let A;switch(L[r.path]){case L.weights:A=de;break;case L.rotation:A=oe;break;case L.position:case L.scale:A=re;break;default:switch(n.itemSize){case 1:A=de;break;case 2:case 3:default:A=re;break}break}const B=s.interpolation!==void 0?es[s.interpolation]:be,c=this._getArrayFromAccessor(n);for(let l=0,u=i.length;l<u;l++){const d=new A(i[l]+"."+L[r.path],e.array,c,B);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(d),o.push(d)}return o}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){const n=Ae(e.constructor),s=new Float32Array(e.length);for(let r=0,o=e.length;r<o;r++)s[r]=e[r]*n;e=s}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(n){const s=this instanceof oe?$t:xe;return new s(this.times,this.values,this.getValueSize()/3,n)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function As(C,t,e){const n=t.attributes,s=new Ft;if(n.POSITION!==void 0){const a=e.json.accessors[n.POSITION],i=a.min,A=a.max;if(i!==void 0&&A!==void 0){if(s.set(new y(i[0],i[1],i[2]),new y(A[0],A[1],A[2])),a.normalized){const B=Ae(P[a.componentType]);s.min.multiplyScalar(B),s.max.multiplyScalar(B)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const r=t.targets;if(r!==void 0){const a=new y,i=new y;for(let A=0,B=r.length;A<B;A++){const c=r[A];if(c.POSITION!==void 0){const l=e.json.accessors[c.POSITION],u=l.min,d=l.max;if(u!==void 0&&d!==void 0){if(i.setX(Math.max(Math.abs(u[0]),Math.abs(d[0]))),i.setY(Math.max(Math.abs(u[1]),Math.abs(d[1]))),i.setZ(Math.max(Math.abs(u[2]),Math.abs(d[2]))),l.normalized){const f=Ae(P[l.componentType]);i.multiplyScalar(f)}a.max(i)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(a)}C.boundingBox=s;const o=new Gt;s.getCenter(o.center),o.radius=s.min.distanceTo(s.max)/2,C.boundingSphere=o}function Ge(C,t,e){const n=t.attributes,s=[];function r(o,a){return e.getDependency("accessor",o).then(function(i){C.setAttribute(a,i)})}for(const o in n){const a=ae[o]||o.toLowerCase();a in C.attributes||s.push(r(n[o],a))}if(t.indices!==void 0&&!C.index){const o=e.getDependency("accessor",t.indices).then(function(a){C.setIndex(a)});s.push(o)}return H(C,t),As(C,t,e),Promise.all(s).then(function(){return t.targets!==void 0?ss(C,t.targets,e):C})}const se=new WeakMap;class Bs extends Ee{constructor(t){super(t),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(t){return this.decoderPath=t,this}setDecoderConfig(t){return this.decoderConfig=t,this}setWorkerLimit(t){return this.workerLimit=t,this}load(t,e,n,s){const r=new j(this.manager);r.setPath(this.path),r.setResponseType("arraybuffer"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(t,o=>{const a={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(o,a).then(e).catch(s)},n,s)}decodeDracoFile(t,e,n,s){const r={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(t,r).then(e)}decodeGeometry(t,e){for(const i in e.attributeTypes){const A=e.attributeTypes[i];A.BYTES_PER_ELEMENT!==void 0&&(e.attributeTypes[i]=A.name)}const n=JSON.stringify(e);if(se.has(t)){const i=se.get(t);if(i.key===n)return i.promise;if(t.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const r=this.workerNextTaskID++,o=t.byteLength,a=this._getWorker(r,o).then(i=>(s=i,new Promise((A,B)=>{s._callbacks[r]={resolve:A,reject:B},s.postMessage({type:"decode",id:r,taskConfig:e,buffer:t},[t])}))).then(i=>this._createGeometry(i.geometry));return a.catch(()=>!0).then(()=>{s&&r&&this._releaseTask(s,r)}),se.set(t,{key:n,promise:a}),a}_createGeometry(t){const e=new He;t.index&&e.setIndex(new _(t.index.array,1));for(let n=0;n<t.attributes.length;n++){const s=t.attributes[n],r=s.name,o=s.array,a=s.itemSize;e.setAttribute(r,new _(o,a))}return e}_loadLibrary(t,e){const n=new j(this.manager);return n.setPath(this.decoderPath),n.setResponseType(e),n.setWithCredentials(this.withCredentials),new Promise((s,r)=>{n.load(t,s,void 0,r)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const t=typeof WebAssembly!="object"||this.decoderConfig.type==="js",e=[];return t?e.push(this._loadLibrary("draco_decoder.js","text")):(e.push(this._loadLibrary("draco_wasm_wrapper.js","text")),e.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(e).then(n=>{const s=n[0];t||(this.decoderConfig.wasmBinary=n[1]);const r=cs.toString(),o=["/* draco decoder */",s,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join(`
2
+ `);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(t,e){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const s=new Worker(this.workerSourceURL);s._callbacks={},s._taskCosts={},s._taskLoad=0,s.postMessage({type:"init",decoderConfig:this.decoderConfig}),s.onmessage=function(r){const o=r.data;switch(o.type){case"decode":s._callbacks[o.id].resolve(o);break;case"error":s._callbacks[o.id].reject(o);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+o.type+'"')}},this.workerPool.push(s)}else this.workerPool.sort(function(s,r){return s._taskLoad>r._taskLoad?-1:1});const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[t]=e,n._taskLoad+=e,n})}_releaseTask(t,e){t._taskLoad-=t._taskCosts[e],delete t._callbacks[e],delete t._taskCosts[e]}debug(){console.log("Task load: ",this.workerPool.map(t=>t._taskLoad))}dispose(){for(let t=0;t<this.workerPool.length;++t)this.workerPool[t].terminate();return this.workerPool.length=0,this}}function cs(){let C,t;onmessage=function(o){const a=o.data;switch(a.type){case"init":C=a.decoderConfig,t=new Promise(function(B){C.onModuleLoaded=function(c){B({draco:c})},DracoDecoderModule(C)});break;case"decode":const i=a.buffer,A=a.taskConfig;t.then(B=>{const c=B.draco,l=new c.Decoder,u=new c.DecoderBuffer;u.Init(new Int8Array(i),i.byteLength);try{const d=e(c,l,u,A),f=d.attributes.map(h=>h.array.buffer);d.index&&f.push(d.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:d},f)}catch(d){console.error(d),self.postMessage({type:"error",id:a.id,error:d.message})}finally{c.destroy(u),c.destroy(l)}});break}};function e(o,a,i,A){const B=A.attributeIDs,c=A.attributeTypes;let l,u;const d=a.GetEncodedGeometryType(i);if(d===o.TRIANGULAR_MESH)l=new o.Mesh,u=a.DecodeBufferToMesh(i,l);else if(d===o.POINT_CLOUD)l=new o.PointCloud,u=a.DecodeBufferToPointCloud(i,l);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!u.ok()||l.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+u.error_msg());const f={index:null,attributes:[]};for(const h in B){const m=self[c[h]];let p,M;if(A.useUniqueIDs)M=B[h],p=a.GetAttributeByUniqueId(l,M);else{if(M=a.GetAttributeId(l,o[B[h]]),M===-1)continue;p=a.GetAttribute(l,M)}f.attributes.push(s(o,a,l,h,m,p))}return d===o.TRIANGULAR_MESH&&(f.index=n(o,a,l)),o.destroy(l),f}function n(o,a,i){const B=i.num_faces()*3,c=B*4,l=o._malloc(c);a.GetTrianglesUInt32Array(i,c,l);const u=new Uint32Array(o.HEAPF32.buffer,l,B).slice();return o._free(l),{array:u,itemSize:1}}function s(o,a,i,A,B,c){const l=c.num_components(),d=i.num_points()*l,f=d*B.BYTES_PER_ELEMENT,h=r(o,B),m=o._malloc(f);a.GetAttributeDataArrayForAllPoints(i,c,h,f,m);const p=new B(o.HEAPF32.buffer,m,d).slice();return o._free(m),{name:A,array:p,itemSize:l}}function r(o,a){switch(a){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}let X;const ne=()=>{if(X)return X;const C="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86B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TtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),n=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if(typeof WebAssembly!="object")return{supported:!1};let s=C;WebAssembly.validate(e)&&(s=t);let r;const o=WebAssembly.instantiate(a(s),{}).then(c=>{r=c.instance,r.exports.__wasm_call_ctors()});function a(c){const l=new Uint8Array(c.length);for(let d=0;d<c.length;++d){const f=c.charCodeAt(d);l[d]=f>96?f-71:f>64?f-65:f>47?f+4:f>46?63:62}let u=0;for(let d=0;d<c.length;++d)l[u++]=l[d]<60?n[l[d]]:(l[d]-60)*64+l[++d];return l.buffer.slice(0,u)}function i(c,l,u,d,f,h){const m=r.exports.sbrk,p=u+3&-4,M=m(p*d),G=m(f.length),E=new Uint8Array(r.exports.memory.buffer);E.set(f,G);const I=c(M,u,d,G,f.length);if(I===0&&h&&h(M,p,d),l.set(E.subarray(M,M+u*d)),m(M-m(0)),I!==0)throw new Error(`Malformed buffer data: ${I}`)}const A={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},B={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return X={ready:o,supported:!0,decodeVertexBuffer(c,l,u,d,f){i(r.exports.meshopt_decodeVertexBuffer,c,l,u,d,r.exports[A[f]])},decodeIndexBuffer(c,l,u,d){i(r.exports.meshopt_decodeIndexBuffer,c,l,u,d)},decodeIndexSequence(c,l,u,d){i(r.exports.meshopt_decodeIndexSequence,c,l,u,d)},decodeGltfBuffer(c,l,u,d,f,h){i(r.exports[B[f]],c,l,u,d,r.exports[A[h]])}},X};function ls(C,{keys:t=["near","far","color","distance","decay","penumbra","angle","intensity","skeleton","visible","castShadow","receiveShadow","morphTargetDictionary","morphTargetInfluences","name","geometry","material","position","rotation","scale","up","userData","bindMode","bindMatrix","bindMatrixInverse","skeleton"],deep:e,inject:n,castShadow:s,receiveShadow:r}){let o={};for(const a of t)o[a]=C[a];return e&&(o.geometry&&e!=="materialsOnly"&&(o.geometry=o.geometry.clone()),o.material&&e!=="geometriesOnly"&&(o.material=o.material.clone())),n&&(typeof n=="function"?o={...o,children:n(C)}:T.isValidElement(n)?o={...o,children:n}:o={...o,...n}),C instanceof Je&&(s&&(o.castShadow=!0),r&&(o.receiveShadow=!0)),o}const Be=T.forwardRef(({isChild:C=!1,object:t,children:e,deep:n,castShadow:s,receiveShadow:r,inject:o,keys:a,...i},A)=>{const B={keys:a,deep:n,inject:o,castShadow:s,receiveShadow:r};if(t=T.useMemo(()=>{if(C===!1&&!Array.isArray(t)){let d=!1;if(t.traverse(f=>{f.isSkinnedMesh&&(d=!0)}),d)return gt.clone(t)}return t},[t,C]),Array.isArray(t))return T.createElement("group",U({},i,{ref:A}),t.map(d=>T.createElement(Be,U({key:d.uuid,object:d},B))),e);const{children:c,...l}=ls(t,B),u=t.type[0].toLowerCase()+t.type.slice(1);return T.createElement(u,U({},l,i,{ref:A}),t.children.map(d=>d.type==="Bone"?T.createElement("primitive",U({key:d.uuid,object:d},B)):T.createElement(Be,U({key:d.uuid,object:d},B,{isChild:!0}))),e,c)});let Y=null,Ke="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function Ue(C=!0,t=!0,e){return n=>{e&&e(n),C&&(Y||(Y=new Bs),Y.setDecoderPath(typeof C=="string"?C:Ke),n.setDRACOLoader(Y)),t&&n.setMeshoptDecoder(typeof ne=="function"?ne():ne)}}const k=(C,t,e,n)=>le(Ce,C,Ue(t,e,n));k.preload=(C,t,e,n)=>le.preload(Ce,C,Ue(t,e,n));k.clear=C=>le.clear(Ce,C);k.setDecoderPath=C=>{Ke=C};const Cs=T.forwardRef(({src:C,useDraco:t,useMeshOpt:e,extendLoader:n,...s},r)=>{const{scene:o}=k(C,t,e,n);return T.createElement(Be,U({ref:r},s,{object:o}))}),ps=Object.freeze(Object.defineProperty({__proto__:null,Gltf:Cs,useGLTF:k},Symbol.toStringTag,{value:"Module"}));export{Be as C,Cs as G,ps as a,W as d,k as u,It as v};
@@ -0,0 +1 @@
1
+ import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{r as o}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{aU as W,aV as H,aW as B,aX as M,aa as v,a5 as P,aY as h,aZ as F}from"./index-Ckxb31Yz.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-IFn-4i31.js";function J({assetPath:i,displayName:l}){const{sheetPath:n,frameName:t}=W(i),a=`/${n}`,[s,r]=o.useState(null),[x,p]=o.useState(t),[m,u]=o.useState("fit"),[j,I]=o.useState(null),w=o.useRef(null),[y,N]=o.useState({w:320,h:240}),f=x??t,g=f?s?.frames.find(c=>c.name===f)??null:null;o.useEffect(()=>{p(t),u("fit")},[t]),o.useEffect(()=>{if(!t){r(null);return}let c=!1;return fetch(`/${H(n)}`).then(d=>d.ok?d.text():null).then(d=>{c||!d||r(B(d))}).catch(()=>{c||r(null)}),()=>{c=!0}},[t,n]),o.useEffect(()=>{const c=w.current;if(!c)return;const d=new ResizeObserver(R=>{const S=R[0]?.contentRect;S&&N({w:Math.max(1,S.width-24),h:Math.max(1,S.height-24)})});return d.observe(c),()=>d.disconnect()},[]);const b=g?.sourceWidth??j?.w??0,$=g?.sourceHeight??j?.h??0,k=M(m,b,$,y.w,y.h),E=l??f??n.split("/").pop()??i;return e.jsxs("div",{"data-testid":"image-asset-document",style:{height:"100%",minHeight:240,display:"flex",flexDirection:"column",minWidth:0},children:[e.jsx(z,{title:E,srcWidth:b,srcHeight:$,scaleMode:m,scale:k,onScaleMode:u}),e.jsx(C,{stageRef:w,frameName:t,frame:g,sheet:s,sheetUrl:a,title:E,scale:k,onNatural:I}),s&&s.frames.length>1?e.jsx(O,{sheetUrl:a,frames:s.frames,activeName:f,onPick:p}):null]})}function z({title:i,srcWidth:l,srcHeight:n,scaleMode:t,scale:a,onScaleMode:s}){return e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:6,padding:"6px 8px"},children:[e.jsx(v,{tone:"dim",variant:"label",children:i}),l>0&&e.jsxs(v,{tone:"muted",variant:"code",children:[l," × ",n,t==="fit"?` · ${T(a)}`:""]}),e.jsx("span",{style:{flex:1}}),[1,4,8,"fit"].map(r=>e.jsx(P,{type:"button",size:"compact",shape:"segment","aria-pressed":t===r,variant:t===r?"primary":"secondary",onClick:()=>s(r),children:r==="fit"?"Fit":`${r}×`},String(r)))]})}function C({stageRef:i,frameName:l,frame:n,sheet:t,sheetUrl:a,title:s,scale:r,onNatural:x}){let p;return l&&!n?p=e.jsx(v,{tone:"muted",variant:"body",children:t?`No sprite named ${l}`:"Loading sprite…"}):n?p=e.jsx(F,{sheetUrl:a,frame:n,scale:r}):p=e.jsx("img",{src:a,alt:s,style:{imageRendering:"pixelated",display:"block",transform:`scale(${r})`,transformOrigin:"center center"},onLoad:m=>{const u=m.currentTarget;x({w:u.naturalWidth,h:u.naturalHeight})}}),e.jsx("div",{ref:i,className:"vgai-asset-transparency-well","data-testid":"sprite-stage",style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center",overflow:"auto"},children:p})}function O({sheetUrl:i,frames:l,activeName:n,onPick:t}){return e.jsx("div",{"data-testid":"sprite-filmstrip",style:{display:"flex",gap:6,overflowX:"auto",padding:"8px 8px 10px",borderTop:`1px solid ${h[3]}`},children:l.map(a=>{const s=a.name===n;return e.jsxs("button",{type:"button",title:a.name,"aria-pressed":s,onClick:()=>t(a.name),style:{border:s?`1px solid ${h[1]}`:"1px solid transparent",background:"transparent",padding:2,cursor:"pointer",flex:"0 0 auto"},children:[e.jsx(F,{sheetUrl:i,frame:a,maxEdge:40}),e.jsx("div",{style:{fontSize:9,color:s?h[1]:h[3],maxWidth:56,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name})]},a.name)})})}function T(i){return i>=1?`${i}×`:`1/${Math.round(1/i)}×`}export{J as ImageViewer};
@@ -0,0 +1 @@
1
+ import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{Object3DSnapshotDocument as p}from"./EntityModelDocument-DuQivdvc.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-Ckxb31Yz.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-IFn-4i31.js";import"./live-mixers-BRkRHd6g.js";import"./StageHost-lB8f---y.js";import"./standard-viewport-dressing-GUUr6GuK.js";import"./live-gesture-lock-DJbrjOqf.js";import"./model-inspection-Cxfg_Fei.js";import"./viewport-shading-boundary-CBvvzS-p.js";import"./clip-planes-CnAI6DZn.js";import"./three-DSsr_Lvp.js";import"./viewport-pick-context-DkawXbEi.js";import"./OrbitControls-CzTRRI7x.js";import"./LineSegments2-Cicm_Hu1.js";import"./three.quarks.esm-CRKGjKAH.js";import"./scene-framing-50N7SKuX.js";import"./source-object3d-authoring-adapter-CfHQLFAL.js";import"./three-projection-core-kubBTx0s.js";import"./editor-presentation-activity-C7SNSmTd.js";import"./viewport-surface-status-BFmnWp7z.js";function q({previewKey:i,object:o,displayName:r,fill:e=!1}){return t.jsx("div",{"data-testid":"inspector-object-preview",style:e?{position:"absolute",inset:0,overflow:"hidden"}:{width:"100%",height:220,minHeight:220,borderBottom:"1px solid var(--vgai-structural-divider)",overflow:"hidden",position:"relative"},children:t.jsx(p,{documentId:`inspector-preview:${i}`,source:o,displayName:r,active:!0,chromeless:!0})})}export{q as InspectorObjectPreview};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DgapqSPi.js","assets/index-BP6wv2A0.js","assets/index-CJbYy-CF.js","assets/index-CanA16PU.js","assets/index-Bge9JUr6.js","assets/index-gHZae-lw.js","assets/index-BncK9THk.js","assets/index-IEjydI9d.js","assets/index-DUqP1RMl.js"])))=>i.map(i=>d[i]);
2
+ import{a}from"./jsx-runtime-DPjLkJKQ.js";import{r as m}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{ap as n,_ as b,h3 as z,aT as F,h4 as M,b4 as J}from"./index-Ckxb31Yz.js";const P={ts:"typescript",tsx:"typescript",mts:"typescript",cts:"typescript",js:"typescript",jsx:"typescript",mjs:"typescript",cjs:"typescript",json:"json",jsonc:"json",json5:"json"};function re(e){const o=e.split("/").pop()??e,t=o.lastIndexOf(".");return t<0?"text":P[o.slice(t+1).toLowerCase()]??"text"}let T=null;function W(){return T??=Promise.all([b(()=>import("./index-BP6wv2A0.js"),[]),b(()=>import("./index-DgapqSPi.js").then(e=>e.i),__vite__mapDeps([0,1])),b(()=>import("./index-CJbYy-CF.js").then(e=>e.w),__vite__mapDeps([2,1,0])),b(()=>import("./index-CanA16PU.js"),__vite__mapDeps([3,0,1])),b(()=>import("./index-Bge9JUr6.js"),__vite__mapDeps([4,1,0,2])),b(()=>import("./index-gHZae-lw.js"),__vite__mapDeps([5,6,2,1,0])),b(()=>import("./index-IEjydI9d.js"),__vite__mapDeps([7,6,2,1,0])),b(()=>import("./index-DUqP1RMl.js"),__vite__mapDeps([8,0,1,2]))]).then(([e,o,t,r,c,s,l,d])=>({state:e,view:o,language:t,search:r,commands:c,javascript:s,json:l,oneDark:d})),T}function S(e){return typeof e=="number"?`${e}px`:e}function R(e){return typeof e=="string"&&e.trim().endsWith("%")}function G(e,o){let t=0;for(;t<e.length&&t<o.length&&e[t]===o[t];)t++;let r=e.length,c=o.length;for(;r>t&&c>t&&e[r-1]===o[c-1];)r--,c--;return{from:t,oldEnd:r,newEnd:c}}const L=1800,k=`color-mix(in srgb, ${n.semantic.warning} 42%, transparent)`,C=`color-mix(in srgb, ${n.semantic.warning} 18%, transparent)`;function U(e){class o extends e.view.WidgetType{constructor(s){super(),this.revision=s}eq(s){return this.revision===s.revision}toDOM(){const s=document.createElement("span");return s.className=`cm-source-deletion cm-source-change cm-source-change-${this.revision%2}`,s.setAttribute("aria-hidden","true"),s}}const t=e.state.StateEffect.define(),r=e.state.StateField.define({create:()=>e.view.Decoration.none,update(c,s){let l=c.map(s.changes);for(const d of s.effects){if(!d.is(t))continue;if(!d.value){l=e.view.Decoration.none;continue}const{from:g,to:i,revision:y}=d.value,f=g===i?e.view.Decoration.widget({widget:new o(y),side:-1}).range(g):e.view.Decoration.mark({class:`cm-source-change cm-source-change-${y%2}`}).range(g,i);l=e.view.Decoration.set([f])}return l},provide:c=>e.view.EditorView.decorations.from(c)});return{mark:t,field:r}}function K(e,o,t){return e.view.EditorView.theme({"&":{color:n.content.primary,backgroundColor:"transparent",fontSize:`${o}px`,...R(t)?{height:S(t)}:{}},"&.cm-focused":{outline:"none"},".cm-content":{fontFamily:n.typography.mono,padding:"2px 0",caretColor:"transparent"},".cm-scroller":{fontFamily:n.typography.mono,lineHeight:"1.5",overflow:"auto",...t===void 0?{}:{maxHeight:S(t)}},".cm-gutters":{backgroundColor:"transparent",color:n.content.dim,border:"none",userSelect:"none"},".cm-lineNumbers .cm-gutterElement":{padding:"0 8px 0 4px",minWidth:"2ch"},".cm-content ::selection":{backgroundColor:n.selection.background},".cm-panels":{backgroundColor:n.surface.raised,color:n.content.primary,border:"none",fontFamily:n.typography.sans},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${n.boundary.default}`},".cm-textfield":{backgroundColor:n.surface.inset,color:n.content.primary,border:`1px solid ${n.boundary.default}`,borderRadius:n.shape.small},".cm-button":{backgroundColor:n.surface.raised,backgroundImage:"none",color:n.content.primary,border:`1px solid ${n.boundary.default}`,borderRadius:n.shape.small},".cm-searchMatch":{backgroundColor:n.accent.muted},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:n.accent.default,color:n.content.onAccent},".cm-source-change":{backgroundColor:k,borderRadius:"2px"},".cm-line:has(.cm-source-change)":{backgroundColor:C},".cm-source-change, .cm-line:has(.cm-source-change)":{animationDuration:`${L}ms`,animationTimingFunction:"ease-out",animationFillMode:"forwards"},".cm-source-deletion":{display:"inline-block",width:"0",position:"relative"},".cm-source-deletion::after":{content:'""',position:"absolute",left:"-2px",bottom:"0",width:"4px",height:"1em",backgroundColor:"inherit",borderRadius:"2px"},".cm-source-change-0":{animationName:"vgai-source-change-even"},".cm-source-change-1":{animationName:"vgai-source-change-odd"},".cm-line:has(.cm-source-change-0)":{animationName:"vgai-source-line-even"},".cm-line:has(.cm-source-change-1)":{animationName:"vgai-source-line-odd"},"@keyframes vgai-source-line-even":{"0%, 40%":{backgroundColor:C},"100%":{backgroundColor:"transparent"}},"@keyframes vgai-source-line-odd":{"0%, 40%":{backgroundColor:C},"100%":{backgroundColor:"transparent"}},"@keyframes vgai-source-change-even":{"0%, 40%":{backgroundColor:k},"100%":{backgroundColor:"transparent"}},"@keyframes vgai-source-change-odd":{"0%, 40%":{backgroundColor:k},"100%":{backgroundColor:"transparent"}},"@media (prefers-reduced-motion: reduce)":{".cm-source-change, .cm-line:has(.cm-source-change)":{animation:"none"}},".cm-matchingBracket, &.cm-focused .cm-matchingBracket":{backgroundColor:n.neutralOverlay.active,outline:`1px solid ${n.boundary.strong}`}},{dark:!0})}function H(e,o,t,r){const c=o==="typescript"?[e.javascript.javascript({typescript:!0,jsx:!0})]:o==="json"?[e.json.json()]:[];return[e.view.lineNumbers(),e.view.highlightSpecialChars(),e.language.bracketMatching(),e.language.syntaxHighlighting(e.oneDark.oneDarkHighlightStyle),e.search.search({top:!0}),e.view.keymap.of([...e.commands.standardKeymap,...e.search.searchKeymap]),e.view.EditorView.lineWrapping,e.state.EditorState.readOnly.of(!0),e.view.EditorView.editable.of(!1),e.view.EditorView.contentAttributes.of({tabindex:"0"}),...c,K(e,t,r)]}function q({value:e,language:o,fontSize:t=11,maxHeight:r,ariaLabel:c,followChanges:s=!1}){const l=m.useRef(null),d=m.useRef(null),g=m.useRef(null),i=m.useRef(null),y=m.useRef(0),f=m.useRef(e);f.current=e;const[p,I]=m.useState(null),[N,$]=m.useState(!1);m.useEffect(()=>{let u=!1;return W().then(h=>{u||I(h)},()=>{u||$(!0)}),()=>{u=!0}},[]),m.useEffect(()=>{const u=l.current;if(!u||!p)return;const h=U(p),w=new p.view.EditorView({parent:u,state:p.state.EditorState.create({doc:f.current,extensions:[H(p,o,t,r),h.field]})});return d.current=w,g.current=h,()=>{i.current!==null&&clearTimeout(i.current),i.current=null,g.current=null,d.current=null,w.destroy()}},[p,o,t,r]),m.useEffect(()=>{const u=d.current;if(!u)return;const h=u.state.toText(e).toString(),w=u.state.doc.toString();if(w===h)return;const{from:x,oldEnd:B,newEnd:D}=G(w,h),O=u.state.changes({from:x,to:B,insert:h.slice(x,D)}),v=g.current,E=[];if(s&&p&&v){const _=u.coordsAtPos(x),j=u.scrollDOM.getBoundingClientRect(),A=_&&_.top>=j.top&&_.bottom<=j.bottom&&_.left>=j.left&&_.right<=j.right?u.scrollSnapshot().map(O):p.view.EditorView.scrollIntoView(x,{y:"nearest",x:"nearest"});A&&E.push(A),E.push(v.mark.of({from:x,to:D,revision:++y.current}))}else v&&E.push(v.mark.of(null));u.dispatch({changes:O,effects:E}),i.current!==null&&clearTimeout(i.current),i.current=null,s&&v&&(i.current=setTimeout(()=>{d.current===u&&u.dispatch({effects:v.mark.of(null)}),i.current=null},L))},[e,s,p]);const V=R(r)?{height:"100%",minHeight:0}:{};return p?a.jsx("div",{ref:l,role:"group","aria-label":c,style:{minWidth:0,...V}}):a.jsxs("div",{role:"group","aria-label":c,style:{minWidth:0,...V},children:[N&&a.jsx("div",{style:{color:n.semantic.warning,fontSize:10,marginBottom:4},children:"Syntax highlighting failed to load — showing plain text."}),a.jsx("pre",{style:{margin:0,fontFamily:n.typography.mono,fontSize:t,lineHeight:1.5,color:n.content.primary,whiteSpace:"pre-wrap",wordBreak:"break-word",overflow:"auto",...r===void 0?{}:{maxHeight:S(r)},...R(r)?{height:S(r)}:{}},children:e})]})}const X={fontSize:11,color:n.content.muted,marginBottom:2};function Y({assetPath:e}){const[o,t]=m.useState(null),[r,c]=m.useState("json"),[s,l]=m.useState(!1),d=e.split("/").pop()??e;return m.useEffect(()=>{let g=!1;return t(null),l(!1),fetch(z(e)).then(i=>i.text()).then(i=>{try{const y=JSON.parse(i);g||(c("json"),t(JSON.stringify(y,null,2)))}catch{g||(c("text"),t(i))}}).catch(()=>{g||l(!0)}),()=>{g=!0}},[e]),a.jsxs("div",{style:{padding:8,display:"flex",flexDirection:"column",gap:8},children:[a.jsx("div",{style:{fontWeight:600,fontSize:12,color:n.content.primary,wordBreak:"break-all"},children:d}),a.jsx("div",{className:"vgai-content-frost",style:{border:`1px solid ${n.boundary.default}`,borderRadius:n.shape.small,padding:8,overflow:"hidden",maxHeight:500},children:s?a.jsx("span",{style:{color:n.semantic.danger,fontSize:11},children:"Failed to load file"}):o===null?a.jsx("span",{style:{color:n.content.muted,fontSize:11},children:"Loading..."}):a.jsx(q,{value:o,language:r,fontSize:10,maxHeight:484,ariaLabel:`Contents of ${d}`})}),a.jsx(F,{label:"Info",defaultOpen:!1,children:a.jsxs("div",{children:[a.jsx("div",{style:X,children:"Path"}),a.jsx("div",{style:{fontSize:11,color:n.content.primary,wordBreak:"break-all"},children:e})]})})]})}function Q({documentId:e,assetPath:o,displayName:t,active:r,sections:c,status:s}){const[l,d]=m.useState({kind:"loading"}),g=M();if(m.useEffect(()=>{if(!r){d({kind:"loading"});return}const i=new AbortController;return d({kind:"loading"}),(async()=>{for(const f of g){const p=await f.recognize(o,i.signal);if(p!==null)return{kind:"content",viewer:f,content:p}}return{kind:"generic"}})().then(f=>{i.signal.aborted||d(f)},f=>{i.signal.aborted||d({kind:"error",message:f instanceof Error?f.message:String(f)})}),()=>i.abort()},[r,o,g]),l.kind==="content"){const{Viewer:i}=l.viewer;return a.jsx(i,{documentId:e,assetPath:o,displayName:t,active:r,content:l.content})}return a.jsx(J,{documentId:e,active:r,type:"json",title:t,sections:c,status:s,children:l.kind==="loading"?a.jsxs("div",{style:{padding:20,color:n.content.muted},children:["Inspecting ",t,"…"]}):l.kind==="error"?a.jsx("div",{role:"alert",style:{padding:20,color:n.semantic.danger},children:l.message}):a.jsx(Y,{assetPath:o})})}const ie=Object.freeze(Object.defineProperty({__proto__:null,JsonAssetDocument:Q},Symbol.toStringTag,{value:"Module"}));export{q as C,Q as J,ie as a,re as c};
@@ -1,4 +1,4 @@
1
- import{h as J,b$ as M,U as G,g as X,bZ as B,aM as Y,aY as I,c0 as O,c1 as _,c2 as Z,u as C,s as V,V as y,M as K,a0 as E,bi as Q,a as ee,r as te}from"./three.module-D396a9Mn.js";B.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new X(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};M.line={uniforms:G.merge([B.common,B.fog,B.line]),vertexShader:`
1
+ import{h as X,c1 as M,U as G,g as $,c0 as B,aJ as K,aV as I,c2 as O,c3 as _,c4 as Q,j as C,p as V,V as y,M as Y,G as E,bf as Z,a as ee,o as te}from"./three.module-IFn-4i31.js";B.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new $(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};M.line={uniforms:G.merge([B.common,B.fog,B.line]),vertexShader:`
2
2
  #include <common>
3
3
  #include <color_pars_vertex>
4
4
  #include <fog_pars_vertex>
@@ -367,4 +367,4 @@ import{h as J,b$ as M,U as G,g as X,bZ as B,aM as Y,aY as I,c0 as O,c1 as _,c2 a
367
367
  #include <premultiplied_alpha_fragment>
368
368
 
369
369
  }
370
- `};class ie extends J{constructor(e){super({type:"LineMaterial",uniforms:G.clone(M.line.uniforms),vertexShader:M.line.vertexShader,fragmentShader:M.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const j=new C,z=new y;class ne extends Y{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new I(e,3)),this.setAttribute("uv",new I(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,i=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),i.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new O(t,6,1);return this.setAttribute("instanceStart",new _(i,3,0)),this.setAttribute("instanceEnd",new _(i,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new O(t,6,1);return this.setAttribute("instanceColorStart",new _(i,3,0)),this.setAttribute("instanceColorEnd",new _(i,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new Z(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new C);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),j.setFromBufferAttribute(t),this.boundingBox.union(j))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new V),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let s=0;for(let r=0,l=e.count;r<l;r++)z.fromBufferAttribute(e,r),s=Math.max(s,i.distanceToSquared(z)),z.fromBufferAttribute(t,r),s=Math.max(s,i.distanceToSquared(z));this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}const L=new E,H=new y,R=new y,a=new E,o=new E,m=new E,D=new y,T=new ee,d=new Q,N=new y,U=new C,A=new V,v=new E;let g,x;function F(c,e,t){return v.set(0,0,-e,1).applyMatrix4(c.projectionMatrix),v.multiplyScalar(1/v.w),v.x=x/t.width,v.y=x/t.height,v.applyMatrix4(c.projectionMatrixInverse),v.multiplyScalar(1/v.w),Math.abs(Math.max(v.x,v.y))}function se(c,e){const t=c.matrixWorld,i=c.geometry,s=i.attributes.instanceStart,r=i.attributes.instanceEnd,l=Math.min(i.instanceCount,s.count);for(let n=0,f=l;n<f;n++){d.start.fromBufferAttribute(s,n),d.end.fromBufferAttribute(r,n),d.applyMatrix4(t);const p=new y,h=new y;g.distanceSqToSegment(d.start,d.end,h,p),h.distanceTo(p)<x*.5&&e.push({point:h,pointOnLine:p,distance:g.origin.distanceTo(h),object:c,face:null,faceIndex:n,uv:null,uv1:null})}}function re(c,e,t){const i=e.projectionMatrix,r=c.material.resolution,l=c.matrixWorld,n=c.geometry,f=n.attributes.instanceStart,p=n.attributes.instanceEnd,h=Math.min(n.instanceCount,f.count),u=-e.near;g.at(1,m),m.w=1,m.applyMatrix4(e.matrixWorldInverse),m.applyMatrix4(i),m.multiplyScalar(1/m.w),m.x*=r.x/2,m.y*=r.y/2,m.z=0,D.copy(m),T.multiplyMatrices(e.matrixWorldInverse,l);for(let S=0,q=h;S<q;S++){if(a.fromBufferAttribute(f,S),o.fromBufferAttribute(p,S),a.w=1,o.w=1,a.applyMatrix4(T),o.applyMatrix4(T),a.z>u&&o.z>u)continue;if(a.z>u){const b=a.z-o.z,w=(a.z-u)/b;a.lerp(o,w)}else if(o.z>u){const b=o.z-a.z,w=(o.z-u)/b;o.lerp(a,w)}a.applyMatrix4(i),o.applyMatrix4(i),a.multiplyScalar(1/a.w),o.multiplyScalar(1/o.w),a.x*=r.x/2,a.y*=r.y/2,o.x*=r.x/2,o.y*=r.y/2,d.start.copy(a),d.start.z=0,d.end.copy(o),d.end.z=0;const P=d.closestPointToPointParameter(D,!0);d.at(P,N);const W=te.lerp(a.z,o.z,P),k=W>=-1&&W<=1,$=D.distanceTo(N)<x*.5;if(k&&$){d.start.fromBufferAttribute(f,S),d.end.fromBufferAttribute(p,S),d.start.applyMatrix4(l),d.end.applyMatrix4(l);const b=new y,w=new y;g.distanceSqToSegment(d.start,d.end,w,b),t.push({point:w,pointOnLine:b,distance:g.origin.distanceTo(w),object:c,face:null,faceIndex:S,uv:null,uv1:null})}}}class de extends K{constructor(e=new ne,t=new ie({color:Math.random()*16777215})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,i=e.attributes.instanceEnd,s=new Float32Array(2*t.count);for(let l=0,n=0,f=t.count;l<f;l++,n+=2)H.fromBufferAttribute(t,l),R.fromBufferAttribute(i,l),s[n]=n===0?0:s[n-1],s[n+1]=s[n]+H.distanceTo(R);const r=new O(s,2,1);return e.setAttribute("instanceDistanceStart",new _(r,1,0)),e.setAttribute("instanceDistanceEnd",new _(r,1,1)),this}raycast(e,t){const i=this.material.worldUnits,s=e.camera;s===null&&!i&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const r=e.params.Line2!==void 0&&e.params.Line2.threshold||0;g=e.ray;const l=this.matrixWorld,n=this.geometry,f=this.material;x=f.linewidth+r,n.boundingSphere===null&&n.computeBoundingSphere(),A.copy(n.boundingSphere).applyMatrix4(l);let p;if(i)p=x*.5;else{const u=Math.max(s.near,A.distanceToPoint(g.origin));p=F(s,u,f.resolution)}if(A.radius+=p,g.intersectsSphere(A)===!1)return;n.boundingBox===null&&n.computeBoundingBox(),U.copy(n.boundingBox).applyMatrix4(l);let h;if(i)h=x*.5;else{const u=Math.max(s.near,U.distanceToPoint(g.origin));h=F(s,u,f.resolution)}U.expandByScalar(h),g.intersectsBox(U)!==!1&&(i?se(this,t):re(this,s,t))}onBeforeRender(e){const t=this.material.uniforms;t&&t.resolution&&(e.getViewport(L),this.material.uniforms.resolution.value.set(L.z,L.w))}}export{de as L,ne as a,ie as b};
370
+ `};class ie extends X{constructor(e){super({type:"LineMaterial",uniforms:G.clone(M.line.uniforms),vertexShader:M.line.vertexShader,fragmentShader:M.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const j=new C,z=new y;class ne extends K{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new I(e,3)),this.setAttribute("uv",new I(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,i=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),i.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new O(t,6,1);return this.setAttribute("instanceStart",new _(i,3,0)),this.setAttribute("instanceEnd",new _(i,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new O(t,6,1);return this.setAttribute("instanceColorStart",new _(i,3,0)),this.setAttribute("instanceColorEnd",new _(i,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new Q(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new C);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),j.setFromBufferAttribute(t),this.boundingBox.union(j))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new V),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let s=0;for(let r=0,l=e.count;r<l;r++)z.fromBufferAttribute(e,r),s=Math.max(s,i.distanceToSquared(z)),z.fromBufferAttribute(t,r),s=Math.max(s,i.distanceToSquared(z));this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}const L=new E,H=new y,R=new y,a=new E,o=new E,m=new E,D=new y,T=new ee,d=new Z,N=new y,U=new C,A=new V,v=new E;let g,x;function F(c,e,t){return v.set(0,0,-e,1).applyMatrix4(c.projectionMatrix),v.multiplyScalar(1/v.w),v.x=x/t.width,v.y=x/t.height,v.applyMatrix4(c.projectionMatrixInverse),v.multiplyScalar(1/v.w),Math.abs(Math.max(v.x,v.y))}function se(c,e){const t=c.matrixWorld,i=c.geometry,s=i.attributes.instanceStart,r=i.attributes.instanceEnd,l=Math.min(i.instanceCount,s.count);for(let n=0,f=l;n<f;n++){d.start.fromBufferAttribute(s,n),d.end.fromBufferAttribute(r,n),d.applyMatrix4(t);const p=new y,h=new y;g.distanceSqToSegment(d.start,d.end,h,p),h.distanceTo(p)<x*.5&&e.push({point:h,pointOnLine:p,distance:g.origin.distanceTo(h),object:c,face:null,faceIndex:n,uv:null,uv1:null})}}function re(c,e,t){const i=e.projectionMatrix,r=c.material.resolution,l=c.matrixWorld,n=c.geometry,f=n.attributes.instanceStart,p=n.attributes.instanceEnd,h=Math.min(n.instanceCount,f.count),u=-e.near;g.at(1,m),m.w=1,m.applyMatrix4(e.matrixWorldInverse),m.applyMatrix4(i),m.multiplyScalar(1/m.w),m.x*=r.x/2,m.y*=r.y/2,m.z=0,D.copy(m),T.multiplyMatrices(e.matrixWorldInverse,l);for(let S=0,q=h;S<q;S++){if(a.fromBufferAttribute(f,S),o.fromBufferAttribute(p,S),a.w=1,o.w=1,a.applyMatrix4(T),o.applyMatrix4(T),a.z>u&&o.z>u)continue;if(a.z>u){const b=a.z-o.z,w=(a.z-u)/b;a.lerp(o,w)}else if(o.z>u){const b=o.z-a.z,w=(o.z-u)/b;o.lerp(a,w)}a.applyMatrix4(i),o.applyMatrix4(i),a.multiplyScalar(1/a.w),o.multiplyScalar(1/o.w),a.x*=r.x/2,a.y*=r.y/2,o.x*=r.x/2,o.y*=r.y/2,d.start.copy(a),d.start.z=0,d.end.copy(o),d.end.z=0;const P=d.closestPointToPointParameter(D,!0);d.at(P,N);const W=te.lerp(a.z,o.z,P),k=W>=-1&&W<=1,J=D.distanceTo(N)<x*.5;if(k&&J){d.start.fromBufferAttribute(f,S),d.end.fromBufferAttribute(p,S),d.start.applyMatrix4(l),d.end.applyMatrix4(l);const b=new y,w=new y;g.distanceSqToSegment(d.start,d.end,w,b),t.push({point:w,pointOnLine:b,distance:g.origin.distanceTo(w),object:c,face:null,faceIndex:S,uv:null,uv1:null})}}}class de extends Y{constructor(e=new ne,t=new ie({color:Math.random()*16777215})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,i=e.attributes.instanceEnd,s=new Float32Array(2*t.count);for(let l=0,n=0,f=t.count;l<f;l++,n+=2)H.fromBufferAttribute(t,l),R.fromBufferAttribute(i,l),s[n]=n===0?0:s[n-1],s[n+1]=s[n]+H.distanceTo(R);const r=new O(s,2,1);return e.setAttribute("instanceDistanceStart",new _(r,1,0)),e.setAttribute("instanceDistanceEnd",new _(r,1,1)),this}raycast(e,t){const i=this.material.worldUnits,s=e.camera;s===null&&!i&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const r=e.params.Line2!==void 0&&e.params.Line2.threshold||0;g=e.ray;const l=this.matrixWorld,n=this.geometry,f=this.material;x=f.linewidth+r,n.boundingSphere===null&&n.computeBoundingSphere(),A.copy(n.boundingSphere).applyMatrix4(l);let p;if(i)p=x*.5;else{const u=Math.max(s.near,A.distanceToPoint(g.origin));p=F(s,u,f.resolution)}if(A.radius+=p,g.intersectsSphere(A)===!1)return;n.boundingBox===null&&n.computeBoundingBox(),U.copy(n.boundingBox).applyMatrix4(l);let h;if(i)h=x*.5;else{const u=Math.max(s.near,U.distanceToPoint(g.origin));h=F(s,u,f.resolution)}U.expandByScalar(h),g.intersectsBox(U)!==!1&&(i?se(this,t):re(this,s,t))}onBeforeRender(e){const t=this.material.uniforms;t&&t.resolution&&(e.getViewport(L),this.material.uniforms.resolution.value.set(L.z,L.w))}}export{de as L,ne as a,ie as b};
@@ -0,0 +1 @@
1
+ import{a as n}from"./jsx-runtime-DPjLkJKQ.js";import{fY as U,fZ as V,ap as g,b7 as P,bH as X,bp as $,f_ as Y,f$ as Z,X as G,g0 as J,g1 as K}from"./index-Ckxb31Yz.js";import{r as p}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{O as Q}from"./Object3DDocumentViewport-DFHqru3a.js";import{S as ee}from"./standard-viewport-dressing-GUUr6GuK.js";import{aU as te,j as re}from"./three.module-IFn-4i31.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./viewport-surface-status-BFmnWp7z.js";class v extends Error{constructor(t){super(t.message),this.refusal=t,this.name="LiveModuleError"}}function oe(e){return Object.keys(e).filter(t=>t!=="__esModule"&&t!=="Symbol.toStringTag")}function S(e){return typeof e=="object"&&e!==null&&e.isObject3D===!0}function ne(e){if("default"in e)return{name:"default",value:e.default};const t=oe(e);return t.length===0?{kind:"not-a-model",message:"This module exports nothing."}:t.length>1?{kind:"not-a-model",message:`This module has no default export and ${t.length} named exports (${t.join(", ")}), so there is no single subject to build. A model module default-exports its builder.`}:{name:t[0],value:e[t[0]]}}function T(e){if(S(e))return{root:e};if(!e||typeof e!="object")return;const t=e;if(!S(t.root))return;const r=t.root;return Array.isArray(t.animations)&&r.animations.length===0&&(r.animations=t.animations),{root:r,...typeof t.dispose=="function"?{dispose:()=>t.dispose.call(e)}:{}}}function L(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e!="object")return typeof e;if(Array.isArray(e))return"an array";const t=Object.keys(e);return t.length>0?`an object with keys ${t.slice(0,8).join(", ")}`:"an object with no own keys"}const R="a model module returns a THREE.Object3D, or a build result `{ root, animations?, dispose? }` whose `root` is one.";async function se(e,t){const r=T(t);if(r)return{...r,exportName:e};if(typeof t!="function")return{kind:"not-a-model",message:`Export '${e}' is ${L(t)}, not a function and not a model — `+R};let l;try{l=await t()}catch(s){return{kind:"import-failed",message:`Export '${e}' threw while building: ${N(s)}`,...s instanceof Error&&s.stack?{stack:s.stack}:{}}}const c=T(l);return c?{...c,exportName:e}:{kind:"not-a-model",message:`Export '${e}' ran but returned ${L(l)} — ${R}`}}function N(e){return e instanceof Error?e.message:String(e)}async function ie(e,t,r){let l;try{l=await import(U(e,t,r))}catch(u){throw new v({kind:"import-failed",message:N(u),...u instanceof Error&&u.stack?{stack:u.stack}:{}})}const c=ne(l);if("kind"in c)throw new v(c);const s=await se(c.name,c.value);if("kind"in s)throw new v(s);return s}const C={height:"100%",width:"100%",minHeight:0,display:"flex",position:"relative"},F={flex:1,minWidth:0,minHeight:0,display:"flex"};function ae(e,t){if(e.kind!=="import-failed")return{message:e.message};const r=K(t);return r?{message:r,stack:e.message}:{message:e.message,stack:e.stack}}function je({documentId:e,projectRoot:t,modulePath:r,displayName:l,active:c,fallback:s}){const[u,w]=p.useState({status:"probing"}),[h,E]=p.useState(null),d=p.useMemo(()=>{const i=new te;return i.name=r.split("/").pop()??r,i},[r]),D=p.useRef(!1);p.useEffect(()=>{let i=!1,y=0,f=null,m=Promise.resolve(),x=null,k=null;const M=()=>{f&&(d.remove(f),d.animations=[],k?k():$(f),f=null,k=null)},B=(o,b)=>{M(),f=o,k=b,d.add(o),d.animations=o.animations,J(e)},I=(o,b)=>{if(o.kind==="not-a-model"&&!b){w({status:"fallback",reason:o.message});return}const a=ae(o,r);E(a),G.error(`${r}: ${a.message}`,"live-module"),b||w({status:"fallback",reason:o.message})},A=o=>i||o!==y,W=async()=>{y+=1;const o=y,b=Z();let a;try{a=await ie(t,r,b)}catch(j){if(A(o))return;if(!(j instanceof v))throw j;x=j,I(j.refusal,f!==null);return}if(A(o)){a.dispose?a.dispose():$(a.root);return}B(a.root,a.dispose??null),x=null,Y(r),E(null),w({status:"live",exportName:a.exportName})},O=()=>(m=W(),m),q=V(e,async()=>{let o=O();for(;;){if(await o,i)throw new Error(`Document closed while rebuilding: ${r}`);if(o===m)break;o=m}if(x)throw x});O();const z=P();return()=>{i=!0,q(),z(),M()}},[d,e,r,t]),p.useEffect(()=>{if(u.status!=="live"||D.current)return;let i=0,y=0;const f=()=>{const m=X(e);if(m){D.current=!0,new re().setFromObject(d).isEmpty()||m.frame();return}++y>60||(i=requestAnimationFrame(f))};return i=requestAnimationFrame(f),()=>cancelAnimationFrame(i)},[d,e,u.status]);const _=p.useCallback(()=>({root:d,dispose(){}}),[d]);return u.status==="probing"?n.jsxs("div",{style:{padding:20,color:g.content.muted},children:["Inspecting ",l,"…"]}):u.status==="fallback"?n.jsxs("div",{style:C,children:[h?n.jsx(H,{failure:h}):null,n.jsx("div",{style:{...F,overflow:"auto"},children:s})]}):n.jsxs("div",{style:C,children:[n.jsx("div",{style:{...F,opacity:h?.35:1},children:n.jsx(Q,{documentId:e,sourcePath:r,displayName:l,build:_,active:c,assetType:"model module",cameraDirection:ee,modelSource:{kind:"project-file",path:r}})}),h?n.jsx(H,{failure:h}):null]})}function H({failure:e}){return n.jsxs("div",{role:"alert","data-testid":"live-module-error",style:{position:"absolute",top:8,left:8,right:8,zIndex:2,maxHeight:"60%",overflow:"auto",padding:"8px 10px",borderRadius:g.shape.small,background:g.surface.raised,border:`1px solid ${g.semantic.danger}`,color:g.semantic.danger,fontFamily:g.typography.mono,fontSize:11,lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-word",pointerEvents:"auto"},children:[n.jsx("div",{style:{fontWeight:600},children:"This module did not build — showing the last good model."}),n.jsx("div",{style:{marginTop:4},children:e.message}),e.stack?n.jsx("div",{style:{marginTop:6,color:g.content.muted},children:e.stack}):null]})}export{je as LiveModuleDocument};
@@ -0,0 +1 @@
1
+ import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{bv as U,fW as A,bx as N,by as I,ap as y,b4 as M,di as k,bB as C,aR as B}from"./index-Ckxb31Yz.js";import{r as w}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{EffectComposer as F,LUT3DEffect as P,RenderPass as O,EffectPass as _}from"./index-DUh02lTr.js";import{ae as $,Y as T,af as G,V as L,ad as H,a0 as R,ag as v,W as V,r as W,s as q,t as X,v as D,u as Z,bC as Y,bA as J,y as j,z as K,B as Q,w as ee,M as te}from"./three.module-IFn-4i31.js";import{s as re}from"./asset-editor-persistence-BVtzjadu.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";class ne extends ${constructor(t){super(t),this.type=T}setType(t){return this.type=t,this}load(t,a,f,g){const n=new G(this.manager);n.setPath(this.path),n.setResponseType("text"),n.load(t,c=>{try{a(this.parse(c))}catch(e){g?g(e):console.error(e),this.manager.itemError(t)}},f,g)}parse(t){const a=/TITLE +"([^"]*)"/,f=/LUT_3D_SIZE +(\d+)/,g=/DOMAIN_MIN +([\d.]+) +([\d.]+) +([\d.]+)/,n=/DOMAIN_MAX +([\d.]+) +([\d.]+) +([\d.]+)/,c=/^([\d.e+-]+) +([\d.e+-]+) +([\d.e+-]+) *$/gm;let e=a.exec(t);const p=e!==null?e[1]:null;if(e=f.exec(t),e===null)throw new Error("LUTCubeLoader: Missing LUT_3D_SIZE information");const s=Number(e[1]),u=s**3*4,o=this.type===T?new Uint8Array(u):new Float32Array(u),d=new L(0,0,0),m=new L(1,1,1);if(e=g.exec(t),e!==null&&d.set(Number(e[1]),Number(e[2]),Number(e[3])),e=n.exec(t),e!==null&&m.set(Number(e[1]),Number(e[2]),Number(e[3])),d.x>m.x||d.y>m.y||d.z>m.z)throw new Error("LUTCubeLoader: Invalid input domain");const x=this.type===T?255:1;let h=0;for(;(e=c.exec(t))!==null;)o[h++]=Number(e[1])*x,o[h++]=Number(e[2])*x,o[h++]=Number(e[3])*x,o[h++]=x;const l=new H;return l.image.data=o,l.image.width=s,l.image.height=s,l.image.depth=s,l.type=this.type,l.magFilter=R,l.minFilter=R,l.wrapS=v,l.wrapT=v,l.wrapR=v,l.generateMipmaps=!1,l.needsUpdate=!0,{title:p,size:s,domainMin:d,domainMax:m,texture3D:l}}}function b(r){return r.split("/").pop()??r}function E(r,t,a){return Math.min(a,Math.max(t,r))}function z(r){return[r.x,r.y,r.z].map(t=>t.toFixed(2)).join(", ")}function se(){const r=new X;r.background=new D("#171a22");const t=new Z(34,1,.1,100);t.position.set(6.6,4.6,8.8),t.lookAt(0,.7,0),r.add(new Y("#dce8ff","#322a27",2.1));const a=new J("#fff3db",3.8);a.position.set(4,7,5),r.add(a);const f=[],g=[],n=(s,u,o)=>{f.push(s),g.push(u);const d=new te(s,u);return d.position.set(...o),d.castShadow=!0,d.receiveShadow=!0,r.add(d),d},c=[["#e64d45",-2.4],["#e5ad42",-1.2],["#55b86a",0],["#47a9d8",1.2],["#8a68d7",2.4]];for(const[s,u]of c)n(new K(.48,48,32),new j({color:s,roughness:.3,metalness:.08}),[u,.65,0]);[.06,.18,.5,.82,1].forEach((s,u)=>{const o=Math.round(s*255);n(new Q(.78,.78,.78),new j({color:new D(`rgb(${o}, ${o}, ${o})`),roughness:.72}),[-2.4+u*1.2,1.85,-.1])});const p=n(new ee(9,6),new j({color:"#777b86",roughness:.92}),[0,.08,-1.8]);return p.rotation.x=-Math.PI/2,{scene:r,camera:t,dispose:()=>{for(const s of f)s.dispose();for(const s of g)s.dispose()}}}function oe({lut:r,settingsRef:t}){const a=w.useRef(null);return w.useEffect(()=>{const f=a.current;if(!f)return;let g=!1,n=0;const c=document.createElement("canvas");c.setAttribute("aria-label","LUT before and after preview"),c.style.width="100%",c.style.height="100%",c.style.display="block",f.replaceChildren(c);const e=new V({canvas:c,antialias:!0});e.outputColorSpace=W,e.toneMapping=q,e.toneMappingExposure=1,e.shadowMap.enabled=!0;const p=se(),s=new F(e),u=new P(r.texture3D,{tetrahedralInterpolation:!0});s.addPass(new O(p.scene,p.camera)),s.addPass(new _(p.camera,u));const o={width:1,height:1},d=()=>{const l=t.current,S=Math.round(o.width*E(l.split,.05,.95));u.blendMode.opacity.value=E(l.intensity,0,1),u.tetrahedralInterpolation=l.tetrahedral,e.setScissorTest(!1),e.setRenderTarget(null),e.clear(),e.setScissorTest(!0),e.setScissor(0,0,S,o.height),e.render(p.scene,p.camera),e.setScissor(S,0,o.width-S,o.height),s.render(),e.setScissorTest(!1)},m=()=>{const l=f.getBoundingClientRect();o.width=Math.max(1,Math.floor(l.width)),o.height=Math.max(1,Math.floor(l.height)),e.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),e.setSize(o.width,o.height,!1),s.setSize(o.width,o.height),p.camera.aspect=o.width/o.height,p.camera.updateProjectionMatrix()};m(),d();const x=new ResizeObserver(()=>{m(),d()});x.observe(f);const h=()=>{g||(d(),n=requestAnimationFrame(h))};return n=requestAnimationFrame(h),()=>{g=!0,cancelAnimationFrame(n),x.disconnect(),s.dispose(),u.dispose(),p.dispose(),e.dispose(),c.remove()}},[r,t]),i.jsx("div",{ref:a,"data-testid":"lut-preview",style:{width:"100%",height:"100%",minHeight:260,background:"#171a22"}})}function ie({settings:r,onChange:t}){return i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,padding:4},children:[i.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:5,fontSize:11},children:["Intensity",i.jsx(C,{value:r.intensity,onChange:a=>t({...r,intensity:E(a,0,1)}),step:.01,precision:2})]}),i.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:5,fontSize:11},children:["Comparison split",i.jsx(C,{value:r.split,onChange:a=>t({...r,split:E(a,.05,.95)}),step:.01,precision:2})]}),i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:7,fontSize:11},children:[i.jsx(B,{checked:r.tetrahedral,onChange:a=>t({...r,tetrahedral:a.target.checked})}),"Tetrahedral interpolation"]}),i.jsx("div",{style:{color:y.content.muted,fontSize:10,lineHeight:1.45},children:"Preview controls are session-only. Bind the LUT and accepted intensity in the owning TSX post-processing composition."})]})}async function ae(r){const t=await k(r);if(t===null)throw new Error(`CUBE LUT not found: ${r}`);return new ne().parse(t)}function be({documentId:r,assetPath:t,active:a=!0}){const[f,g]=w.useState(0),[n,c]=w.useState(null),[e,p]=w.useState(null),[s,u]=w.useState({intensity:1,split:.5,tetrahedral:!0}),o=w.useRef(s);o.current=s,w.useEffect(()=>{if(a)return re(t,()=>g(m=>m+1))},[a,t]),w.useEffect(()=>{if(!a)return;let m=!1,x=null;return c(null),p(null),ae(t).then(h=>{if(x=h,m){h.texture3D.dispose();return}c(h)},h=>{m||p(h instanceof Error?h.message:String(h))}),()=>{m=!0,x?.texture3D.dispose()}},[a,t,f]);const d=w.useMemo(()=>[{id:"lut-profile",title:"Color Grade",icon:A,order:U,body:{kind:"custom",...n?{data:{title:n.title,size:n.size,domainMin:n.domainMin.toArray(),domainMax:n.domainMax.toArray()}}:{},render:()=>i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"auto 1fr",gap:"6px 10px"},children:[i.jsx("span",{style:{color:y.content.muted},children:"Title"}),i.jsx("span",{children:n?.title||b(t)}),i.jsx("span",{style:{color:y.content.muted},children:"Cube"}),i.jsx("span",{children:n?`${n.size}³`:"—"}),i.jsx("span",{style:{color:y.content.muted},children:"Domain"}),i.jsx("span",{children:n?`${z(n.domainMin)} → ${z(n.domainMax)}`:"—"})]})}},{id:"lut-preview-settings",title:"Preview",icon:I,order:N,body:{kind:"custom",data:{...s},render:()=>i.jsx(ie,{settings:s,onChange:u})}}],[t,n,s]);return e?i.jsx(M,{documentId:r,active:a,type:"color grade",title:b(t),status:"CUBE LUT unavailable",children:i.jsx("div",{role:"alert",style:{padding:20,color:y.semantic.danger},children:e})}):n?i.jsx(M,{documentId:r,active:a,type:"color grade",title:b(t),sections:d,status:`CUBE LUT · ${n.size}³`,fill:!0,children:i.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",minHeight:0,background:"#171a22"},children:[i.jsx(oe,{lut:n,settingsRef:o}),i.jsx("div",{style:{position:"absolute",left:12,top:12,padding:"4px 7px",borderRadius:4,background:"rgba(12,14,20,0.72)",color:"#f2f4f8",fontSize:10,pointerEvents:"none"},children:"Original"}),i.jsx("div",{style:{position:"absolute",right:12,top:12,padding:"4px 7px",borderRadius:4,background:"rgba(12,14,20,0.72)",color:"#f2f4f8",fontSize:10,pointerEvents:"none"},children:n.title||"Graded"})]})}):i.jsx(M,{documentId:r,active:a,type:"color grade",title:b(t),status:"Loading CUBE LUT",children:i.jsx("div",{style:{padding:20,color:y.content.muted},children:"Loading color grade…"})})}export{be as LutAssetDocument};
@@ -1,2 +1,2 @@
1
- import{ak as b,b2 as w,al as M,aq as x,a2 as F,b3 as d,C as u,j as f,a$ as O,g,b4 as y,e as C}from"./three.module-D396a9Mn.js";class A extends b{constructor(s){super(s)}load(s,o,p,e){const a=this,n=this.path===""?w.extractUrlBase(s):this.path,r=new M(this.manager);r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(s,function(t){try{o(a.parse(t,n))}catch(i){e?e(i):console.error(i),a.manager.itemError(s)}},p,e)}setMaterialOptions(s){return this.materialOptions=s,this}parse(s,o){const p=s.split(`
2
- `);let e={};const a=/\s+/,n={};for(let t=0;t<p.length;t++){let i=p[t];if(i=i.trim(),i.length===0||i.charAt(0)==="#")continue;const c=i.indexOf(" ");let l=c>=0?i.substring(0,c):i;l=l.toLowerCase();let h=c>=0?i.substring(c+1):"";if(h=h.trim(),l==="newmtl")e={name:h},n[h]=e;else if(l==="ka"||l==="kd"||l==="ks"||l==="ke"){const m=h.split(a,3);e[l]=[parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])]}else e[l]=h}const r=new L(this.resourcePath||o,this.materialOptions);return r.setCrossOrigin(this.crossOrigin),r.setManager(this.manager),r.setMaterials(n),r}}class L{constructor(s="",o={}){this.baseUrl=s,this.options=o,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:x,this.wrap=this.options.wrap!==void 0?this.options.wrap:F}setCrossOrigin(s){return this.crossOrigin=s,this}setManager(s){this.manager=s}setMaterials(s){this.materialsInfo=this.convert(s),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(s){if(!this.options)return s;const o={};for(const p in s){const e=s[p],a={};o[p]=a;for(const n in e){let r=!0,t=e[n];const i=n.toLowerCase();switch(i){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(t=[t[0]/255,t[1]/255,t[2]/255]),this.options&&this.options.ignoreZeroRGBs&&t[0]===0&&t[1]===0&&t[2]===0&&(r=!1);break}r&&(a[i]=t)}}return o}preload(){for(const s in this.materialsInfo)this.create(s)}getIndex(s){return this.nameLookup[s]}getAsArray(){let s=0;for(const o in this.materialsInfo)this.materialsArray[s]=this.create(o),this.nameLookup[o]=s,s++;return this.materialsArray}create(s){return this.materials[s]===void 0&&this.createMaterial_(s),this.materials[s]}createMaterial_(s){const o=this,p=this.materialsInfo[s],e={name:s,side:this.side};function a(r,t){return typeof t!="string"||t===""?"":/^https?:\/\//i.test(t)?t:r+t}function n(r,t){if(e[r])return;const i=o.getTextureParams(t,e),c=o.loadTexture(a(o.baseUrl,i.url));c.repeat.copy(i.scale),c.offset.copy(i.offset),c.wrapS=o.wrap,c.wrapT=o.wrap,(r==="map"||r==="emissiveMap")&&(c.colorSpace=f),e[r]=c}for(const r in p){const t=p[r];let i;if(t!=="")switch(r.toLowerCase()){case"kd":e.color=d.colorSpaceToWorking(new u().fromArray(t),f);break;case"ks":e.specular=d.colorSpaceToWorking(new u().fromArray(t),f);break;case"ke":e.emissive=d.colorSpaceToWorking(new u().fromArray(t),f);break;case"map_kd":n("map",t);break;case"map_ks":n("specularMap",t);break;case"map_ke":n("emissiveMap",t);break;case"norm":n("normalMap",t);break;case"map_bump":case"bump":n("bumpMap",t);break;case"disp":n("displacementMap",t);break;case"map_d":n("alphaMap",t),e.transparent=!0;break;case"ns":e.shininess=parseFloat(t);break;case"d":i=parseFloat(t),i<1&&(e.opacity=i,e.transparent=!0);break;case"tr":i=parseFloat(t),this.options&&this.options.invertTrProperty&&(i=1-i),i>0&&(e.opacity=1-i,e.transparent=!0);break}}return this.materials[s]=new O(e),this.materials[s]}getTextureParams(s,o){const p={scale:new g(1,1),offset:new g(0,0)},e=s.split(/\s+/);let a;return a=e.indexOf("-bm"),a>=0&&(o.bumpScale=parseFloat(e[a+1]),e.splice(a,2)),a=e.indexOf("-mm"),a>=0&&(o.displacementBias=parseFloat(e[a+1]),o.displacementScale=parseFloat(e[a+2]),e.splice(a,3)),a=e.indexOf("-s"),a>=0&&(p.scale.set(parseFloat(e[a+1]),parseFloat(e[a+2])),e.splice(a,4)),a=e.indexOf("-o"),a>=0&&(p.offset.set(parseFloat(e[a+1]),parseFloat(e[a+2])),e.splice(a,4)),p.url=e.join(" ").trim(),p}loadTexture(s,o,p,e,a){const n=this.manager!==void 0?this.manager:y;let r=n.getHandler(s);r===null&&(r=new C(n)),r.setCrossOrigin&&r.setCrossOrigin(this.crossOrigin);const t=r.load(s,p,e,a);return o!==void 0&&(t.mapping=o),t}}export{A as MTLLoader};
1
+ import{ae as b,a$ as w,af as M,am as x,I as F,b0 as d,v as u,r as f,aY as O,g,b1 as y,e as L}from"./three.module-IFn-4i31.js";class A extends b{constructor(s){super(s)}load(s,o,p,e){const a=this,n=this.path===""?w.extractUrlBase(s):this.path,r=new M(this.manager);r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(s,function(t){try{o(a.parse(t,n))}catch(i){e?e(i):console.error(i),a.manager.itemError(s)}},p,e)}setMaterialOptions(s){return this.materialOptions=s,this}parse(s,o){const p=s.split(`
2
+ `);let e={};const a=/\s+/,n={};for(let t=0;t<p.length;t++){let i=p[t];if(i=i.trim(),i.length===0||i.charAt(0)==="#")continue;const c=i.indexOf(" ");let l=c>=0?i.substring(0,c):i;l=l.toLowerCase();let h=c>=0?i.substring(c+1):"";if(h=h.trim(),l==="newmtl")e={name:h},n[h]=e;else if(l==="ka"||l==="kd"||l==="ks"||l==="ke"){const m=h.split(a,3);e[l]=[parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])]}else e[l]=h}const r=new v(this.resourcePath||o,this.materialOptions);return r.setCrossOrigin(this.crossOrigin),r.setManager(this.manager),r.setMaterials(n),r}}class v{constructor(s="",o={}){this.baseUrl=s,this.options=o,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:x,this.wrap=this.options.wrap!==void 0?this.options.wrap:F}setCrossOrigin(s){return this.crossOrigin=s,this}setManager(s){this.manager=s}setMaterials(s){this.materialsInfo=this.convert(s),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(s){if(!this.options)return s;const o={};for(const p in s){const e=s[p],a={};o[p]=a;for(const n in e){let r=!0,t=e[n];const i=n.toLowerCase();switch(i){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(t=[t[0]/255,t[1]/255,t[2]/255]),this.options&&this.options.ignoreZeroRGBs&&t[0]===0&&t[1]===0&&t[2]===0&&(r=!1);break}r&&(a[i]=t)}}return o}preload(){for(const s in this.materialsInfo)this.create(s)}getIndex(s){return this.nameLookup[s]}getAsArray(){let s=0;for(const o in this.materialsInfo)this.materialsArray[s]=this.create(o),this.nameLookup[o]=s,s++;return this.materialsArray}create(s){return this.materials[s]===void 0&&this.createMaterial_(s),this.materials[s]}createMaterial_(s){const o=this,p=this.materialsInfo[s],e={name:s,side:this.side};function a(r,t){return typeof t!="string"||t===""?"":/^https?:\/\//i.test(t)?t:r+t}function n(r,t){if(e[r])return;const i=o.getTextureParams(t,e),c=o.loadTexture(a(o.baseUrl,i.url));c.repeat.copy(i.scale),c.offset.copy(i.offset),c.wrapS=o.wrap,c.wrapT=o.wrap,(r==="map"||r==="emissiveMap")&&(c.colorSpace=f),e[r]=c}for(const r in p){const t=p[r];let i;if(t!=="")switch(r.toLowerCase()){case"kd":e.color=d.colorSpaceToWorking(new u().fromArray(t),f);break;case"ks":e.specular=d.colorSpaceToWorking(new u().fromArray(t),f);break;case"ke":e.emissive=d.colorSpaceToWorking(new u().fromArray(t),f);break;case"map_kd":n("map",t);break;case"map_ks":n("specularMap",t);break;case"map_ke":n("emissiveMap",t);break;case"norm":n("normalMap",t);break;case"map_bump":case"bump":n("bumpMap",t);break;case"disp":n("displacementMap",t);break;case"map_d":n("alphaMap",t),e.transparent=!0;break;case"ns":e.shininess=parseFloat(t);break;case"d":i=parseFloat(t),i<1&&(e.opacity=i,e.transparent=!0);break;case"tr":i=parseFloat(t),this.options&&this.options.invertTrProperty&&(i=1-i),i>0&&(e.opacity=1-i,e.transparent=!0);break}}return this.materials[s]=new O(e),this.materials[s]}getTextureParams(s,o){const p={scale:new g(1,1),offset:new g(0,0)},e=s.split(/\s+/);let a;return a=e.indexOf("-bm"),a>=0&&(o.bumpScale=parseFloat(e[a+1]),e.splice(a,2)),a=e.indexOf("-mm"),a>=0&&(o.displacementBias=parseFloat(e[a+1]),o.displacementScale=parseFloat(e[a+2]),e.splice(a,3)),a=e.indexOf("-s"),a>=0&&(p.scale.set(parseFloat(e[a+1]),parseFloat(e[a+2])),e.splice(a,4)),a=e.indexOf("-o"),a>=0&&(p.offset.set(parseFloat(e[a+1]),parseFloat(e[a+2])),e.splice(a,4)),p.url=e.join(" ").trim(),p}loadTexture(s,o,p,e,a){const n=this.manager!==void 0?this.manager:y;let r=n.getHandler(s);r===null&&(r=new L(n)),r.setCrossOrigin&&r.setCrossOrigin(this.crossOrigin);const t=r.load(s,p,e,a);return o!==void 0&&(t.mapping=o),t}}export{A as MTLLoader};
@@ -1 +1 @@
1
- import{M as q,aB as t1,aC as H,aV as N,s as i1,V as e1,C as R}from"./three.module-D396a9Mn.js";class s1 extends q{constructor(K,L,O=!1,Q=!1,J=1e4){const v=new t1;super(v,L),this.isMarchingCubes=!0;const t=this,g=new Float32Array(36),C=new Float32Array(36),U=new Float32Array(36);this.enableUvs=O,this.enableColors=Q,this.init=function(e){this.resolution=e,this.isolation=80,this.size=e,this.size2=this.size*this.size,this.size3=this.size2*this.size,this.halfsize=this.size/2,this.delta=2/this.size,this.yd=this.size,this.zd=this.size2,this.field=new Float32Array(this.size3),this.normal_cache=new Float32Array(this.size3*3),this.palette=new Float32Array(this.size3*3),this.count=0;const i=J*3;this.positionArray=new Float32Array(i*3);const r=new H(this.positionArray,3);r.setUsage(N),v.setAttribute("position",r),this.normalArray=new Float32Array(i*3);const s=new H(this.normalArray,3);if(s.setUsage(N),v.setAttribute("normal",s),this.enableUvs){this.uvArray=new Float32Array(i*2);const x=new H(this.uvArray,2);x.setUsage(N),v.setAttribute("uv",x)}if(this.enableColors){this.colorArray=new Float32Array(i*3);const x=new H(this.colorArray,3);x.setUsage(N),v.setAttribute("color",x)}v.boundingSphere=new i1(new e1,1)};function b(e,i,r){return e+(i-e)*r}function X(e,i,r,s,x,n,a,c,f,d){const l=(r-a)/(c-a),h=t.normal_cache;g[i+0]=s+l*t.delta,g[i+1]=x,g[i+2]=n,C[i+0]=b(h[e+0],h[e+3],l),C[i+1]=b(h[e+1],h[e+4],l),C[i+2]=b(h[e+2],h[e+5],l),U[i+0]=b(t.palette[f*3+0],t.palette[d*3+0],l),U[i+1]=b(t.palette[f*3+1],t.palette[d*3+1],l),U[i+2]=b(t.palette[f*3+2],t.palette[d*3+2],l)}function Y(e,i,r,s,x,n,a,c,f,d){const l=(r-a)/(c-a),h=t.normal_cache;g[i+0]=s,g[i+1]=x+l*t.delta,g[i+2]=n;const o=e+t.yd*3;C[i+0]=b(h[e+0],h[o+0],l),C[i+1]=b(h[e+1],h[o+1],l),C[i+2]=b(h[e+2],h[o+2],l),U[i+0]=b(t.palette[f*3+0],t.palette[d*3+0],l),U[i+1]=b(t.palette[f*3+1],t.palette[d*3+1],l),U[i+2]=b(t.palette[f*3+2],t.palette[d*3+2],l)}function Z(e,i,r,s,x,n,a,c,f,d){const l=(r-a)/(c-a),h=t.normal_cache;g[i+0]=s,g[i+1]=x,g[i+2]=n+l*t.delta;const o=e+t.zd*3;C[i+0]=b(h[e+0],h[o+0],l),C[i+1]=b(h[e+1],h[o+1],l),C[i+2]=b(h[e+2],h[o+2],l),U[i+0]=b(t.palette[f*3+0],t.palette[d*3+0],l),U[i+1]=b(t.palette[f*3+1],t.palette[d*3+1],l),U[i+2]=b(t.palette[f*3+2],t.palette[d*3+2],l)}function y(e){const i=e*3;t.normal_cache[i]===0&&(t.normal_cache[i+0]=t.field[e-1]-t.field[e+1],t.normal_cache[i+1]=t.field[e-t.yd]-t.field[e+t.yd],t.normal_cache[i+2]=t.field[e-t.zd]-t.field[e+t.zd])}function W(e,i,r,s,x){const n=s+1,a=s+t.yd,c=s+t.zd,f=n+t.yd,d=n+t.zd,l=s+t.yd+t.zd,h=n+t.yd+t.zd;let o=0;const z=t.field[s],A=t.field[n],p=t.field[a],w=t.field[f],F=t.field[c],V=t.field[d],m=t.field[l],M=t.field[h];z<x&&(o|=1),A<x&&(o|=2),p<x&&(o|=8),w<x&&(o|=4),F<x&&(o|=16),V<x&&(o|=32),m<x&&(o|=128),M<x&&(o|=64);const u=a1[o];if(u===0)return 0;const I=t.delta,S=e+I,B=i+I,D=r+I;u&1&&(y(s),y(n),X(s*3,0,x,e,i,r,z,A,s,n)),u&2&&(y(n),y(f),Y(n*3,3,x,S,i,r,A,w,n,f)),u&4&&(y(a),y(f),X(a*3,6,x,e,B,r,p,w,a,f)),u&8&&(y(s),y(a),Y(s*3,9,x,e,i,r,z,p,s,a)),u&16&&(y(c),y(d),X(c*3,12,x,e,i,D,F,V,c,d)),u&32&&(y(d),y(h),Y(d*3,15,x,S,i,D,V,M,d,h)),u&64&&(y(l),y(h),X(l*3,18,x,e,B,D,m,M,l,h)),u&128&&(y(c),y(l),Y(c*3,21,x,e,i,D,F,m,c,l)),u&256&&(y(s),y(c),Z(s*3,24,x,e,i,r,z,F,s,c)),u&512&&(y(n),y(d),Z(n*3,27,x,S,i,r,A,V,n,d)),u&1024&&(y(f),y(h),Z(f*3,30,x,S,B,r,w,M,f,h)),u&2048&&(y(a),y(l),Z(a*3,33,x,e,B,r,p,m,a,l)),o<<=4;let P,E,G,T=0,_=0;for(;j[o+_]!=-1;)P=o+_,E=P+1,G=P+2,$(g,C,U,3*j[P],3*j[E],3*j[G]),_+=3,T++;return T}function $(e,i,r,s,x,n){const a=t.count*3;if(t.positionArray[a+0]=e[s],t.positionArray[a+1]=e[s+1],t.positionArray[a+2]=e[s+2],t.positionArray[a+3]=e[x],t.positionArray[a+4]=e[x+1],t.positionArray[a+5]=e[x+2],t.positionArray[a+6]=e[n],t.positionArray[a+7]=e[n+1],t.positionArray[a+8]=e[n+2],t.material.flatShading===!0){const c=(i[s+0]+i[x+0]+i[n+0])/3,f=(i[s+1]+i[x+1]+i[n+1])/3,d=(i[s+2]+i[x+2]+i[n+2])/3;t.normalArray[a+0]=c,t.normalArray[a+1]=f,t.normalArray[a+2]=d,t.normalArray[a+3]=c,t.normalArray[a+4]=f,t.normalArray[a+5]=d,t.normalArray[a+6]=c,t.normalArray[a+7]=f,t.normalArray[a+8]=d}else t.normalArray[a+0]=i[s+0],t.normalArray[a+1]=i[s+1],t.normalArray[a+2]=i[s+2],t.normalArray[a+3]=i[x+0],t.normalArray[a+4]=i[x+1],t.normalArray[a+5]=i[x+2],t.normalArray[a+6]=i[n+0],t.normalArray[a+7]=i[n+1],t.normalArray[a+8]=i[n+2];if(t.enableUvs){const c=t.count*2;t.uvArray[c+0]=e[s+0],t.uvArray[c+1]=e[s+2],t.uvArray[c+2]=e[x+0],t.uvArray[c+3]=e[x+2],t.uvArray[c+4]=e[n+0],t.uvArray[c+5]=e[n+2]}t.enableColors&&(t.colorArray[a+0]=r[s+0],t.colorArray[a+1]=r[s+1],t.colorArray[a+2]=r[s+2],t.colorArray[a+3]=r[x+0],t.colorArray[a+4]=r[x+1],t.colorArray[a+5]=r[x+2],t.colorArray[a+6]=r[n+0],t.colorArray[a+7]=r[n+1],t.colorArray[a+8]=r[n+2]),t.count+=3}this.addBall=function(e,i,r,s,x,n){const a=Math.sign(s);s=Math.abs(s);const c=n!=null;let f=new R(e,i,r);if(c)try{f=n instanceof R?n:Array.isArray(n)?new R(Math.min(Math.abs(n[0]),1),Math.min(Math.abs(n[1]),1),Math.min(Math.abs(n[2]),1)):new R(n)}catch{f=new R(e,i,r)}const d=this.size*Math.sqrt(s/x),l=r*this.size,h=i*this.size,o=e*this.size;let z=Math.floor(l-d);z<1&&(z=1);let A=Math.floor(l+d);A>this.size-1&&(A=this.size-1);let p=Math.floor(h-d);p<1&&(p=1);let w=Math.floor(h+d);w>this.size-1&&(w=this.size-1);let F=Math.floor(o-d);F<1&&(F=1);let V=Math.floor(o+d);V>this.size-1&&(V=this.size-1);let m,M,u,I,S,B,D,P,E,G,T;for(u=z;u<A;u++)for(S=this.size2*u,P=u/this.size-r,E=P*P,M=p;M<w;M++)for(I=S+this.size*M,D=M/this.size-i,G=D*D,m=F;m<V;m++)if(B=m/this.size-e,T=s/(1e-6+B*B+G+E)-x,T>0){this.field[I+m]+=T*a;const _=Math.sqrt((m-o)*(m-o)+(M-h)*(M-h)+(u-l)*(u-l))/d,k=1-_*_*_*(_*(_*6-15)+10);this.palette[(I+m)*3+0]+=f.r*k,this.palette[(I+m)*3+1]+=f.g*k,this.palette[(I+m)*3+2]+=f.b*k}},this.addPlaneX=function(e,i){const r=this.size,s=this.yd,x=this.zd,n=this.field;let a,c,f,d,l,h,o,z=r*Math.sqrt(e/i);for(z>r&&(z=r),a=0;a<z;a++)if(h=a/r,d=h*h,l=e/(1e-4+d)-i,l>0)for(c=0;c<r;c++)for(o=a+c*s,f=0;f<r;f++)n[x*f+o]+=l},this.addPlaneY=function(e,i){const r=this.size,s=this.yd,x=this.zd,n=this.field;let a,c,f,d,l,h,o,z,A=r*Math.sqrt(e/i);for(A>r&&(A=r),c=0;c<A;c++)if(h=c/r,d=h*h,l=e/(1e-4+d)-i,l>0)for(o=c*s,a=0;a<r;a++)for(z=o+a,f=0;f<r;f++)n[x*f+z]+=l},this.addPlaneZ=function(e,i){const r=this.size,s=this.yd,x=this.zd,n=this.field;let a,c,f,d,l,h,o,z,A=r*Math.sqrt(e/i);for(A>r&&(A=r),f=0;f<A;f++)if(h=f/r,d=h*h,l=e/(1e-4+d)-i,l>0)for(o=x*f,c=0;c<r;c++)for(z=o+c*s,a=0;a<r;a++)n[z+a]+=l},this.setCell=function(e,i,r,s){const x=this.size2*r+this.size*i+e;this.field[x]=s},this.getCell=function(e,i,r){const s=this.size2*r+this.size*i+e;return this.field[s]},this.blur=function(e=1){const i=this.field,r=i.slice(),s=this.size,x=this.size2;for(let n=0;n<s;n++)for(let a=0;a<s;a++)for(let c=0;c<s;c++){const f=x*c+s*a+n;let d=r[f],l=1;for(let h=-1;h<=1;h+=2){const o=h+n;if(!(o<0||o>=s))for(let z=-1;z<=1;z+=2){const A=z+a;if(!(A<0||A>=s))for(let p=-1;p<=1;p+=2){const w=p+c;if(w<0||w>=s)continue;const F=x*w+s*A+o,V=r[F];l++,d+=e*(V-d)/l}}}i[f]=d}},this.reset=function(){for(let e=0;e<this.size3;e++)this.normal_cache[e*3]=0,this.field[e]=0,this.palette[e*3]=this.palette[e*3+1]=this.palette[e*3+2]=0},this.update=function(){this.count=0;const e=this.size-2;for(let i=1;i<e;i++){const r=this.size2*i,s=(i-this.halfsize)/this.halfsize;for(let x=1;x<e;x++){const n=r+this.size*x,a=(x-this.halfsize)/this.halfsize;for(let c=1;c<e;c++){const f=(c-this.halfsize)/this.halfsize,d=n+c;W(f,a,s,d,this.isolation)}}}this.geometry.setDrawRange(0,this.count),v.getAttribute("position").needsUpdate=!0,v.getAttribute("normal").needsUpdate=!0,this.enableUvs&&(v.getAttribute("uv").needsUpdate=!0),this.enableColors&&(v.getAttribute("color").needsUpdate=!0),this.count/3>J&&console.warn("THREE.MarchingCubes: Geometry buffers too small for rendering. Please create an instance with a higher poly count.")},this.init(K)}}const a1=new Int32Array([0,265,515,778,1030,1295,1541,1804,2060,2309,2575,2822,3082,3331,3593,3840,400,153,915,666,1430,1183,1941,1692,2460,2197,2975,2710,3482,3219,3993,3728,560,825,51,314,1590,1855,1077,1340,2620,2869,2111,2358,3642,3891,3129,3376,928,681,419,170,1958,1711,1445,1196,2988,2725,2479,2214,4010,3747,3497,3232,1120,1385,1635,1898,102,367,613,876,3180,3429,3695,3942,2154,2403,2665,2912,1520,1273,2035,1786,502,255,1013,764,3580,3317,4095,3830,2554,2291,3065,2800,1616,1881,1107,1370,598,863,85,348,3676,3925,3167,3414,2650,2899,2137,2384,1984,1737,1475,1226,966,719,453,204,4044,3781,3535,3270,3018,2755,2505,2240,2240,2505,2755,3018,3270,3535,3781,4044,204,453,719,966,1226,1475,1737,1984,2384,2137,2899,2650,3414,3167,3925,3676,348,85,863,598,1370,1107,1881,1616,2800,3065,2291,2554,3830,4095,3317,3580,764,1013,255,502,1786,2035,1273,1520,2912,2665,2403,2154,3942,3695,3429,3180,876,613,367,102,1898,1635,1385,1120,3232,3497,3747,4010,2214,2479,2725,2988,1196,1445,1711,1958,170,419,681,928,3376,3129,3891,3642,2358,2111,2869,2620,1340,1077,1855,1590,314,51,825,560,3728,3993,3219,3482,2710,2975,2197,2460,1692,1941,1183,1430,666,915,153,400,3840,3593,3331,3082,2822,2575,2309,2060,1804,1541,1295,1030,778,515,265,0]),j=new Int32Array([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,8,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,8,3,9,8,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,8,3,1,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,9,2,10,0,2,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,8,3,2,10,8,10,9,8,-1,-1,-1,-1,-1,-1,-1,3,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,11,2,8,11,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,9,0,2,3,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,11,2,1,9,11,9,8,11,-1,-1,-1,-1,-1,-1,-1,3,10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0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);export{s1 as MarchingCubes,a1 as edgeTable,j as triTable};
1
+ import{M as q,ax as t1,ay as H,aS as N,p as i1,V as e1,v as R}from"./three.module-IFn-4i31.js";class s1 extends q{constructor(K,L,O=!1,Q=!1,J=1e4){const M=new t1;super(M,L),this.isMarchingCubes=!0;const t=this,g=new Float32Array(36),C=new Float32Array(36),U=new Float32Array(36);this.enableUvs=O,this.enableColors=Q,this.init=function(e){this.resolution=e,this.isolation=80,this.size=e,this.size2=this.size*this.size,this.size3=this.size2*this.size,this.halfsize=this.size/2,this.delta=2/this.size,this.yd=this.size,this.zd=this.size2,this.field=new Float32Array(this.size3),this.normal_cache=new Float32Array(this.size3*3),this.palette=new Float32Array(this.size3*3),this.count=0;const i=J*3;this.positionArray=new Float32Array(i*3);const r=new H(this.positionArray,3);r.setUsage(N),M.setAttribute("position",r),this.normalArray=new Float32Array(i*3);const s=new H(this.normalArray,3);if(s.setUsage(N),M.setAttribute("normal",s),this.enableUvs){this.uvArray=new Float32Array(i*2);const x=new H(this.uvArray,2);x.setUsage(N),M.setAttribute("uv",x)}if(this.enableColors){this.colorArray=new Float32Array(i*3);const x=new H(this.colorArray,3);x.setUsage(N),M.setAttribute("color",x)}M.boundingSphere=new i1(new e1,1)};function b(e,i,r){return e+(i-e)*r}function X(e,i,r,s,x,n,a,c,f,d){const l=(r-a)/(c-a),h=t.normal_cache;g[i+0]=s+l*t.delta,g[i+1]=x,g[i+2]=n,C[i+0]=b(h[e+0],h[e+3],l),C[i+1]=b(h[e+1],h[e+4],l),C[i+2]=b(h[e+2],h[e+5],l),U[i+0]=b(t.palette[f*3+0],t.palette[d*3+0],l),U[i+1]=b(t.palette[f*3+1],t.palette[d*3+1],l),U[i+2]=b(t.palette[f*3+2],t.palette[d*3+2],l)}function Y(e,i,r,s,x,n,a,c,f,d){const l=(r-a)/(c-a),h=t.normal_cache;g[i+0]=s,g[i+1]=x+l*t.delta,g[i+2]=n;const o=e+t.yd*3;C[i+0]=b(h[e+0],h[o+0],l),C[i+1]=b(h[e+1],h[o+1],l),C[i+2]=b(h[e+2],h[o+2],l),U[i+0]=b(t.palette[f*3+0],t.palette[d*3+0],l),U[i+1]=b(t.palette[f*3+1],t.palette[d*3+1],l),U[i+2]=b(t.palette[f*3+2],t.palette[d*3+2],l)}function Z(e,i,r,s,x,n,a,c,f,d){const l=(r-a)/(c-a),h=t.normal_cache;g[i+0]=s,g[i+1]=x,g[i+2]=n+l*t.delta;const o=e+t.zd*3;C[i+0]=b(h[e+0],h[o+0],l),C[i+1]=b(h[e+1],h[o+1],l),C[i+2]=b(h[e+2],h[o+2],l),U[i+0]=b(t.palette[f*3+0],t.palette[d*3+0],l),U[i+1]=b(t.palette[f*3+1],t.palette[d*3+1],l),U[i+2]=b(t.palette[f*3+2],t.palette[d*3+2],l)}function y(e){const i=e*3;t.normal_cache[i]===0&&(t.normal_cache[i+0]=t.field[e-1]-t.field[e+1],t.normal_cache[i+1]=t.field[e-t.yd]-t.field[e+t.yd],t.normal_cache[i+2]=t.field[e-t.zd]-t.field[e+t.zd])}function W(e,i,r,s,x){const n=s+1,a=s+t.yd,c=s+t.zd,f=n+t.yd,d=n+t.zd,l=s+t.yd+t.zd,h=n+t.yd+t.zd;let o=0;const z=t.field[s],A=t.field[n],p=t.field[a],w=t.field[f],F=t.field[c],_=t.field[d],m=t.field[l],v=t.field[h];z<x&&(o|=1),A<x&&(o|=2),p<x&&(o|=8),w<x&&(o|=4),F<x&&(o|=16),_<x&&(o|=32),m<x&&(o|=128),v<x&&(o|=64);const u=a1[o];if(u===0)return 0;const I=t.delta,P=e+I,D=i+I,S=r+I;u&1&&(y(s),y(n),X(s*3,0,x,e,i,r,z,A,s,n)),u&2&&(y(n),y(f),Y(n*3,3,x,P,i,r,A,w,n,f)),u&4&&(y(a),y(f),X(a*3,6,x,e,D,r,p,w,a,f)),u&8&&(y(s),y(a),Y(s*3,9,x,e,i,r,z,p,s,a)),u&16&&(y(c),y(d),X(c*3,12,x,e,i,S,F,_,c,d)),u&32&&(y(d),y(h),Y(d*3,15,x,P,i,S,_,v,d,h)),u&64&&(y(l),y(h),X(l*3,18,x,e,D,S,m,v,l,h)),u&128&&(y(c),y(l),Y(c*3,21,x,e,i,S,F,m,c,l)),u&256&&(y(s),y(c),Z(s*3,24,x,e,i,r,z,F,s,c)),u&512&&(y(n),y(d),Z(n*3,27,x,P,i,r,A,_,n,d)),u&1024&&(y(f),y(h),Z(f*3,30,x,P,D,r,w,v,f,h)),u&2048&&(y(a),y(l),Z(a*3,33,x,e,D,r,p,m,a,l)),o<<=4;let B,E,G,T=0,V=0;for(;j[o+V]!=-1;)B=o+V,E=B+1,G=B+2,$(g,C,U,3*j[B],3*j[E],3*j[G]),V+=3,T++;return T}function $(e,i,r,s,x,n){const a=t.count*3;if(t.positionArray[a+0]=e[s],t.positionArray[a+1]=e[s+1],t.positionArray[a+2]=e[s+2],t.positionArray[a+3]=e[x],t.positionArray[a+4]=e[x+1],t.positionArray[a+5]=e[x+2],t.positionArray[a+6]=e[n],t.positionArray[a+7]=e[n+1],t.positionArray[a+8]=e[n+2],t.material.flatShading===!0){const c=(i[s+0]+i[x+0]+i[n+0])/3,f=(i[s+1]+i[x+1]+i[n+1])/3,d=(i[s+2]+i[x+2]+i[n+2])/3;t.normalArray[a+0]=c,t.normalArray[a+1]=f,t.normalArray[a+2]=d,t.normalArray[a+3]=c,t.normalArray[a+4]=f,t.normalArray[a+5]=d,t.normalArray[a+6]=c,t.normalArray[a+7]=f,t.normalArray[a+8]=d}else t.normalArray[a+0]=i[s+0],t.normalArray[a+1]=i[s+1],t.normalArray[a+2]=i[s+2],t.normalArray[a+3]=i[x+0],t.normalArray[a+4]=i[x+1],t.normalArray[a+5]=i[x+2],t.normalArray[a+6]=i[n+0],t.normalArray[a+7]=i[n+1],t.normalArray[a+8]=i[n+2];if(t.enableUvs){const c=t.count*2;t.uvArray[c+0]=e[s+0],t.uvArray[c+1]=e[s+2],t.uvArray[c+2]=e[x+0],t.uvArray[c+3]=e[x+2],t.uvArray[c+4]=e[n+0],t.uvArray[c+5]=e[n+2]}t.enableColors&&(t.colorArray[a+0]=r[s+0],t.colorArray[a+1]=r[s+1],t.colorArray[a+2]=r[s+2],t.colorArray[a+3]=r[x+0],t.colorArray[a+4]=r[x+1],t.colorArray[a+5]=r[x+2],t.colorArray[a+6]=r[n+0],t.colorArray[a+7]=r[n+1],t.colorArray[a+8]=r[n+2]),t.count+=3}this.addBall=function(e,i,r,s,x,n){const a=Math.sign(s);s=Math.abs(s);const c=n!=null;let f=new R(e,i,r);if(c)try{f=n instanceof R?n:Array.isArray(n)?new R(Math.min(Math.abs(n[0]),1),Math.min(Math.abs(n[1]),1),Math.min(Math.abs(n[2]),1)):new R(n)}catch{f=new R(e,i,r)}const d=this.size*Math.sqrt(s/x),l=r*this.size,h=i*this.size,o=e*this.size;let z=Math.floor(l-d);z<1&&(z=1);let A=Math.floor(l+d);A>this.size-1&&(A=this.size-1);let p=Math.floor(h-d);p<1&&(p=1);let w=Math.floor(h+d);w>this.size-1&&(w=this.size-1);let F=Math.floor(o-d);F<1&&(F=1);let _=Math.floor(o+d);_>this.size-1&&(_=this.size-1);let m,v,u,I,P,D,S,B,E,G,T;for(u=z;u<A;u++)for(P=this.size2*u,B=u/this.size-r,E=B*B,v=p;v<w;v++)for(I=P+this.size*v,S=v/this.size-i,G=S*S,m=F;m<_;m++)if(D=m/this.size-e,T=s/(1e-6+D*D+G+E)-x,T>0){this.field[I+m]+=T*a;const V=Math.sqrt((m-o)*(m-o)+(v-h)*(v-h)+(u-l)*(u-l))/d,k=1-V*V*V*(V*(V*6-15)+10);this.palette[(I+m)*3+0]+=f.r*k,this.palette[(I+m)*3+1]+=f.g*k,this.palette[(I+m)*3+2]+=f.b*k}},this.addPlaneX=function(e,i){const r=this.size,s=this.yd,x=this.zd,n=this.field;let a,c,f,d,l,h,o,z=r*Math.sqrt(e/i);for(z>r&&(z=r),a=0;a<z;a++)if(h=a/r,d=h*h,l=e/(1e-4+d)-i,l>0)for(c=0;c<r;c++)for(o=a+c*s,f=0;f<r;f++)n[x*f+o]+=l},this.addPlaneY=function(e,i){const r=this.size,s=this.yd,x=this.zd,n=this.field;let a,c,f,d,l,h,o,z,A=r*Math.sqrt(e/i);for(A>r&&(A=r),c=0;c<A;c++)if(h=c/r,d=h*h,l=e/(1e-4+d)-i,l>0)for(o=c*s,a=0;a<r;a++)for(z=o+a,f=0;f<r;f++)n[x*f+z]+=l},this.addPlaneZ=function(e,i){const r=this.size,s=this.yd,x=this.zd,n=this.field;let a,c,f,d,l,h,o,z,A=r*Math.sqrt(e/i);for(A>r&&(A=r),f=0;f<A;f++)if(h=f/r,d=h*h,l=e/(1e-4+d)-i,l>0)for(o=x*f,c=0;c<r;c++)for(z=o+c*s,a=0;a<r;a++)n[z+a]+=l},this.setCell=function(e,i,r,s){const x=this.size2*r+this.size*i+e;this.field[x]=s},this.getCell=function(e,i,r){const s=this.size2*r+this.size*i+e;return this.field[s]},this.blur=function(e=1){const i=this.field,r=i.slice(),s=this.size,x=this.size2;for(let n=0;n<s;n++)for(let a=0;a<s;a++)for(let c=0;c<s;c++){const f=x*c+s*a+n;let d=r[f],l=1;for(let h=-1;h<=1;h+=2){const o=h+n;if(!(o<0||o>=s))for(let z=-1;z<=1;z+=2){const A=z+a;if(!(A<0||A>=s))for(let p=-1;p<=1;p+=2){const w=p+c;if(w<0||w>=s)continue;const F=x*w+s*A+o,_=r[F];l++,d+=e*(_-d)/l}}}i[f]=d}},this.reset=function(){for(let e=0;e<this.size3;e++)this.normal_cache[e*3]=0,this.field[e]=0,this.palette[e*3]=this.palette[e*3+1]=this.palette[e*3+2]=0},this.update=function(){this.count=0;const e=this.size-2;for(let i=1;i<e;i++){const r=this.size2*i,s=(i-this.halfsize)/this.halfsize;for(let x=1;x<e;x++){const n=r+this.size*x,a=(x-this.halfsize)/this.halfsize;for(let c=1;c<e;c++){const f=(c-this.halfsize)/this.halfsize,d=n+c;W(f,a,s,d,this.isolation)}}}this.geometry.setDrawRange(0,this.count),M.getAttribute("position").needsUpdate=!0,M.getAttribute("normal").needsUpdate=!0,this.enableUvs&&(M.getAttribute("uv").needsUpdate=!0),this.enableColors&&(M.getAttribute("color").needsUpdate=!0),this.count/3>J&&console.warn("THREE.MarchingCubes: Geometry buffers too small for rendering. Please create an instance with a higher poly count.")},this.init(K)}}const a1=new Int32Array([0,265,515,778,1030,1295,1541,1804,2060,2309,2575,2822,3082,3331,3593,3840,400,153,915,666,1430,1183,1941,1692,2460,2197,2975,2710,3482,3219,3993,3728,560,825,51,314,1590,1855,1077,1340,2620,2869,2111,2358,3642,3891,3129,3376,928,681,419,170,1958,1711,1445,1196,2988,2725,2479,2214,4010,3747,3497,3232,1120,1385,1635,1898,102,367,613,876,3180,3429,3695,3942,2154,2403,2665,2912,1520,1273,2035,1786,502,255,1013,764,3580,3317,4095,3830,2554,2291,3065,2800,1616,1881,1107,1370,598,863,85,348,3676,3925,3167,3414,2650,2899,2137,2384,1984,1737,1475,1226,966,719,453,204,4044,3781,3535,3270,3018,2755,2505,2240,2240,2505,2755,3018,3270,3535,3781,4044,204,453,719,966,1226,1475,1737,1984,2384,2137,2899,2650,3414,3167,3925,3676,348,85,863,598,1370,1107,1881,1616,2800,3065,2291,2554,3830,4095,3317,3580,764,1013,255,502,1786,2035,1273,1520,2912,2665,2403,2154,3942,3695,3429,3180,876,613,367,102,1898,1635,1385,1120,3232,3497,3747,4010,2214,2479,2725,2988,1196,1445,1711,1958,170,419,681,928,3376,3129,3891,3642,2358,2111,2869,2620,1340,1077,1855,1590,314,51,825,560,3728,3993,3219,3482,2710,2975,2197,2460,1692,1941,1183,1430,666,915,153,400,3840,3593,3331,3082,2822,2575,2309,2060,1804,1541,1295,1030,778,515,265,0]),j=new Int32Array([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-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