@splinetool/runtime 2.0.149 → 2.0.151

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 (314) hide show
  1. package/build/{runtime-bloom-6P2PGPRG.js → runtime-bloom-B7VHP3DE.js} +1 -1
  2. package/build/runtime-bloom-B7VHP3DE.js.br +0 -0
  3. package/build/runtime-bloom-B7VHP3DE.js.gz +0 -0
  4. package/build/{runtime-brightnessContrast-GQKYRZIS.js → runtime-brightnessContrast-SZX5T7MA.js} +1 -1
  5. package/build/runtime-brightnessContrast-SZX5T7MA.js.br +0 -0
  6. package/build/runtime-brightnessContrast-SZX5T7MA.js.gz +0 -0
  7. package/build/{runtime-chromaticAberration-24VUHGNX.js → runtime-chromaticAberration-JH3ZUJGV.js} +1 -1
  8. package/build/runtime-chromaticAberration-JH3ZUJGV.js.br +0 -0
  9. package/build/runtime-chromaticAberration-JH3ZUJGV.js.gz +0 -0
  10. package/build/{runtime-chunk-2JC43YPS.js → runtime-chunk-3OPOF3AO.js} +1 -1
  11. package/build/runtime-chunk-3OPOF3AO.js.br +0 -0
  12. package/build/runtime-chunk-3OPOF3AO.js.gz +0 -0
  13. package/build/{runtime-chunk-25CCJVWZ.js → runtime-chunk-3R5IVOGQ.js} +1 -1
  14. package/build/runtime-chunk-3R5IVOGQ.js.br +0 -0
  15. package/build/runtime-chunk-3R5IVOGQ.js.gz +0 -0
  16. package/build/{runtime-chunk-3DN5WJCC.js → runtime-chunk-4Y57HRNJ.js} +1 -1
  17. package/build/runtime-chunk-4Y57HRNJ.js.br +0 -0
  18. package/build/runtime-chunk-4Y57HRNJ.js.gz +0 -0
  19. package/build/{runtime-chunk-DDSU66IA.js → runtime-chunk-A7EDSZVI.js} +1 -1
  20. package/build/runtime-chunk-A7EDSZVI.js.br +0 -0
  21. package/build/runtime-chunk-A7EDSZVI.js.gz +0 -0
  22. package/build/{runtime-chunk-AEDDM67H.js → runtime-chunk-AUUKCZJE.js} +1 -1
  23. package/build/runtime-chunk-AUUKCZJE.js.br +0 -0
  24. package/build/runtime-chunk-AUUKCZJE.js.gz +0 -0
  25. package/build/{runtime-chunk-BVZK2X37.js → runtime-chunk-AW6U245D.js} +1 -1
  26. package/build/runtime-chunk-AW6U245D.js.br +0 -0
  27. package/build/runtime-chunk-AW6U245D.js.gz +0 -0
  28. package/build/{runtime-chunk-D4ZNSF6F.js → runtime-chunk-B2P5O5QC.js} +1 -1
  29. package/build/{runtime-chunk-D4ZNSF6F.js.br → runtime-chunk-B2P5O5QC.js.br} +0 -0
  30. package/build/runtime-chunk-B2P5O5QC.js.gz +0 -0
  31. package/build/{runtime-chunk-SF3NWUI3.js → runtime-chunk-CE2FMEOR.js} +1 -1
  32. package/build/runtime-chunk-CE2FMEOR.js.br +0 -0
  33. package/build/runtime-chunk-CE2FMEOR.js.gz +0 -0
  34. package/build/{runtime-chunk-BNOO5KCO.js → runtime-chunk-DM5ENDO2.js} +1 -1
  35. package/build/runtime-chunk-DM5ENDO2.js.br +0 -0
  36. package/build/runtime-chunk-DM5ENDO2.js.gz +0 -0
  37. package/build/{runtime-chunk-BKTDKA4Q.js → runtime-chunk-DWHVL46W.js} +1 -1
  38. package/build/runtime-chunk-DWHVL46W.js.br +0 -0
  39. package/build/runtime-chunk-DWHVL46W.js.gz +0 -0
  40. package/build/{runtime-chunk-5XJPFG76.js → runtime-chunk-EXDN6XEO.js} +1 -1
  41. package/build/runtime-chunk-EXDN6XEO.js.br +0 -0
  42. package/build/runtime-chunk-EXDN6XEO.js.gz +0 -0
  43. package/build/{runtime-chunk-2RNKFNMP.js → runtime-chunk-III53OHU.js} +1 -1
  44. package/build/runtime-chunk-III53OHU.js.br +0 -0
  45. package/build/runtime-chunk-III53OHU.js.gz +0 -0
  46. package/build/{runtime-chunk-AZWULIMU.js → runtime-chunk-KA5IGYNJ.js} +1 -1
  47. package/build/runtime-chunk-KA5IGYNJ.js.br +0 -0
  48. package/build/runtime-chunk-KA5IGYNJ.js.gz +0 -0
  49. package/build/{runtime-chunk-F3YLZRKK.js → runtime-chunk-LQQLGNQW.js} +1 -1
  50. package/build/runtime-chunk-LQQLGNQW.js.br +0 -0
  51. package/build/runtime-chunk-LQQLGNQW.js.gz +0 -0
  52. package/build/{runtime-chunk-KB2MNCH2.js → runtime-chunk-MJSD6UBC.js} +1 -1
  53. package/build/runtime-chunk-MJSD6UBC.js.br +0 -0
  54. package/build/runtime-chunk-MJSD6UBC.js.gz +0 -0
  55. package/build/{runtime-chunk-5NKADMLG.js → runtime-chunk-NPNYVUFG.js} +1 -1
  56. package/build/runtime-chunk-NPNYVUFG.js.br +0 -0
  57. package/build/runtime-chunk-NPNYVUFG.js.gz +0 -0
  58. package/build/{runtime-chunk-DJQR2363.js → runtime-chunk-P4TQC6WV.js} +1 -1
  59. package/build/runtime-chunk-P4TQC6WV.js.br +0 -0
  60. package/build/runtime-chunk-P4TQC6WV.js.gz +0 -0
  61. package/build/{runtime-chunk-LGLIAPCL.js → runtime-chunk-PQ42NYOR.js} +1 -1
  62. package/build/runtime-chunk-PQ42NYOR.js.br +0 -0
  63. package/build/runtime-chunk-PQ42NYOR.js.gz +0 -0
  64. package/build/{runtime-chunk-YBKTPAVG.js → runtime-chunk-QQ4W2SKI.js} +1 -1
  65. package/build/runtime-chunk-QQ4W2SKI.js.br +0 -0
  66. package/build/runtime-chunk-QQ4W2SKI.js.gz +0 -0
  67. package/build/{runtime-chunk-HXOUVAEQ.js → runtime-chunk-R2RFRC63.js} +1 -1
  68. package/build/runtime-chunk-R2RFRC63.js.br +0 -0
  69. package/build/runtime-chunk-R2RFRC63.js.gz +0 -0
  70. package/build/{runtime-chunk-UN6LBHPT.js → runtime-chunk-RBP5T6NT.js} +1 -1
  71. package/build/runtime-chunk-RBP5T6NT.js.br +0 -0
  72. package/build/runtime-chunk-RBP5T6NT.js.gz +0 -0
  73. package/build/{runtime-chunk-DM52PR6M.js → runtime-chunk-U2PNHN7Z.js} +1 -1
  74. package/build/runtime-chunk-U2PNHN7Z.js.br +0 -0
  75. package/build/runtime-chunk-U2PNHN7Z.js.gz +0 -0
  76. package/build/{runtime-chunk-VGNSUY7Y.js → runtime-chunk-UEUUTSLL.js} +1 -1
  77. package/build/runtime-chunk-UEUUTSLL.js.br +0 -0
  78. package/build/runtime-chunk-UEUUTSLL.js.gz +0 -0
  79. package/build/{runtime-chunk-YAQU4MFB.js → runtime-chunk-UXQT6U5G.js} +1 -1
  80. package/build/runtime-chunk-UXQT6U5G.js.br +0 -0
  81. package/build/runtime-chunk-UXQT6U5G.js.gz +0 -0
  82. package/build/{runtime-chunk-7Q6LMOLN.js → runtime-chunk-ZAJWTQT2.js} +1 -1
  83. package/build/runtime-chunk-ZAJWTQT2.js.br +2 -0
  84. package/build/runtime-chunk-ZAJWTQT2.js.gz +0 -0
  85. package/build/{runtime-chunk-CICXWI7A.js → runtime-chunk-ZEDD7JAI.js} +1 -1
  86. package/build/{runtime-chunk-CICXWI7A.js.br → runtime-chunk-ZEDD7JAI.js.br} +0 -0
  87. package/build/runtime-chunk-ZEDD7JAI.js.gz +0 -0
  88. package/build/{runtime-chunk-RXAZMXPJ.js → runtime-chunk-ZONXYF62.js} +1 -1
  89. package/build/runtime-chunk-ZONXYF62.js.br +0 -0
  90. package/build/runtime-chunk-ZONXYF62.js.gz +0 -0
  91. package/build/{runtime-classicRuntime-6ANLAKFQ.js → runtime-classicRuntime-3X74PWZU.js} +1 -1
  92. package/build/runtime-classicRuntime-3X74PWZU.js.br +0 -0
  93. package/build/runtime-classicRuntime-3X74PWZU.js.gz +0 -0
  94. package/build/{runtime-cloners-DFTPUSH6.js → runtime-cloners-AOZNS72R.js} +1 -1
  95. package/build/runtime-cloners-AOZNS72R.js.br +0 -0
  96. package/build/runtime-cloners-AOZNS72R.js.gz +0 -0
  97. package/build/{runtime-components-EJDISCGU.js → runtime-components-676HC4AY.js} +1 -1
  98. package/build/runtime-components-676HC4AY.js.br +0 -0
  99. package/build/runtime-components-676HC4AY.js.gz +0 -0
  100. package/build/{runtime-createDestroy-XGG3ML6E.js → runtime-createDestroy-O6YPCOAU.js} +1 -1
  101. package/build/runtime-createDestroy-O6YPCOAU.js.br +0 -0
  102. package/build/runtime-createDestroy-O6YPCOAU.js.gz +0 -0
  103. package/build/{runtime-depthOfField-UQP455BO.js → runtime-depthOfField-RT3UQWXR.js} +1 -1
  104. package/build/runtime-depthOfField-RT3UQWXR.js.br +0 -0
  105. package/build/runtime-depthOfField-RT3UQWXR.js.gz +0 -0
  106. package/build/{runtime-dragDrop-XIESFGX7.js → runtime-dragDrop-BAM3NNYT.js} +1 -1
  107. package/build/runtime-dragDrop-BAM3NNYT.js.br +0 -0
  108. package/build/runtime-dragDrop-BAM3NNYT.js.gz +0 -0
  109. package/build/{runtime-gameControls-MAMEOR7N.js → runtime-gameControls-YDJP6MZB.js} +1 -1
  110. package/build/runtime-gameControls-YDJP6MZB.js.br +0 -0
  111. package/build/runtime-gameControls-YDJP6MZB.js.gz +0 -0
  112. package/build/{runtime-hair-7HQYEP6L.js → runtime-hair-47SWFY7O.js} +1 -1
  113. package/build/runtime-hair-47SWFY7O.js.br +1 -0
  114. package/build/runtime-hair-47SWFY7O.js.gz +0 -0
  115. package/build/{runtime-hueSaturation-6EW62DC4.js → runtime-hueSaturation-R7366WUU.js} +1 -1
  116. package/build/runtime-hueSaturation-R7366WUU.js.br +0 -0
  117. package/build/runtime-hueSaturation-R7366WUU.js.gz +0 -0
  118. package/build/{runtime-mergeStaticGeometries-X63B7YMB.js → runtime-mergeStaticGeometries-ZMUPBRA5.js} +1 -1
  119. package/build/runtime-mergeStaticGeometries-ZMUPBRA5.js.br +0 -0
  120. package/build/runtime-mergeStaticGeometries-ZMUPBRA5.js.gz +0 -0
  121. package/build/{runtime-miscActions-DGCWZJ2S.js → runtime-miscActions-HH5PV6XG.js} +1 -1
  122. package/build/runtime-miscActions-HH5PV6XG.js.br +0 -0
  123. package/build/runtime-miscActions-HH5PV6XG.js.gz +0 -0
  124. package/build/{runtime-mouseHover-IYA5K7TR.js → runtime-mouseHover-IWJADH4B.js} +1 -1
  125. package/build/runtime-mouseHover-IWJADH4B.js.br +0 -0
  126. package/build/runtime-mouseHover-IWJADH4B.js.gz +0 -0
  127. package/build/{runtime-noise-6CNKMG4F.js → runtime-noise-ZEES4YA4.js} +1 -1
  128. package/build/runtime-noise-ZEES4YA4.js.br +0 -0
  129. package/build/runtime-noise-ZEES4YA4.js.gz +0 -0
  130. package/build/{runtime-particles-YD5FG7Y6.js → runtime-particles-MCHGN7C4.js} +1 -1
  131. package/build/runtime-particles-MCHGN7C4.js.br +0 -0
  132. package/build/runtime-particles-MCHGN7C4.js.gz +0 -0
  133. package/build/{runtime-paths-Z5IBSWFP.js → runtime-paths-JNZ276RN.js} +1 -1
  134. package/build/runtime-paths-JNZ276RN.js.br +0 -0
  135. package/build/runtime-paths-JNZ276RN.js.gz +0 -0
  136. package/build/{runtime-pixelation-BPCQKW2B.js → runtime-pixelation-Q2E3B4AV.js} +1 -1
  137. package/build/runtime-pixelation-Q2E3B4AV.js.br +0 -0
  138. package/build/runtime-pixelation-Q2E3B4AV.js.gz +0 -0
  139. package/build/{runtime-resize-MOVFPHEO.js → runtime-resize-ZMTVLSAY.js} +1 -1
  140. package/build/runtime-resize-ZMTVLSAY.js.br +0 -0
  141. package/build/runtime-resize-ZMTVLSAY.js.gz +0 -0
  142. package/build/{runtime-sceneTransition-7C6DEUI6.js → runtime-sceneTransition-FEWDAFMC.js} +1 -1
  143. package/build/runtime-sceneTransition-FEWDAFMC.js.br +0 -0
  144. package/build/runtime-sceneTransition-FEWDAFMC.js.gz +0 -0
  145. package/build/{runtime-scroll-DOZT3GXB.js → runtime-scroll-TZKU5FST.js} +1 -1
  146. package/build/runtime-scroll-TZKU5FST.js.br +0 -0
  147. package/build/runtime-scroll-TZKU5FST.js.gz +0 -0
  148. package/build/runtime-shapeBlends-4TWLMQYR.js +1 -0
  149. package/build/runtime-shapeBlends-4TWLMQYR.js.br +0 -0
  150. package/build/runtime-shapeBlends-4TWLMQYR.js.gz +0 -0
  151. package/build/{runtime-text-DG7PI7Q3.js → runtime-text-LXL2AZ4X.js} +1 -1
  152. package/build/runtime-text-LXL2AZ4X.js.br +0 -0
  153. package/build/runtime-text-LXL2AZ4X.js.gz +0 -0
  154. package/build/{runtime-textInputs-7DUIZBUD.js → runtime-textInputs-JNQQ7ZZK.js} +1 -1
  155. package/build/runtime-textInputs-JNQQ7ZZK.js.br +0 -0
  156. package/build/runtime-textInputs-JNQQ7ZZK.js.gz +0 -0
  157. package/build/{runtime-timeline-PUYKIKH5.js → runtime-timeline-XITVYO3P.js} +1 -1
  158. package/build/runtime-timeline-XITVYO3P.js.br +0 -0
  159. package/build/runtime-timeline-XITVYO3P.js.gz +0 -0
  160. package/build/{runtime-tracking-RZVR2RI6.js → runtime-tracking-CG7FVIUB.js} +1 -1
  161. package/build/runtime-tracking-CG7FVIUB.js.br +0 -0
  162. package/build/runtime-tracking-CG7FVIUB.js.gz +0 -0
  163. package/build/{runtime-transitions-MRLS2GRQ.js → runtime-transitions-5XSIRH23.js} +1 -1
  164. package/build/runtime-transitions-5XSIRH23.js.br +0 -0
  165. package/build/runtime-transitions-5XSIRH23.js.gz +0 -0
  166. package/build/{runtime-ui2d-D64PB4E3.js → runtime-ui2d-ZILV4MGY.js} +1 -1
  167. package/build/runtime-ui2d-ZILV4MGY.js.br +0 -0
  168. package/build/runtime-ui2d-ZILV4MGY.js.gz +0 -0
  169. package/build/{runtime-vectorShapes-KOUE7B7S.js → runtime-vectorShapes-KMHYX3X2.js} +1 -1
  170. package/build/runtime-vectorShapes-KMHYX3X2.js.br +0 -0
  171. package/build/runtime-vectorShapes-KMHYX3X2.js.gz +0 -0
  172. package/build/{runtime-vignette-Q7YIX7HT.js → runtime-vignette-4ISCJPBR.js} +1 -1
  173. package/build/runtime-vignette-4ISCJPBR.js.br +0 -0
  174. package/build/runtime-vignette-4ISCJPBR.js.gz +0 -0
  175. package/build/{runtime-webgpu-IZOUZ5D7.js → runtime-webgpu-H3DOMAKQ.js} +1 -1
  176. package/build/runtime-webgpu-H3DOMAKQ.js.br +0 -0
  177. package/build/runtime-webgpu-H3DOMAKQ.js.gz +0 -0
  178. package/build/runtime.cjs +7 -7
  179. package/build/runtime.js +1 -1
  180. package/build/runtime.js.br +0 -0
  181. package/build/runtime.js.gz +0 -0
  182. package/build/runtime.standalone.js +1 -1
  183. package/build/runtime.standalone.js.br +0 -0
  184. package/build/runtime.standalone.js.gz +0 -0
  185. package/build/runtime.standalone.webgl.js +1 -1
  186. package/build/runtime.standalone.webgl.js.br +0 -0
  187. package/build/runtime.standalone.webgl.js.gz +0 -0
  188. package/build/runtime.standalone.webgpu.js +1 -1
  189. package/build/runtime.standalone.webgpu.js.br +0 -0
  190. package/build/runtime.standalone.webgpu.js.gz +0 -0
  191. package/build/runtime.standalone.webgpu.micro.js +1 -1
  192. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  193. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  194. package/build/runtime.standalone.webgpu.min.js +1 -1
  195. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  196. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  197. package/package.json +1 -1
  198. package/build/runtime-bloom-6P2PGPRG.js.br +0 -0
  199. package/build/runtime-bloom-6P2PGPRG.js.gz +0 -0
  200. package/build/runtime-brightnessContrast-GQKYRZIS.js.br +0 -0
  201. package/build/runtime-brightnessContrast-GQKYRZIS.js.gz +0 -0
  202. package/build/runtime-chromaticAberration-24VUHGNX.js.br +0 -0
  203. package/build/runtime-chromaticAberration-24VUHGNX.js.gz +0 -0
  204. package/build/runtime-chunk-25CCJVWZ.js.br +0 -0
  205. package/build/runtime-chunk-25CCJVWZ.js.gz +0 -0
  206. package/build/runtime-chunk-2JC43YPS.js.br +0 -0
  207. package/build/runtime-chunk-2JC43YPS.js.gz +0 -0
  208. package/build/runtime-chunk-2RNKFNMP.js.br +0 -0
  209. package/build/runtime-chunk-2RNKFNMP.js.gz +0 -0
  210. package/build/runtime-chunk-3DN5WJCC.js.br +0 -0
  211. package/build/runtime-chunk-3DN5WJCC.js.gz +0 -0
  212. package/build/runtime-chunk-5NKADMLG.js.br +0 -0
  213. package/build/runtime-chunk-5NKADMLG.js.gz +0 -0
  214. package/build/runtime-chunk-5XJPFG76.js.br +0 -0
  215. package/build/runtime-chunk-5XJPFG76.js.gz +0 -0
  216. package/build/runtime-chunk-7Q6LMOLN.js.br +0 -0
  217. package/build/runtime-chunk-7Q6LMOLN.js.gz +0 -0
  218. package/build/runtime-chunk-AEDDM67H.js.br +0 -0
  219. package/build/runtime-chunk-AEDDM67H.js.gz +0 -0
  220. package/build/runtime-chunk-AZWULIMU.js.br +0 -0
  221. package/build/runtime-chunk-AZWULIMU.js.gz +0 -0
  222. package/build/runtime-chunk-BKTDKA4Q.js.br +0 -0
  223. package/build/runtime-chunk-BKTDKA4Q.js.gz +0 -0
  224. package/build/runtime-chunk-BNOO5KCO.js.br +0 -0
  225. package/build/runtime-chunk-BNOO5KCO.js.gz +0 -0
  226. package/build/runtime-chunk-BVZK2X37.js.br +0 -0
  227. package/build/runtime-chunk-BVZK2X37.js.gz +0 -0
  228. package/build/runtime-chunk-CICXWI7A.js.gz +0 -0
  229. package/build/runtime-chunk-D4ZNSF6F.js.gz +0 -0
  230. package/build/runtime-chunk-DDSU66IA.js.br +0 -0
  231. package/build/runtime-chunk-DDSU66IA.js.gz +0 -0
  232. package/build/runtime-chunk-DJQR2363.js.br +0 -0
  233. package/build/runtime-chunk-DJQR2363.js.gz +0 -0
  234. package/build/runtime-chunk-DM52PR6M.js.br +0 -0
  235. package/build/runtime-chunk-DM52PR6M.js.gz +0 -0
  236. package/build/runtime-chunk-F3YLZRKK.js.br +0 -0
  237. package/build/runtime-chunk-F3YLZRKK.js.gz +0 -0
  238. package/build/runtime-chunk-HXOUVAEQ.js.br +0 -0
  239. package/build/runtime-chunk-HXOUVAEQ.js.gz +0 -0
  240. package/build/runtime-chunk-KB2MNCH2.js.br +0 -0
  241. package/build/runtime-chunk-KB2MNCH2.js.gz +0 -0
  242. package/build/runtime-chunk-LGLIAPCL.js.br +0 -0
  243. package/build/runtime-chunk-LGLIAPCL.js.gz +0 -0
  244. package/build/runtime-chunk-RXAZMXPJ.js.br +0 -0
  245. package/build/runtime-chunk-RXAZMXPJ.js.gz +0 -0
  246. package/build/runtime-chunk-SF3NWUI3.js.br +0 -0
  247. package/build/runtime-chunk-SF3NWUI3.js.gz +0 -0
  248. package/build/runtime-chunk-UN6LBHPT.js.br +0 -0
  249. package/build/runtime-chunk-UN6LBHPT.js.gz +0 -0
  250. package/build/runtime-chunk-VGNSUY7Y.js.br +0 -0
  251. package/build/runtime-chunk-VGNSUY7Y.js.gz +0 -0
  252. package/build/runtime-chunk-YAQU4MFB.js.br +0 -0
  253. package/build/runtime-chunk-YAQU4MFB.js.gz +0 -0
  254. package/build/runtime-chunk-YBKTPAVG.js.br +0 -0
  255. package/build/runtime-chunk-YBKTPAVG.js.gz +0 -0
  256. package/build/runtime-classicRuntime-6ANLAKFQ.js.br +0 -0
  257. package/build/runtime-classicRuntime-6ANLAKFQ.js.gz +0 -0
  258. package/build/runtime-cloners-DFTPUSH6.js.br +0 -0
  259. package/build/runtime-cloners-DFTPUSH6.js.gz +0 -0
  260. package/build/runtime-components-EJDISCGU.js.br +0 -0
  261. package/build/runtime-components-EJDISCGU.js.gz +0 -0
  262. package/build/runtime-createDestroy-XGG3ML6E.js.br +0 -0
  263. package/build/runtime-createDestroy-XGG3ML6E.js.gz +0 -0
  264. package/build/runtime-depthOfField-UQP455BO.js.br +0 -0
  265. package/build/runtime-depthOfField-UQP455BO.js.gz +0 -0
  266. package/build/runtime-dragDrop-XIESFGX7.js.br +0 -0
  267. package/build/runtime-dragDrop-XIESFGX7.js.gz +0 -0
  268. package/build/runtime-gameControls-MAMEOR7N.js.br +0 -0
  269. package/build/runtime-gameControls-MAMEOR7N.js.gz +0 -0
  270. package/build/runtime-hair-7HQYEP6L.js.br +0 -0
  271. package/build/runtime-hair-7HQYEP6L.js.gz +0 -0
  272. package/build/runtime-hueSaturation-6EW62DC4.js.br +0 -0
  273. package/build/runtime-hueSaturation-6EW62DC4.js.gz +0 -0
  274. package/build/runtime-mergeStaticGeometries-X63B7YMB.js.br +0 -0
  275. package/build/runtime-mergeStaticGeometries-X63B7YMB.js.gz +0 -0
  276. package/build/runtime-miscActions-DGCWZJ2S.js.br +0 -0
  277. package/build/runtime-miscActions-DGCWZJ2S.js.gz +0 -0
  278. package/build/runtime-mouseHover-IYA5K7TR.js.br +0 -0
  279. package/build/runtime-mouseHover-IYA5K7TR.js.gz +0 -0
  280. package/build/runtime-noise-6CNKMG4F.js.br +0 -0
  281. package/build/runtime-noise-6CNKMG4F.js.gz +0 -0
  282. package/build/runtime-particles-YD5FG7Y6.js.br +0 -0
  283. package/build/runtime-particles-YD5FG7Y6.js.gz +0 -0
  284. package/build/runtime-paths-Z5IBSWFP.js.br +0 -0
  285. package/build/runtime-paths-Z5IBSWFP.js.gz +0 -0
  286. package/build/runtime-pixelation-BPCQKW2B.js.br +0 -0
  287. package/build/runtime-pixelation-BPCQKW2B.js.gz +0 -0
  288. package/build/runtime-resize-MOVFPHEO.js.br +0 -0
  289. package/build/runtime-resize-MOVFPHEO.js.gz +0 -0
  290. package/build/runtime-sceneTransition-7C6DEUI6.js.br +0 -0
  291. package/build/runtime-sceneTransition-7C6DEUI6.js.gz +0 -0
  292. package/build/runtime-scroll-DOZT3GXB.js.br +0 -0
  293. package/build/runtime-scroll-DOZT3GXB.js.gz +0 -0
  294. package/build/runtime-shapeBlends-VNB72GQB.js +0 -1
  295. package/build/runtime-shapeBlends-VNB72GQB.js.br +0 -0
  296. package/build/runtime-shapeBlends-VNB72GQB.js.gz +0 -0
  297. package/build/runtime-text-DG7PI7Q3.js.br +0 -0
  298. package/build/runtime-text-DG7PI7Q3.js.gz +0 -0
  299. package/build/runtime-textInputs-7DUIZBUD.js.br +0 -0
  300. package/build/runtime-textInputs-7DUIZBUD.js.gz +0 -0
  301. package/build/runtime-timeline-PUYKIKH5.js.br +0 -0
  302. package/build/runtime-timeline-PUYKIKH5.js.gz +0 -0
  303. package/build/runtime-tracking-RZVR2RI6.js.br +0 -0
  304. package/build/runtime-tracking-RZVR2RI6.js.gz +0 -0
  305. package/build/runtime-transitions-MRLS2GRQ.js.br +0 -0
  306. package/build/runtime-transitions-MRLS2GRQ.js.gz +0 -0
  307. package/build/runtime-ui2d-D64PB4E3.js.br +0 -0
  308. package/build/runtime-ui2d-D64PB4E3.js.gz +0 -0
  309. package/build/runtime-vectorShapes-KOUE7B7S.js.br +0 -0
  310. package/build/runtime-vectorShapes-KOUE7B7S.js.gz +0 -0
  311. package/build/runtime-vignette-Q7YIX7HT.js.br +0 -0
  312. package/build/runtime-vignette-Q7YIX7HT.js.gz +0 -0
  313. package/build/runtime-webgpu-IZOUZ5D7.js.br +0 -0
  314. package/build/runtime-webgpu-IZOUZ5D7.js.gz +0 -0
@@ -1 +1 @@
1
- import{a as e}from"./runtime-chunk-BVZK2X37.js";import{oa as t}from"./runtime-chunk-2RNKFNMP.js";import{h as a}from"./runtime-chunk-LGLIAPCL.js";import{c as s,e as o,f as r}from"./runtime-chunk-2PT2WH66.js";import{b as i}from"./runtime-chunk-MOPA2GCL.js";import{Fa as n,w as d}from"./runtime-chunk-ADHKZQMB.js";import{Hc as c}from"./runtime-chunk-KPOUV3HD.js";var l=new c;function u(e,t,s=!1){let o=[],c=a=>{let s=a.data;delete a.states,a.currentState=null,a.reversibleToState=null,a.currentTransitionEvent=null;for(let e of s.states){let t={...e.data};a.states||(a.states={}),a.states[e.id]=i.patch(s,t)}p(e.scene,a,null,t,void 0!==s.events.find(e=>"Follow"===e.data.type||"LookAt"===e.data.type)),f(e)};e.scene.traverse2D(c),e.traverseChildren(i=>{if(s&&(i.rigidBody?.setTranslation(i.position0,!0),i.rigidBody?.setRotation(i.rotation0,!0),i.rigidBody?.setLinvel(l,!0),i.rigidBody?.setAngvel(l,!0)),!a.is(i))return;let u=i.uuid,f=i.data;if(delete i.states,i.uuid===d)return;let m=!1;o.some(t=>e.scene.find(u)?.isDescendantOf(t))?m=!0:!0===f.physics?.fusedBody&&"dynamic"===f.physics.rigidBody&&o.push(u),i.data=f,i.currentState=null,i.reversibleToState=null,i.currentTransitionEvent=null,i.transitionState={settled:!0,state:null};for(let t of f.states){let a={...t.data};!0===e.data.globalPhysics.usePhysics&&f.physics&&("dynamic"===f.physics.rigidBody||m)&&(void 0!==t.data.position&&delete a.position,void 0!==t.data.rotation&&delete a.rotation),i.states||(i.states={}),i.states[t.id]=n.patch(f,a)}p(e.scene,i,null,t,void 0!==f.events.find(e=>"Follow"===e.data.type||"LookAt"===e.data.type)),r(i)&&i.frame&&(i.frame.traverse(e=>c(e)),i.uiCanvas?.applySize())}),f(e),e.frame&&(e.frame.traverse(e=>c(e)),e.uiCanvas?.applySize())}function f(e){e.traverseEntity(t=>{for(let a of t.data.events){let t=[];switch(a.data.type){case"Follow":case"MouseHover":case"Scroll":case"MouseDown":case"MouseUp":case"MousePress":case"KeyUp":case"KeyDown":case"KeyPress":case"Collision":t.push(...a.data.actions);break;case"GameControl":for(let e of Object.values(a.data.gameActions))t.push(...e);break;case"DragDrop":t.push(...a.data.dragDropActions.drag,...a.data.dragDropActions.drop);break;case"Conditional":t.push(...a.data.inActions,...a.data.outActions)}for(let a of t)if("Create"===a.data.type&&"Yes"===a.data.hideBase){let t=e.scene.find(a.data.object);t&&(t.visible=!1)}}})}function p(a,r,i,n,d=!1){if(a.markShadowsDirty(),r instanceof t&&!s(r)&&r.removeInteractionGeometry(n),o(r)?r.changeSelectedState(i,{shared:n},d):r.changeSelectedState(i,{scene:a,shared:n},d),r instanceof t&&r.updateGeometryGroupsIfNeeded(),r instanceof e&&r.updateCameraState(r.dataPatched,{scene:a,shared:n}),!o(r)){if(r.cloner){let e=!1;for(let t of r.cloner.children)t.playModeVisible=void 0,void 0!==t.transformOverride&&(t.transformOverride=void 0,e=!0);e&&a.addPendingUpdateCloner(r),r.cloner.syncInstanceMatrices()}r.updateVisible()}}export{u as a};
1
+ import{a as e}from"./runtime-chunk-AW6U245D.js";import{oa as t}from"./runtime-chunk-III53OHU.js";import{h as a}from"./runtime-chunk-PQ42NYOR.js";import{c as s,e as o,f as r}from"./runtime-chunk-2PT2WH66.js";import{b as i}from"./runtime-chunk-MOPA2GCL.js";import{Fa as n,w as d}from"./runtime-chunk-ADHKZQMB.js";import{Hc as c}from"./runtime-chunk-KPOUV3HD.js";var l=new c;function u(e,t,s=!1){let o=[],c=a=>{let s=a.data;delete a.states,a.currentState=null,a.reversibleToState=null,a.currentTransitionEvent=null;for(let e of s.states){let t={...e.data};a.states||(a.states={}),a.states[e.id]=i.patch(s,t)}p(e.scene,a,null,t,void 0!==s.events.find(e=>"Follow"===e.data.type||"LookAt"===e.data.type)),f(e)};e.scene.traverse2D(c),e.traverseChildren(i=>{if(s&&(i.rigidBody?.setTranslation(i.position0,!0),i.rigidBody?.setRotation(i.rotation0,!0),i.rigidBody?.setLinvel(l,!0),i.rigidBody?.setAngvel(l,!0)),!a.is(i))return;let u=i.uuid,f=i.data;if(delete i.states,i.uuid===d)return;let m=!1;o.some(t=>e.scene.find(u)?.isDescendantOf(t))?m=!0:!0===f.physics?.fusedBody&&"dynamic"===f.physics.rigidBody&&o.push(u),i.data=f,i.currentState=null,i.reversibleToState=null,i.currentTransitionEvent=null,i.transitionState={settled:!0,state:null};for(let t of f.states){let a={...t.data};!0===e.data.globalPhysics.usePhysics&&f.physics&&("dynamic"===f.physics.rigidBody||m)&&(void 0!==t.data.position&&delete a.position,void 0!==t.data.rotation&&delete a.rotation),i.states||(i.states={}),i.states[t.id]=n.patch(f,a)}p(e.scene,i,null,t,void 0!==f.events.find(e=>"Follow"===e.data.type||"LookAt"===e.data.type)),r(i)&&i.frame&&(i.frame.traverse(e=>c(e)),i.uiCanvas?.applySize())}),f(e),e.frame&&(e.frame.traverse(e=>c(e)),e.uiCanvas?.applySize())}function f(e){e.traverseEntity(t=>{for(let a of t.data.events){let t=[];switch(a.data.type){case"Follow":case"MouseHover":case"Scroll":case"MouseDown":case"MouseUp":case"MousePress":case"KeyUp":case"KeyDown":case"KeyPress":case"Collision":t.push(...a.data.actions);break;case"GameControl":for(let e of Object.values(a.data.gameActions))t.push(...e);break;case"DragDrop":t.push(...a.data.dragDropActions.drag,...a.data.dragDropActions.drop);break;case"Conditional":t.push(...a.data.inActions,...a.data.outActions)}for(let a of t)if("Create"===a.data.type&&"Yes"===a.data.hideBase){let t=e.scene.find(a.data.object);t&&(t.visible=!1)}}})}function p(a,r,i,n,d=!1){if(a.markShadowsDirty(),r instanceof t&&!s(r)&&r.removeInteractionGeometry(n),o(r)?r.changeSelectedState(i,{shared:n},d):r.changeSelectedState(i,{scene:a,shared:n},d),r instanceof t&&r.updateGeometryGroupsIfNeeded(),r instanceof e&&r.updateCameraState(r.dataPatched,{scene:a,shared:n}),!o(r)){if(r.cloner){let e=!1;for(let t of r.cloner.children)t.playModeVisible=void 0,void 0!==t.transformOverride&&(t.transformOverride=void 0,e=!0);e&&a.addPendingUpdateCloner(r),r.cloner.syncInstanceMatrices()}r.updateVisible()}}export{u as a};
@@ -1 +1 @@
1
- import{h as e,oa as t}from"./runtime-chunk-2RNKFNMP.js";import{$c as r,Ec as a,Hc as o,dd as n}from"./runtime-chunk-KPOUV3HD.js";function i(r){if(Array.isArray(r.material)){for(let e of r.material)if(0===e.getLayersOfType("outline").length)return}else if(!e(r.material)||0===r.material.getLayersOfType("outline").length)return;r instanceof t&&r.is2DAndNoDepth?function(e){if(e.geometry.attributes.extrudeNormals||!e.geometry.attributes.position)return;let t=e.geometry.attributes.position.array,r=new Float32Array(t.length),a=new o;for(let e=0;e<t.length;e+=3)a.set(t[e],t[e+1],t[e+2]).normalize(),r[e]=a.x,r[e+1]=a.y,r[e+2]=a.z;e.geometry.setAttribute("extrudeNormal",new n(r,3))}(r):function(e){if(e.geometry.attributes.extrudeNormal||!e.geometry.attributes.position||!e.geometry.attributes.normal)return;let t=new Map,r=e.geometry.attributes,a=r.position.array,i=r.normal.array,l=new Float32Array(a.length);for(let e=0;e<a.length;e+=3){let r=`${a[e]}_${a[e+1]}_${a[e+2]}`,n=new o(i[e],i[e+1],i[e+2]);t.has(r)?t.get(r)?.normals.push(n):t.set(r,{normals:[n],result:new o})}t.forEach((e,t)=>{for(let t of e.normals)e.result.add(t);e.result.divideScalar(e.normals.length)});for(let e=0;e<a.length;e+=3){let r=`${a[e]}_${a[e+1]}_${a[e+2]}`,o=t.get(r)?.result;o&&(l[e]=o.x,l[e+1]=o.y,l[e+2]=o.z)}e.geometry.setAttribute("extrudeNormal",new n(l,3))}(r)}function l(e){return Math.min(2047,Math.max(1,Math.round(2048*e)))/2048}function s(e){if(!e.geometry.attributes.position)return;let t=e.geometry.attributes,o=t.position.array,n=t.randomColor;if(void 0!==n&&3*n.count===o.length)return;let i=new Float32Array(o.length),s=parseInt(e.uuid.replace(/\D/g,"")),u=[l(a.seededRandom(s)),l(a.seededRandom(s+1e4)),l(a.seededRandom(s+2e4))];for(let e=0;e<o.length;e++)i[e]=u[e%3];e.geometry.setAttribute("randomColor",new r(i,3))}export{i as a,s as b};
1
+ import{h as e,oa as t}from"./runtime-chunk-III53OHU.js";import{$c as r,Ec as a,Hc as o,dd as n}from"./runtime-chunk-KPOUV3HD.js";function i(r){if(Array.isArray(r.material)){for(let e of r.material)if(0===e.getLayersOfType("outline").length)return}else if(!e(r.material)||0===r.material.getLayersOfType("outline").length)return;r instanceof t&&r.is2DAndNoDepth?function(e){if(e.geometry.attributes.extrudeNormals||!e.geometry.attributes.position)return;let t=e.geometry.attributes.position.array,r=new Float32Array(t.length),a=new o;for(let e=0;e<t.length;e+=3)a.set(t[e],t[e+1],t[e+2]).normalize(),r[e]=a.x,r[e+1]=a.y,r[e+2]=a.z;e.geometry.setAttribute("extrudeNormal",new n(r,3))}(r):function(e){if(e.geometry.attributes.extrudeNormal||!e.geometry.attributes.position||!e.geometry.attributes.normal)return;let t=new Map,r=e.geometry.attributes,a=r.position.array,i=r.normal.array,l=new Float32Array(a.length);for(let e=0;e<a.length;e+=3){let r=`${a[e]}_${a[e+1]}_${a[e+2]}`,n=new o(i[e],i[e+1],i[e+2]);t.has(r)?t.get(r)?.normals.push(n):t.set(r,{normals:[n],result:new o})}t.forEach((e,t)=>{for(let t of e.normals)e.result.add(t);e.result.divideScalar(e.normals.length)});for(let e=0;e<a.length;e+=3){let r=`${a[e]}_${a[e+1]}_${a[e+2]}`,o=t.get(r)?.result;o&&(l[e]=o.x,l[e+1]=o.y,l[e+2]=o.z)}e.geometry.setAttribute("extrudeNormal",new n(l,3))}(r)}function l(e){return Math.min(2047,Math.max(1,Math.round(2048*e)))/2048}function s(e){if(!e.geometry.attributes.position)return;let t=e.geometry.attributes,o=t.position.array,n=t.randomColor;if(void 0!==n&&3*n.count===o.length)return;let i=new Float32Array(o.length),s=parseInt(e.uuid.replace(/\D/g,"")),u=[l(a.seededRandom(s)),l(a.seededRandom(s+1e4)),l(a.seededRandom(s+2e4))];for(let e=0;e<o.length;e++)i[e]=u[e%3];e.geometry.setAttribute("randomColor",new r(i,3))}export{i as a,s as b};
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-CICXWI7A.js";import{d as e}from"./runtime-chunk-AEDDM67H.js";import{Uc as s}from"./runtime-chunk-KPOUV3HD.js";var r=class extends(e(s,t)){constructor(t,e,s){super(),this.super_Entity(t,e),this.context=s,this.objectHelper.update()}updateState(t,e){this.updateState_Entity(t,e)}};export{r as a};
1
+ import{a as t}from"./runtime-chunk-ZEDD7JAI.js";import{d as e}from"./runtime-chunk-AUUKCZJE.js";import{Uc as s}from"./runtime-chunk-KPOUV3HD.js";var r=class extends(e(s,t)){constructor(t,e,s){super(),this.super_Entity(t,e),this.context=s,this.objectHelper.update()}updateState(t,e){this.updateState_Entity(t,e)}};export{r as a};
@@ -1 +1 @@
1
- import{f as t}from"./runtime-chunk-RTLL6WIB.js";import{h as e}from"./runtime-chunk-2PT2WH66.js";import{c as i}from"./runtime-chunk-TZCHGFVF.js";import{C as s,Ca as r,Da as a,Fa as n,J as o,Sa as l,i as h,j as p,k as d,n as c}from"./runtime-chunk-ADHKZQMB.js";import{Ec as u,Gc as m,Hc as f,Md as y,Qc as v,Rc as g,Rd as x,Tc as S,Te as w,Zc as M,bd as B,dd as b,ed as P,fd as E,md as A,nd as C}from"./runtime-chunk-KPOUV3HD.js";var D={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function O(t,e){let i=[];if(e.length!==t.length)return null;{let s=0;for(;s<t.length;){if("*"===e[s])i.push(t[s]);else if(t[s]!==e[s])return null;s+=1}}return i}function _(t,e){let i=[];if(!(e.length<=t.length))return null;{let s=0;for(;s<e.length;){if("*"===e[s])i.push(t[s]);else if(t[s]!==e[s])return null;s+=1}}return i}var V=new f,R=new f,T=new v,W=[new f(-1,1,1),new f(-1,-1,1),new f(1,-1,1),new f(1,1,1),new f(-1,1,-1),new f(-1,-1,-1),new f(1,-1,-1),new f(1,1,-1)],U=[[0,3],[1,2],[5,6],[4,7],[0,1],[3,2],[7,6],[4,5],[0,4],[1,5],[2,6],[3,7]],I=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],L=(t,e,i)=>{t.updateEntityBoxSize(V,R),T.copy(e).multiply(t.matrixWorld),0===R.x&&0===R.y&&0===R.z?i.push(new f(V.x,V.y,V.z).applyMatrix4(T)):W.forEach(t=>{i.push(t.clone().multiply(R).add(V).applyMatrix4(T))})},F=class extends M{constructor(){super(...arguments),this.matrix=new v,this.vertices=[],this.faces=[],this.edges=[],this.centerEdges=[]}copy(t){return super.copy(t),this.matrix.copy(t.matrix),this.vertices=t.vertices.map(t=>t.clone()),this.faces=t.faces.map(t=>t.clone()),this.edges=t.edges.map(t=>t.clone()),this.centerEdges=t.centerEdges.map(t=>t.clone()),this}setFromObjectSize(t,e=!1){t.updateWorldMatrix(!1,e),this.makeEmpty(),this.matrix.copy(t.matrixWorld);let i=(new v).copy(t.matrixWorld).invert();return this.expandByObjectSize(t,i,e)}expandByObjectSize(t,e,i=!1){let s=[];if(!0===i){let i=[];t.traverseEntity(t=>{if(t.visible||t.cloner&&t.data.visible){if(!("geometry"in t))return T.copy(e).multiply(t.matrixWorld),void i.push((new f).applyMatrix4(T));L(t,e,s)}}),0===s.length&&s.push(...i)}else L(t,e,s);return this.setFromPoints(s)}getCenter(t){return(t=super.getCenter(t)).applyMatrix4(this.matrix),t}getPositionToCenter(t){return(t=super.getCenter(t)).applyMatrix4(T.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(R).multiplyScalar(.5),this.getCenter(V),T.copy(this.matrix).setPosition(V),this.vertices=W.map(t=>t.clone().multiply(R).applyMatrix4(T))}computeEdges(){this.vertices.length>0&&this.computeVertices(),this.edges=U.map(([t,e])=>new w(this.vertices[t],this.vertices[e])),this.centerEdges=this.edges.map(t=>t.getCenter(new f))}computeFaces(){this.vertices.length>0&&this.computeVertices(),this.faces=I.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},z=new f(1,1,1);function j(t,e,i,s,r=new v){return r.compose(t,e,z).multiply(i).scale(s)}var N,k=new v;(N||(N={})).is=function(t){return t&&t.__isSPEObject};var G=t=>class extends t{constructor(){super(...arguments),this.previousModelViewMatrix=new v,this.copyPreviousMatrix=!0,this.pivotMatrix=new v,this.matrixWorldRigid=new v,this.shearScale=new v,this.shearScaleInv=new v,this.shearMatrix=new v}get __isSPEObject(){return!0}getPhysicsLocalMatrix(t){return!!this.rigidBody?.isDynamic()&&(t.copy(this.matrixWorld),this.hasNonUniformScale&&t.multiply(this.shearScaleInv),this.parent&&t.premultiply(k.copy(this.parent.matrixWorld).invert()),t.multiply(k.copy(this.pivotMatrix).invert()),!0)}isDescendantOf(t){t instanceof S&&(t=t.uuid);let e=this;for(;e.parent;){if(e.parent.uuid===t)return!0;e=e.parent}return!1}updateMatrix(){!this.shearMatrix||(j(this.position,this.quaternion,this.shearMatrix,this.scale,this.matrix),this.matrixWorldNeedsUpdate=!0)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}traverseChildren(t,e=0){for(let i of this.children)N.is(i)&&i.traverseObject(t,e+1)}traverseObject(t,e=0){if(!0!==t(this,e))for(let i of this.children)N.is(i)&&i.traverseObject(t,e+1)}updateMatrixWorldRigid(){this.hasNonUniformScale=l(this.matrixWorld,this.matrixWorldRigid,this.shearScale),this.matrixWorldRigid.copyPosition(this.matrixWorld),this.shearScaleInv.copy(this.shearScale).invert()}attach(t,e){this.updateWorldMatrix(!0,!1);let i=(new v).copy(this.matrixWorld).invert();return null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),i.multiply(t.parent.matrixWorld)),t.applyMatrix4(i),t.updateWorldMatrix(!1,!1),this.add(t),void 0!==e&&(this.children.pop(),this.children.splice(e,0,t)),this}copy(t,e=!1){return super.copy(t,e),this}onAfterRender(t,e,i,s,r,a){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}},H=class extends x{constructor(){super()}getPoints(t=12){let e,i=[],s=this.getCurveLengths(),r=s[s.length-1]/s.length;for(let a=0,n=this.curves;a<n.length;a++){let o=n[a],l=0===a?s[a]:s[a]-s[a-1],h=Math.ceil(t*l/r),p=o.getPoints(h);for(let t=0;t<p.length;t++){let s=p[t];e&&e.equals(s)||(i.push(s),e=s)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}},q=.001,Z=new f,Q=new f,K=new f,J=new f,X=new f,Y=new f,$=new f,tt=new f,et=new f;function it(t,e,i){return Z.subVectors(e,t),Q.subVectors(e,i),Z.cross(Q).length()<=q}var st=new WeakMap;function rt(t){let e=st.get(t.points);if(void 0!==e&&e.isClosed===t.isClosed)return e.curve;let i=function(t){let e=t.points,i=[e[0]],s=[new f(...e[0].data.position)];K.copy(s[0]);for(let t=0;t<e.length-1;t++)Z.fromArray(e[t].data.position),Q.fromArray(e[t+1].data.position),X.subVectors(Z,K),$.subVectors(Z,Q),X.cross($).length()>q&&(i.push(e[t]),s.push((new f).copy(Z)),K.copy(Z));let r=e[e.length-1];i.push(r),s.push(new f(...r.data.position));let a=t.isClosed,n=i.length-(a?0:1),o=i.length,l=[],h=[];for(let t=0;t<o;t++){let e=i[t].data;l.push(new f(...e.controlPrevious.position)),h.push(new f(...e.controlNext.position))}let p=[];for(let t=0;t<n;t++){let e=t===o-1?0:t+1;p.push(it(s[t],h[t],s[e])&&it(s[t],l[e],s[e]))}let d=[];for(let t=0;t<o;t++){let e=i[t].data,r=s[t],n={position:r,prevDir:void 0,nextDir:void 0,controlPrevious:l[t],controlNext:h[t],tan:void 0,baseRoundness:e.roundness,removedLength:0};if(d.push(n),0===e.roundness||!a&&(0===t||t===o-1))continue;let c=a&&0==t?o-1:t-1,u=a&&t==o-1?0:t+1,m=(new f).subVectors(s[c],r).normalize(),y=(new f).subVectors(s[u],r).normalize();n.prevDir=m,n.nextDir=y;let v=p[a&&0===t?o-1:t-1],g=p[t];if(v&&g){J.addVectors(m,y).normalize();let t=K.crossVectors(J,m).length()/m.dot(J);n.tan=t,n.removedLength=e.roundness/t}}for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],s=d[e];if(0!==i.removedLength||0!==s.removedLength){let t=i.position.distanceTo(s.position);i.removedLength=Math.min(i.removedLength,t/2),s.removedLength=Math.min(s.removedLength,t/2)}}let c=new Array(2*o).fill(null);for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],s=d[e],r=null;if(p[t]){let t=i.position.clone(),e=s.position.clone();(0!==i.removedLength||0!==s.removedLength)&&(i.nextDir&&t.add(K.copy(i.nextDir).setLength(i.removedLength)),s.prevDir&&e.add(K.copy(s.prevDir).setLength(s.removedLength))),t.distanceTo(e)>q&&(r=new y(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(s.position)>q&&(r=new y(i.position,i.controlNext,s.controlPrevious,s.position));c[2*t+1]=r}for(let t=0;t<o;t++){let e=d[t];if(0===e.removedLength)continue;let i=e.position,s=e.prevDir.clone().multiplyScalar(e.removedLength).add(i),r=e.nextDir.clone().multiplyScalar(e.removedLength).add(i),a=e.tan*e.removedLength;J.addVectors(e.prevDir,e.nextDir).normalize(),X.copy(s).lerp(r,.5);let n=s.distanceTo(r)/2;et.copy(J).multiplyScalar(Math.sqrt(Math.pow(a,2)-Math.pow(n,2))).add(X),Y.copy(J).multiplyScalar(-a).add(et);let o=i.distanceTo(Y)/i.distanceTo(X);$.copy(e.prevDir).multiplyScalar(o*i.distanceTo(s)).add(i),tt.copy($).lerp(Y,2);let l=s.clone().lerp($,4/3),h=r.clone().lerp(tt,4/3);c[2*t]=new y(s,l,h,r)}let u=new H;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return st.set(t.points,{isClosed:t.isClosed,curve:i}),i}var at,nt=new v,ot=new m,lt=new m,ht=new g,pt=new f,dt=new f(0,1,0);(at||(at={})).is=function(t){return t&&t.__isEntity};var ct=t=>at.is(t),ut={type:"completeState",isfromEntity:!0},mt=["x","y","z"],ft=new f,yt=new f(1,1,1),vt=new m,gt=new g,xt=new v,St=l=>class extends(G(l)){constructor(){super(...arguments),this.raycastLock=!1,this.scaleLock=!1,this.disposed=!1,this.stateSelection=null,this.destroyedInAction=!1,this.instances=[],this.prevState=null,this.currentState=null,this.currentAnimationAction=null,this.reversibleToState=null,this.transitionState={settled:!0,state:null},this.currentTransitionEvent=null,this.previousAction=null,this._singleBBox=new F,this._recursiveBBox=new F,this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0,this._needApplyPathSnapping=!0,this.attachedPaths=new Set}get __isEntity(){return!0}entityChildren(t){let e=this.children[t];if(at.is(e))return e}entityChildrenCount(){let t=this.children.length;for(;t--;)if(at.is(this.children[t]))return t+1;return 0}get isConcreteEntity(){return"string"==typeof this.identity}get isVirtualEntity(){return"string"!=typeof this.identity}get isInstanceRoot(){return this.isConcreteEntity&&"Instance"===this.data.type}nearestInstanceSelfOrParent(){let t=this;for(;"Instance"!==t.data.type;){let e=t.parent;if(!at.is(e))return;t=e}return t}forInstancesRec(t){this.instances.forEach(e=>{e.disposed||t(e),e.forInstancesRec(t)})}super_Entity(t,e){"string"==typeof t&&(this.uuid=t),this.identity=t,this.data=e,this.matrixAutoUpdate=!1,this.dataPatched=this.data}changeSelectedState(t,e,i=!1){if(0!==this.data.states.length||i){for(let t of this.data.states)n.toOps(this.data,t.data).forEach(t=>{let i=p.replaceProps(t,this.data);this.dataPatched=this.data,this.updateByPatchedOp(i,this.data,e)});if(null!==t){let i=this.data.states.data(t);i&&(this.dataPatched=n.patch(this.data,i),n.toOps(this.data,i).forEach(t=>{this.updateByPatchedOp(t,this.dataPatched,e)}))}i&&this.updateTransformState(this.dataPatched,e),this.stateSelection=t,this.updatePathSnapping(this.dataPatched.pathSnapping)}}get singleBBox(){return this.singleBBoxNeedsUpdate&&(this.singleBBoxNeedsUpdate=!1,this._singleBBox.setFromObjectSize(this,!1),this._singleBBox.computeVertices(),this._singleBBox.computeEdges(),this._singleBBox.computeFaces()),this._singleBBox}get recursiveBBox(){return this.recursiveBBoxNeedsUpdate&&(this.recursiveBBoxNeedsUpdate=!1,this._recursiveBBox.setFromObjectSize(this,!0),this._recursiveBBox.computeVertices(),this._recursiveBBox.computeEdges(),this._recursiveBBox.computeFaces()),this._recursiveBBox}updateEntityBoxSize(t,e){t.setScalar(0),e.setScalar(0)}resetBBoxNeedsUpdateSelf(){this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0}resetBBoxNeedsUpdate(){this.resetBBoxNeedsUpdateSelf(),this.traverseAncestors(t=>{ct(t)&&t.resetBBoxNeedsUpdateSelf()}),this.traverseEntity(t=>{t.resetBBoxNeedsUpdateSelf()})}find(t){let e;return this.traverseEntity(i=>{i.uuid===t&&(e=i)}),e}traverseSortNextHelper(){let t=this.parent;if(t){let e=t.children,i=e.indexOf(this)+1;if(at.is(e[i]))return e[i];if(at.is(t))return t.traverseSortNextHelper()}}sortNext(){let t=this.children;return this.children.length>0&&at.is(this.children[0])?t[0]:this.traverseSortNextHelper()}goUp(t){let e=this;for(;t>0&&null!==e;)e=e.parent,t-=1;return e}hasAnccestorOrSelf(t){return this===t||this.hasAnccestor(t)}hasAnccestor(t){let e=this.parent;for(;e;){if(t===e)return!0;e=e.parent}return!1}countToAccestor(t){let e=0,i=this;for(;i!==t;){if(null===i)return-1;i=i.parent,e+=1}return e}forEachEntity(t){for(let e of this.children)ct(e)&&t(e)}traverseEntityAncestors(t){this.traverseAncestors(e=>{at.is(e)&&t(e)})}traverseConcreteEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ct(i)&&i.isConcreteEntity&&i.traverseEntity(t,e+1)}traverseEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ct(i)&&i.traverseEntity(t,e+1)}traverseVisibleEntity(t){t(this);for(let e of this.children)ct(e)&&e.visible&&e.traverseVisibleEntity(t)}updateMatrix(){super.updateMatrix(),this.cloner&&this.cloner.onObjUpdateMatrix(),this.dispatchEvent({type:"updateMatrix"})}updateMatrixWorld(t){super.updateMatrixWorld(t),this.dispatchEvent({type:"updateMatrixWorld"})}copy(t,e=!1){return super.copy(t,e),this.dataPatched=t.dataPatched,this.raycastLock=t.raycastLock,this.scaleLock=t.scaleLock,this}hasEntityChild(){return this.children.some(t=>ct(t))}isAncestorOf(t){if(this.uuid===t)return!1;let e=!1;return this.traverseEntity(i=>{i.uuid===t&&(e=!0)}),e}toObjectTransformState(e=[]){this.updateWorldMatrix(!0,!1);let i={position:this.position.toArray(),rotation:[this.rotation.x*u.RAD2DEG,this.rotation.y*u.RAD2DEG,this.rotation.z*u.RAD2DEG],scale:this.scale.toArray(),shear:s.fromMatrix(this.shearMatrix.toArray()),pivot:[0,0,0],pivotRotation:[0,0,0]};return t(i,e)}getTransformValues(t,e,i){return e[t].map((e,s)=>i?.shared.getVariable(e,[this.uuid,t,mt[s]])??e)}updateTransformState(t,e){let i=!1;if(t.position&&(this.position.fromArray(this.getTransformValues("position",t,e)),i=!0),t.rotation&&(ft.fromArray(this.getTransformValues("rotation",t,e)).multiplyScalar(u.DEG2RAD),this.rotation.setFromVector3(ft),i=!0),t.scale&&(this.scale.fromArray(this.getTransformValues("scale",t,e)),i=!0),t.shear&&(this.shearMatrix.fromArray(s.toMatrix(t.shear)),i=!0),void 0!==t.pivot||void 0!==t.pivotRotation)if(i=!0,void 0!==t.pivot&&void 0!==t.pivotRotation)this.pivotMatrix.compose(ft.fromArray(t.pivot).negate(),vt.setFromEuler(gt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),yt);else if(void 0!==t.pivot)this.pivotMatrix.setPosition(-t.pivot[0],-t.pivot[1],-t.pivot[2]);else if(void 0!==t.pivotRotation){let e=ft.setFromMatrixPosition(this.pivotMatrix);vt.setFromEuler(gt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),this.pivotMatrix.compose(e,vt,yt)}return i&&(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)})),t.position&&t.rotation&&t.scale&&this.updateWorldMatrix(!1,!0),i}onVariableUpdate(t=!1){t?this.resetBBoxNeedsUpdate():(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)}),this.requestRender())}dispose(){this.disposed=!0,this.cloner&&(this.cloner.dispose(),this.cloner=void 0)}disposeChildrenRecursively(){for(let t of this.children)at.is(t)&&t.disposeRecursively()}disposeRecursively(){this.dispose(),this.children.forEach(t=>{at.is(t)&&t.disposeRecursively()})}toState(e=[]){let i={name:this.name,visible:this.visible,raycastLock:this.raycastLock,...this.toObjectTransformState(e)};return t(i,e)}updateByObjUpdateOp(t,e){void 0!==t&&this.updateByOp({type:0,props:t,path:[]},{...this.data,...t},e,!1)}updateByOp(t,e,i,s){let o=this.data;this.data=e;let l=t,p=_(t.path,["states","*"]);if(null!==p){if(0===t.type){let[e]=p;if(this?.stateSelection===e){let e={...t.props};if(delete e.name,Object.values(t.props).some(t=>void 0===t)){let i=this.data;if(void 0!==i){let s=c.zoom(i,t.path.slice(2));if(s)for(let i in t.props)void 0===t.props[i]&&i in s&&(e[i]=s[i])}}l={...t,props:e,path:t.path.slice(2)}}}}else if(0===t.type){let e=this.stateSelection?this.data.states.data(this.stateSelection):void 0;if(void 0!==e){if(void 0!==t.props.name&&e.name){let{name:t,...i}=e;e=i}if(void 0!==t.props.material&&"material"in e){let{material:t,...i}=e;e=i}let i=c.removeOverridden(t.path,t.props,e);l={...t,props:i}}}if(this.updateByPatchedOpBase(l,n.patch(this.data,this.stateSelection?this.data.states.data(this.stateSelection):void 0),i),_(t.path,["overrides"])){let s=[],a=[...t.path];for(s.push(a[1]),a.splice(0,2);a.length>0&&"descendants"===a[0];)s.push(a[1]),a.splice(0,2);if(void 0===s[s.length-1]){if(0===t.type)for(let e of Object.keys(t.props)){s[s.length-1]=e;let r=i.scene.findInstance([this.uuid,...s]);r&&(r.overrideData=t.props[e],r.updateState(h.apply(r.component.data,r.overrideData),i))}}else{let n=i.scene.findInstance([this.uuid,...s]);if(n){let o=c.zoom(n.component.data,a);if(0===(t={...t,path:a}).type){let e=t.props;if(o)for(let[i,s]of Object.entries(t.props))void 0===s&&(e===t.props&&(e={...t.props}),e[i]=o[i]);t={...t,props:e}}n.overrideData=r.resolve(e.overrides,s),n.updateByOp(t,d.applySimple(n.data,t),i,!1)}}}else if(this.instances.length>0){let s;if(0===t.path.length&&0===t.type){let e;for(let i of a.rootOverrideProps)i in t.props&&(void 0===e&&(e={}),e[i]=t.props[i]);e&&(s={...t,props:e})}else for(let e of a.rootOverrideProps)if(_(t.path,[e])){s=t;break}void 0!==s&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=h.filterOp(t.overrideData,s);e&&t.updateByOp(e,d.applySimple(t.data,e),i,!0)}}),this.instances.forEach(s=>{if(!s.isInstanceRoot){let r=h.filterOp(s.overrideData,t);if(r){let a;a=o===s.data&&t===r?e:d.applySimple(s.data,r),s.updateByOp(r,a,i,!0)}}})}}updateByPatchedOpBase(t,e,i){if(this.dataPatched=e,0===t.path.length&&0===t.type)void 0!==t.props.type&&!o.is(t.props.type)&&D.changeEntityProptotype(this,this.data,i);else if(1===t.path.length&&"geometry"===t.path[0]&&0===t.type&&"type"in t.props){D.changeEntityProptotype(this,this.data,i);for(let t of this.children)at.is(t)&&t.updateVisible(i.scene)}this.updateByPatchedOp(t,e,i)}updateByPatchedOp(t,e,i){if(0===t.path.length&&0===t.type?this.updateState(t.props,i):0===t.type&&("resolutionLevel"in t.props||"useChildrenColors"in t.props)&&this.updateState(e,i),"morphTargetInfluences"===t.path[0]&&0===t.type){let s=e.morphTargetInfluences.get(t.path[1])?.data.name;s&&this.updateMorphInfluences(s,i.shared.getVariable(t.props.value,[this.uuid,"morphTargetInfluences",s]))}if(null!==_(t.path,["pathSnapping"])&&(this.updatePathSnapping(e.pathSnapping),this.isVirtualEntity&&i.scene?.syncInstancePathConstraint(this)),null!==_(t.path,["cloner"])){let s=d.drop(t,1);0===s.path.length&&0===s.type&&!0===s.props.disabled?this.setFromClonerState(null,i):this.cloner?this.cloner.updateState(e.cloner,i):(this.setFromClonerState(e.cloner,i),this.expandCloner(i)),this.updateVisible(i.scene)}}updatePathSnapping(t=this.dataPatched.pathSnapping){this._updatedPathSnapping=t,this._needApplyPathSnapping=!0}get updatedPathSnapping(){return this._updatedPathSnapping}applyPathSnapping(t){if(!1===this._needApplyPathSnapping)return;let e=this._updatedPathSnapping?.pathId??this.dataPatched.pathSnapping.pathId,i=this._updatedPathSnapping?.slide??this.dataPatched.pathSnapping.slide??0,s=this._updatedPathSnapping?.offset??this.dataPatched.pathSnapping.offset??0,r=this._updatedPathSnapping?.orientation??this.dataPatched.pathSnapping.orientation;if(null===e)return;let a=t.find(this.isVirtualEntity&&t.pathConstraints.getConstraint(this.uuid)||e);if(!a)return;this._needApplyPathSnapping=!1;let n=a.data;if(n.geometry.path.points.length<=1)return;let o=rt(n.geometry.path),l=function(t){let e=t%1;return e<0?e+1:0===e&&t>0?1:e}(i+s),h=null;try{h=o.curves.length?o.getPointAt(l):null}catch(t){}if(null===h)return;a.updateMatrixWorld();let p=this.parent?xt.copy(this.parent.matrixWorld):xt.identity(),d=function(t,e,i,s){ot.setFromRotationMatrix(nt.extractRotation(s));let r=t.clone().applyMatrix4(nt.copy(s).invert().multiply(i));if(null===e)lt.setFromRotationMatrix(nt.extractRotation(i));else{let t=e.clone().applyMatrix4(nt.extractRotation(i));lt.setFromRotationMatrix(nt.lookAt(pt.set(0,0,0),t,dt))}return{position:r,rotation:(new f).setFromEuler(ht.setFromQuaternion(ot.invert().multiply(lt))).multiplyScalar(u.RAD2DEG)}}(h,"tangential"===r?o.getTangentAt(l):null,a.matrixWorld,p);this.updateTransformState({position:d.position.toArray(),rotation:d.rotation.toArray()}),this.traverseEntity(t=>{t._cameraType&&t.dispatchEvent(ut)})}updateVisible(t){if(this.visible=this.dataPatched.visible&&(!this.dataPatched.cloner||(this.dataPatched.cloner.disabled??!1)||!0!==this.dataPatched.cloner?.hideBase),!t)return;let e=!1;this.traverseEntity(t=>{if("Splat"===t.data.type)return e=!0,!0}),e&&t.reloadSplats()}updateState_Entity(t,e){void 0!==t.name&&(this.name=t.name),void 0!==t.raycastLock&&(this.raycastLock=t.raycastLock),void 0!==t.visible&&(this.updateVisible(e?.scene),this.resetBBoxNeedsUpdate()),e&&"cloner"in t&&void 0!==t.cloner&&(this.setFromClonerState(t.cloner,e),this.updateVisible(e.scene)),this.updateTransformState(t,e)}get attachedSurfaceCloners(){return this.children.filter(t=>e(t)&&"toObject"===t.parameters.type)}setFromClonerState(t,e){if(!this.disposed)if(null===t||t.disabled)this.cloner&&this.cloner.dispose(),this.cloner=void 0;else if(void 0===this.cloner){if(null===D.Cloner)return void i("cloners","a cloner");this.cloner=new D.Cloner(this,t),e.scene.addPendingExpandCloner(this)}else this.cloner.updateState(t,e)}expandCloner(t){!this.disposed&&this.cloner&&this.cloner.expandClones(t)}invalidateClonerTransform(t){this.cloner&&this.cloner.invalidateTransform(t)}requestRender(){this.dispatchEvent({type:"requestRender"})}},wt=class{static create(t){return this.build(this.normalizeInputs(t))}static normalizeInputs(t,e){let i=Object.assign({},e?.parameters??{width:100,revolutions:2,segments:40,pathRadius:10,pathType:0,pathSegments:30,cornerRadius:30,cornerSegments:4},t.parameters),s=Math.abs(i.width),r=Math.abs(i.height??s),a=Math.abs(i.depth??s),n=Math.abs(Math.min(s,a))/2;return{parameters:Object.assign(i,{width:s,height:r,depth:a,radius:n,segments:Math.round(i.segments),pathSegments:Math.round(i.pathSegments),cornerSegments:Math.round(i.cornerSegments)})}}static build(t){let{width:e,height:i,depth:s,radius:r,revolutions:a,segments:n,pathRadius:o,pathType:l,pathSegments:h,cornerRadius:p,cornerSegments:d}=t.parameters,c=new Et(!1,e,i,s,r,a,n,o,l,h,p,d);return Object.assign(c,{userData:{...t,type:"HelixGeometry"}})}},Mt=new B([0,0,0],1);function Bt(t){return"TorusGeometry"===t.type&&360===t.arc}var bt,Pt,Et=class extends E{constructor(t=!0,e=1,i=1,s=1,r=1,a=1,n=1,o=1,l=1,h=1,p=1,d=1){if(super(),0===a)return;let c=t&&1===a;c&&(d=0),p>100&&(p=100),0===p&&(d=0);let u,m,y,v,g,x,S,w,M=()=>new f,B=new f,P=M(),E=M(),A=M(),C=M(),D=M(),O=M(),_=M(),V=M(),R=M(),T=M(),W=M(),U=i-2*o+.001,I=U/a,L=Math.ceil(n*a),F=L+1,z=U/L,j=-U/2,N=h+1,k=2*Math.PI/h,G=Math.PI/2/d,H=Math.min((1-p/100)*o,o-.01),q=o-H,Z=0,Q=2*d+2,K=N*Q/2,J=K+N*F,X=Math.max(0,N*(F+Q)),[Y,$,tt]=[3,3,2].map(t=>Array(X*t).fill(0)),et=[],it=r-o;function st(e,i){let s=Math.PI/2;x=i*z,w=2*Math.PI*(x%I)/I+s,x+=j,S=Math.sin(w)*it,g=Math.cos(w)*it,t?e.set(g,S,x):e.set(g,x,S)}st(B,-1e-10),st(P,0),C.copy(B),st(B,1);let rt=B.distanceTo(P),at=c?0:q+H,nt=rt*L+2*at,ot=H,lt=nt-at;for(let e=0;e<=L;e++){st(E,e),W.subVectors(E,C).normalize(),C.copy(E),R.copy(E).setComponent(+t+1,0).normalize(),T.crossVectors(W,R).normalize();let i=0===e,s=e===L,r=i?3*Math.PI/2:G,a=i?ot:lt,n=i?N:J,l=i?0:X-N,p=W.clone().multiplyScalar(i?-q:q).add(E),u=W.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<N;t++){let m=t*k;if(D.addVectors(B.copy(R).multiplyScalar(o*Math.cos(m)),P.copy(T).multiplyScalar(o*Math.sin(m))),O.copy(D).normalize(),i||s){c||(Z=l+t,[0,1,2].forEach(t=>{Y[3*Z+t]=p.getComponent(t),$[3*Z+t]=u.getComponent(t)}),tt[2*Z]=+s,tt[2*Z+1]=t/h),P.copy(O).multiplyScalar(H),A.addVectors(E,P);for(let e=0;e<d;e++){let s=e*G+r;_.addVectors(B.copy(W).multiplyScalar(q*Math.sin(s)),P.copy(O).multiplyScalar(q*Math.cos(s))),V.copy(_).normalize(),P.addVectors(A,_),_.normalize(),Z=n+e*N+t,[0,1,2].forEach(t=>{Y[3*Z+t]=P.getComponent(t),$[3*Z+t]=V.getComponent(t)});let o=+i+Math.sin(s);tt[2*Z]=(a+q*o)/nt,tt[2*Z+1]=t/h}}P.addVectors(E,D),Z=K+e*N+t,[0,1,2].forEach(t=>{Y[3*Z+t]=P.getComponent(t),$[3*Z+t]=O.getComponent(t)}),tt[2*Z]=(at+e*rt)/nt,tt[2*Z+1]=t/h}}let ht=F+2*d+2,[pt,dt]=[+c,ht-1];for(let t=pt;t<=dt-1;t++){let e=c&&t===dt-1;for(let i=0;i<N-1;i++)u=t*N+i,m=u+1,y=(e?i:u)+N,v=(e?i+1:m)+N,0===t?et.push(m,v,y):t===ht-2?et.push(u,m,y):et.push(u,m,y,m,v,y)}this.setIndex(et),this.setAttribute("position",new b(Y,3)),this.setAttribute("normal",new b($,3)),this.setAttribute("uv",new b(tt,2))}getClosedTorusIndicesForBooleanOrSubdiv(){let t,e,i,s,r=this.userData.parameters,a=Math.ceil(r.tubularSegments),n=r.radialSegments,o=n+1,l=[];for(let r=1;r<a;r++)for(let a=0;a<n;a++)t=r*o+a,e=t+1,i=t+o,s=e+o,l.push(t,e,i,e,s,i);for(let r=0;r<n;r++)t=a*o+r,e=t+1,i=r+o,s=r+1+o,l.push(t,e,i,e,s,i);return Mt.array=new Uint32Array(l),Mt.count=l.length,Mt}},At=new Map,Ct=0;function Dt(t){return Pt||(Pt=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.149/build",i=import("./boolean.js"),[s,r]=await Promise.all([i,fetch(`${e}/boolean.wasm`).then(t=>t.arrayBuffer())]);await s.default({module_or_path:r}),bt=s}())}function Ot(){if(void 0===bt)throw new Error("boolean-wasm is not loaded");return bt}function _t(t){let e=At.get(t);if(void 0===e)throw new Error("Unknown csg mesh set handle "+t);return e}function Vt(t){return At.set(++Ct,t),Ct}var Rt={0:0,1:1,2:2};function Tt(t,e,i){if(void 0===bt)return-1;let{positions:s,indices:r,normals:a}=function(t,e){if(e&&void 0!==t.userData.positions){let e=t.userData,i=[];for(let t=0,s=0;t<e.verticesPerFace.length;t++){let r=e.verticesPerFace[t];for(let t=1;t<r-1;t++)i.push(e.indices[s],e.indices[s+t],e.indices[s+t+1]);s+=r}return{positions:e.positions instanceof Float32Array?e.positions:new Float32Array(e.positions),indices:new Uint32Array(i)}}let i;i=Bt(t.userData.parameters)?t.getClosedTorusIndicesForBooleanOrSubdiv():t.getIndex();let s,r=t.getAttribute("position");if(null===i){s=new Uint32Array(r.count);for(let t=0;t<s.length;t++)s[t]=t}else s=i.array instanceof Uint32Array?i.array:new Uint32Array(i.array);let a=t.getAttribute("normal"),n=void 0!==a&&3===a.itemSize&&a.count===r.count&&a.array instanceof Float32Array&&!0!==a.isInterleavedBufferAttribute?a.array:void 0;return{positions:r.array,indices:s,normals:n}}(t,e);return Vt(new bt.CsgMesh(s,r,a))}function Wt(t,e){let i=Ot(),s=Rt[e];if(void 0===s)throw new Error("Unknown boolean operation "+e);let r=t.map(_t);if(1===r.length)return i.clone_mesh(r[0]);let a,n=[];if(2===e&&r.length>2){let t=r[0];for(let e=1;e<r.length-1;e++)t=i.boolean_mesh(t,r[e],0),n.push(t);a=i.boolean_mesh(r[r.length-1],t,2)}else if(2===e)a=i.boolean_mesh(r[1],r[0],2);else{let t=r[r.length-1];for(let e=0;e<r.length-1&&(t=i.boolean_mesh(t,r[e],s),n.push(t),0!==t.tri_count());e++);a=t,n.pop()}for(let t of n)t.free();return a}function Ut(t,e,i,s){let r=Ot(),a=Wt(t,e),n=r.mesh_render_data(a,Math.max(s,0));if(i.setAttribute("position",new b(n.positions(),3)),i.setAttribute("normal",new b(n.normals(),3)),n.free(),null===i.boundingSphere&&(i.boundingSphere=new P),0===a.tri_count())i.boundingSphere.center.set(0,0,0),i.boundingSphere.radius=0,i.userData.parameters={width:0,height:0,depth:0};else{let t=a.bounds();i.boundingSphere.center.set(t[0],t[1],t[2]),i.boundingSphere.radius=(t[3]**2+t[4]**2+t[5]**2)**.5,i.userData.parameters={width:2*t[3],height:2*t[4],depth:2*t[5]}}return Vt(a)}function It(t,e){let i=Ot(),s=Wt(t,e),r=i.mesh_topological_data(s),a=r.positions(),n=r.indices();return r.free(),s.free(),{positions:a,indices:n,verticesPerFace:new Uint8Array(n.length/3).fill(3)}}function Lt(t,e){_t(t).transform(new Float32Array(e.elements))}function Ft(t){let e=At.get(t);void 0!==e&&(e.free(),At.delete(t))}function zt(t,e){return Vt(Ot().instanced_union(_t(t),e))}function jt(t){return null!==t&&"booleanOp"in t}var Nt=class extends(St(C)){constructor(){super(...arguments),this.booleanMeshSetAddress=-1,this.booleanWasTransformed=!1,this.booleanMatrixInvOld=new v}updateVisible(t){super.updateVisible(t),this.visible=!jt(this.parent)&&this.visible,jt(this.parent)&&this.parent.invalidateDownstreamBooleanData()}onClonerLayoutUpdated(){jt(this.parent)&&this.invalidateDownstreamBooleanData()}freeBooleanPointer(){-1!==this.booleanMeshSetAddress&&(Ft(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}dispose(){super.dispose(),this.freeBooleanPointer()}invalidateDownstreamBooleanData(t=!1){return t?this.booleanWasTransformed=!0:this.freeBooleanPointer(),jt(this.parent)?this.parent.invalidateDownstreamBooleanData():this}invalidateUpstreamBooleanData(){this.freeBooleanPointer();for(let t of this.children)t instanceof Nt&&(t.freeBooleanPointer(),jt(t)&&t.invalidateUpstreamBooleanData())}updateTransformState(t,e){let i=super.updateTransformState(t,e);return i&&jt(this.parent)&&this.invalidateDownstreamBooleanData(!0),i}onVariableUpdate(t=!1){super.onVariableUpdate(t),jt(this.parent)&&this.invalidateDownstreamBooleanData(!0)}},kt=new M;function Gt(t,e=0,i=t.count,s,r){let a=1/0,n=1/0,o=1/0,l=-1/0,h=-1/0,p=-1/0;for(let s=e;s<i;s++){let e=t.getX(s),i=t.getY(s),r=t.getZ(s);e<a&&(a=e),i<n&&(n=i),r<o&&(o=r),e>l&&(l=e),i>h&&(h=i),r>p&&(p=r)}kt.min.set(a,n,o),kt.max.set(l,h,p),kt.getCenter(s),kt.getSize(r).multiplyScalar(.5)}var Ht=new E,qt=new A,Zt=class extends Nt{constructor(t,e){super(Ht,qt),this.super_Entity(t,e)}updateState(t,e){this.updateState_Entity(t,e)}raycast(t,e){if(this.raycastDeformed(t,e))return;super.raycast(t,e)}raycastDeformed(t,e){return!1}updateEntityBoxSize(t,e){let i=this.geometry.getAttribute("position");void 0!==i?Gt(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,e):super.updateEntityBoxSize(t,e)}};export{O as a,_ as b,D as c,j as d,N as e,G as f,rt as g,at as h,ct as i,St as j,wt as k,Bt as l,Et as m,Dt as n,Tt as o,Ut as p,It as q,Lt as r,Ft as s,zt as t,Gt as u,Zt as v};
1
+ import{f as t}from"./runtime-chunk-RTLL6WIB.js";import{h as e}from"./runtime-chunk-2PT2WH66.js";import{c as i}from"./runtime-chunk-TZCHGFVF.js";import{C as s,Ca as r,Da as a,Fa as n,J as o,Sa as l,i as h,j as p,k as d,n as c}from"./runtime-chunk-ADHKZQMB.js";import{Ec as u,Gc as m,Hc as f,Md as y,Qc as v,Rc as g,Rd as x,Tc as S,Te as w,Zc as M,bd as B,dd as b,ed as P,fd as E,md as A,nd as C}from"./runtime-chunk-KPOUV3HD.js";var D={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function O(t,e){let i=[];if(e.length!==t.length)return null;{let s=0;for(;s<t.length;){if("*"===e[s])i.push(t[s]);else if(t[s]!==e[s])return null;s+=1}}return i}function _(t,e){let i=[];if(!(e.length<=t.length))return null;{let s=0;for(;s<e.length;){if("*"===e[s])i.push(t[s]);else if(t[s]!==e[s])return null;s+=1}}return i}var V=new f,R=new f,T=new v,W=[new f(-1,1,1),new f(-1,-1,1),new f(1,-1,1),new f(1,1,1),new f(-1,1,-1),new f(-1,-1,-1),new f(1,-1,-1),new f(1,1,-1)],U=[[0,3],[1,2],[5,6],[4,7],[0,1],[3,2],[7,6],[4,5],[0,4],[1,5],[2,6],[3,7]],I=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],L=(t,e,i)=>{t.updateEntityBoxSize(V,R),T.copy(e).multiply(t.matrixWorld),0===R.x&&0===R.y&&0===R.z?i.push(new f(V.x,V.y,V.z).applyMatrix4(T)):W.forEach(t=>{i.push(t.clone().multiply(R).add(V).applyMatrix4(T))})},F=class extends M{constructor(){super(...arguments),this.matrix=new v,this.vertices=[],this.faces=[],this.edges=[],this.centerEdges=[]}copy(t){return super.copy(t),this.matrix.copy(t.matrix),this.vertices=t.vertices.map(t=>t.clone()),this.faces=t.faces.map(t=>t.clone()),this.edges=t.edges.map(t=>t.clone()),this.centerEdges=t.centerEdges.map(t=>t.clone()),this}setFromObjectSize(t,e=!1){t.updateWorldMatrix(!1,e),this.makeEmpty(),this.matrix.copy(t.matrixWorld);let i=(new v).copy(t.matrixWorld).invert();return this.expandByObjectSize(t,i,e)}expandByObjectSize(t,e,i=!1){let s=[];if(!0===i){let i=[];t.traverseEntity(t=>{if(t.visible||t.cloner&&t.data.visible){if(!("geometry"in t))return T.copy(e).multiply(t.matrixWorld),void i.push((new f).applyMatrix4(T));L(t,e,s)}}),0===s.length&&s.push(...i)}else L(t,e,s);return this.setFromPoints(s)}getCenter(t){return(t=super.getCenter(t)).applyMatrix4(this.matrix),t}getPositionToCenter(t){return(t=super.getCenter(t)).applyMatrix4(T.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(R).multiplyScalar(.5),this.getCenter(V),T.copy(this.matrix).setPosition(V),this.vertices=W.map(t=>t.clone().multiply(R).applyMatrix4(T))}computeEdges(){this.vertices.length>0&&this.computeVertices(),this.edges=U.map(([t,e])=>new w(this.vertices[t],this.vertices[e])),this.centerEdges=this.edges.map(t=>t.getCenter(new f))}computeFaces(){this.vertices.length>0&&this.computeVertices(),this.faces=I.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},z=new f(1,1,1);function j(t,e,i,s,r=new v){return r.compose(t,e,z).multiply(i).scale(s)}var N,k=new v;(N||(N={})).is=function(t){return t&&t.__isSPEObject};var G=t=>class extends t{constructor(){super(...arguments),this.previousModelViewMatrix=new v,this.copyPreviousMatrix=!0,this.pivotMatrix=new v,this.matrixWorldRigid=new v,this.shearScale=new v,this.shearScaleInv=new v,this.shearMatrix=new v}get __isSPEObject(){return!0}getPhysicsLocalMatrix(t){return!!this.rigidBody?.isDynamic()&&(t.copy(this.matrixWorld),this.hasNonUniformScale&&t.multiply(this.shearScaleInv),this.parent&&t.premultiply(k.copy(this.parent.matrixWorld).invert()),t.multiply(k.copy(this.pivotMatrix).invert()),!0)}isDescendantOf(t){t instanceof S&&(t=t.uuid);let e=this;for(;e.parent;){if(e.parent.uuid===t)return!0;e=e.parent}return!1}updateMatrix(){!this.shearMatrix||(j(this.position,this.quaternion,this.shearMatrix,this.scale,this.matrix),this.matrixWorldNeedsUpdate=!0)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}traverseChildren(t,e=0){for(let i of this.children)N.is(i)&&i.traverseObject(t,e+1)}traverseObject(t,e=0){if(!0!==t(this,e))for(let i of this.children)N.is(i)&&i.traverseObject(t,e+1)}updateMatrixWorldRigid(){this.hasNonUniformScale=l(this.matrixWorld,this.matrixWorldRigid,this.shearScale),this.matrixWorldRigid.copyPosition(this.matrixWorld),this.shearScaleInv.copy(this.shearScale).invert()}attach(t,e){this.updateWorldMatrix(!0,!1);let i=(new v).copy(this.matrixWorld).invert();return null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),i.multiply(t.parent.matrixWorld)),t.applyMatrix4(i),t.updateWorldMatrix(!1,!1),this.add(t),void 0!==e&&(this.children.pop(),this.children.splice(e,0,t)),this}copy(t,e=!1){return super.copy(t,e),this}onAfterRender(t,e,i,s,r,a){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}},H=class extends x{constructor(){super()}getPoints(t=12){let e,i=[],s=this.getCurveLengths(),r=s[s.length-1]/s.length;for(let a=0,n=this.curves;a<n.length;a++){let o=n[a],l=0===a?s[a]:s[a]-s[a-1],h=Math.ceil(t*l/r),p=o.getPoints(h);for(let t=0;t<p.length;t++){let s=p[t];e&&e.equals(s)||(i.push(s),e=s)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}},q=.001,Z=new f,Q=new f,K=new f,J=new f,X=new f,Y=new f,$=new f,tt=new f,et=new f;function it(t,e,i){return Z.subVectors(e,t),Q.subVectors(e,i),Z.cross(Q).length()<=q}var st=new WeakMap;function rt(t){let e=st.get(t.points);if(void 0!==e&&e.isClosed===t.isClosed)return e.curve;let i=function(t){let e=t.points,i=[e[0]],s=[new f(...e[0].data.position)];K.copy(s[0]);for(let t=0;t<e.length-1;t++)Z.fromArray(e[t].data.position),Q.fromArray(e[t+1].data.position),X.subVectors(Z,K),$.subVectors(Z,Q),X.cross($).length()>q&&(i.push(e[t]),s.push((new f).copy(Z)),K.copy(Z));let r=e[e.length-1];i.push(r),s.push(new f(...r.data.position));let a=t.isClosed,n=i.length-(a?0:1),o=i.length,l=[],h=[];for(let t=0;t<o;t++){let e=i[t].data;l.push(new f(...e.controlPrevious.position)),h.push(new f(...e.controlNext.position))}let p=[];for(let t=0;t<n;t++){let e=t===o-1?0:t+1;p.push(it(s[t],h[t],s[e])&&it(s[t],l[e],s[e]))}let d=[];for(let t=0;t<o;t++){let e=i[t].data,r=s[t],n={position:r,prevDir:void 0,nextDir:void 0,controlPrevious:l[t],controlNext:h[t],tan:void 0,baseRoundness:e.roundness,removedLength:0};if(d.push(n),0===e.roundness||!a&&(0===t||t===o-1))continue;let c=a&&0==t?o-1:t-1,u=a&&t==o-1?0:t+1,m=(new f).subVectors(s[c],r).normalize(),y=(new f).subVectors(s[u],r).normalize();n.prevDir=m,n.nextDir=y;let v=p[a&&0===t?o-1:t-1],g=p[t];if(v&&g){J.addVectors(m,y).normalize();let t=K.crossVectors(J,m).length()/m.dot(J);n.tan=t,n.removedLength=e.roundness/t}}for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],s=d[e];if(0!==i.removedLength||0!==s.removedLength){let t=i.position.distanceTo(s.position);i.removedLength=Math.min(i.removedLength,t/2),s.removedLength=Math.min(s.removedLength,t/2)}}let c=new Array(2*o).fill(null);for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],s=d[e],r=null;if(p[t]){let t=i.position.clone(),e=s.position.clone();(0!==i.removedLength||0!==s.removedLength)&&(i.nextDir&&t.add(K.copy(i.nextDir).setLength(i.removedLength)),s.prevDir&&e.add(K.copy(s.prevDir).setLength(s.removedLength))),t.distanceTo(e)>q&&(r=new y(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(s.position)>q&&(r=new y(i.position,i.controlNext,s.controlPrevious,s.position));c[2*t+1]=r}for(let t=0;t<o;t++){let e=d[t];if(0===e.removedLength)continue;let i=e.position,s=e.prevDir.clone().multiplyScalar(e.removedLength).add(i),r=e.nextDir.clone().multiplyScalar(e.removedLength).add(i),a=e.tan*e.removedLength;J.addVectors(e.prevDir,e.nextDir).normalize(),X.copy(s).lerp(r,.5);let n=s.distanceTo(r)/2;et.copy(J).multiplyScalar(Math.sqrt(Math.pow(a,2)-Math.pow(n,2))).add(X),Y.copy(J).multiplyScalar(-a).add(et);let o=i.distanceTo(Y)/i.distanceTo(X);$.copy(e.prevDir).multiplyScalar(o*i.distanceTo(s)).add(i),tt.copy($).lerp(Y,2);let l=s.clone().lerp($,4/3),h=r.clone().lerp(tt,4/3);c[2*t]=new y(s,l,h,r)}let u=new H;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return st.set(t.points,{isClosed:t.isClosed,curve:i}),i}var at,nt=new v,ot=new m,lt=new m,ht=new g,pt=new f,dt=new f(0,1,0);(at||(at={})).is=function(t){return t&&t.__isEntity};var ct=t=>at.is(t),ut={type:"completeState",isfromEntity:!0},mt=["x","y","z"],ft=new f,yt=new f(1,1,1),vt=new m,gt=new g,xt=new v,St=l=>class extends(G(l)){constructor(){super(...arguments),this.raycastLock=!1,this.scaleLock=!1,this.disposed=!1,this.stateSelection=null,this.destroyedInAction=!1,this.instances=[],this.prevState=null,this.currentState=null,this.currentAnimationAction=null,this.reversibleToState=null,this.transitionState={settled:!0,state:null},this.currentTransitionEvent=null,this.previousAction=null,this._singleBBox=new F,this._recursiveBBox=new F,this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0,this._needApplyPathSnapping=!0,this.attachedPaths=new Set}get __isEntity(){return!0}entityChildren(t){let e=this.children[t];if(at.is(e))return e}entityChildrenCount(){let t=this.children.length;for(;t--;)if(at.is(this.children[t]))return t+1;return 0}get isConcreteEntity(){return"string"==typeof this.identity}get isVirtualEntity(){return"string"!=typeof this.identity}get isInstanceRoot(){return this.isConcreteEntity&&"Instance"===this.data.type}nearestInstanceSelfOrParent(){let t=this;for(;"Instance"!==t.data.type;){let e=t.parent;if(!at.is(e))return;t=e}return t}forInstancesRec(t){this.instances.forEach(e=>{e.disposed||t(e),e.forInstancesRec(t)})}super_Entity(t,e){"string"==typeof t&&(this.uuid=t),this.identity=t,this.data=e,this.matrixAutoUpdate=!1,this.dataPatched=this.data}changeSelectedState(t,e,i=!1){if(0!==this.data.states.length||i){for(let t of this.data.states)n.toOps(this.data,t.data).forEach(t=>{let i=p.replaceProps(t,this.data);this.dataPatched=this.data,this.updateByPatchedOp(i,this.data,e)});if(null!==t){let i=this.data.states.data(t);i&&(this.dataPatched=n.patch(this.data,i),n.toOps(this.data,i).forEach(t=>{this.updateByPatchedOp(t,this.dataPatched,e)}))}i&&this.updateTransformState(this.dataPatched,e),this.stateSelection=t,this.updatePathSnapping(this.dataPatched.pathSnapping)}}get singleBBox(){return this.singleBBoxNeedsUpdate&&(this.singleBBoxNeedsUpdate=!1,this._singleBBox.setFromObjectSize(this,!1),this._singleBBox.computeVertices(),this._singleBBox.computeEdges(),this._singleBBox.computeFaces()),this._singleBBox}get recursiveBBox(){return this.recursiveBBoxNeedsUpdate&&(this.recursiveBBoxNeedsUpdate=!1,this._recursiveBBox.setFromObjectSize(this,!0),this._recursiveBBox.computeVertices(),this._recursiveBBox.computeEdges(),this._recursiveBBox.computeFaces()),this._recursiveBBox}updateEntityBoxSize(t,e){t.setScalar(0),e.setScalar(0)}resetBBoxNeedsUpdateSelf(){this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0}resetBBoxNeedsUpdate(){this.resetBBoxNeedsUpdateSelf(),this.traverseAncestors(t=>{ct(t)&&t.resetBBoxNeedsUpdateSelf()}),this.traverseEntity(t=>{t.resetBBoxNeedsUpdateSelf()})}find(t){let e;return this.traverseEntity(i=>{i.uuid===t&&(e=i)}),e}traverseSortNextHelper(){let t=this.parent;if(t){let e=t.children,i=e.indexOf(this)+1;if(at.is(e[i]))return e[i];if(at.is(t))return t.traverseSortNextHelper()}}sortNext(){let t=this.children;return this.children.length>0&&at.is(this.children[0])?t[0]:this.traverseSortNextHelper()}goUp(t){let e=this;for(;t>0&&null!==e;)e=e.parent,t-=1;return e}hasAnccestorOrSelf(t){return this===t||this.hasAnccestor(t)}hasAnccestor(t){let e=this.parent;for(;e;){if(t===e)return!0;e=e.parent}return!1}countToAccestor(t){let e=0,i=this;for(;i!==t;){if(null===i)return-1;i=i.parent,e+=1}return e}forEachEntity(t){for(let e of this.children)ct(e)&&t(e)}traverseEntityAncestors(t){this.traverseAncestors(e=>{at.is(e)&&t(e)})}traverseConcreteEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ct(i)&&i.isConcreteEntity&&i.traverseEntity(t,e+1)}traverseEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ct(i)&&i.traverseEntity(t,e+1)}traverseVisibleEntity(t){t(this);for(let e of this.children)ct(e)&&e.visible&&e.traverseVisibleEntity(t)}updateMatrix(){super.updateMatrix(),this.cloner&&this.cloner.onObjUpdateMatrix(),this.dispatchEvent({type:"updateMatrix"})}updateMatrixWorld(t){super.updateMatrixWorld(t),this.dispatchEvent({type:"updateMatrixWorld"})}copy(t,e=!1){return super.copy(t,e),this.dataPatched=t.dataPatched,this.raycastLock=t.raycastLock,this.scaleLock=t.scaleLock,this}hasEntityChild(){return this.children.some(t=>ct(t))}isAncestorOf(t){if(this.uuid===t)return!1;let e=!1;return this.traverseEntity(i=>{i.uuid===t&&(e=!0)}),e}toObjectTransformState(e=[]){this.updateWorldMatrix(!0,!1);let i={position:this.position.toArray(),rotation:[this.rotation.x*u.RAD2DEG,this.rotation.y*u.RAD2DEG,this.rotation.z*u.RAD2DEG],scale:this.scale.toArray(),shear:s.fromMatrix(this.shearMatrix.toArray()),pivot:[0,0,0],pivotRotation:[0,0,0]};return t(i,e)}getTransformValues(t,e,i){return e[t].map((e,s)=>i?.shared.getVariable(e,[this.uuid,t,mt[s]])??e)}updateTransformState(t,e){let i=!1;if(t.position&&(this.position.fromArray(this.getTransformValues("position",t,e)),i=!0),t.rotation&&(ft.fromArray(this.getTransformValues("rotation",t,e)).multiplyScalar(u.DEG2RAD),this.rotation.setFromVector3(ft),i=!0),t.scale&&(this.scale.fromArray(this.getTransformValues("scale",t,e)),i=!0),t.shear&&(this.shearMatrix.fromArray(s.toMatrix(t.shear)),i=!0),void 0!==t.pivot||void 0!==t.pivotRotation)if(i=!0,void 0!==t.pivot&&void 0!==t.pivotRotation)this.pivotMatrix.compose(ft.fromArray(t.pivot).negate(),vt.setFromEuler(gt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),yt);else if(void 0!==t.pivot)this.pivotMatrix.setPosition(-t.pivot[0],-t.pivot[1],-t.pivot[2]);else if(void 0!==t.pivotRotation){let e=ft.setFromMatrixPosition(this.pivotMatrix);vt.setFromEuler(gt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),this.pivotMatrix.compose(e,vt,yt)}return i&&(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)})),t.position&&t.rotation&&t.scale&&this.updateWorldMatrix(!1,!0),i}onVariableUpdate(t=!1){t?this.resetBBoxNeedsUpdate():(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)}),this.requestRender())}dispose(){this.disposed=!0,this.cloner&&(this.cloner.dispose(),this.cloner=void 0)}disposeChildrenRecursively(){for(let t of this.children)at.is(t)&&t.disposeRecursively()}disposeRecursively(){this.dispose(),this.children.forEach(t=>{at.is(t)&&t.disposeRecursively()})}toState(e=[]){let i={name:this.name,visible:this.visible,raycastLock:this.raycastLock,...this.toObjectTransformState(e)};return t(i,e)}updateByObjUpdateOp(t,e){void 0!==t&&this.updateByOp({type:0,props:t,path:[]},{...this.data,...t},e,!1)}updateByOp(t,e,i,s){let o=this.data;this.data=e;let l=t,p=_(t.path,["states","*"]);if(null!==p){if(0===t.type){let[e]=p;if(this?.stateSelection===e){let e={...t.props};if(delete e.name,Object.values(t.props).some(t=>void 0===t)){let i=this.data;if(void 0!==i){let s=c.zoom(i,t.path.slice(2));if(s)for(let i in t.props)void 0===t.props[i]&&i in s&&(e[i]=s[i])}}l={...t,props:e,path:t.path.slice(2)}}}}else if(0===t.type){let e=this.stateSelection?this.data.states.data(this.stateSelection):void 0;if(void 0!==e){if(void 0!==t.props.name&&e.name){let{name:t,...i}=e;e=i}if(void 0!==t.props.material&&"material"in e){let{material:t,...i}=e;e=i}let i=c.removeOverridden(t.path,t.props,e);l={...t,props:i}}}if(this.updateByPatchedOpBase(l,n.patch(this.data,this.stateSelection?this.data.states.data(this.stateSelection):void 0),i),_(t.path,["overrides"])){let s=[],a=[...t.path];for(s.push(a[1]),a.splice(0,2);a.length>0&&"descendants"===a[0];)s.push(a[1]),a.splice(0,2);if(void 0===s[s.length-1]){if(0===t.type)for(let e of Object.keys(t.props)){s[s.length-1]=e;let r=i.scene.findInstance([this.uuid,...s]);r&&(r.overrideData=t.props[e],r.updateState(h.apply(r.component.data,r.overrideData),i))}}else{let n=i.scene.findInstance([this.uuid,...s]);if(n){let o=c.zoom(n.component.data,a);if(0===(t={...t,path:a}).type){let e=t.props;if(o)for(let[i,s]of Object.entries(t.props))void 0===s&&(e===t.props&&(e={...t.props}),e[i]=o[i]);t={...t,props:e}}n.overrideData=r.resolve(e.overrides,s),n.updateByOp(t,d.applySimple(n.data,t),i,!1)}}}else if(this.instances.length>0){let s;if(0===t.path.length&&0===t.type){let e;for(let i of a.rootOverrideProps)i in t.props&&(void 0===e&&(e={}),e[i]=t.props[i]);e&&(s={...t,props:e})}else for(let e of a.rootOverrideProps)if(_(t.path,[e])){s=t;break}void 0!==s&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=h.filterOp(t.overrideData,s);e&&t.updateByOp(e,d.applySimple(t.data,e),i,!0)}}),this.instances.forEach(s=>{if(!s.isInstanceRoot){let r=h.filterOp(s.overrideData,t);if(r){let a;a=o===s.data&&t===r?e:d.applySimple(s.data,r),s.updateByOp(r,a,i,!0)}}})}}updateByPatchedOpBase(t,e,i){if(this.dataPatched=e,0===t.path.length&&0===t.type)void 0!==t.props.type&&!o.is(t.props.type)&&D.changeEntityProptotype(this,this.data,i);else if(1===t.path.length&&"geometry"===t.path[0]&&0===t.type&&"type"in t.props){D.changeEntityProptotype(this,this.data,i);for(let t of this.children)at.is(t)&&t.updateVisible(i.scene)}this.updateByPatchedOp(t,e,i)}updateByPatchedOp(t,e,i){if(0===t.path.length&&0===t.type?this.updateState(t.props,i):0===t.type&&("resolutionLevel"in t.props||"useChildrenColors"in t.props)&&this.updateState(e,i),"morphTargetInfluences"===t.path[0]&&0===t.type){let s=e.morphTargetInfluences.get(t.path[1])?.data.name;s&&this.updateMorphInfluences(s,i.shared.getVariable(t.props.value,[this.uuid,"morphTargetInfluences",s]))}if(null!==_(t.path,["pathSnapping"])&&(this.updatePathSnapping(e.pathSnapping),this.isVirtualEntity&&i.scene?.syncInstancePathConstraint(this)),null!==_(t.path,["cloner"])){let s=d.drop(t,1);0===s.path.length&&0===s.type&&!0===s.props.disabled?this.setFromClonerState(null,i):this.cloner?this.cloner.updateState(e.cloner,i):(this.setFromClonerState(e.cloner,i),this.expandCloner(i)),this.updateVisible(i.scene)}}updatePathSnapping(t=this.dataPatched.pathSnapping){this._updatedPathSnapping=t,this._needApplyPathSnapping=!0}get updatedPathSnapping(){return this._updatedPathSnapping}applyPathSnapping(t){if(!1===this._needApplyPathSnapping)return;let e=this._updatedPathSnapping?.pathId??this.dataPatched.pathSnapping.pathId,i=this._updatedPathSnapping?.slide??this.dataPatched.pathSnapping.slide??0,s=this._updatedPathSnapping?.offset??this.dataPatched.pathSnapping.offset??0,r=this._updatedPathSnapping?.orientation??this.dataPatched.pathSnapping.orientation;if(null===e)return;let a=t.find(this.isVirtualEntity&&t.pathConstraints.getConstraint(this.uuid)||e);if(!a)return;this._needApplyPathSnapping=!1;let n=a.data;if(n.geometry.path.points.length<=1)return;let o=rt(n.geometry.path),l=function(t){let e=t%1;return e<0?e+1:0===e&&t>0?1:e}(i+s),h=null;try{h=o.curves.length?o.getPointAt(l):null}catch(t){}if(null===h)return;a.updateMatrixWorld();let p=this.parent?xt.copy(this.parent.matrixWorld):xt.identity(),d=function(t,e,i,s){ot.setFromRotationMatrix(nt.extractRotation(s));let r=t.clone().applyMatrix4(nt.copy(s).invert().multiply(i));if(null===e)lt.setFromRotationMatrix(nt.extractRotation(i));else{let t=e.clone().applyMatrix4(nt.extractRotation(i));lt.setFromRotationMatrix(nt.lookAt(pt.set(0,0,0),t,dt))}return{position:r,rotation:(new f).setFromEuler(ht.setFromQuaternion(ot.invert().multiply(lt))).multiplyScalar(u.RAD2DEG)}}(h,"tangential"===r?o.getTangentAt(l):null,a.matrixWorld,p);this.updateTransformState({position:d.position.toArray(),rotation:d.rotation.toArray()}),this.traverseEntity(t=>{t._cameraType&&t.dispatchEvent(ut)})}updateVisible(t){if(this.visible=this.dataPatched.visible&&(!this.dataPatched.cloner||(this.dataPatched.cloner.disabled??!1)||!0!==this.dataPatched.cloner?.hideBase),!t)return;let e=!1;this.traverseEntity(t=>{if("Splat"===t.data.type)return e=!0,!0}),e&&t.reloadSplats()}updateState_Entity(t,e){void 0!==t.name&&(this.name=t.name),void 0!==t.raycastLock&&(this.raycastLock=t.raycastLock),void 0!==t.visible&&(this.updateVisible(e?.scene),this.resetBBoxNeedsUpdate()),e&&"cloner"in t&&void 0!==t.cloner&&(this.setFromClonerState(t.cloner,e),this.updateVisible(e.scene)),this.updateTransformState(t,e)}get attachedSurfaceCloners(){return this.children.filter(t=>e(t)&&"toObject"===t.parameters.type)}setFromClonerState(t,e){if(!this.disposed)if(null===t||t.disabled)this.cloner&&this.cloner.dispose(),this.cloner=void 0;else if(void 0===this.cloner){if(null===D.Cloner)return void i("cloners","a cloner");this.cloner=new D.Cloner(this,t),e.scene.addPendingExpandCloner(this)}else this.cloner.updateState(t,e)}expandCloner(t){!this.disposed&&this.cloner&&this.cloner.expandClones(t)}invalidateClonerTransform(t){this.cloner&&this.cloner.invalidateTransform(t)}requestRender(){this.dispatchEvent({type:"requestRender"})}},wt=class{static create(t){return this.build(this.normalizeInputs(t))}static normalizeInputs(t,e){let i=Object.assign({},e?.parameters??{width:100,revolutions:2,segments:40,pathRadius:10,pathType:0,pathSegments:30,cornerRadius:30,cornerSegments:4},t.parameters),s=Math.abs(i.width),r=Math.abs(i.height??s),a=Math.abs(i.depth??s),n=Math.abs(Math.min(s,a))/2;return{parameters:Object.assign(i,{width:s,height:r,depth:a,radius:n,segments:Math.round(i.segments),pathSegments:Math.round(i.pathSegments),cornerSegments:Math.round(i.cornerSegments)})}}static build(t){let{width:e,height:i,depth:s,radius:r,revolutions:a,segments:n,pathRadius:o,pathType:l,pathSegments:h,cornerRadius:p,cornerSegments:d}=t.parameters,c=new Et(!1,e,i,s,r,a,n,o,l,h,p,d);return Object.assign(c,{userData:{...t,type:"HelixGeometry"}})}},Mt=new B([0,0,0],1);function Bt(t){return"TorusGeometry"===t.type&&360===t.arc}var bt,Pt,Et=class extends E{constructor(t=!0,e=1,i=1,s=1,r=1,a=1,n=1,o=1,l=1,h=1,p=1,d=1){if(super(),0===a)return;let c=t&&1===a;c&&(d=0),p>100&&(p=100),0===p&&(d=0);let u,m,y,v,g,x,S,w,M=()=>new f,B=new f,P=M(),E=M(),A=M(),C=M(),D=M(),O=M(),_=M(),V=M(),R=M(),T=M(),W=M(),U=i-2*o+.001,I=U/a,L=Math.ceil(n*a),F=L+1,z=U/L,j=-U/2,N=h+1,k=2*Math.PI/h,G=Math.PI/2/d,H=Math.min((1-p/100)*o,o-.01),q=o-H,Z=0,Q=2*d+2,K=N*Q/2,J=K+N*F,X=Math.max(0,N*(F+Q)),[Y,$,tt]=[3,3,2].map(t=>Array(X*t).fill(0)),et=[],it=r-o;function st(e,i){let s=Math.PI/2;x=i*z,w=2*Math.PI*(x%I)/I+s,x+=j,S=Math.sin(w)*it,g=Math.cos(w)*it,t?e.set(g,S,x):e.set(g,x,S)}st(B,-1e-10),st(P,0),C.copy(B),st(B,1);let rt=B.distanceTo(P),at=c?0:q+H,nt=rt*L+2*at,ot=H,lt=nt-at;for(let e=0;e<=L;e++){st(E,e),W.subVectors(E,C).normalize(),C.copy(E),R.copy(E).setComponent(+t+1,0).normalize(),T.crossVectors(W,R).normalize();let i=0===e,s=e===L,r=i?3*Math.PI/2:G,a=i?ot:lt,n=i?N:J,l=i?0:X-N,p=W.clone().multiplyScalar(i?-q:q).add(E),u=W.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<N;t++){let m=t*k;if(D.addVectors(B.copy(R).multiplyScalar(o*Math.cos(m)),P.copy(T).multiplyScalar(o*Math.sin(m))),O.copy(D).normalize(),i||s){c||(Z=l+t,[0,1,2].forEach(t=>{Y[3*Z+t]=p.getComponent(t),$[3*Z+t]=u.getComponent(t)}),tt[2*Z]=+s,tt[2*Z+1]=t/h),P.copy(O).multiplyScalar(H),A.addVectors(E,P);for(let e=0;e<d;e++){let s=e*G+r;_.addVectors(B.copy(W).multiplyScalar(q*Math.sin(s)),P.copy(O).multiplyScalar(q*Math.cos(s))),V.copy(_).normalize(),P.addVectors(A,_),_.normalize(),Z=n+e*N+t,[0,1,2].forEach(t=>{Y[3*Z+t]=P.getComponent(t),$[3*Z+t]=V.getComponent(t)});let o=+i+Math.sin(s);tt[2*Z]=(a+q*o)/nt,tt[2*Z+1]=t/h}}P.addVectors(E,D),Z=K+e*N+t,[0,1,2].forEach(t=>{Y[3*Z+t]=P.getComponent(t),$[3*Z+t]=O.getComponent(t)}),tt[2*Z]=(at+e*rt)/nt,tt[2*Z+1]=t/h}}let ht=F+2*d+2,[pt,dt]=[+c,ht-1];for(let t=pt;t<=dt-1;t++){let e=c&&t===dt-1;for(let i=0;i<N-1;i++)u=t*N+i,m=u+1,y=(e?i:u)+N,v=(e?i+1:m)+N,0===t?et.push(m,v,y):t===ht-2?et.push(u,m,y):et.push(u,m,y,m,v,y)}this.setIndex(et),this.setAttribute("position",new b(Y,3)),this.setAttribute("normal",new b($,3)),this.setAttribute("uv",new b(tt,2))}getClosedTorusIndicesForBooleanOrSubdiv(){let t,e,i,s,r=this.userData.parameters,a=Math.ceil(r.tubularSegments),n=r.radialSegments,o=n+1,l=[];for(let r=1;r<a;r++)for(let a=0;a<n;a++)t=r*o+a,e=t+1,i=t+o,s=e+o,l.push(t,e,i,e,s,i);for(let r=0;r<n;r++)t=a*o+r,e=t+1,i=r+o,s=r+1+o,l.push(t,e,i,e,s,i);return Mt.array=new Uint32Array(l),Mt.count=l.length,Mt}},At=new Map,Ct=0;function Dt(t){return Pt||(Pt=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.151/build",i=import("./boolean.js"),[s,r]=await Promise.all([i,fetch(`${e}/boolean.wasm`).then(t=>t.arrayBuffer())]);await s.default({module_or_path:r}),bt=s}())}function Ot(){if(void 0===bt)throw new Error("boolean-wasm is not loaded");return bt}function _t(t){let e=At.get(t);if(void 0===e)throw new Error("Unknown csg mesh set handle "+t);return e}function Vt(t){return At.set(++Ct,t),Ct}var Rt={0:0,1:1,2:2};function Tt(t,e,i){if(void 0===bt)return-1;let{positions:s,indices:r,normals:a}=function(t,e){if(e&&void 0!==t.userData.positions){let e=t.userData,i=[];for(let t=0,s=0;t<e.verticesPerFace.length;t++){let r=e.verticesPerFace[t];for(let t=1;t<r-1;t++)i.push(e.indices[s],e.indices[s+t],e.indices[s+t+1]);s+=r}return{positions:e.positions instanceof Float32Array?e.positions:new Float32Array(e.positions),indices:new Uint32Array(i)}}let i;i=Bt(t.userData.parameters)?t.getClosedTorusIndicesForBooleanOrSubdiv():t.getIndex();let s,r=t.getAttribute("position");if(null===i){s=new Uint32Array(r.count);for(let t=0;t<s.length;t++)s[t]=t}else s=i.array instanceof Uint32Array?i.array:new Uint32Array(i.array);let a=t.getAttribute("normal"),n=void 0!==a&&3===a.itemSize&&a.count===r.count&&a.array instanceof Float32Array&&!0!==a.isInterleavedBufferAttribute?a.array:void 0;return{positions:r.array,indices:s,normals:n}}(t,e);return Vt(new bt.CsgMesh(s,r,a))}function Wt(t,e){let i=Ot(),s=Rt[e];if(void 0===s)throw new Error("Unknown boolean operation "+e);let r=t.map(_t);if(1===r.length)return i.clone_mesh(r[0]);let a,n=[];if(2===e&&r.length>2){let t=r[0];for(let e=1;e<r.length-1;e++)t=i.boolean_mesh(t,r[e],0),n.push(t);a=i.boolean_mesh(r[r.length-1],t,2)}else if(2===e)a=i.boolean_mesh(r[1],r[0],2);else{let t=r[r.length-1];for(let e=0;e<r.length-1&&(t=i.boolean_mesh(t,r[e],s),n.push(t),0!==t.tri_count());e++);a=t,n.pop()}for(let t of n)t.free();return a}function Ut(t,e,i,s){let r=Ot(),a=Wt(t,e),n=r.mesh_render_data(a,Math.max(s,0));if(i.setAttribute("position",new b(n.positions(),3)),i.setAttribute("normal",new b(n.normals(),3)),n.free(),null===i.boundingSphere&&(i.boundingSphere=new P),0===a.tri_count())i.boundingSphere.center.set(0,0,0),i.boundingSphere.radius=0,i.userData.parameters={width:0,height:0,depth:0};else{let t=a.bounds();i.boundingSphere.center.set(t[0],t[1],t[2]),i.boundingSphere.radius=(t[3]**2+t[4]**2+t[5]**2)**.5,i.userData.parameters={width:2*t[3],height:2*t[4],depth:2*t[5]}}return Vt(a)}function It(t,e){let i=Ot(),s=Wt(t,e),r=i.mesh_topological_data(s),a=r.positions(),n=r.indices();return r.free(),s.free(),{positions:a,indices:n,verticesPerFace:new Uint8Array(n.length/3).fill(3)}}function Lt(t,e){_t(t).transform(new Float32Array(e.elements))}function Ft(t){let e=At.get(t);void 0!==e&&(e.free(),At.delete(t))}function zt(t,e){return Vt(Ot().instanced_union(_t(t),e))}function jt(t){return null!==t&&"booleanOp"in t}var Nt=class extends(St(C)){constructor(){super(...arguments),this.booleanMeshSetAddress=-1,this.booleanWasTransformed=!1,this.booleanMatrixInvOld=new v}updateVisible(t){super.updateVisible(t),this.visible=!jt(this.parent)&&this.visible,jt(this.parent)&&this.parent.invalidateDownstreamBooleanData()}onClonerLayoutUpdated(){jt(this.parent)&&this.invalidateDownstreamBooleanData()}freeBooleanPointer(){-1!==this.booleanMeshSetAddress&&(Ft(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}dispose(){super.dispose(),this.freeBooleanPointer()}invalidateDownstreamBooleanData(t=!1){return t?this.booleanWasTransformed=!0:this.freeBooleanPointer(),jt(this.parent)?this.parent.invalidateDownstreamBooleanData():this}invalidateUpstreamBooleanData(){this.freeBooleanPointer();for(let t of this.children)t instanceof Nt&&(t.freeBooleanPointer(),jt(t)&&t.invalidateUpstreamBooleanData())}updateTransformState(t,e){let i=super.updateTransformState(t,e);return i&&jt(this.parent)&&this.invalidateDownstreamBooleanData(!0),i}onVariableUpdate(t=!1){super.onVariableUpdate(t),jt(this.parent)&&this.invalidateDownstreamBooleanData(!0)}},kt=new M;function Gt(t,e=0,i=t.count,s,r){let a=1/0,n=1/0,o=1/0,l=-1/0,h=-1/0,p=-1/0;for(let s=e;s<i;s++){let e=t.getX(s),i=t.getY(s),r=t.getZ(s);e<a&&(a=e),i<n&&(n=i),r<o&&(o=r),e>l&&(l=e),i>h&&(h=i),r>p&&(p=r)}kt.min.set(a,n,o),kt.max.set(l,h,p),kt.getCenter(s),kt.getSize(r).multiplyScalar(.5)}var Ht=new E,qt=new A,Zt=class extends Nt{constructor(t,e){super(Ht,qt),this.super_Entity(t,e)}updateState(t,e){this.updateState_Entity(t,e)}raycast(t,e){if(this.raycastDeformed(t,e))return;super.raycast(t,e)}raycastDeformed(t,e){return!1}updateEntityBoxSize(t,e){let i=this.geometry.getAttribute("position");void 0!==i?Gt(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,e):super.updateEntityBoxSize(t,e)}};export{O as a,_ as b,D as c,j as d,N as e,G as f,rt as g,at as h,ct as i,St as j,wt as k,Bt as l,Et as m,Dt as n,Tt as o,Ut as p,It as q,Lt as r,Ft as s,zt as t,Gt as u,Zt as v};
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-CICXWI7A.js";import{d as e}from"./runtime-chunk-AEDDM67H.js";import{Uc as s}from"./runtime-chunk-KPOUV3HD.js";var r=class extends(e(s,t)){constructor(t,e){super(),this.super_Entity(t,e),this.objectHelper.update(),"Empty"===this.data.type&&(this.objectHelper.visible=!1)}updateState(t,e){this.updateState_Entity(t,e),"buffer"in t&&1===Object.keys(t).length&&e.scene.reloadSplats()}};export{r as a};
1
+ import{a as t}from"./runtime-chunk-ZEDD7JAI.js";import{d as e}from"./runtime-chunk-AUUKCZJE.js";import{Uc as s}from"./runtime-chunk-KPOUV3HD.js";var r=class extends(e(s,t)){constructor(t,e){super(),this.super_Entity(t,e),this.objectHelper.update(),"Empty"===this.data.type&&(this.objectHelper.visible=!1)}updateState(t,e){this.updateState_Entity(t,e),"buffer"in t&&1===Object.keys(t).length&&e.scene.reloadSplats()}};export{r as a};
@@ -1 +1 @@
1
- import{a as e}from"./runtime-chunk-TU4KDRKR.js";import{$ as o}from"./runtime-chunk-2RNKFNMP.js";import{Fc as n,Hc as t,Lc as r}from"./runtime-chunk-KPOUV3HD.js";function s(e){return!0===e?.depthPrepass}var i=!0;try{i="0"!==new URLSearchParams(window.location.search).get("dbgdepthprepass")}catch{}function a(e){return i&&e.transparent&&e.depthTest&&!e.wireframe&&!e.shapeBlend&&!function(e){let o=e?.layers;if(!o)return!1;for(let e of o)if("transmission"===e.data.type&&e.data.visible)return!0;return!1}(e.data)}var c={enabled:!1},l=new WeakMap;function u(e){if(!c.enabled)return e;let o=l.get(e);return o||(o={...e,bloom:{...e.bloom,kernelSize:0},depthOfField:{...e.depthOfField,enabled:!1}},l.set(e,o)),o}var f=new WeakSet;function p(e){if(!e.isPointLight&&!e.isSpotLight&&!e.isDirectionalLight)return!1;if(c.enabled){if(!0===e.castShadow)return e.castShadow=!1,f.add(e),!0}else if(f.has(e)&&(f.delete(e),!1===e.castShadow))return e.castShadow=!0,!0;return!1}function h(s,i){switch(s.type){case"cavity":return function(e,o){return{...d(e,o),ridge:e.ridge,valley:e.valley}}(s,i);case"dust":return function(n,t){return{...d(n,t),color:e(n.color,t),coverage:o(n.coverage,t)??.2,softness:o(n.softness,t)??.2,noiseStrength:o(n.noiseStrength,t)??.2,noiseScale:o(n.noiseScale,t)??1}}(s,i);case"fresnel":return function(o,n){let{bias:t,scale:r,intensity:s,factor:i,color:a}=o;return{...d(o,n),color:e(a,n),bias:t,scale:r,intensity:s,factor:i}}(s,i);case"gradient":return function(e,o){let{gradientType:t,smooth:s,colors:i,steps:a,angle:c,offset:l,morph:u}=e;return{...d(e,o),gradientType:t,smooth:s,colors:i.map(e=>new r(e[0],e[1],e[2],e[3])),num:i.length,steps:a,offset:new n(...l.map(e=>"number"==typeof e?e:0)),morph:new n(...u.map(e=>"number"==typeof e?e:0)),angle:c}}(s,i);case"depth":return function(e,o){let{gradientType:n,near:s,far:i,isVector:a,isWorldSpace:c,origin:l,direction:u,colors:f,steps:p,smooth:h}=e;return{...d(e,o),gradientType:n,near:s,far:i,isVector:a,isWorldSpace:c,origin:new t(...l),direction:u?new t(...u):new t(1,0,0),colors:f.map(e=>void 0!==e?new r(e[0],e[1],e[2],e[3]):new r(0,0,0,0)),steps:p.slice(0,f.length),smooth:h}}(s,i);case"normal":return function(e,o){let{cnormal:n}=e;return{...d(e,o),cnormal:new t(n[0],n[1],n[2])}}(s,i);case"noise":return function(o,r){return{...d(o,r),scale:o.scale,move:o.move,fA:new n(...o.fA.map(e=>"number"==typeof e?e:0)),fB:new n(...o.fB.map(e=>"number"==typeof e?e:0)),size:new t(...o.size),distortion:new n(...o.distortion.map(e=>"number"==typeof e?e:0)),colorA:e(o.colorA,r),colorB:e(o.colorB,r),colorC:e(o.colorC,r),colorD:e(o.colorD,r),noiseType:o.noiseType,voronoiStyle:o.voronoiStyle,highCut:o.highCut,lowCut:o.lowCut,smoothness:o.smoothness,seed:o.seed,quality:o.quality}}(s,i);case"rainbow":return function(e,o){return{...d(e,o),filmThickness:e.filmThickness,movement:e.movement,wavelengths:new t(...e.wavelengths),noiseStrength:e.noiseStrength,noiseScale:e.noiseScale,offset:new t(...e.offset)}}(s,i);case"toon":return function(o,n){return{...d(o,n),positioning:o.positioning,colors:o.colors.map(e=>new r(e[0],e[1],e[2],e[3])),num:o.colors.length,steps:o.steps,source:new t(...o.source),isWorldSpace:o.isWorldSpace,noiseStrength:o.noiseStrength,noiseScale:o.noiseScale,shadowColor:e(o.shadowColor,n),offset:new t(...o.offset)}}(s,i);case"outline":return function(o,n){return{...d(o,n),outlineColor:e(o.outlineColor,n),contourColor:e(o.contourColor,n),outlineWidth:o.outlineWidth,contourWidth:o.contourWidth,outlineThreshold:o.outlineThreshold,contourThreshold:o.contourThreshold,outlineSmoothing:o.outlineSmoothing,contourFrequency:o.contourFrequency,contourDirection:new t(...o.contourDirection),positionalLines:o.positionalLines,compensation:o.compensation}}(s,i);case"transmission":return function(o,n){return{...d(o,n),thickness:o.thickness,ior:o.ior,roughness:o.roughness,attenuationColor:void 0!==o.attenuationColor?e(o.attenuationColor,n):{r:1,g:1,b:1,a:1},attenuationDistance:o.attenuationDistance??0}}(s,i);case"reflection":return function(e,n){return{...d(e,n),blur:o(e.blur,n)??0,thickness:o(e.thickness,n)??.001,steps:o(e.steps,n)??60,stepSize:o(e.stepSize,n)??.005,tracingMode:e.tracingMode,mirror:e.mirror??0}}(s,i);case"pattern":return function(o,t){return{...d(o,t),style:o.style,projection:o.projection,axis:o.axis,blending:o.blending,offset:new n(...o.offset.map(e=>"number"==typeof e?e:0)),colorA:e(o.colorA,t),colorB:e(o.colorB,t),frequency:new n(...o.frequency.map(e=>"number"==typeof e?e:0)),size:o.size,variation:o.variation,smoothness:o.smoothness,zigzag:o.zigzag,rotation:o.rotation,vertical:new n(...o.vertical.map(e=>"number"==typeof e?e:0)),horizontal:new n(...o.horizontal.map(e=>"number"==typeof e?e:0)),sides:o.sides}}(s,i);case"vertexColor":return d(s,i);default:return function(o,n){return{...d(o,n),color:e(o.color,n)}}(s,i)}}function m(e){return{type:e.type}}function d(e,o){let{alpha:n,mode:t,isMask:r}=e,s="string"==typeof n?Number(o.getVariable(n)??100)/100:n;return{...m(e),alpha:s,mode:t,isMask:r}}export{s as a,a as b,c,u as d,p as e,h as f};
1
+ import{a as e}from"./runtime-chunk-TU4KDRKR.js";import{$ as o}from"./runtime-chunk-III53OHU.js";import{Fc as n,Hc as t,Lc as r}from"./runtime-chunk-KPOUV3HD.js";function s(e){return!0===e?.depthPrepass}var i=!0;try{i="0"!==new URLSearchParams(window.location.search).get("dbgdepthprepass")}catch{}function a(e){return i&&e.transparent&&e.depthTest&&!e.wireframe&&!e.shapeBlend&&!function(e){let o=e?.layers;if(!o)return!1;for(let e of o)if("transmission"===e.data.type&&e.data.visible)return!0;return!1}(e.data)}var c={enabled:!1},l=new WeakMap;function u(e){if(!c.enabled)return e;let o=l.get(e);return o||(o={...e,bloom:{...e.bloom,kernelSize:0},depthOfField:{...e.depthOfField,enabled:!1}},l.set(e,o)),o}var f=new WeakSet;function p(e){if(!e.isPointLight&&!e.isSpotLight&&!e.isDirectionalLight)return!1;if(c.enabled){if(!0===e.castShadow)return e.castShadow=!1,f.add(e),!0}else if(f.has(e)&&(f.delete(e),!1===e.castShadow))return e.castShadow=!0,!0;return!1}function h(s,i){switch(s.type){case"cavity":return function(e,o){return{...d(e,o),ridge:e.ridge,valley:e.valley}}(s,i);case"dust":return function(n,t){return{...d(n,t),color:e(n.color,t),coverage:o(n.coverage,t)??.2,softness:o(n.softness,t)??.2,noiseStrength:o(n.noiseStrength,t)??.2,noiseScale:o(n.noiseScale,t)??1}}(s,i);case"fresnel":return function(o,n){let{bias:t,scale:r,intensity:s,factor:i,color:a}=o;return{...d(o,n),color:e(a,n),bias:t,scale:r,intensity:s,factor:i}}(s,i);case"gradient":return function(e,o){let{gradientType:t,smooth:s,colors:i,steps:a,angle:c,offset:l,morph:u}=e;return{...d(e,o),gradientType:t,smooth:s,colors:i.map(e=>new r(e[0],e[1],e[2],e[3])),num:i.length,steps:a,offset:new n(...l.map(e=>"number"==typeof e?e:0)),morph:new n(...u.map(e=>"number"==typeof e?e:0)),angle:c}}(s,i);case"depth":return function(e,o){let{gradientType:n,near:s,far:i,isVector:a,isWorldSpace:c,origin:l,direction:u,colors:f,steps:p,smooth:h}=e;return{...d(e,o),gradientType:n,near:s,far:i,isVector:a,isWorldSpace:c,origin:new t(...l),direction:u?new t(...u):new t(1,0,0),colors:f.map(e=>void 0!==e?new r(e[0],e[1],e[2],e[3]):new r(0,0,0,0)),steps:p.slice(0,f.length),smooth:h}}(s,i);case"normal":return function(e,o){let{cnormal:n}=e;return{...d(e,o),cnormal:new t(n[0],n[1],n[2])}}(s,i);case"noise":return function(o,r){return{...d(o,r),scale:o.scale,move:o.move,fA:new n(...o.fA.map(e=>"number"==typeof e?e:0)),fB:new n(...o.fB.map(e=>"number"==typeof e?e:0)),size:new t(...o.size),distortion:new n(...o.distortion.map(e=>"number"==typeof e?e:0)),colorA:e(o.colorA,r),colorB:e(o.colorB,r),colorC:e(o.colorC,r),colorD:e(o.colorD,r),noiseType:o.noiseType,voronoiStyle:o.voronoiStyle,highCut:o.highCut,lowCut:o.lowCut,smoothness:o.smoothness,seed:o.seed,quality:o.quality}}(s,i);case"rainbow":return function(e,o){return{...d(e,o),filmThickness:e.filmThickness,movement:e.movement,wavelengths:new t(...e.wavelengths),noiseStrength:e.noiseStrength,noiseScale:e.noiseScale,offset:new t(...e.offset)}}(s,i);case"toon":return function(o,n){return{...d(o,n),positioning:o.positioning,colors:o.colors.map(e=>new r(e[0],e[1],e[2],e[3])),num:o.colors.length,steps:o.steps,source:new t(...o.source),isWorldSpace:o.isWorldSpace,noiseStrength:o.noiseStrength,noiseScale:o.noiseScale,shadowColor:e(o.shadowColor,n),offset:new t(...o.offset)}}(s,i);case"outline":return function(o,n){return{...d(o,n),outlineColor:e(o.outlineColor,n),contourColor:e(o.contourColor,n),outlineWidth:o.outlineWidth,contourWidth:o.contourWidth,outlineThreshold:o.outlineThreshold,contourThreshold:o.contourThreshold,outlineSmoothing:o.outlineSmoothing,contourFrequency:o.contourFrequency,contourDirection:new t(...o.contourDirection),positionalLines:o.positionalLines,compensation:o.compensation}}(s,i);case"transmission":return function(o,n){return{...d(o,n),thickness:o.thickness,ior:o.ior,roughness:o.roughness,attenuationColor:void 0!==o.attenuationColor?e(o.attenuationColor,n):{r:1,g:1,b:1,a:1},attenuationDistance:o.attenuationDistance??0}}(s,i);case"reflection":return function(e,n){return{...d(e,n),blur:o(e.blur,n)??0,thickness:o(e.thickness,n)??.001,steps:o(e.steps,n)??60,stepSize:o(e.stepSize,n)??.005,tracingMode:e.tracingMode,mirror:e.mirror??0}}(s,i);case"pattern":return function(o,t){return{...d(o,t),style:o.style,projection:o.projection,axis:o.axis,blending:o.blending,offset:new n(...o.offset.map(e=>"number"==typeof e?e:0)),colorA:e(o.colorA,t),colorB:e(o.colorB,t),frequency:new n(...o.frequency.map(e=>"number"==typeof e?e:0)),size:o.size,variation:o.variation,smoothness:o.smoothness,zigzag:o.zigzag,rotation:o.rotation,vertical:new n(...o.vertical.map(e=>"number"==typeof e?e:0)),horizontal:new n(...o.horizontal.map(e=>"number"==typeof e?e:0)),sides:o.sides}}(s,i);case"vertexColor":return d(s,i);default:return function(o,n){return{...d(o,n),color:e(o.color,n)}}(s,i)}}function m(e){return{type:e.type}}function d(e,o){let{alpha:n,mode:t,isMask:r}=e,s="string"==typeof n?Number(o.getVariable(n)??100)/100:n;return{...m(e),alpha:s,mode:t,isMask:r}}export{s as a,a as b,c,u as d,p as e,h as f};
@@ -1 +1 @@
1
- import{f as t}from"./runtime-chunk-BVZK2X37.js";import{a as s,b as a}from"./runtime-chunk-AEDDM67H.js";import{Ae as e,De as i,Ec as o,Gc as h,Hc as r,Ue as d,We as n,Xe as c}from"./runtime-chunk-KPOUV3HD.js";var l=class extends(s(n)){constructor(t,s=15,a=10066329){super(t,s,a),this.object=t,this.added=!1,this.name=`DirectionalLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,l.geometryHelper,t,s)}},p=class extends(t(i,l)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=2048,this.shadow.mapSize.height=2048,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.top=1250,e.bottom=-1250,e.right=1250,e.left=-1250,e.near=-1e4,e.far=2500;let i=new c(this.shadow.camera);i.visible=!1,this.gizmos.shadowmap=i}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof c&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s);let a=void 0!==t.depth&&t.depth!==this.shadow.camera.far||void 0!==t.size&&t.size/2!==this.shadow.camera.right;void 0!==t.size&&function(t,s){t.shadow.camera.right=s/2,t.shadow.camera.left=-s/2,t.shadow.camera.top=s/2,t.shadow.camera.bottom=-s/2,t.shadow.needsUpdate=!0}(this,t.size),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null)),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),a&&this.update()}},m=class extends(s(d)){constructor(t,s=6710886){super(t,s),this.object=t,this.matrix=t.matrixWorld,this.name=`SpotLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,m.geometryHelper,t,s)}update(){if(void 0!==this.object){let t=m._vector,s=this.object.distance?this.object.distance:1e3,a=s*Math.tan(this.object.angle);this.cone.scale.set(a,a,s),t.setFromMatrixPosition(this.object.target.matrixWorld),this.cone.lookAt(t);let e=void 0!==this.color?this.color:this.light.color;if(this.cone.material instanceof Array)for(let t=0,s=this.cone.material.length;t<s;t++)this.cone.material[t].color.set(e);else this.cone.material.color.set(e)}}},u=m;u._vector=new r;var w=new r,b=new r,g=new h,v=class extends(t(e,u)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=1024,this.shadow.mapSize.height=1024,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.fov=2*o.RAD2DEG*this.angle,e.aspect=1,e.near=100,e.far=2500;let i=new c(this.shadow.camera);i.visible=!1,this.gizmos.shadowmap=i,this.update()}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof c&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),b.setFromMatrixPosition(this.matrixWorld),g.setFromRotationMatrix(this.matrixWorld),w.copy(this.up).applyQuaternion(g).negate().multiplyScalar(this.distance),this.target.position.copy(b).add(w),this.target.updateMatrixWorld(),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.angle&&(this.angle=t.angle),void 0!==t.penumbra&&(this.penumbra=t.penumbra),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null))}};export{p as a,v as b};
1
+ import{f as t}from"./runtime-chunk-AW6U245D.js";import{a as s,b as a}from"./runtime-chunk-AUUKCZJE.js";import{Ae as e,De as i,Ec as o,Gc as h,Hc as r,Ue as d,We as n,Xe as c}from"./runtime-chunk-KPOUV3HD.js";var l=class extends(s(n)){constructor(t,s=15,a=10066329){super(t,s,a),this.object=t,this.added=!1,this.name=`DirectionalLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,l.geometryHelper,t,s)}},p=class extends(t(i,l)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=2048,this.shadow.mapSize.height=2048,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.top=1250,e.bottom=-1250,e.right=1250,e.left=-1250,e.near=-1e4,e.far=2500;let i=new c(this.shadow.camera);i.visible=!1,this.gizmos.shadowmap=i}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof c&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s);let a=void 0!==t.depth&&t.depth!==this.shadow.camera.far||void 0!==t.size&&t.size/2!==this.shadow.camera.right;void 0!==t.size&&function(t,s){t.shadow.camera.right=s/2,t.shadow.camera.left=-s/2,t.shadow.camera.top=s/2,t.shadow.camera.bottom=-s/2,t.shadow.needsUpdate=!0}(this,t.size),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null)),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),a&&this.update()}},m=class extends(s(d)){constructor(t,s=6710886){super(t,s),this.object=t,this.matrix=t.matrixWorld,this.name=`SpotLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,m.geometryHelper,t,s)}update(){if(void 0!==this.object){let t=m._vector,s=this.object.distance?this.object.distance:1e3,a=s*Math.tan(this.object.angle);this.cone.scale.set(a,a,s),t.setFromMatrixPosition(this.object.target.matrixWorld),this.cone.lookAt(t);let e=void 0!==this.color?this.color:this.light.color;if(this.cone.material instanceof Array)for(let t=0,s=this.cone.material.length;t<s;t++)this.cone.material[t].color.set(e);else this.cone.material.color.set(e)}}},u=m;u._vector=new r;var w=new r,b=new r,g=new h,v=class extends(t(e,u)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=1024,this.shadow.mapSize.height=1024,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.fov=2*o.RAD2DEG*this.angle,e.aspect=1,e.near=100,e.far=2500;let i=new c(this.shadow.camera);i.visible=!1,this.gizmos.shadowmap=i,this.update()}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof c&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),b.setFromMatrixPosition(this.matrixWorld),g.setFromRotationMatrix(this.matrixWorld),w.copy(this.up).applyQuaternion(g).negate().multiplyScalar(this.distance),this.target.position.copy(b).add(w),this.target.updateMatrixWorld(),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.angle&&(this.angle=t.angle),void 0!==t.penumbra&&(this.penumbra=t.penumbra),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null))}};export{p as a,v as b};
@@ -1 +1 @@
1
- import{a as e,b as t}from"./runtime-chunk-UN6LBHPT.js";import{a,c as i,g as s,i as r}from"./runtime-chunk-BVZK2X37.js";import{a as n}from"./runtime-chunk-TU4KDRKR.js";import{a as l,b as o}from"./runtime-chunk-5NKADMLG.js";import{Y as h,d as u,e as c,i as d,na as p}from"./runtime-chunk-2RNKFNMP.js";import{b as y,h as g,j as f,v as m}from"./runtime-chunk-LGLIAPCL.js";import{c as b}from"./runtime-chunk-2PT2WH66.js";import{c as v,l as C}from"./runtime-chunk-TZCHGFVF.js";import{Aa as k,ra as S,ua as A,w}from"./runtime-chunk-ADHKZQMB.js";import{Pe as L,Qc as F,Vc as H,Wc as O,Xc as j,ed as B,ld as M,nd as D,xe as T}from"./runtime-chunk-KPOUV3HD.js";function U(e){return e instanceof p&&e.needsAO&&!b(e)&&!0!==e.isDecalObject}function P(e){let t=e.cloner;if(t&&Array.isArray(t.children))for(let a of t.children)a?.layers&&(a.layers.mask=e.layers.mask)}function z(e){return e.getLayersOfType("reflection").filter(e=>e.data.visible).length}function x(e){return e.getLayersOfType("reflection").some(e=>e.data.visible&&1===e.data.mirror)}function I(e){let t=1/0,a=-1/0;for(let i of e.getLayersOfType("reflection")){let e=i.data;if(!e.visible||1===e.mirror)continue;let s="number"==typeof e.blur?e.blur:null;t=Math.min(t,s??0),a=Math.max(a,s??10)}return t===1/0?null:{min:t,max:a}}function E(e){for(let t of e.getLayersOfType("reflection")){let e=t.data;if(!e.visible)continue;let{blur:a,thickness:i,steps:s,stepSize:r}=e;return"number"!=typeof a||"number"!=typeof i||"number"!=typeof s||"number"!=typeof r?"variable":{blur:a,thickness:i,steps:s,stepSize:r,tracingMode:1===e.tracingMode?1:0}}return null}function K(e,t){let a={outline:!1,cavity:!1},i=512&e.layers.mask,s=t.getLayersOfType("transmission"),r=t.getLayersOfType("outline"),n=z(t),h=t.getLayersOfType("cavity");return(r.length>0||h.length>0)&&(e.layers.set(8),s.length>0&&e.layers.enable(3),n>0&&e.layers.enable(4),a.outline=r.length>0,a.cavity=h.length>0,o(e),l(e)),0===s.length&&0===r.length&&0===h.length&&0===n&&e.layers.set(0),i&&e.layers.set(9),!i&&U(e)&&e.layers.enable(5),P(e),a}function V(e,t){if(!t.layers)return!1;let a=512&e.layers.mask,i=!1,s=t.getLayersOfType("transmission").filter(e=>e.data.visible),r=t.getLayersOfType("outline").filter(e=>e.data.visible),n=z(t),l=t.getLayersOfType("cavity").filter(e=>e.data.visible);return s.length>0&&(e.layers.set(3),(r.length>0||l.length>0)&&e.layers.enable(8),n>0&&e.layers.enable(4),i=!0),0===s.length&&0===r.length&&0===l.length&&0===n&&e.layers.set(0),a&&e.layers.set(9),!a&&U(e)&&e.layers.enable(5),P(e),i}function W(e,t){var a;if(!t.layers)return!1;let i=512&e.layers.mask,s=!1,r=z(t),n=t.getLayersOfType("transmission").filter(e=>e.data.visible),l=t.getLayersOfType("outline").filter(e=>e.data.visible),o=t.getLayersOfType("cavity").filter(e=>e.data.visible);return r>0&&((a=e.userData).__splinePlanarMirror??(a.__splinePlanarMirror=0),e.layers.set(4),n.length>0&&e.layers.enable(3),(l.length>0||o.length>0)&&e.layers.enable(8),s=!0),0===r&&0===n.length&&0===l.length&&0===o.length&&e.layers.set(0),i&&e.layers.set(9),!i&&U(e)&&e.layers.enable(5),P(e),s}function G(e){let t={outline:!1,cavity:!1},a=e=>{t.outline=t.outline||e.outline,t.cavity=t.cavity||e.cavity};return e.traverseEntity(e=>{if(e instanceof p)if(Array.isArray(e.material))for(let t=0;t<e.material.length;t++)a(K(e,e.material[t]));else a(K(e,e.material))}),t}function _(e){let t=!1;return e.traverseEntity(e=>{if(e instanceof p)if(Array.isArray(e.material))for(let a=0;a<e.material.length;a++)V(e,e.material[a])&&(t=!0);else V(e,e.material)&&(t=!0)}),t}function N(e){let t=!1;return e.traverseEntity(e=>{if(e instanceof p)if(Array.isArray(e.material))for(let a=0;a<e.material.length;a++)W(e,e.material[a])&&(t=!0);else W(e,e.material)&&(t=!0)}),t}var Q=new L,R=new F,Z=new M,X=new B;function Y(e,t,a,i=!1){let s=e.cloner;if(s){let r=null;if((e.raycast===D.prototype.raycast||e.raycast===m.prototype.raycast)&&!0!==e.isSkinnedMesh){let t=e.geometry;t&&(null===t.boundingSphere&&t.computeBoundingSphere(),r=t.boundingSphere)}for(let n of s.children){if(null!==r&&(X.copy(r).applyMatrix4(n.matrixWorld),!t.ray.intersectsSphere(X)))continue;let s=R.copy(n.matrixWorld).invert(),l=Z.copy(t.ray).applyMatrix4(s),o=e.matrixWorld;l.applyMatrix4(o);let h=Q;h.set(l.origin,l.direction),h.near=t.near,h.far=t.far,h.layers.mask=t.layers.mask;let u=h.intersectObject(e,!1);u.length>0&&a.push({...u[0],object:i?n:e})}}}var q=class extends(f(j)){constructor(e,t,i){if(super(),this.data=t,this.bgColor=new d(1,1,1,1),this.fog=null,this.backupFog=new O(16777215,.1,2e3),this.fogUseBGColor=!1,this.fogMode="linear",this.fogDensity=S.getDensity({}),this.fogHeightFalloff=S.getHeightFalloff({}),this.fogHeightBase=S.getHeightBase({}),this.isActive=!1,this.skyState=null,this.skyStateVersion=0,this.gradingState=null,this.skyHdriHolder=null,this.aoColor=new H,this.penumbraSizeArrayCache=null,this.super_Entity(e,t),this.personalCamera=new a(w,{...k.defaultData,...t.camera,name:"Personal Camera"}),this.personalCamera.objectHelper.visible=!1,this.add(this.personalCamera),this.activeCamera=this.personalCamera,this.ambientLight=new T(13882323,8553090,.75*Math.PI),this.ambientLight.name="Default Ambient Light",this.ambientLight.layers.enable(3),this.ambientLight.removeFromParent(),this.add(this.ambientLight),t.uiScene){let a=C();null===a?v("ui-2d","a page's 2D scene"):this.uiScene=new a.Scene2D((Array.isArray(e)?e[0]:e)+"-ui",t.uiScene,{dpr:window.devicePixelRatio,shared:i.shared})}else t.uiFrame&&this.createUICanvas(t.uiFrame,i)}get scene(){return this.parent}get postprocessing(){return this.data.postprocessing}get frameId(){return this.data.uiFrame}get frame(){return this.uiCanvas?.frame}createUICanvas(e,t){let a=C();null!==a?(this.uiCanvas=new a.UICanvas(this.uuid+"-uiscreen",window.innerWidth,window.innerHeight,t),this.uiCanvas.isScreenSpace=!0,this.uiCanvas.promise.then(()=>{this.uiCanvas?.applyFrame(e),this.uiCanvas?.applySize()})):v("ui-2d","a page's UI canvas")}updateVisible(){}setBackgroundColor(e){this.bgColor=e,!0===this.fogUseBGColor&&(this.backupFog.color=e)}entityChildrenCount(){return this.uiScene?this.uiScene.children.length:super.entityChildrenCount()}updateAmbientLight(e,t){void 0!==e.color&&(this.ambientLight.color=n(e.color,t)),void 0!==e.intensity&&(this.ambientLight.intensity=e.intensity*Math.PI),void 0!==e.enabled&&(e.enabled?this.add(this.ambientLight):this.remove(this.ambientLight))}onDeactive(){this.isActive=!1}onActive(e){this.isActive=!0,e.fog=this.fog,this.traverseEntity(e=>{e instanceof i&&e.recomputeBoolean()}),this.updateShadow(this.data.shadow)}forceMaterialsUpdate(){this.traverseEntity(e=>{if(e instanceof p)if(Array.isArray(e.material))for(let t of e.material)t.needsUpdate=!0;else e.material.needsUpdate=!0,e.material.dispose()})}updateShadow(e){if(void 0===e.softShadowQuality&&void 0===e.type||!this.isActive)return;let t=this.data.shadow,a=A.isSoft(t);h(a,t?.softShadowQuality)&&this.forceMaterialsUpdate()}updateFog(e,t){e.enabled?this.fog=this.backupFog:this.fog=null,this.isActive&&(this.scene.fog=this.fog),this.fogUseBGColor=e.useBackgroundColor,e.useBackgroundColor?this.backupFog.color.set(this.bgColor):this.backupFog.color=n(e.color,t),this.backupFog.near=e.near,this.backupFog.far=e.far,this.fogMode=S.getMode(e),this.fogDensity=S.getDensity(e),this.fogHeightFalloff=S.getHeightFalloff(e),this.fogHeightBase=S.getHeightBase(e)}updateSky(e,t){this.skyState=e??null,this.skyStateVersion++;let a=e?.hdri?.image;this.skyHdriHolder=null!=a?t.image(a):null}updateAo(e,t){void 0!==e.aoColor&&(this.aoColor=n(e.aoColor,t))}updateByOp(e,t,a,i){let s=this.data.uiFrame;super.updateByOp(e,t,a,i);let r=t;y(e.path,["fog"])?this.updateFog(r.fog,a.shared):y(e.path,["sky"])?this.updateSky(r.sky,a.shared):y(e.path,["grading"])?this.gradingState=r.grading??null:y(e.path,["ao"])?this.updateAo(r.ao,a.shared):y(e.path,["ambient"])?this.updateAmbientLight(r.ambient,a.shared):y(e.path,["shadow"])?this.updateShadow(r.shadow):0===e.type&&0===e.path.length&&(void 0!==e.props.uiFrame||s!==r.uiFrame)&&this.updateUIFrame(e.props.uiFrame,a)}updateUIFrame(e,t){e?(this.uiCanvas||this.createUICanvas(e,t),this.uiCanvas.enabled=!0,this.uiCanvas.applyFrame(e)):this.uiCanvas&&(this.uiCanvas.enabled=!1)}updateState(e,t){this.updateState_Entity(e,t),void 0!==e.backgroundColor&&this.setBackgroundColor(n(e.backgroundColor,t.shared)),void 0!==e.fog&&this.updateFog(e.fog,t.shared),void 0!==e.sky&&this.updateSky(e.sky,t.shared),void 0!==e.grading&&(this.gradingState=e.grading),void 0!==e.ambient&&this.updateAmbientLight(e.ambient,t.shared),void 0!==e.ao&&this.updateAo(e.ao,t.shared),void 0!==e.shadow&&this.updateShadow(e.shadow)}createFrame(e,t){}raycast(e,t){super.raycast(e,t)}switchActiveCamera(e){e instanceof a&&e.isDescendantOf(this)&&(this.activeCamera!==this.personalCamera&&(this.activeCamera.objectHelper.visible=!0),this.activeCamera=e,e.objectHelper.visible=!1)}get playCamera(){let e=this.scene?.find(this.data.publish.playCamera);return e instanceof a?e:this.personalCamera}switchToPlayCamera(){this.switchActiveCamera(this.playCamera)}get penumbraSizeArray(){return null===this.penumbraSizeArrayCache&&this.updatePenumbraSizeArray(),this.penumbraSizeArrayCache}updatePenumbraSizeArray(){this.penumbraSizeArrayCache=new Array(u).fill(.5);let a=0,i=0;this.traverseEntity(s=>{if(!s.visible)return!0;s instanceof e&&s.visible&&a<c&&(this.penumbraSizeArrayCache[a]=s.data.penumbraSize??.5,a+=1),s instanceof t&&s.visible&&a<u-c&&(this.penumbraSizeArrayCache[c+i]=s.data.penumbraSize??.5,i+=1)})}raycastWithClones(e){let t=[],a=i=>{for(let n of i.children){let i=n.cloner;g.is(n)&&(n.visible||i?.object.data.visible)&&((s(n)||r(n)&&this.scene.enableHelpers&&n.objectHelper.visible)&&(e.intersectObject(n,!1,t),Y(n,e,t,!0)),a(n))}};return a(this),t}updateEntity2DByOp(e,t,a,i){this.uiCanvas?.updateEntity2DByOp(e,t,a,i)}};export{x as a,I as b,E as c,G as d,_ as e,N as f,Y as g,q as h};
1
+ import{a as e,b as t}from"./runtime-chunk-RBP5T6NT.js";import{a,c as i,g as s,i as r}from"./runtime-chunk-AW6U245D.js";import{a as n}from"./runtime-chunk-TU4KDRKR.js";import{a as l,b as o}from"./runtime-chunk-NPNYVUFG.js";import{Y as h,d as u,e as c,i as d,na as p}from"./runtime-chunk-III53OHU.js";import{b as y,h as g,j as f,v as m}from"./runtime-chunk-PQ42NYOR.js";import{c as b}from"./runtime-chunk-2PT2WH66.js";import{c as v,l as C}from"./runtime-chunk-TZCHGFVF.js";import{Aa as k,ra as S,ua as A,w}from"./runtime-chunk-ADHKZQMB.js";import{Pe as F,Qc as L,Vc as O,Wc as H,Xc as j,ed as B,ld as T,nd as U,xe as D}from"./runtime-chunk-KPOUV3HD.js";function M(e){return e instanceof p&&e.needsAO&&!b(e)&&!0!==e.isDecalObject}function P(e){let t=e.cloner;if(t&&Array.isArray(t.children))for(let a of t.children)a?.layers&&(a.layers.mask=e.layers.mask)}function z(e){return e.getLayersOfType("reflection").filter(e=>e.data.visible).length}function I(e){return e.getLayersOfType("reflection").some(e=>e.data.visible&&1===e.data.mirror)}function x(e){let t=1/0,a=-1/0;for(let i of e.getLayersOfType("reflection")){let e=i.data;if(!e.visible||1===e.mirror)continue;let s="number"==typeof e.blur?e.blur:null;t=Math.min(t,s??0),a=Math.max(a,s??10)}return t===1/0?null:{min:t,max:a}}function E(e){for(let t of e.getLayersOfType("reflection")){let e=t.data;if(!e.visible)continue;let{blur:a,thickness:i,steps:s,stepSize:r}=e;return"number"!=typeof a||"number"!=typeof i||"number"!=typeof s||"number"!=typeof r?"variable":{blur:a,thickness:i,steps:s,stepSize:r,tracingMode:1===e.tracingMode?1:0}}return null}function W(e,t){let a={outline:!1,cavity:!1},i=512&e.layers.mask,s=t.getLayersOfType("transmission"),r=t.getLayersOfType("outline"),n=z(t),h=t.getLayersOfType("cavity");return(r.length>0||h.length>0)&&(e.layers.set(8),s.length>0&&e.layers.enable(3),n>0&&e.layers.enable(4),a.outline=r.length>0,a.cavity=h.length>0,o(e),l(e)),0===s.length&&0===r.length&&0===h.length&&0===n&&e.layers.set(0),i&&e.layers.set(9),!i&&M(e)&&e.layers.enable(5),P(e),a}function V(e,t){if(!t.layers)return!1;let a=512&e.layers.mask,i=!1,s=t.getLayersOfType("transmission").filter(e=>e.data.visible),r=t.getLayersOfType("outline").filter(e=>e.data.visible),n=z(t),l=t.getLayersOfType("cavity").filter(e=>e.data.visible);return s.length>0&&(e.layers.set(3),(r.length>0||l.length>0)&&e.layers.enable(8),n>0&&e.layers.enable(4),i=!0),0===s.length&&0===r.length&&0===l.length&&0===n&&e.layers.set(0),a&&e.layers.set(9),!a&&M(e)&&e.layers.enable(5),P(e),i}function _(e,t){var a;if(!t.layers)return!1;let i=512&e.layers.mask,s=!1,r=z(t),n=t.getLayersOfType("transmission").filter(e=>e.data.visible),l=t.getLayersOfType("outline").filter(e=>e.data.visible),o=t.getLayersOfType("cavity").filter(e=>e.data.visible);return r>0&&((a=e.userData).__splinePlanarMirror??(a.__splinePlanarMirror=0),e.layers.set(4),n.length>0&&e.layers.enable(3),(l.length>0||o.length>0)&&e.layers.enable(8),s=!0),0===r&&0===n.length&&0===l.length&&0===o.length&&e.layers.set(0),i&&e.layers.set(9),!i&&M(e)&&e.layers.enable(5),P(e),s}function G(e){let t={outline:!1,cavity:!1},a=e=>{t.outline=t.outline||e.outline,t.cavity=t.cavity||e.cavity};return e.traverseEntity(e=>{if(e instanceof p)if(Array.isArray(e.material))for(let t=0;t<e.material.length;t++)a(W(e,e.material[t]));else a(W(e,e.material))}),t}function Q(e){let t=!1;return e.traverseEntity(e=>{if(e instanceof p)if(Array.isArray(e.material))for(let a=0;a<e.material.length;a++)V(e,e.material[a])&&(t=!0);else V(e,e.material)&&(t=!0)}),t}function R(e){let t=!1;return e.traverseEntity(e=>{if(e instanceof p)if(Array.isArray(e.material))for(let a=0;a<e.material.length;a++)_(e,e.material[a])&&(t=!0);else _(e,e.material)&&(t=!0)}),t}var K=new F,N=new L,Y=new T,Z=new B;function X(e,t,a,i=!1){let s=e.cloner;if(s){let r=null;if((e.raycast===U.prototype.raycast||e.raycast===m.prototype.raycast)&&!0!==e.isSkinnedMesh){let t=e.geometry;t&&(null===t.boundingSphere&&t.computeBoundingSphere(),r=t.boundingSphere)}for(let n of s.children){if(null!==r&&(Z.copy(r).applyMatrix4(n.matrixWorld),!t.ray.intersectsSphere(Z)))continue;let s=N.copy(n.matrixWorld).invert(),l=Y.copy(t.ray).applyMatrix4(s),o=e.matrixWorld;l.applyMatrix4(o);let h=K;h.set(l.origin,l.direction),h.near=t.near,h.far=t.far,h.layers.mask=t.layers.mask;let u=h.intersectObject(e,!1);u.length>0&&a.push({...u[0],object:i?n:e})}}}var q=class extends(f(j)){constructor(e,t,i){if(super(),this.data=t,this.bgColor=new d(1,1,1,1),this.fog=null,this.backupFog=new H(16777215,.1,2e3),this.fogUseBGColor=!1,this.fogMode="linear",this.fogDensity=S.getDensity({}),this.fogHeightFalloff=S.getHeightFalloff({}),this.fogHeightBase=S.getHeightBase({}),this.isActive=!1,this.skyState=null,this.skyStateVersion=0,this.gradingState=null,this.skyHdriHolder=null,this.aoColor=new O,this.penumbraSizeArrayCache=null,this.super_Entity(e,t),this.personalCamera=new a(w,{...k.defaultData,...t.camera,name:"Personal Camera"}),this.personalCamera.objectHelper.visible=!1,this.add(this.personalCamera),this.activeCamera=this.personalCamera,this.ambientLight=new D(13882323,8553090,.75*Math.PI),this.ambientLight.name="Default Ambient Light",this.ambientLight.layers.enable(3),this.ambientLight.removeFromParent(),this.add(this.ambientLight),t.uiScene){let a=C();null===a?v("ui-2d","a page's 2D scene"):this.uiScene=new a.Scene2D((Array.isArray(e)?e[0]:e)+"-ui",t.uiScene,{dpr:window.devicePixelRatio,shared:i.shared})}else t.uiFrame&&this.createUICanvas(t.uiFrame,i)}get scene(){return this.parent}get postprocessing(){return this.data.postprocessing}get frameId(){return this.data.uiFrame}get frame(){return this.uiCanvas?.frame}createUICanvas(e,t){let a=C();null!==a?(this.uiCanvas=new a.UICanvas(this.uuid+"-uiscreen",window.innerWidth,window.innerHeight,t),this.uiCanvas.isScreenSpace=!0,this.uiCanvas.promise.then(()=>{this.uiCanvas?.applyFrame(e),this.uiCanvas?.applySize()})):v("ui-2d","a page's UI canvas")}updateVisible(){}setBackgroundColor(e){this.bgColor=e,!0===this.fogUseBGColor&&(this.backupFog.color=e)}entityChildrenCount(){return this.uiScene?this.uiScene.children.length:super.entityChildrenCount()}updateAmbientLight(e,t){void 0!==e.color&&(this.ambientLight.color=n(e.color,t)),void 0!==e.intensity&&(this.ambientLight.intensity=e.intensity*Math.PI),void 0!==e.enabled&&(e.enabled?this.add(this.ambientLight):this.remove(this.ambientLight))}onDeactive(){this.isActive=!1}onActive(e){this.isActive=!0,e.fog=this.fog,this.traverseEntity(e=>{e instanceof i&&e.recomputeBoolean()}),this.updateShadow(this.data.shadow)}forceMaterialsUpdate(){this.traverseEntity(e=>{if(e instanceof p)if(Array.isArray(e.material))for(let t of e.material)t.needsUpdate=!0;else e.material.needsUpdate=!0,e.material.dispose()})}updateShadow(e){if(void 0===e.softShadowQuality&&void 0===e.type||!this.isActive)return;let t=this.data.shadow,a=A.isSoft(t);h(a,t?.softShadowQuality)&&this.forceMaterialsUpdate()}updateFog(e,t){e.enabled?this.fog=this.backupFog:this.fog=null,this.isActive&&(this.scene.fog=this.fog),this.fogUseBGColor=e.useBackgroundColor,e.useBackgroundColor?this.backupFog.color.set(this.bgColor):this.backupFog.color=n(e.color,t),this.backupFog.near=e.near,this.backupFog.far=e.far,this.fogMode=S.getMode(e),this.fogDensity=S.getDensity(e),this.fogHeightFalloff=S.getHeightFalloff(e),this.fogHeightBase=S.getHeightBase(e)}updateSky(e,t){this.skyState=e??null,this.skyStateVersion++;let a=e?.hdri?.image;this.skyHdriHolder=null!=a?t.image(a):null}updateAo(e,t){void 0!==e.aoColor&&(this.aoColor=n(e.aoColor,t))}updateByOp(e,t,a,i){let s=this.data.uiFrame;super.updateByOp(e,t,a,i);let r=t;y(e.path,["fog"])?this.updateFog(r.fog,a.shared):y(e.path,["sky"])?this.updateSky(r.sky,a.shared):y(e.path,["grading"])?this.gradingState=r.grading??null:y(e.path,["ao"])?this.updateAo(r.ao,a.shared):y(e.path,["ambient"])?this.updateAmbientLight(r.ambient,a.shared):y(e.path,["shadow"])?this.updateShadow(r.shadow):0===e.type&&0===e.path.length&&(void 0!==e.props.uiFrame||s!==r.uiFrame)&&this.updateUIFrame(e.props.uiFrame,a)}updateUIFrame(e,t){e?(this.uiCanvas||this.createUICanvas(e,t),this.uiCanvas.enabled=!0,this.uiCanvas.applyFrame(e)):this.uiCanvas&&(this.uiCanvas.enabled=!1)}updateState(e,t){this.updateState_Entity(e,t),void 0!==e.backgroundColor&&this.setBackgroundColor(n(e.backgroundColor,t.shared)),void 0!==e.fog&&this.updateFog(e.fog,t.shared),void 0!==e.sky&&this.updateSky(e.sky,t.shared),void 0!==e.grading&&(this.gradingState=e.grading),void 0!==e.ambient&&this.updateAmbientLight(e.ambient,t.shared),void 0!==e.ao&&this.updateAo(e.ao,t.shared),void 0!==e.shadow&&this.updateShadow(e.shadow)}createFrame(e,t){}raycast(e,t){super.raycast(e,t)}switchActiveCamera(e){e instanceof a&&e.isDescendantOf(this)&&(this.activeCamera!==this.personalCamera&&(this.activeCamera.objectHelper.visible=!0),this.activeCamera=e,e.objectHelper.visible=!1)}get playCamera(){let e=this.scene?.find(this.data.publish.playCamera);return e instanceof a?e:this.personalCamera}switchToPlayCamera(){this.switchActiveCamera(this.playCamera)}get penumbraSizeArray(){return null===this.penumbraSizeArrayCache&&this.updatePenumbraSizeArray(),this.penumbraSizeArrayCache}updatePenumbraSizeArray(){this.penumbraSizeArrayCache=new Array(u).fill(.5);let a=0,i=0;this.traverseEntity(s=>{if(!s.visible)return!0;s instanceof e&&s.visible&&a<c&&(this.penumbraSizeArrayCache[a]=s.data.penumbraSize??.5,a+=1),s instanceof t&&s.visible&&a<u-c&&(this.penumbraSizeArrayCache[c+i]=s.data.penumbraSize??.5,i+=1)})}raycastWithClones(e){let t=[],a=i=>{for(let n of i.children){let i=n.cloner;g.is(n)&&(n.visible||i?.object.data.visible)&&((s(n)||r(n)&&this.scene.enableHelpers&&n.objectHelper.visible)&&(e.intersectObject(n,!1,t),X(n,e,t,!0)),a(n))}};return a(this),t}updateEntity2DByOp(e,t,a,i){this.uiCanvas?.updateEntity2DByOp(e,t,a,i)}};export{I as a,x as b,E as c,G as d,Q as e,R as f,X as g,q as h};
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-5XJPFG76.js";import{b as e}from"./runtime-chunk-SF3NWUI3.js";import{H as i,ia as r}from"./runtime-chunk-2RNKFNMP.js";import{f as n,v as s}from"./runtime-chunk-LGLIAPCL.js";import{c as o}from"./runtime-chunk-RTLL6WIB.js";import{c as a}from"./runtime-chunk-2PT2WH66.js";import{L as l}from"./runtime-chunk-ADHKZQMB.js";import{Ec as h,Gc as c,Hc as d,Qc as u,Rc as p,Tc as m,Yc as f,sd as y}from"./runtime-chunk-KPOUV3HD.js";import{a as b,b as x}from"./runtime-chunk-ML3Z74BL.js";var g=x(b((t,e)=>{var i,r;i=t,r=function(){return t.importState=function(e){var i=new t;return i.importState(e),i},t;function t(){return function(t){var e=0,i=0,r=0,n=1;0==t.length&&(t=[+new Date]);var s=function(){var t=4022871197,e=function(e){e=e.toString();for(var i=0;i<e.length;i++){var r=.02519603282416938*(t+=e.charCodeAt(i));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)};return e.version="Mash 0.9",e}();e=s(" "),i=s(" "),r=s(" ");for(var o=0;o<t.length;o++)(e-=s(t[o]))<0&&(e+=1),(i-=s(t[o]))<0&&(i+=1),(r-=s(t[o]))<0&&(r+=1);s=null;var a=function(){var t=2091639*e+2.3283064365386963e-10*n;return e=i,i=r,r=t-(n=0|t)};return a.next=a,a.uint32=function(){return 4294967296*a()},a.fract53=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.version="Alea 0.9",a.args=t,a.exportState=function(){return[e,i,r,n]},a.importState=function(t){e=+t[0]||0,i=+t[1]||0,r=+t[2]||0,n=+t[3]||0},a}(Array.prototype.slice.call(arguments))}},"object"==typeof t?e.exports=r():"function"==typeof define&&define.amd?define(r):i.Alea=r()})()),v=.5*(Math.sqrt(3)-1),M=(3-Math.sqrt(3))/6,w=1/3,j=1/6,A=(Math.sqrt(5),Math.sqrt(5),t=>0|Math.floor(t)),S=new Float64Array([1,1,-1,1,1,-1,-1,-1,1,0,-1,0,1,0,-1,0,0,1,0,-1,0,1,0,-1]),F=new Float64Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);function _(t){let e=new Uint8Array(512);for(let t=0;t<256;t++)e[t]=t;for(let i=0;i<255;i++){let r=i+~~(t()*(256-i)),n=e[i];e[i]=e[r],e[r]=n}for(let t=256;t<512;t++)e[t]=e[t-256];return e}var C=new f,z=class{constructor(t){this.weightAttribute=null;let e=t.geometry;if(!e.isBufferGeometry||3!==e.attributes.position.itemSize)throw new Error("THREE.MeshSurfaceSampler: Requires BufferGeometry triangle mesh.");e.index&&(e=e.toNonIndexed()),this.geometry=e,this.randomFunction=Math.random,this.positionAttribute=this.geometry.getAttribute("position"),this.distribution=null}build(){let t=this.positionAttribute,e=new Float32Array(t.count/3);for(let i=0;i<t.count;i+=3){let r=1;C.a.fromBufferAttribute(t,i),C.b.fromBufferAttribute(t,i+1),C.c.fromBufferAttribute(t,i+2),r*=C.getArea(),e[i/3]=r}this.distribution=new Float32Array(t.count/3);let i=0;for(let t=0;t<e.length;t++)i+=e[t],this.distribution[t]=i;return this}setRandomGenerator(t){return this.randomFunction=t,this}sample(t,e){if(this.distribution){let i=this.distribution[this.distribution.length-1],r=this.binarySearch(this.randomFunction()*i);return this.sampleFace(r,t,e)}}binarySearch(t){if(!this.distribution)return 0;let e=this.distribution,i=0,r=e.length-1,n=-1;for(;i<=r;){let s=Math.ceil((i+r)/2);if(0===s||e[s-1]<=t&&e[s]>t){n=s;break}t<e[s]?r=s-1:i=s+1}return n}sampleFace(t,e,i){let r=this.randomFunction(),n=this.randomFunction();return r+n>1&&(r=1-r,n=1-n),C.a.fromBufferAttribute(this.positionAttribute,3*t),C.b.fromBufferAttribute(this.positionAttribute,3*t+1),C.c.fromBufferAttribute(this.positionAttribute,3*t+2),e.set(0,0,0).addScaledVector(C.a,r).addScaledVector(C.b,n).addScaledVector(C.c,1-(r+n)),C.getNormal(i),this}},W={x:[1,0,0],"-x":[-1,0,0],y:[0,1,0],"-y":[0,-1,0],z:[0,0,1],"-z":[0,0,-1]},O={polygon_center:0,edge:1,vertex:2},N=(t,e)=>(i,r)=>e&&0!==i&&0!==t?t*r/100:0,P=(t,e)=>{let i=Math.abs(e),r=-1*i;return(t- -1)*(i-r)/2+r},T=new d,B=new d,U=new d,k=new d;function I(t,e){let i=U.fromArray(t),r=k.fromArray(e);B.copy(r).sub(i);let n=B.length();return B.normalize().multiplyScalar(.5*n),T.copy(i).add(B).toArray()}var R,V,E,D,L=new f,q=new d,G=new d,H=new d,$=class extends y{},K=class extends ${constructor(t,e){super(void 0,void 0,e),this.source=t,this.isClonerInstancedMesh=!0,this.pivotMatrix=new u,this.previousModelViewMatrix=new u,this.copyPreviousMatrix=!0,this.capacity=e,this.count=0,this.matrixAutoUpdate=!1}raycast(t,e){}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}onAfterRender(t,e,i,r,n,s){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}get visible(){return!0!==this.source.cloner?.insideBoolean&&(this.source.visible||this.source.dataPatched.visible&&!0===this.source.dataPatched.cloner?.hideBase)}set visible(t){}get castShadow(){return this.source.castShadow}set castShadow(t){}get receiveShadow(){return this.source.receiveShadow}set receiveShadow(t){}get layers(){return this.source.layers}set layers(t){}get geometry(){return this.source.geometry}set geometry(t){}get material(){return this.source.material}set material(t){}get morphTargetInfluences(){return this.source.morphTargetInfluences}set morphTargetInfluences(t){}},Q=t=>.5*(1-Math.cos(t*Math.PI)),Z=class{constructor(){this.perlin=new Array(4096)}noise(t,e=0,i=0){if(null==this.perlin){this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=Math.random()}t<0&&(t=-t),e<0&&(e=-e),i<0&&(i=-i);let r,n,s,o,a,l=Math.floor(t),h=Math.floor(e),c=Math.floor(i),d=t-l,u=e-h,p=i-c,m=0,f=.5;for(let t=0;t<4;t++){let t=l+(h<<4)+(c<<8);r=Q(d),n=Q(u),s=this.perlin[4095&t],s+=r*(this.perlin[t+1&4095]-s),o=this.perlin[t+16&4095],o+=r*(this.perlin[t+16+1&4095]-o),s+=n*(o-s),t+=256,o=this.perlin[4095&t],o+=r*(this.perlin[t+1&4095]-o),a=this.perlin[t+16&4095],a+=r*(this.perlin[t+16+1&4095]-a),o+=n*(a-o),s+=Q(p)*(o-s),m+=s*f,f*=.5,l<<=1,d*=2,h<<=1,u*=2,c<<=1,p*=2,d>=1&&(l++,d--),u>=1&&(h++,u--),p>=1&&(c++,p--)}return m}noiseSeed(t){let e=(()=>{let t,e;return{setSeed(i){e=t=(i??4294967296*Math.random())>>>0},getSeed:()=>t,rand:()=>(e=(1664525*e+1013904223)%4294967296,e/4294967296)}})();e.setSeed(t),this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=e.rand()}},J=1e-4,X=new d,Y=new d;i.then(t=>{V=[(R=t).get_face_center,R.get_edge_midpoint,R.get_vertex_position],E=[R.get_face_normal,R.get_edge_normal,R.get_vertex_normal],D=[R.face_count,R.edge_count,R.vertex_count]}),new u;var tt=new u,et=new u,it=new u,rt=new u,nt=new u,st=new u,ot=new d,at=new d,lt=new d,ht=new d,ct=new d,dt=new d,ut=new d,pt=new d,mt=new d,ft=new d,yt=new d,bt=new p,xt=new c;function gt(t){return t?t.version??t.data?.version??0:-1}function vt(t,e){return["number"==typeof t?.[0]?t[0]:"string"==typeof t?.[0]&&e?parseFloat(String(e.shared.getVariable(t[0])??"0")):0,"number"==typeof t?.[1]?t[1]:"string"==typeof t?.[1]&&e?parseFloat(String(e.shared.getVariable(t[1])??"0")):0,"number"==typeof t?.[2]?t[2]:"string"==typeof t?.[2]&&e?parseFloat(String(e.shared.getVariable(t[2])??"0")):0]}var Mt=class{constructor(t,e){this.data=t,this.is3D=e,this.perlin=new Z,"perlin"===t.noiseType?(this.perlin.noiseSeed(t.seed),this.noise=e?(t,e,i)=>this.perlin.noise(t,e,i):t=>this.perlin.noise(t)):this.noise=e?function(t=Math.random){let e=_(t),i=new Float64Array(e).map(t=>F[t%12*3]),r=new Float64Array(e).map(t=>F[t%12*3+1]),n=new Float64Array(e).map(t=>F[t%12*3+2]);return function(t,s,o){let a,l,h,c,d,u,p,m,f,y,b=(t+s+o)*w,x=A(t+b),g=A(s+b),v=A(o+b),M=(x+g+v)*j,S=t-(x-M),F=s-(g-M),_=o-(v-M);S>=F?F>=_?(d=1,u=0,p=0,m=1,f=1,y=0):S>=_?(d=1,u=0,p=0,m=1,f=0,y=1):(d=0,u=0,p=1,m=1,f=0,y=1):F<_?(d=0,u=0,p=1,m=0,f=1,y=1):S<_?(d=0,u=1,p=0,m=0,f=1,y=1):(d=0,u=1,p=0,m=1,f=1,y=0);let C=S-d+j,z=F-u+j,W=_-p+j,O=S-m+2*j,N=F-f+2*j,P=_-y+2*j,T=S-1+.5,B=F-1+.5,U=_-1+.5,k=255&x,I=255&g,R=255&v,V=.6-S*S-F*F-_*_;if(V<0)a=0;else{let t=k+e[I+e[R]];V*=V,a=V*V*(i[t]*S+r[t]*F+n[t]*_)}let E=.6-C*C-z*z-W*W;if(E<0)l=0;else{let t=k+d+e[I+u+e[R+p]];E*=E,l=E*E*(i[t]*C+r[t]*z+n[t]*W)}let D=.6-O*O-N*N-P*P;if(D<0)h=0;else{let t=k+m+e[I+f+e[R+y]];D*=D,h=D*D*(i[t]*O+r[t]*N+n[t]*P)}let L=.6-T*T-B*B-U*U;if(L<0)c=0;else{let t=k+1+e[I+1+e[R+1]];L*=L,c=L*L*(i[t]*T+r[t]*B+n[t]*U)}return 32*(a+l+h+c)}}((0,g.default)(t.seed)):function(t=Math.random){let e=_(t),i=new Float64Array(e).map(t=>S[t%12*2]),r=new Float64Array(e).map(t=>S[t%12*2+1]);return function(t,n){let s,o,a=0,l=0,h=0,c=(t+n)*v,d=A(t+c),u=A(n+c),p=(d+u)*M,m=t-(d-p),f=n-(u-p);m>f?(s=1,o=0):(s=0,o=1);let y=m-s+M,b=f-o+M,x=m-1+2*M,g=f-1+2*M,w=255&d,j=255&u,S=.5-m*m-f*f;if(S>=0){let t=w+e[j];S*=S,a=S*S*(i[t]*m+r[t]*f)}let F=.5-y*y-b*b;if(F>=0){let t=w+s+e[j+o];F*=F,l=F*F*(i[t]*y+r[t]*b)}let _=.5-x*x-g*g;if(_>=0){let t=w+1+e[j+1];_*=_,h=_*_*(i[t]*x+r[t]*g)}return 70*(a+l+h)}}((0,g.default)(t.seed??""))}},wt=class extends(n(m)){constructor(t,e){super(),this.parameters=e,this.isCloner=!0,this.objectForSample=void 0,this._pendingMediaLoad=!1,this.random=null,this.surfaceSamplerCache=null,this.surfacePointsCache=null,this.object=t}resetOnMove(){this.removeFromParent(),this.parent=null}removeFromParent(){return super.removeFromParent(),this.instancedMesh?.removeFromParent(),this}dispose(){this.removeFromParent(),this._disposeInstancedMesh(),this._invalidateBoolean(),this._syncEnclosingCopies(!0)}createCopy(){return new jt(this)}_syncEnclosingCopies(t){!t&&this.parent!==this.object.parent||this.object.traverseEntityAncestors(e=>{let i=e.cloner;void 0===i||null===i.parent||(t&&i.expandCopies(),i.invalidateTransform(this.object))})}_invalidateBoolean(){this.object instanceof s&&this.object.onClonerLayoutUpdated()}expandClones(t){null===this.parent?this.updateState(this.parameters,t):this.expandCopies()}expandCopies(){for(let t of this.children)t instanceof r&&t.expand();this._syncInstancedMesh()}invalidateTransform(t){this.matrixWorldNeedsUpdate=!0}onObjUpdateMatrix(){"toObject"!==this.parameters.type&&(this.matrixWorldNeedsUpdate=!0)}update(t){this._syncEnclosingCopies(this._layout(t))}_layout(t){let e=this.children.length;switch(this._updateCount(t),this.parameters.type){case"radial":this._updateRadial(this.parameters,t);break;case"linear":this._updateLinear(this.parameters,t);break;case"grid":this._updateGrid(this.parameters,t);break;case"toObject":this._updateToObject(this.parameters,t)}for(let t of this.children){let e=t.transformOverride;void 0!==e&&(t.position.fromArray(e.position),t.rotation.fromArray(e.rotation),t.scale.fromArray(e.scale)),t.updateMatrix(),t.hasNonUniformScale&&(t.updateMatrixWorld(),t.updateMatrixWorldRigid())}return this._syncInstancedMesh(),this._invalidateBoolean(),this.children.length!==e}get instancingActive(){return void 0!==this.instancedMesh}get insideBoolean(){return null!==this.parent&&"booleanOp"in this.parent}_instancingEligible(){if(!0!==this.parameters.instanced)return!1;let t=this.object;return!(t.entityChildrenCount()>0||!0!==t.isMesh||a(t)||!0===t.isDecalObject)}_syncInstancedMesh(){if(!this._instancingEligible())return void this._disposeInstancedMesh();let t=this.instancedMesh;if(void 0!==t&&t.capacity<this.children.length&&(this._disposeInstancedMesh(),t=void 0),void 0===t){let e=Math.max(8,Math.ceil(1.5*this.children.length));t=this.instancedMesh=new K(this.object,e)}t.matrix=this.matrix,t.matrixWorldNeedsUpdate=!0,t.parent!==this.parent&&(t.removeFromParent(),this.parent?.add(t)),this.syncInstanceMatrices()}syncInstanceMatrices(){this._invalidateBoolean();let t=this.instancedMesh;if(void 0===t)return;let e=0;for(let i of this.children)!1!==i.playModeVisible&&(et.copy(i.matrix).multiply(i.pivotMatrix),t.setMatrixAt(e++,et));t.count=e,t.instanceMatrix.needsUpdate=!0,t.boundingSphere=null}_disposeInstancedMesh(){let t=this.instancedMesh;void 0!==t&&(this.instancedMesh=void 0,t.removeFromParent(),t.dispose())}_updateCount(t,e){let i;if(void 0!==e)i=e;else{let e=vt(this.parameters.grid.count,t);i="grid"===this.parameters.type?Math.round(e[0])*Math.round(e[1])*Math.round(e[2]):this.parameters.count}if("toObject"===this.parameters.type)if(this.parameters.toObject.object){if(void 0===e&&"random"!==this.parameters.toObject.spreadType)return}else i=0;if(this.children.length!==i)if(this.children.length<i)for(let t=0,e=i-this.children.length;t<e;++t){let t=new r(this.object);t.expand(),this.add(t)}else for(;this.children.length>i;){let t=this.children.pop();t.parent=null,t.dispatchEvent({type:"removed"}),this.dispatchEvent({type:"childremoved",child:t})}}getRandom(t,e=!1){return(null===this.random||this.random.data.seed!==t.seed||this.random.data.noiseType!==t.noiseType||this.random.is3D!==e)&&(this.random=new Mt(t,e)),this.random}_updateRadial(t,e){let i,r=t.radial,n=r.start*h.DEG2RAD,s=n-r.end*h.DEG2RAD,o=vt(r.rotation,e),a=new p(o[0],o[1],o[2]);switch(r.axis){case"z":i=new d(0,0,1);break;case"y":i=new d(0,1,0);break;default:i=new d(1,0,0)}let c=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,u=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,m=vt(r.scale,e),f=vt(r.position,e),y=vt(c.scale,e),b=vt(c.position,e),x=vt(c.rotation,e),g=s/t.count,v=N(c.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let s=t*(c.freqScale/10)+c.movement,o=null===u?0:u.noise(s,s,s),l=t+1;e.scale.x=m[0]+v(l,P(o,y[0]))||J,e.scale.y=m[1]+v(l,P(o,y[1]))||J,e.scale.z=m[2]+v(l,P(o,y[2]))||J;let h=g*t-n;switch(r.axis){default:case"x":bt.set(0,h,0);break;case"y":bt.set(0,0,h);break;case"z":bt.set(h,0,0)}ut.copy(i).applyQuaternion(xt.setFromEuler(bt)).multiplyScalar(r.radius),e.position.set(ut.x+(f[0]+v(l,P(o,b[0]))),ut.y+(f[1]+v(l,P(o,b[1]))),ut.z+(f[2]+v(l,P(o,b[2]))));let d=v(l,P(o,x[0])),p=v(l,P(o,x[1])),M=v(l,P(o,x[2]));!0===r.alignment?e.rotation.set(bt.x+(a.x+d),bt.y+(a.y+p),bt.z+(a.z+M)):e.rotation.set(a.x+d,a.y+p,a.z+M)}}_updateLinear(t,e){if("linear"!==t.type)throw new Error;let i=t.linear,r=vt(i.rotation,e),n=vt(i.scale,e),s=vt(i.position,e),o=new p(r[0]??0,r[1]??0,r[2]??0),a=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,h=vt(a.rotation,e),c=vt(a.scale,e),d=vt(a.position,e),u=!0===this.parameters.randomness&&0!==a.strength?this.getRandom(a):null,m=N(a.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let i=t*(a.freqScale/10)+a.movement,r=null===u?0:u.noise(i,i,i),l=t+1,p=m(l,P(r,h[0])),f=m(l,P(r,h[1])),y=m(l,P(r,h[2]));e.scale.x=1+(n[0]-1)*t+m(l,P(r,c[0]))||J,e.scale.y=1+(n[1]-1)*t+m(l,P(r,c[1]))||J,e.scale.z=1+(n[2]-1)*t+m(l,P(r,c[2]))||J,e.rotation.set(o.x*t+p,o.y*t+f,o.z*t+y),e.position.x=s[0]*t+m(l,P(r,d[0])),e.position.y=s[1]*t+m(l,P(r,d[1])),e.position.z=s[2]*t+m(l,P(r,d[2]))}}_updateGrid(t,e){let i=0,r=t.grid,n=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,s=vt(n.scale,e),o=vt(n.rotation,e),a=vt(n.position,e),h=!0===this.parameters.randomness&&0!==n.strength?this.getRandom(n,!0):null,c=N(n.strength,this.parameters.randomness),u=vt(r.count,e),p=vt(r.size,e);if(!0===r.useCenter){let t={x:u[0]%2==0?2:1,y:u[1]%2==0?2:1,z:u[2]%2==0?2:1},e=new d(p[0]*(u[0]-t.x)*.5,p[1]*(u[1]-t.y)*.5,p[2]*(u[2]-t.z)*.5);for(let t=0;t<u[0];t++)for(let r=0;r<u[1];r++)for(let l=0;l<u[2];l++){let d=this.children[i++];if(!d)continue;let u=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement,(l+1)*(n.freqScale/10)+n.movement);d.scale.x=1+c(i,P(u,s[0]))||J,d.scale.y=1+c(i,P(u,s[1]))||J,d.scale.z=1+c(i,P(u,s[2]))||J;let m=c(i,P(u,o[0])),f=c(i,P(u,o[1])),y=c(i,P(u,o[2]));d.rotation.set(m,f,y),d.position.x=p[0]*t-e.x+c(i,P(u,a[0])),d.position.y=p[1]*r-e.y+c(i,P(u,a[1])),d.position.z=p[2]*l-e.z+c(i,P(u,a[2]))}}else for(let t=0;t<u[0];t++)for(let e=0;e<u[1];e++)for(let r=0;r<u[2];r++){let l=this.children[i++];if(!l)continue;let d=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(e+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement);l.scale.x=1+c(i,P(d,s[0]))||J,l.scale.y=1+c(i,P(d,s[1]))||J,l.scale.z=1+c(i,P(d,s[2]))||J;let u=c(i,P(d,o[0])),m=c(i,P(d,o[1])),f=c(i,P(d,o[2]));l.rotation.set(u,m,f),l.position.x=p[0]*t+c(i,P(d,a[0])),l.position.y=-p[1]*e+c(i,P(d,a[1])),l.position.z=-p[2]*r+c(i,P(d,a[2]))}}_updateToObject(i,r){if("toObject"!==i.type)throw new Error;let{toObject:n}=i,s=vt(n.rotation,r),o=vt(n.position,r),a=vt(n.scale,r),h=new p(s[0],s[1],s[2]),c=i.randomnessObject??l.defaultData([1,1,1]).randomnessObject,d=vt(c.rotation,r),u=vt(c.position,r),m=vt(c.scale,r),f=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,y=N(c.strength,this.parameters.randomness);if(!n.object){for(let[,t]of this.children.entries())t.position.set(0,0,0),t.scale.setScalar(1),t.rotation.set(0,0,0);return this.objectForSample=void 0,void this.invalidateSurfaceCaches()}if(!this.objectForSample)return;if(this.objectForSample instanceof t){if(!this.objectForSample.font?.isLoaded||void 0===this.objectForSample.geometry.attributes.position)return void(this._pendingMediaLoad=!0);this._pendingMediaLoad=!1}if(void 0===this.objectForSample.geometry&&this.objectForSample.isAncestorOf(this.object.uuid))return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) seem to be a child/descendant of the object it's being cloned to. Please re-parent it so that they are siblings instead.`);let b=this.getSubdivData();if(b.length>0){let t=Math.round(b.length*n.count/100);this._updateCount(r,t)}else{let t=this.objectForSample.geometry.getAttribute("position");if(!t||isNaN(t.count)||0===t.count)return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) cannot be cloned on the surface of "${this.objectForSample.name}" (${this.objectForSample.uuid}) because the latter does not have a valid geometry.`)}this.objectForSample.updateMatrixWorld();let x="random"===n.spreadType,v=null;x&&(v=this.getSurfaceSampler(),v.setRandomGenerator((0,g.default)(this.object.uuid+n.seed)));let M=W[n.axis],w=this.children;ot.fromArray(M);let j=this.objectForSample instanceof e;j&&it.copy(this.objectForSample.matrixWorld).invert(),"normal"!==n.align&&this.object.getWorldDirection(dt),ft.set(ot.y,ot.z,ot.x).normalize(),yt.copy(ft).cross(ot).normalize(),nt.makeBasis(ft,ot,yt).invert();for(let[t,e]of w.entries()){let i=t*(c.freqScale/10)+c.movement,r=null===f?0:f.noise(i,i,i),s=t+1,l=y(s,P(r,d[0])),p=y(s,P(r,d[1])),g=y(s,P(r,d[2]));x?v.sample(lt,ht):(b.length&&(lt.fromArray(b[t].pos),ht.fromArray(b[t].norm)),j&&lt.applyMatrix4(it)),e.position.copy(lt);let M="normal"===n.align?ht:dt,w=at.fromArray(o);at.x+=y(s,P(r,u[0])),at.y+=y(s,P(r,u[1])),at.z+=y(s,P(r,u[2]));let A=Math.acos(M.dot(ot)),S=ct.crossVectors(ot,M).normalize(),F=tt.makeRotationAxis(S,A);pt.copy(M).cross(this.object.up).normalize(),mt.copy(pt).cross(M).normalize(),rt.makeBasis(pt,M,mt),st.multiplyMatrices(rt,nt),bt.setFromRotationMatrix(st),w.applyMatrix4(F),e.position.add(w),e.rotation.set(bt.x+h.x+l,bt.y+h.y+p,bt.z+h.z+g),e.scale.set(1+a[0]+y(s,P(r,m[0]))||J,1+a[1]+y(s,P(r,m[1]))||J,1+a[2]+y(s,P(r,m[2]))||J),e.scale.multiply(this.object.scale)}}getSurfaceSampler(){let t=this.objectForSample,e=t.geometry,i=e.getAttribute("position"),r=e.index,n=this.surfaceSamplerCache;if(null!==n&&n.geometry===e&&n.position===i&&n.positionVersion===gt(i)&&n.index===r&&n.indexVersion===(null===r?-1:r.version))return n.sampler;let s=new z(t).build();return this.surfaceSamplerCache={geometry:e,position:i,positionVersion:gt(i),index:r,indexVersion:null===r?-1:r.version,sampler:s},s}invalidateSurfaceCaches(){this.surfaceSamplerCache=null,this.surfacePointsCache=null}getSubdivData(){if(!this.objectForSample)return[];let t=this.parameters.toObject.spreadType;if("random"===t)return[];let i=this.objectForSample instanceof e,r=this.objectForSample.geometry;if(!i&&r){let e=this.surfacePointsCache,i=r.getAttribute("position");if(null!==e&&e.spreadType===t&&e.geometry===r&&e.position===i&&e.positionVersion===gt(i)&&e.index===r.index&&e.indexVersion===(null===r.index?-1:r.index.version))return e.points}let n=new Map,s=(t,e)=>{let i=Math.round(1e4*t[0])+"_"+Math.round(1e4*t[1])+"_"+Math.round(1e4*t[2]),r=n.get(i);r?(r.pos[0]+=t[0],r.pos[1]+=t[1],r.pos[2]+=t[2],r.norm[0]+=e[0],r.norm[1]+=e[1],r.norm[2]+=e[2],r.count+=1):n.set(i,{pos:[...t],norm:[...e],count:1})};if(i){let e=this.objectForSample,i=O[t],r=D[i],n=V[i],o=E[i],a=r(e.subdivPointerNew);for(let t=0;t<=a-1;t++){let i=n(e.subdivPointerNew,t),r=o(e.subdivPointerNew,t);X.fromArray(i).applyMatrix4(e.matrixWorld),Y.fromArray(r),s(X.toArray(),Y.toArray())}}else(r.index?function(t){let e=[],i=Math.floor(t.index.count/3);for(let r=0;r<i;r++)if(q.fromArray(t.index.array,3*r),L.setFromAttributeAndIndices(t.attributes.position,q.x,q.y,q.z),L.getNormal(G),L.getMidpoint(H),!(isNaN(H.x)||isNaN(H.y)||isNaN(H.z))){let{a:t,b:i,c:r}=L,n=t.toArray(),s=i.toArray(),o=r.toArray(),a=t.distanceTo(i),l=i.distanceTo(r),h=r.distanceTo(t),c=I(n,s),d=I(s,o),u=I(o,n),p=[a,l,h],m=Math.max(...p),f=p.filter(t=>Math.round(t)===Math.round(m)).length>1,y=[],b=L.getMidpoint(H).toArray();m===a&&!f&&(y=[d,u,u],b=c),m===l&&!f&&(y=[c,u,u],b=d),m===h&&!f&&(y=[c,d,d],b=u),f&&(y=[c,d,u]),e.push({vertices:[n,s,o],faceCenters:y,midpoint:b,norm:L.getNormal(G).toArray()})}return e}(r):function(t){let e=[],{position:i}=t.attributes;for(let t=0;t<i.count;t++){L.setFromAttributeAndIndices(i,3*t,3*t+1,3*t+2),L.getNormal(G),L.getMidpoint(H);let r=L.a.toArray(),n=L.b.toArray(),s=L.c.toArray();e.push({vertices:[r,n,s],faceCenters:[I(r,n),I(n,s),I(s,r)],midpoint:H.toArray(),norm:G.toArray()})}return e}(r)).forEach((e,i)=>{"polygon_center"===t&&s(e.midpoint,e.norm),"vertex"===t&&(s(e.vertices[0],e.norm),s(e.vertices[1],e.norm),s(e.vertices[2],e.norm)),"edge"===t&&(s(e.faceCenters[0],e.norm),s(e.faceCenters[1],e.norm),s(e.faceCenters[2],e.norm))});let o=Array.from(n.values());for(let t of o)t.pos[0]/=t.count,t.pos[1]/=t.count,t.pos[2]/=t.count,t.norm[0]/=t.count,t.norm[1]/=t.count,t.norm[2]/=t.count;if(!i&&r){let e=r.getAttribute("position");this.surfacePointsCache={spreadType:t,geometry:r,position:e,positionVersion:gt(e),index:r.index,indexVersion:null===r.index?-1:r.index.version,points:o}}return o}updateState(t,e){this.parameters=o(t);let{parent:i,matrix:r}=this;if("toObject"!==this.parameters.type)this.invalidateSurfaceCaches(),(null===this.parent||this.parent!==this.object)&&(this.removeFromParent(),this.object.parent?.add(this),this.matrix=this.object.matrix,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1);else if(null===this.parent||this.parent.uuid!==this.parameters.toObject.object){this.removeFromParent(),this.invalidateSurfaceCaches();let t=e.scene.find(this.parameters.toObject.object);this.objectForSample=t instanceof s?t:void 0,this.matrix=new u,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1,t&&t.add(this)}let n=this._layout(e);this._syncEnclosingCopies(n||this.parent!==i||this.matrix!==r)}get pendingMediaLoad(){return this._pendingMediaLoad}},jt=class extends wt{constructor(t){super(t.object,t.parameters),this.source=t,this.matrixAutoUpdate=!1}get insideBoolean(){return this.source.insideBoolean}expand(){this.matrix=this.source.matrix,this.matrixWorldNeedsUpdate=!0;let t=0;for(let e of this.source.children){if(!(e instanceof r))continue;let i=this.children[t];void 0===i&&(i=new r(this.object),this.add(i)),i.matrix=e.matrix,i.matrixWorldNeedsUpdate=!0,i.expand(),t+=1}for(;this.children.length>t;)this.remove(this.children[t])}};export{wt as a};
1
+ import{a as t}from"./runtime-chunk-EXDN6XEO.js";import{b as e}from"./runtime-chunk-CE2FMEOR.js";import{H as i,ia as r}from"./runtime-chunk-III53OHU.js";import{f as n,v as s}from"./runtime-chunk-PQ42NYOR.js";import{c as o}from"./runtime-chunk-RTLL6WIB.js";import{c as a}from"./runtime-chunk-2PT2WH66.js";import{L as l}from"./runtime-chunk-ADHKZQMB.js";import{Ec as h,Gc as c,Hc as d,Qc as u,Rc as p,Tc as m,Yc as f,sd as y}from"./runtime-chunk-KPOUV3HD.js";import{a as b,b as x}from"./runtime-chunk-ML3Z74BL.js";var g=x(b((t,e)=>{var i,r;i=t,r=function(){return t.importState=function(e){var i=new t;return i.importState(e),i},t;function t(){return function(t){var e=0,i=0,r=0,n=1;0==t.length&&(t=[+new Date]);var s=function(){var t=4022871197,e=function(e){e=e.toString();for(var i=0;i<e.length;i++){var r=.02519603282416938*(t+=e.charCodeAt(i));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)};return e.version="Mash 0.9",e}();e=s(" "),i=s(" "),r=s(" ");for(var o=0;o<t.length;o++)(e-=s(t[o]))<0&&(e+=1),(i-=s(t[o]))<0&&(i+=1),(r-=s(t[o]))<0&&(r+=1);s=null;var a=function(){var t=2091639*e+2.3283064365386963e-10*n;return e=i,i=r,r=t-(n=0|t)};return a.next=a,a.uint32=function(){return 4294967296*a()},a.fract53=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.version="Alea 0.9",a.args=t,a.exportState=function(){return[e,i,r,n]},a.importState=function(t){e=+t[0]||0,i=+t[1]||0,r=+t[2]||0,n=+t[3]||0},a}(Array.prototype.slice.call(arguments))}},"object"==typeof t?e.exports=r():"function"==typeof define&&define.amd?define(r):i.Alea=r()})()),v=.5*(Math.sqrt(3)-1),M=(3-Math.sqrt(3))/6,w=1/3,j=1/6,A=(Math.sqrt(5),Math.sqrt(5),t=>0|Math.floor(t)),S=new Float64Array([1,1,-1,1,1,-1,-1,-1,1,0,-1,0,1,0,-1,0,0,1,0,-1,0,1,0,-1]),_=new Float64Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);function F(t){let e=new Uint8Array(512);for(let t=0;t<256;t++)e[t]=t;for(let i=0;i<255;i++){let r=i+~~(t()*(256-i)),n=e[i];e[i]=e[r],e[r]=n}for(let t=256;t<512;t++)e[t]=e[t-256];return e}var C=new f,O=class{constructor(t){this.weightAttribute=null;let e=t.geometry;if(!e.isBufferGeometry||3!==e.attributes.position.itemSize)throw new Error("THREE.MeshSurfaceSampler: Requires BufferGeometry triangle mesh.");e.index&&(e=e.toNonIndexed()),this.geometry=e,this.randomFunction=Math.random,this.positionAttribute=this.geometry.getAttribute("position"),this.distribution=null}build(){let t=this.positionAttribute,e=new Float32Array(t.count/3);for(let i=0;i<t.count;i+=3){let r=1;C.a.fromBufferAttribute(t,i),C.b.fromBufferAttribute(t,i+1),C.c.fromBufferAttribute(t,i+2),r*=C.getArea(),e[i/3]=r}this.distribution=new Float32Array(t.count/3);let i=0;for(let t=0;t<e.length;t++)i+=e[t],this.distribution[t]=i;return this}setRandomGenerator(t){return this.randomFunction=t,this}sample(t,e){if(this.distribution){let i=this.distribution[this.distribution.length-1],r=this.binarySearch(this.randomFunction()*i);return this.sampleFace(r,t,e)}}binarySearch(t){if(!this.distribution)return 0;let e=this.distribution,i=0,r=e.length-1,n=-1;for(;i<=r;){let s=Math.ceil((i+r)/2);if(0===s||e[s-1]<=t&&e[s]>t){n=s;break}t<e[s]?r=s-1:i=s+1}return n}sampleFace(t,e,i){let r=this.randomFunction(),n=this.randomFunction();return r+n>1&&(r=1-r,n=1-n),C.a.fromBufferAttribute(this.positionAttribute,3*t),C.b.fromBufferAttribute(this.positionAttribute,3*t+1),C.c.fromBufferAttribute(this.positionAttribute,3*t+2),e.set(0,0,0).addScaledVector(C.a,r).addScaledVector(C.b,n).addScaledVector(C.c,1-(r+n)),C.getNormal(i),this}},z={x:[1,0,0],"-x":[-1,0,0],y:[0,1,0],"-y":[0,-1,0],z:[0,0,1],"-z":[0,0,-1]},W={polygon_center:0,edge:1,vertex:2},N=(t,e)=>(i,r)=>e&&0!==i&&0!==t?t*r/100:0,P=(t,e)=>{let i=Math.abs(e),r=-1*i;return(t- -1)*(i-r)/2+r},T=new d,E=new d,B=new d,U=new d;function I(t,e){let i=B.fromArray(t),r=U.fromArray(e);E.copy(r).sub(i);let n=E.length();return E.normalize().multiplyScalar(.5*n),T.copy(i).add(E).toArray()}var R,k,V,D,q=new f,L=new d,G=new d,H=new d,$=class extends y{},Q=class extends ${constructor(t,e){super(void 0,void 0,e),this.source=t,this.isClonerInstancedMesh=!0,this.pivotMatrix=new u,this.previousModelViewMatrix=new u,this.copyPreviousMatrix=!0,this.capacity=e,this.count=0,this.matrixAutoUpdate=!1}raycast(t,e){}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}onAfterRender(t,e,i,r,n,s){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}get visible(){return!0!==this.source.cloner?.insideBoolean&&(this.source.visible||this.source.dataPatched.visible&&!0===this.source.dataPatched.cloner?.hideBase)}set visible(t){}get castShadow(){return this.source.castShadow}set castShadow(t){}get receiveShadow(){return this.source.receiveShadow}set receiveShadow(t){}get layers(){return this.source.layers}set layers(t){}get geometry(){return this.source.geometry}set geometry(t){}get material(){return this.source.material}set material(t){}get morphTargetInfluences(){return this.source.morphTargetInfluences}set morphTargetInfluences(t){}},K=t=>.5*(1-Math.cos(t*Math.PI)),X=class{constructor(){this.perlin=new Array(4096)}noise(t,e=0,i=0){if(null==this.perlin){this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=Math.random()}t<0&&(t=-t),e<0&&(e=-e),i<0&&(i=-i);let r,n,s,o,a,l=Math.floor(t),h=Math.floor(e),c=Math.floor(i),d=t-l,u=e-h,p=i-c,m=0,f=.5;for(let t=0;t<4;t++){let t=l+(h<<4)+(c<<8);r=K(d),n=K(u),s=this.perlin[4095&t],s+=r*(this.perlin[t+1&4095]-s),o=this.perlin[t+16&4095],o+=r*(this.perlin[t+16+1&4095]-o),s+=n*(o-s),t+=256,o=this.perlin[4095&t],o+=r*(this.perlin[t+1&4095]-o),a=this.perlin[t+16&4095],a+=r*(this.perlin[t+16+1&4095]-a),o+=n*(a-o),s+=K(p)*(o-s),m+=s*f,f*=.5,l<<=1,d*=2,h<<=1,u*=2,c<<=1,p*=2,d>=1&&(l++,d--),u>=1&&(h++,u--),p>=1&&(c++,p--)}return m}noiseSeed(t){let e=(()=>{let t,e;return{setSeed(i){e=t=(i??4294967296*Math.random())>>>0},getSeed:()=>t,rand:()=>(e=(1664525*e+1013904223)%4294967296,e/4294967296)}})();e.setSeed(t),this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=e.rand()}},Y=1e-4,Z=new d,J=new d;i.then(t=>{k=[(R=t).get_face_center,R.get_edge_midpoint,R.get_vertex_position],V=[R.get_face_normal,R.get_edge_normal,R.get_vertex_normal],D=[R.face_count,R.edge_count,R.vertex_count]}),new u;var tt=new u,et=new u,it=new u,rt=new u,nt=new u,st=new u,ot=new d,at=new d,lt=new d,ht=new d,ct=new d,dt=new d,ut=new d,pt=new d,mt=new d,ft=new d,yt=new d,bt=new p,xt=new c;function gt(t){return t?t.version??t.data?.version??0:-1}function vt(t,e){return["number"==typeof t?.[0]?t[0]:"string"==typeof t?.[0]&&e?parseFloat(String(e.shared.getVariable(t[0])??"0")):0,"number"==typeof t?.[1]?t[1]:"string"==typeof t?.[1]&&e?parseFloat(String(e.shared.getVariable(t[1])??"0")):0,"number"==typeof t?.[2]?t[2]:"string"==typeof t?.[2]&&e?parseFloat(String(e.shared.getVariable(t[2])??"0")):0]}var Mt=class{constructor(t,e){this.data=t,this.is3D=e,this.perlin=new X,"perlin"===t.noiseType?(this.perlin.noiseSeed(t.seed),this.noise=e?(t,e,i)=>this.perlin.noise(t,e,i):t=>this.perlin.noise(t)):this.noise=e?function(t=Math.random){let e=F(t),i=new Float64Array(e).map(t=>_[t%12*3]),r=new Float64Array(e).map(t=>_[t%12*3+1]),n=new Float64Array(e).map(t=>_[t%12*3+2]);return function(t,s,o){let a,l,h,c,d,u,p,m,f,y,b=(t+s+o)*w,x=A(t+b),g=A(s+b),v=A(o+b),M=(x+g+v)*j,S=t-(x-M),_=s-(g-M),F=o-(v-M);S>=_?_>=F?(d=1,u=0,p=0,m=1,f=1,y=0):S>=F?(d=1,u=0,p=0,m=1,f=0,y=1):(d=0,u=0,p=1,m=1,f=0,y=1):_<F?(d=0,u=0,p=1,m=0,f=1,y=1):S<F?(d=0,u=1,p=0,m=0,f=1,y=1):(d=0,u=1,p=0,m=1,f=1,y=0);let C=S-d+j,O=_-u+j,z=F-p+j,W=S-m+2*j,N=_-f+2*j,P=F-y+2*j,T=S-1+.5,E=_-1+.5,B=F-1+.5,U=255&x,I=255&g,R=255&v,k=.6-S*S-_*_-F*F;if(k<0)a=0;else{let t=U+e[I+e[R]];k*=k,a=k*k*(i[t]*S+r[t]*_+n[t]*F)}let V=.6-C*C-O*O-z*z;if(V<0)l=0;else{let t=U+d+e[I+u+e[R+p]];V*=V,l=V*V*(i[t]*C+r[t]*O+n[t]*z)}let D=.6-W*W-N*N-P*P;if(D<0)h=0;else{let t=U+m+e[I+f+e[R+y]];D*=D,h=D*D*(i[t]*W+r[t]*N+n[t]*P)}let q=.6-T*T-E*E-B*B;if(q<0)c=0;else{let t=U+1+e[I+1+e[R+1]];q*=q,c=q*q*(i[t]*T+r[t]*E+n[t]*B)}return 32*(a+l+h+c)}}((0,g.default)(t.seed)):function(t=Math.random){let e=F(t),i=new Float64Array(e).map(t=>S[t%12*2]),r=new Float64Array(e).map(t=>S[t%12*2+1]);return function(t,n){let s,o,a=0,l=0,h=0,c=(t+n)*v,d=A(t+c),u=A(n+c),p=(d+u)*M,m=t-(d-p),f=n-(u-p);m>f?(s=1,o=0):(s=0,o=1);let y=m-s+M,b=f-o+M,x=m-1+2*M,g=f-1+2*M,w=255&d,j=255&u,S=.5-m*m-f*f;if(S>=0){let t=w+e[j];S*=S,a=S*S*(i[t]*m+r[t]*f)}let _=.5-y*y-b*b;if(_>=0){let t=w+s+e[j+o];_*=_,l=_*_*(i[t]*y+r[t]*b)}let F=.5-x*x-g*g;if(F>=0){let t=w+1+e[j+1];F*=F,h=F*F*(i[t]*x+r[t]*g)}return 70*(a+l+h)}}((0,g.default)(t.seed??""))}},wt=class extends(n(m)){constructor(t,e){super(),this.parameters=e,this.isCloner=!0,this.objectForSample=void 0,this._pendingMediaLoad=!1,this.random=null,this.surfaceSamplerCache=null,this.surfacePointsCache=null,this.object=t}resetOnMove(){this.removeFromParent(),this.parent=null}removeFromParent(){return super.removeFromParent(),this.instancedMesh?.removeFromParent(),this}dispose(){this.removeFromParent(),this._disposeInstancedMesh(),this._invalidateBoolean(),this._syncEnclosingCopies(!0)}createCopy(){return new jt(this)}_syncEnclosingCopies(t){!t&&this.parent!==this.object.parent||this.object.traverseEntityAncestors(e=>{let i=e.cloner;void 0===i||null===i.parent||(t&&i.expandCopies(),i.invalidateTransform(this.object))})}_invalidateBoolean(){this.object instanceof s&&this.object.onClonerLayoutUpdated()}expandClones(t){null===this.parent?this.updateState(this.parameters,t):this.expandCopies()}expandCopies(){for(let t of this.children)t instanceof r&&t.expand();this._syncInstancedMesh()}invalidateTransform(t){this.matrixWorldNeedsUpdate=!0}onObjUpdateMatrix(){"toObject"!==this.parameters.type&&(this.matrixWorldNeedsUpdate=!0)}update(t){this._syncEnclosingCopies(this._layout(t))}_layout(t){let e=this.children.length;switch(this._updateCount(t),this.parameters.type){case"radial":this._updateRadial(this.parameters,t);break;case"linear":this._updateLinear(this.parameters,t);break;case"grid":this._updateGrid(this.parameters,t);break;case"toObject":this._updateToObject(this.parameters,t)}for(let t of this.children){let e=t.transformOverride;void 0!==e&&(t.position.fromArray(e.position),t.rotation.fromArray(e.rotation),t.scale.fromArray(e.scale)),t.updateMatrix(),t.hasNonUniformScale&&(t.updateMatrixWorld(),t.updateMatrixWorldRigid())}return this._syncInstancedMesh(),this._invalidateBoolean(),this.children.length!==e}get instancingActive(){return void 0!==this.instancedMesh}get insideBoolean(){return null!==this.parent&&"booleanOp"in this.parent}_instancingEligible(){if(!0!==this.parameters.instanced)return!1;let t=this.object;return!(t.entityChildrenCount()>0||!0!==t.isMesh||a(t)||!0===t.isDecalObject)}_syncInstancedMesh(){if(!this._instancingEligible())return void this._disposeInstancedMesh();let t=this.instancedMesh;if(void 0!==t&&t.capacity<this.children.length&&(this._disposeInstancedMesh(),t=void 0),void 0===t){let e=Math.max(8,Math.ceil(1.5*this.children.length));t=this.instancedMesh=new Q(this.object,e)}t.matrix=this.matrix,t.matrixWorldNeedsUpdate=!0,t.parent!==this.parent&&(t.removeFromParent(),this.parent?.add(t)),this.syncInstanceMatrices()}syncInstanceMatrices(){this._invalidateBoolean();let t=this.instancedMesh;if(void 0===t)return;let e=0;for(let i of this.children)!1!==i.playModeVisible&&(et.copy(i.matrix).multiply(i.pivotMatrix),t.setMatrixAt(e++,et));t.count=e,t.instanceMatrix.needsUpdate=!0,t.boundingSphere=null}_disposeInstancedMesh(){let t=this.instancedMesh;void 0!==t&&(this.instancedMesh=void 0,t.removeFromParent(),t.dispose())}_updateCount(t,e){let i;if(void 0!==e)i=e;else{let e=vt(this.parameters.grid.count,t);i="grid"===this.parameters.type?Math.round(e[0])*Math.round(e[1])*Math.round(e[2]):this.parameters.count}if("toObject"===this.parameters.type)if(this.parameters.toObject.object){if(void 0===e&&"random"!==this.parameters.toObject.spreadType)return}else i=0;if(this.children.length!==i)if(this.children.length<i)for(let t=0,e=i-this.children.length;t<e;++t){let t=new r(this.object);t.expand(),this.add(t)}else for(;this.children.length>i;){let t=this.children.pop();t.parent=null,t.dispatchEvent({type:"removed"}),this.dispatchEvent({type:"childremoved",child:t})}}getRandom(t,e=!1){return(null===this.random||this.random.data.seed!==t.seed||this.random.data.noiseType!==t.noiseType||this.random.is3D!==e)&&(this.random=new Mt(t,e)),this.random}_updateRadial(t,e){let i,r=t.radial,n=r.start*h.DEG2RAD,s=n-r.end*h.DEG2RAD,o=vt(r.rotation,e),a=new p(o[0],o[1],o[2]);switch(r.axis){case"z":i=new d(0,0,1);break;case"y":i=new d(0,1,0);break;default:i=new d(1,0,0)}let c=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,u=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,m=vt(r.scale,e),f=vt(r.position,e),y=vt(c.scale,e),b=vt(c.position,e),x=vt(c.rotation,e),g=s/t.count,v=N(c.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let s=t*(c.freqScale/10)+c.movement,o=null===u?0:u.noise(s,s,s),l=t+1;e.scale.x=m[0]+v(l,P(o,y[0]))||Y,e.scale.y=m[1]+v(l,P(o,y[1]))||Y,e.scale.z=m[2]+v(l,P(o,y[2]))||Y;let h=g*t-n;switch(r.axis){default:case"x":bt.set(0,h,0);break;case"y":bt.set(0,0,h);break;case"z":bt.set(h,0,0)}ut.copy(i).applyQuaternion(xt.setFromEuler(bt)).multiplyScalar(r.radius),e.position.set(ut.x+(f[0]+v(l,P(o,b[0]))),ut.y+(f[1]+v(l,P(o,b[1]))),ut.z+(f[2]+v(l,P(o,b[2]))));let d=v(l,P(o,x[0])),p=v(l,P(o,x[1])),M=v(l,P(o,x[2]));!0===r.alignment?e.rotation.set(bt.x+(a.x+d),bt.y+(a.y+p),bt.z+(a.z+M)):e.rotation.set(a.x+d,a.y+p,a.z+M)}}_updateLinear(t,e){if("linear"!==t.type)throw new Error;let i=t.linear,r=vt(i.rotation,e),n=vt(i.scale,e),s=vt(i.position,e),o=new p(r[0]??0,r[1]??0,r[2]??0),a=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,h=vt(a.rotation,e),c=vt(a.scale,e),d=vt(a.position,e),u=!0===this.parameters.randomness&&0!==a.strength?this.getRandom(a):null,m=N(a.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let i=t*(a.freqScale/10)+a.movement,r=null===u?0:u.noise(i,i,i),l=t+1,p=m(l,P(r,h[0])),f=m(l,P(r,h[1])),y=m(l,P(r,h[2]));e.scale.x=1+(n[0]-1)*t+m(l,P(r,c[0]))||Y,e.scale.y=1+(n[1]-1)*t+m(l,P(r,c[1]))||Y,e.scale.z=1+(n[2]-1)*t+m(l,P(r,c[2]))||Y,e.rotation.set(o.x*t+p,o.y*t+f,o.z*t+y),e.position.x=s[0]*t+m(l,P(r,d[0])),e.position.y=s[1]*t+m(l,P(r,d[1])),e.position.z=s[2]*t+m(l,P(r,d[2]))}}_updateGrid(t,e){let i=0,r=t.grid,n=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,s=vt(n.scale,e),o=vt(n.rotation,e),a=vt(n.position,e),h=!0===this.parameters.randomness&&0!==n.strength?this.getRandom(n,!0):null,c=N(n.strength,this.parameters.randomness),u=vt(r.count,e),p=vt(r.size,e);if(!0===r.useCenter){let t={x:u[0]%2==0?2:1,y:u[1]%2==0?2:1,z:u[2]%2==0?2:1},e=new d(p[0]*(u[0]-t.x)*.5,p[1]*(u[1]-t.y)*.5,p[2]*(u[2]-t.z)*.5);for(let t=0;t<u[0];t++)for(let r=0;r<u[1];r++)for(let l=0;l<u[2];l++){let d=this.children[i++];if(!d)continue;let u=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement,(l+1)*(n.freqScale/10)+n.movement);d.scale.x=1+c(i,P(u,s[0]))||Y,d.scale.y=1+c(i,P(u,s[1]))||Y,d.scale.z=1+c(i,P(u,s[2]))||Y;let m=c(i,P(u,o[0])),f=c(i,P(u,o[1])),y=c(i,P(u,o[2]));d.rotation.set(m,f,y),d.position.x=p[0]*t-e.x+c(i,P(u,a[0])),d.position.y=p[1]*r-e.y+c(i,P(u,a[1])),d.position.z=p[2]*l-e.z+c(i,P(u,a[2]))}}else for(let t=0;t<u[0];t++)for(let e=0;e<u[1];e++)for(let r=0;r<u[2];r++){let l=this.children[i++];if(!l)continue;let d=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(e+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement);l.scale.x=1+c(i,P(d,s[0]))||Y,l.scale.y=1+c(i,P(d,s[1]))||Y,l.scale.z=1+c(i,P(d,s[2]))||Y;let u=c(i,P(d,o[0])),m=c(i,P(d,o[1])),f=c(i,P(d,o[2]));l.rotation.set(u,m,f),l.position.x=p[0]*t+c(i,P(d,a[0])),l.position.y=-p[1]*e+c(i,P(d,a[1])),l.position.z=-p[2]*r+c(i,P(d,a[2]))}}_updateToObject(i,r){if("toObject"!==i.type)throw new Error;let{toObject:n}=i,s=vt(n.rotation,r),o=vt(n.position,r),a=vt(n.scale,r),h=new p(s[0],s[1],s[2]),c=i.randomnessObject??l.defaultData([1,1,1]).randomnessObject,d=vt(c.rotation,r),u=vt(c.position,r),m=vt(c.scale,r),f=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,y=N(c.strength,this.parameters.randomness);if(!n.object){for(let[,t]of this.children.entries())t.position.set(0,0,0),t.scale.setScalar(1),t.rotation.set(0,0,0);return this.objectForSample=void 0,void this.invalidateSurfaceCaches()}if(!this.objectForSample)return;if(this.objectForSample instanceof t){if(!this.objectForSample.font?.isLoaded||void 0===this.objectForSample.geometry.attributes.position)return void(this._pendingMediaLoad=!0);this._pendingMediaLoad=!1}if(void 0===this.objectForSample.geometry&&this.objectForSample.isAncestorOf(this.object.uuid))return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) seem to be a child/descendant of the object it's being cloned to. Please re-parent it so that they are siblings instead.`);let b=this.getSubdivData();if(b.length>0){let t=Math.round(b.length*n.count/100);this._updateCount(r,t)}else{let t=this.objectForSample.geometry.getAttribute("position");if(!t||isNaN(t.count)||0===t.count)return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) cannot be cloned on the surface of "${this.objectForSample.name}" (${this.objectForSample.uuid}) because the latter does not have a valid geometry.`)}this.objectForSample.updateMatrixWorld();let x="random"===n.spreadType,v=null;x&&(v=this.getSurfaceSampler(),v.setRandomGenerator((0,g.default)(this.object.uuid+n.seed)));let M=z[n.axis],w=this.children;ot.fromArray(M);let j=this.objectForSample instanceof e;j&&it.copy(this.objectForSample.matrixWorld).invert(),"normal"!==n.align&&this.object.getWorldDirection(dt),ft.set(ot.y,ot.z,ot.x).normalize(),yt.copy(ft).cross(ot).normalize(),nt.makeBasis(ft,ot,yt).invert();for(let[t,e]of w.entries()){let i=t*(c.freqScale/10)+c.movement,r=null===f?0:f.noise(i,i,i),s=t+1,l=y(s,P(r,d[0])),p=y(s,P(r,d[1])),g=y(s,P(r,d[2]));x?v.sample(lt,ht):(b.length&&(lt.fromArray(b[t].pos),ht.fromArray(b[t].norm)),j&&lt.applyMatrix4(it)),e.position.copy(lt);let M="normal"===n.align?ht:dt,w=at.fromArray(o);at.x+=y(s,P(r,u[0])),at.y+=y(s,P(r,u[1])),at.z+=y(s,P(r,u[2]));let A=Math.acos(M.dot(ot)),S=ct.crossVectors(ot,M).normalize(),_=tt.makeRotationAxis(S,A);pt.copy(M).cross(this.object.up).normalize(),mt.copy(pt).cross(M).normalize(),rt.makeBasis(pt,M,mt),st.multiplyMatrices(rt,nt),bt.setFromRotationMatrix(st),w.applyMatrix4(_),e.position.add(w),e.rotation.set(bt.x+h.x+l,bt.y+h.y+p,bt.z+h.z+g),e.scale.set(1+a[0]+y(s,P(r,m[0]))||Y,1+a[1]+y(s,P(r,m[1]))||Y,1+a[2]+y(s,P(r,m[2]))||Y),e.scale.multiply(this.object.scale)}}getSurfaceSampler(){let t=this.objectForSample,e=t.geometry,i=e.getAttribute("position"),r=e.index,n=this.surfaceSamplerCache;if(null!==n&&n.geometry===e&&n.position===i&&n.positionVersion===gt(i)&&n.index===r&&n.indexVersion===(null===r?-1:r.version))return n.sampler;let s=new O(t).build();return this.surfaceSamplerCache={geometry:e,position:i,positionVersion:gt(i),index:r,indexVersion:null===r?-1:r.version,sampler:s},s}invalidateSurfaceCaches(){this.surfaceSamplerCache=null,this.surfacePointsCache=null}getSubdivData(){if(!this.objectForSample)return[];let t=this.parameters.toObject.spreadType;if("random"===t)return[];let i=this.objectForSample instanceof e,r=this.objectForSample.geometry;if(!i&&r){let e=this.surfacePointsCache,i=r.getAttribute("position");if(null!==e&&e.spreadType===t&&e.geometry===r&&e.position===i&&e.positionVersion===gt(i)&&e.index===r.index&&e.indexVersion===(null===r.index?-1:r.index.version))return e.points}let n=new Map,s=(t,e)=>{let i=Math.round(1e4*t[0])+"_"+Math.round(1e4*t[1])+"_"+Math.round(1e4*t[2]),r=n.get(i);r?(r.pos[0]+=t[0],r.pos[1]+=t[1],r.pos[2]+=t[2],r.norm[0]+=e[0],r.norm[1]+=e[1],r.norm[2]+=e[2],r.count+=1):n.set(i,{pos:[...t],norm:[...e],count:1})};if(i){let e=this.objectForSample,i=W[t],r=D[i],n=k[i],o=V[i],a=r(e.subdivPointerNew);for(let t=0;t<=a-1;t++){let i=n(e.subdivPointerNew,t),r=o(e.subdivPointerNew,t);Z.fromArray(i).applyMatrix4(e.matrixWorld),J.fromArray(r),s(Z.toArray(),J.toArray())}}else(r.index?function(t){let e=[],i=Math.floor(t.index.count/3);for(let r=0;r<i;r++)if(L.fromArray(t.index.array,3*r),q.setFromAttributeAndIndices(t.attributes.position,L.x,L.y,L.z),q.getNormal(G),q.getMidpoint(H),!(isNaN(H.x)||isNaN(H.y)||isNaN(H.z))){let{a:t,b:i,c:r}=q,n=t.toArray(),s=i.toArray(),o=r.toArray(),a=t.distanceTo(i),l=i.distanceTo(r),h=r.distanceTo(t),c=I(n,s),d=I(s,o),u=I(o,n),p=[a,l,h],m=Math.max(...p),f=p.filter(t=>Math.round(t)===Math.round(m)).length>1,y=[],b=q.getMidpoint(H).toArray();m===a&&!f&&(y=[d,u,u],b=c),m===l&&!f&&(y=[c,u,u],b=d),m===h&&!f&&(y=[c,d,d],b=u),f&&(y=[c,d,u]),e.push({vertices:[n,s,o],faceCenters:y,midpoint:b,norm:q.getNormal(G).toArray()})}return e}(r):function(t){let e=[],{position:i}=t.attributes;for(let t=0;t<i.count;t++){q.setFromAttributeAndIndices(i,3*t,3*t+1,3*t+2),q.getNormal(G),q.getMidpoint(H);let r=q.a.toArray(),n=q.b.toArray(),s=q.c.toArray();e.push({vertices:[r,n,s],faceCenters:[I(r,n),I(n,s),I(s,r)],midpoint:H.toArray(),norm:G.toArray()})}return e}(r)).forEach((e,i)=>{"polygon_center"===t&&s(e.midpoint,e.norm),"vertex"===t&&(s(e.vertices[0],e.norm),s(e.vertices[1],e.norm),s(e.vertices[2],e.norm)),"edge"===t&&(s(e.faceCenters[0],e.norm),s(e.faceCenters[1],e.norm),s(e.faceCenters[2],e.norm))});let o=Array.from(n.values());for(let t of o)t.pos[0]/=t.count,t.pos[1]/=t.count,t.pos[2]/=t.count,t.norm[0]/=t.count,t.norm[1]/=t.count,t.norm[2]/=t.count;if(!i&&r){let e=r.getAttribute("position");this.surfacePointsCache={spreadType:t,geometry:r,position:e,positionVersion:gt(e),index:r.index,indexVersion:null===r.index?-1:r.index.version,points:o}}return o}updateState(t,e){this.parameters=o(t);let{parent:i,matrix:r}=this;if("toObject"!==this.parameters.type)this.invalidateSurfaceCaches(),(null===this.parent||this.parent!==this.object)&&(this.removeFromParent(),this.object.parent?.add(this),this.matrix=this.object.matrix,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1);else if(null===this.parent||this.parent.uuid!==this.parameters.toObject.object){this.removeFromParent(),this.invalidateSurfaceCaches();let t=e.scene.find(this.parameters.toObject.object);this.objectForSample=t instanceof s?t:void 0,this.matrix=new u,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1,t&&t.add(this)}let n=this._layout(e);this._syncEnclosingCopies(n||this.parent!==i||this.matrix!==r)}get pendingMediaLoad(){return this._pendingMediaLoad}},jt=class extends wt{constructor(t){super(t.object,t.parameters),this.source=t,this.matrixAutoUpdate=!1}get insideBoolean(){return this.source.insideBoolean}expand(){this.matrix=this.source.matrix,this.matrixWorldNeedsUpdate=!0;let t=0;for(let e of this.source.children){if(!(e instanceof r))continue;let i=this.children[t];void 0===i&&(i=new r(this.object),this.add(i)),i.matrix=e.matrix,i.matrixWorldNeedsUpdate=!0,i.expand(),t+=1}for(;this.children.length>t;)this.remove(this.children[t])}};export{wt as a};
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-YBKTPAVG.js";import{g as e}from"./runtime-chunk-BVZK2X37.js";import{c as i}from"./runtime-chunk-2RNKFNMP.js";import{i as r}from"./runtime-chunk-LGLIAPCL.js";import{j as s}from"./runtime-chunk-2PT2WH66.js";import{Hc as n,Pe as o,fd as a,wd as h,xd as c}from"./runtime-chunk-KPOUV3HD.js";var d=class extends o{constructor(){super(),i(this.layers)}setFromCamera(t,e){e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,-1).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):e.isPerspectiveCamera?(this.ray.origin.set(t.x,t.y,-1).unproject(e),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):console.error("Raycaster: Unsupported camera type.")}intersectVisibleObjects(t,e=!0,i=[]){return t.forEach(t=>{t.visible&&this.intersectObject(t,e,i)}),i}createRaycastLineHelper(){let t=new h({color:65280,linewidth:10}),e=new n(this.ray.origin.x,this.ray.origin.y,this.ray.origin.z),i=new n(this.ray.direction.x,this.ray.direction.y,this.ray.direction.z),r=this.camera.far-this.camera.near,s=(new n).addVectors(e,i.multiplyScalar(r)),o=new a;return o.setFromPoints([e,s]),new c(o,t)}},u=e=>e instanceof t||s(e);function l(t,e){return t.distance-e.distance}function m(t,i,s){if(r(i)&&i.visible){e(i)&&i.raycast(t,s);for(let e of i.children)m(t,e,s)}}function f(t,e,i,r=!1){if(!r&&!i.some(e=>void 0!==y(t,e)))return[];let s=[];return e.children.forEach(e=>m(t,e,s)),s.sort(l),s}function p(t){let e=[];if(t.length){let i=t[0].object;r(i)&&e.push(i);let s=i.parent;for(;s;)u(s)&&e.push(s),s=s.parent}return e}function w(t,e,i,r){let s=t.frame;if(s){let t=e[0]*s.width,n=(1-e[1])*s.height;for(let e of i){let i=e===s.uuid?s:s.find(e);if(i?.intersects(t,n))return r(i),!0}}return!1}function y(t,i){if(e(i)){if(i.visible){let e=[];return i.raycast(t,e),e.length?e[0]:void 0}}else if(u(i))return g(t,i)}function g(t,i){if(r(i)&&i.visible){if(e(i)){let e=[];if(i.raycast(t,e),e.length)return e[0]}for(let e of i.children){let i=g(t,e);if(i)return i}}}var v=class{constructor(t,e,i,r,s,n,o,a){this.renderer=t,this.publish=e,this.scene=i,this.getCamera=r,this.sharedAssets=s,this.requestRender=n,this.isExport=o,this.frame=a,this.raycaster=new d,this._useWindowEvents=!1,this.pointerWorld={x:0,y:0},this.pointerScreen={x:0,y:0},this._useWindowEvents="window"===e.mouseEventTarget,this.domElement=t.domElement,this.eventElement=this._useWindowEvents?window:t.domElement,this._domRect=this.domElement.getBoundingClientRect()}get stopRaycast(){return this.publish.stopRaycast}get page(){return this.scene.activePage}set useWindowEvents(t){this._useWindowEvents=t,this.eventElement=t?window:this.renderer.domElement}get useWindowEvents(){return this._useWindowEvents}set domRect(t){this._domRect=t}get domRect(){return this._domRect}updateRaycaster(t){let{pageX:e,pageY:i}=t.touches?.length>0?t.touches[0]:t;this.pointerWorld=function(t,e,i){return{x:(t-(i.left+window.scrollX))/i.width*2-1,y:-(e-(i.top+window.scrollY))/i.height*2+1}}(e,i,this._domRect),this.pointerScreen=function(t,e,i){return{x:(t-(i.left+window.scrollX))/i.width,y:1-(e-(i.top+window.scrollY))/i.height}}(e,i,this._domRect),this.raycaster.setFromCamera(this.pointerWorld,this.getCamera())}dispose(){this.scene=void 0,this.sharedAssets=void 0,this.publish=void 0,this.getCamera=void 0,this.requestRender=void 0,this.frame=void 0,this.isExport=void 0}};export{f as a,p as b,w as c,y as d,v as e};
1
+ import{a as t}from"./runtime-chunk-QQ4W2SKI.js";import{g as e}from"./runtime-chunk-AW6U245D.js";import{c as i}from"./runtime-chunk-III53OHU.js";import{i as r}from"./runtime-chunk-PQ42NYOR.js";import{j as s}from"./runtime-chunk-2PT2WH66.js";import{Hc as n,Pe as o,fd as a,wd as h,xd as c}from"./runtime-chunk-KPOUV3HD.js";var d=class extends o{constructor(){super(),i(this.layers)}setFromCamera(t,e){e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,-1).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):e.isPerspectiveCamera?(this.ray.origin.set(t.x,t.y,-1).unproject(e),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):console.error("Raycaster: Unsupported camera type.")}intersectVisibleObjects(t,e=!0,i=[]){return t.forEach(t=>{t.visible&&this.intersectObject(t,e,i)}),i}createRaycastLineHelper(){let t=new h({color:65280,linewidth:10}),e=new n(this.ray.origin.x,this.ray.origin.y,this.ray.origin.z),i=new n(this.ray.direction.x,this.ray.direction.y,this.ray.direction.z),r=this.camera.far-this.camera.near,s=(new n).addVectors(e,i.multiplyScalar(r)),o=new a;return o.setFromPoints([e,s]),new c(o,t)}},u=e=>e instanceof t||s(e);function l(t,e){return t.distance-e.distance}function m(t,i,s){if(r(i)&&i.visible){e(i)&&i.raycast(t,s);for(let e of i.children)m(t,e,s)}}function f(t,e,i,r=!1){if(!r&&!i.some(e=>void 0!==y(t,e)))return[];let s=[];return e.children.forEach(e=>m(t,e,s)),s.sort(l),s}function p(t){let e=[];if(t.length){let i=t[0].object;r(i)&&e.push(i);let s=i.parent;for(;s;)u(s)&&e.push(s),s=s.parent}return e}function w(t,e,i,r){let s=t.frame;if(s){let t=e[0]*s.width,n=(1-e[1])*s.height;for(let e of i){let i=e===s.uuid?s:s.find(e);if(i?.intersects(t,n))return r(i),!0}}return!1}function y(t,i){if(e(i)){if(i.visible){let e=[];return i.raycast(t,e),e.length?e[0]:void 0}}else if(u(i))return g(t,i)}function g(t,i){if(r(i)&&i.visible){if(e(i)){let e=[];if(i.raycast(t,e),e.length)return e[0]}for(let e of i.children){let i=g(t,e);if(i)return i}}}var v=class{constructor(t,e,i,r,s,n,o,a){this.renderer=t,this.publish=e,this.scene=i,this.getCamera=r,this.sharedAssets=s,this.requestRender=n,this.isExport=o,this.frame=a,this.raycaster=new d,this._useWindowEvents=!1,this.pointerWorld={x:0,y:0},this.pointerScreen={x:0,y:0},this._useWindowEvents="window"===e.mouseEventTarget,this.domElement=t.domElement,this.eventElement=this._useWindowEvents?window:t.domElement,this._domRect=this.domElement.getBoundingClientRect()}get stopRaycast(){return this.publish.stopRaycast}get page(){return this.scene.activePage}set useWindowEvents(t){this._useWindowEvents=t,this.eventElement=t?window:this.renderer.domElement}get useWindowEvents(){return this._useWindowEvents}set domRect(t){this._domRect=t}get domRect(){return this._domRect}updateRaycaster(t){let{pageX:e,pageY:i}=t.touches?.length>0?t.touches[0]:t;this.pointerWorld=function(t,e,i){return{x:(t-(i.left+window.scrollX))/i.width*2-1,y:-(e-(i.top+window.scrollY))/i.height*2+1}}(e,i,this._domRect),this.pointerScreen=function(t,e,i){return{x:(t-(i.left+window.scrollX))/i.width,y:1-(e-(i.top+window.scrollY))/i.height}}(e,i,this._domRect),this.raycaster.setFromCamera(this.pointerWorld,this.getCamera())}dispose(){this.scene=void 0,this.sharedAssets=void 0,this.publish=void 0,this.getCamera=void 0,this.requestRender=void 0,this.frame=void 0,this.isExport=void 0}};export{f as a,p as b,w as c,y as d,v as e};
@@ -1 +1 @@
1
- import{f as e}from"./runtime-chunk-F3YLZRKK.js";var t=class{constructor(t,n){this.enabled=!1,this.effect=new t(n),Object.defineProperty(this,"opacity",{enumerable:!0,set(e){this.effect.blendMode.opacity.value=e},get(){return this.effect.blendMode.opacity.value}}),Object.defineProperty(this,"blendFunction",{enumerable:!0,set(e){this.effect.blendMode.setBlendFunction(Number(e))},get(){return this.effect.blendMode.blendFunction}}),this.blendFunction=e.NORMAL}dispose(){this.effect.dispose()}};export{t as a};
1
+ import{f as e}from"./runtime-chunk-LQQLGNQW.js";var t=class{constructor(t,n){this.enabled=!1,this.effect=new t(n),Object.defineProperty(this,"opacity",{enumerable:!0,set(e){this.effect.blendMode.opacity.value=e},get(){return this.effect.blendMode.opacity.value}}),Object.defineProperty(this,"blendFunction",{enumerable:!0,set(e){this.effect.blendMode.setBlendFunction(Number(e))},get(){return this.effect.blendMode.blendFunction}}),this.blendFunction=e.NORMAL}dispose(){this.effect.dispose()}};export{t as a};
@@ -0,0 +1,2 @@
1
+ � ď�f��}���Ӳ��1������ͭ��K��$ (�l�������iBK�1L4qIXסZv���O���_s{:m����$j':F�sCiR2Ĕ�l2�Bg��(��/=�Hɗ�3�=���pid��}�L��I8?�?x�c$H �1�YL��wXz��^�6�Hi5�[w0#:��j@x��؀H�� %���8�u�����?;r��!���r�A
2
+ ��
@@ -1 +1 @@
1
- import{a as t,b as e}from"./runtime-chunk-AEDDM67H.js";import{Gc as s,Hc as r,Uc as a,Ze as i}from"./runtime-chunk-KPOUV3HD.js";var o=new r(1,1,1),m=new r,d=new r,u=new s,c=class extends(t(i)){constructor(t,e=15){super(e),this.object=t,this.dummy=new a,this.object.updateMatrixWorld(),this.name=`EmptyObjectHelper: ${t.uuid}`,this.matrix=this.dummy.matrixWorld,this.matrixAutoUpdate=!1,this.object.isBone&&(this.visible=!1)}raycast(t,s){e(this.object,c.geometryHelper,t,s,!1,this.dummy)}update(){}updateMatrix(){}updateMatrixWorld(t){this.object.matrixWorld.decompose(m,u,d),this.matrix.compose(m,u,o),super.updateMatrixWorld(t)}updateWorldMatrix(t,e){}};export{c as a};
1
+ import{a as t,b as e}from"./runtime-chunk-AUUKCZJE.js";import{Gc as s,Hc as r,Uc as a,Ze as i}from"./runtime-chunk-KPOUV3HD.js";var o=new r(1,1,1),m=new r,d=new r,u=new s,c=class extends(t(i)){constructor(t,e=15){super(e),this.object=t,this.dummy=new a,this.object.updateMatrixWorld(),this.name=`EmptyObjectHelper: ${t.uuid}`,this.matrix=this.dummy.matrixWorld,this.matrixAutoUpdate=!1,this.object.isBone&&(this.visible=!1)}raycast(t,s){e(this.object,c.geometryHelper,t,s,!1,this.dummy)}update(){}updateMatrix(){}updateMatrixWorld(t){this.object.matrixWorld.decompose(m,u,d),this.matrix.compose(m,u,o),super.updateMatrixWorld(t)}updateWorldMatrix(t,e){}};export{c as a};