@splinetool/runtime 2.0.101 → 2.0.103

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 (312) hide show
  1. package/build/{runtime-bloom-BOI6KO5B.js → runtime-bloom-C4G5VYK6.js} +1 -1
  2. package/build/runtime-bloom-C4G5VYK6.js.br +0 -0
  3. package/build/runtime-bloom-C4G5VYK6.js.gz +0 -0
  4. package/build/{runtime-brightnessContrast-6ZMNRJAO.js → runtime-brightnessContrast-UII4QNL3.js} +1 -1
  5. package/build/runtime-brightnessContrast-UII4QNL3.js.br +0 -0
  6. package/build/runtime-brightnessContrast-UII4QNL3.js.gz +0 -0
  7. package/build/{runtime-chromaticAberration-72CZWXTD.js → runtime-chromaticAberration-JZEAE7GG.js} +1 -1
  8. package/build/runtime-chromaticAberration-JZEAE7GG.js.br +0 -0
  9. package/build/runtime-chromaticAberration-JZEAE7GG.js.gz +0 -0
  10. package/build/{runtime-chunk-B3ARQO3Z.js → runtime-chunk-4DMKO7YJ.js} +1 -1
  11. package/build/{runtime-chunk-B3ARQO3Z.js.br → runtime-chunk-4DMKO7YJ.js.br} +0 -0
  12. package/build/runtime-chunk-4DMKO7YJ.js.gz +0 -0
  13. package/build/{runtime-chunk-AWUFMMKH.js → runtime-chunk-4SU7HY7O.js} +1 -1
  14. package/build/runtime-chunk-4SU7HY7O.js.br +0 -0
  15. package/build/runtime-chunk-4SU7HY7O.js.gz +0 -0
  16. package/build/{runtime-chunk-BEWSX4P6.js → runtime-chunk-5T76R6GZ.js} +1 -1
  17. package/build/runtime-chunk-5T76R6GZ.js.br +0 -0
  18. package/build/runtime-chunk-5T76R6GZ.js.gz +0 -0
  19. package/build/{runtime-chunk-SXHQLHLW.js → runtime-chunk-BZF6P7U6.js} +1 -1
  20. package/build/{runtime-chunk-SXHQLHLW.js.br → runtime-chunk-BZF6P7U6.js.br} +0 -0
  21. package/build/runtime-chunk-BZF6P7U6.js.gz +0 -0
  22. package/build/{runtime-chunk-AORANPJP.js → runtime-chunk-ERDBNMCW.js} +1 -1
  23. package/build/runtime-chunk-ERDBNMCW.js.br +0 -0
  24. package/build/runtime-chunk-ERDBNMCW.js.gz +0 -0
  25. package/build/{runtime-chunk-YDR7MZGF.js → runtime-chunk-EZEGMMTB.js} +1 -1
  26. package/build/runtime-chunk-EZEGMMTB.js.br +0 -0
  27. package/build/runtime-chunk-EZEGMMTB.js.gz +0 -0
  28. package/build/{runtime-chunk-YPL52E4O.js → runtime-chunk-G6TFLOKQ.js} +1 -1
  29. package/build/runtime-chunk-G6TFLOKQ.js.br +0 -0
  30. package/build/runtime-chunk-G6TFLOKQ.js.gz +0 -0
  31. package/build/{runtime-chunk-357LYO3J.js → runtime-chunk-IXDHDVKZ.js} +1 -1
  32. package/build/runtime-chunk-IXDHDVKZ.js.br +0 -0
  33. package/build/runtime-chunk-IXDHDVKZ.js.gz +0 -0
  34. package/build/{runtime-chunk-Q7BYLYP7.js → runtime-chunk-J4GVJ32W.js} +1 -1
  35. package/build/runtime-chunk-J4GVJ32W.js.br +0 -0
  36. package/build/runtime-chunk-J4GVJ32W.js.gz +0 -0
  37. package/build/{runtime-chunk-7MEZ2KDU.js → runtime-chunk-J73B5O64.js} +1 -1
  38. package/build/runtime-chunk-J73B5O64.js.br +0 -0
  39. package/build/runtime-chunk-J73B5O64.js.gz +0 -0
  40. package/build/{runtime-chunk-6GYTYA7C.js → runtime-chunk-L2PJDZH7.js} +1 -1
  41. package/build/runtime-chunk-L2PJDZH7.js.br +0 -0
  42. package/build/runtime-chunk-L2PJDZH7.js.gz +0 -0
  43. package/build/{runtime-chunk-WK3XJ2YB.js → runtime-chunk-N5BMGLHF.js} +1 -1
  44. package/build/runtime-chunk-N5BMGLHF.js.br +0 -0
  45. package/build/runtime-chunk-N5BMGLHF.js.gz +0 -0
  46. package/build/{runtime-chunk-GPEQDP4A.js → runtime-chunk-N75UOWZ5.js} +1 -1
  47. package/build/runtime-chunk-N75UOWZ5.js.br +0 -0
  48. package/build/runtime-chunk-N75UOWZ5.js.gz +0 -0
  49. package/build/{runtime-chunk-HUSJ7KZG.js → runtime-chunk-NZCX3HNZ.js} +1 -1
  50. package/build/runtime-chunk-NZCX3HNZ.js.br +0 -0
  51. package/build/runtime-chunk-NZCX3HNZ.js.gz +0 -0
  52. package/build/{runtime-chunk-3F3Y2G5B.js → runtime-chunk-OKIGUZC3.js} +1 -1
  53. package/build/runtime-chunk-OKIGUZC3.js.br +0 -0
  54. package/build/runtime-chunk-OKIGUZC3.js.gz +0 -0
  55. package/build/{runtime-chunk-VA6WKZXP.js → runtime-chunk-OZQMQXCI.js} +1 -1
  56. package/build/runtime-chunk-OZQMQXCI.js.br +0 -0
  57. package/build/runtime-chunk-OZQMQXCI.js.gz +0 -0
  58. package/build/{runtime-chunk-D7JBGVG7.js → runtime-chunk-QAGSWGDI.js} +1 -1
  59. package/build/runtime-chunk-QAGSWGDI.js.br +0 -0
  60. package/build/runtime-chunk-QAGSWGDI.js.gz +0 -0
  61. package/build/{runtime-chunk-EYCGSFF7.js → runtime-chunk-RYJE3NW3.js} +1 -1
  62. package/build/runtime-chunk-RYJE3NW3.js.br +0 -0
  63. package/build/runtime-chunk-RYJE3NW3.js.gz +0 -0
  64. package/build/{runtime-chunk-OBB4M3GU.js → runtime-chunk-RZTJOEEJ.js} +1 -1
  65. package/build/{runtime-chunk-OBB4M3GU.js.br → runtime-chunk-RZTJOEEJ.js.br} +0 -0
  66. package/build/{runtime-chunk-OBB4M3GU.js.gz → runtime-chunk-RZTJOEEJ.js.gz} +0 -0
  67. package/build/{runtime-chunk-OSFWHAMN.js → runtime-chunk-SZRCIDDG.js} +1 -1
  68. package/build/runtime-chunk-SZRCIDDG.js.br +0 -0
  69. package/build/runtime-chunk-SZRCIDDG.js.gz +0 -0
  70. package/build/{runtime-chunk-5VCUVBXQ.js → runtime-chunk-T4AQT7WT.js} +1 -1
  71. package/build/runtime-chunk-T4AQT7WT.js.br +0 -0
  72. package/build/runtime-chunk-T4AQT7WT.js.gz +0 -0
  73. package/build/{runtime-chunk-MIPG36RU.js → runtime-chunk-T6PSCTLT.js} +1 -1
  74. package/build/runtime-chunk-T6PSCTLT.js.br +0 -0
  75. package/build/runtime-chunk-T6PSCTLT.js.gz +0 -0
  76. package/build/{runtime-chunk-IIR3Y2PX.js → runtime-chunk-TA5K5A4I.js} +1 -1
  77. package/build/runtime-chunk-TA5K5A4I.js.br +0 -0
  78. package/build/runtime-chunk-TA5K5A4I.js.gz +0 -0
  79. package/build/{runtime-chunk-5CXAJPAF.js → runtime-chunk-XHJYYIYT.js} +1 -1
  80. package/build/runtime-chunk-XHJYYIYT.js.br +3 -0
  81. package/build/runtime-chunk-XHJYYIYT.js.gz +0 -0
  82. package/build/{runtime-chunk-JBRM62V6.js → runtime-chunk-XRTVHFUK.js} +1 -1
  83. package/build/runtime-chunk-XRTVHFUK.js.br +0 -0
  84. package/build/runtime-chunk-XRTVHFUK.js.gz +0 -0
  85. package/build/runtime-chunk-YODHP57H.js +1 -0
  86. package/build/runtime-chunk-YODHP57H.js.br +0 -0
  87. package/build/runtime-chunk-YODHP57H.js.gz +0 -0
  88. package/build/{runtime-chunk-YH7N5LRF.js → runtime-chunk-ZO5L56DT.js} +1 -1
  89. package/build/runtime-chunk-ZO5L56DT.js.br +0 -0
  90. package/build/runtime-chunk-ZO5L56DT.js.gz +0 -0
  91. package/build/{runtime-classicRuntime-IYA2AK5E.js → runtime-classicRuntime-DVQPNGKA.js} +1 -1
  92. package/build/runtime-classicRuntime-DVQPNGKA.js.br +0 -0
  93. package/build/runtime-classicRuntime-DVQPNGKA.js.gz +0 -0
  94. package/build/{runtime-cloners-IP4B45UK.js → runtime-cloners-FHCQRJMH.js} +1 -1
  95. package/build/runtime-cloners-FHCQRJMH.js.br +0 -0
  96. package/build/runtime-cloners-FHCQRJMH.js.gz +0 -0
  97. package/build/{runtime-components-BF3GMZ52.js → runtime-components-GYR4VFW7.js} +1 -1
  98. package/build/runtime-components-GYR4VFW7.js.br +0 -0
  99. package/build/runtime-components-GYR4VFW7.js.gz +0 -0
  100. package/build/{runtime-createDestroy-BIQXIAYO.js → runtime-createDestroy-7VGJNJEL.js} +1 -1
  101. package/build/runtime-createDestroy-7VGJNJEL.js.br +0 -0
  102. package/build/runtime-createDestroy-7VGJNJEL.js.gz +0 -0
  103. package/build/{runtime-depthOfField-PSOUFSGP.js → runtime-depthOfField-VXJHTCLR.js} +1 -1
  104. package/build/runtime-depthOfField-VXJHTCLR.js.br +0 -0
  105. package/build/runtime-depthOfField-VXJHTCLR.js.gz +0 -0
  106. package/build/{runtime-dragDrop-WYJRT22Q.js → runtime-dragDrop-ISRV5HQW.js} +1 -1
  107. package/build/runtime-dragDrop-ISRV5HQW.js.br +0 -0
  108. package/build/runtime-dragDrop-ISRV5HQW.js.gz +0 -0
  109. package/build/{runtime-gameControls-YYSSAWFT.js → runtime-gameControls-B2PBY6VF.js} +1 -1
  110. package/build/runtime-gameControls-B2PBY6VF.js.br +0 -0
  111. package/build/runtime-gameControls-B2PBY6VF.js.gz +0 -0
  112. package/build/{runtime-hair-KEXD7S64.js → runtime-hair-6NWQIMI2.js} +1 -1
  113. package/build/runtime-hair-6NWQIMI2.js.br +1 -0
  114. package/build/runtime-hair-6NWQIMI2.js.gz +0 -0
  115. package/build/{runtime-hueSaturation-G2JT6P4G.js → runtime-hueSaturation-N55N3XN7.js} +1 -1
  116. package/build/runtime-hueSaturation-N55N3XN7.js.br +0 -0
  117. package/build/runtime-hueSaturation-N55N3XN7.js.gz +0 -0
  118. package/build/{runtime-mergeStaticGeometries-RDDTTVN2.js → runtime-mergeStaticGeometries-2F3ZN77O.js} +1 -1
  119. package/build/runtime-mergeStaticGeometries-2F3ZN77O.js.br +0 -0
  120. package/build/runtime-mergeStaticGeometries-2F3ZN77O.js.gz +0 -0
  121. package/build/{runtime-miscActions-SQEVCHD6.js → runtime-miscActions-XB7EYI65.js} +1 -1
  122. package/build/runtime-miscActions-XB7EYI65.js.br +0 -0
  123. package/build/runtime-miscActions-XB7EYI65.js.gz +0 -0
  124. package/build/{runtime-mouseHover-PVE2QUFI.js → runtime-mouseHover-75XZCO5A.js} +1 -1
  125. package/build/runtime-mouseHover-75XZCO5A.js.br +0 -0
  126. package/build/runtime-mouseHover-75XZCO5A.js.gz +0 -0
  127. package/build/{runtime-noise-UZ5EXJW7.js → runtime-noise-FPHZGHTA.js} +1 -1
  128. package/build/runtime-noise-FPHZGHTA.js.br +0 -0
  129. package/build/runtime-noise-FPHZGHTA.js.gz +0 -0
  130. package/build/{runtime-particles-QMKT2E2M.js → runtime-particles-ZIFZMER2.js} +1 -1
  131. package/build/runtime-particles-ZIFZMER2.js.br +0 -0
  132. package/build/{runtime-particles-QMKT2E2M.js.gz → runtime-particles-ZIFZMER2.js.gz} +0 -0
  133. package/build/{runtime-paths-G2QXI7II.js → runtime-paths-ZK6OE7IJ.js} +1 -1
  134. package/build/runtime-paths-ZK6OE7IJ.js.br +0 -0
  135. package/build/runtime-paths-ZK6OE7IJ.js.gz +0 -0
  136. package/build/{runtime-pixelation-REH3LYGQ.js → runtime-pixelation-3QRT3E4B.js} +1 -1
  137. package/build/runtime-pixelation-3QRT3E4B.js.br +0 -0
  138. package/build/runtime-pixelation-3QRT3E4B.js.gz +0 -0
  139. package/build/{runtime-resize-U6VSAW63.js → runtime-resize-2IWIBRQI.js} +1 -1
  140. package/build/runtime-resize-2IWIBRQI.js.br +0 -0
  141. package/build/runtime-resize-2IWIBRQI.js.gz +0 -0
  142. package/build/{runtime-sceneTransition-IFTVI4XL.js → runtime-sceneTransition-FKUMTJ7C.js} +1 -1
  143. package/build/runtime-sceneTransition-FKUMTJ7C.js.br +0 -0
  144. package/build/runtime-sceneTransition-FKUMTJ7C.js.gz +0 -0
  145. package/build/{runtime-scroll-4TIXCG7C.js → runtime-scroll-HJS2WLZO.js} +1 -1
  146. package/build/runtime-scroll-HJS2WLZO.js.br +0 -0
  147. package/build/runtime-scroll-HJS2WLZO.js.gz +0 -0
  148. package/build/runtime-shapeBlends-JNUYXCZC.js +1 -0
  149. package/build/runtime-shapeBlends-JNUYXCZC.js.br +0 -0
  150. package/build/runtime-shapeBlends-JNUYXCZC.js.gz +0 -0
  151. package/build/{runtime-text-3GGOC64X.js → runtime-text-VOM5K7LU.js} +1 -1
  152. package/build/runtime-text-VOM5K7LU.js.br +0 -0
  153. package/build/runtime-text-VOM5K7LU.js.gz +0 -0
  154. package/build/{runtime-textInputs-LKHFZZIA.js → runtime-textInputs-ILQFU6RZ.js} +1 -1
  155. package/build/runtime-textInputs-ILQFU6RZ.js.br +0 -0
  156. package/build/runtime-textInputs-ILQFU6RZ.js.gz +0 -0
  157. package/build/{runtime-timeline-SICDYTVP.js → runtime-timeline-LJHPI3CC.js} +1 -1
  158. package/build/runtime-timeline-LJHPI3CC.js.br +0 -0
  159. package/build/runtime-timeline-LJHPI3CC.js.gz +0 -0
  160. package/build/{runtime-tracking-AZFZEWAF.js → runtime-tracking-DHIUIZ3G.js} +1 -1
  161. package/build/runtime-tracking-DHIUIZ3G.js.br +0 -0
  162. package/build/runtime-tracking-DHIUIZ3G.js.gz +0 -0
  163. package/build/{runtime-transitions-S6E7WME3.js → runtime-transitions-UNIR6MJQ.js} +1 -1
  164. package/build/runtime-transitions-UNIR6MJQ.js.br +0 -0
  165. package/build/runtime-transitions-UNIR6MJQ.js.gz +0 -0
  166. package/build/{runtime-ui2d-IU6BMLCA.js → runtime-ui2d-QKHVWPWS.js} +1 -1
  167. package/build/runtime-ui2d-QKHVWPWS.js.br +0 -0
  168. package/build/runtime-ui2d-QKHVWPWS.js.gz +0 -0
  169. package/build/{runtime-vectorShapes-ZGLU5TLJ.js → runtime-vectorShapes-LGCZOXBX.js} +1 -1
  170. package/build/runtime-vectorShapes-LGCZOXBX.js.br +0 -0
  171. package/build/runtime-vectorShapes-LGCZOXBX.js.gz +0 -0
  172. package/build/{runtime-vignette-HK6KS66E.js → runtime-vignette-WMLJ3N33.js} +1 -1
  173. package/build/runtime-vignette-WMLJ3N33.js.br +0 -0
  174. package/build/runtime-vignette-WMLJ3N33.js.gz +0 -0
  175. package/build/{runtime-webgpu-YDFMWVCK.js → runtime-webgpu-KWLX7IC2.js} +1 -1
  176. package/build/runtime-webgpu-KWLX7IC2.js.br +0 -0
  177. package/build/runtime-webgpu-KWLX7IC2.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-BOI6KO5B.js.br +0 -0
  199. package/build/runtime-bloom-BOI6KO5B.js.gz +0 -0
  200. package/build/runtime-brightnessContrast-6ZMNRJAO.js.br +0 -0
  201. package/build/runtime-brightnessContrast-6ZMNRJAO.js.gz +0 -0
  202. package/build/runtime-chromaticAberration-72CZWXTD.js.br +0 -0
  203. package/build/runtime-chromaticAberration-72CZWXTD.js.gz +0 -0
  204. package/build/runtime-chunk-357LYO3J.js.br +0 -0
  205. package/build/runtime-chunk-357LYO3J.js.gz +0 -0
  206. package/build/runtime-chunk-3F3Y2G5B.js.br +0 -0
  207. package/build/runtime-chunk-3F3Y2G5B.js.gz +0 -0
  208. package/build/runtime-chunk-5CXAJPAF.js.br +0 -0
  209. package/build/runtime-chunk-5CXAJPAF.js.gz +0 -0
  210. package/build/runtime-chunk-5VCUVBXQ.js.br +0 -1
  211. package/build/runtime-chunk-5VCUVBXQ.js.gz +0 -0
  212. package/build/runtime-chunk-6GYTYA7C.js.br +0 -0
  213. package/build/runtime-chunk-6GYTYA7C.js.gz +0 -0
  214. package/build/runtime-chunk-7MEZ2KDU.js.br +0 -0
  215. package/build/runtime-chunk-7MEZ2KDU.js.gz +0 -0
  216. package/build/runtime-chunk-AORANPJP.js.br +0 -0
  217. package/build/runtime-chunk-AORANPJP.js.gz +0 -0
  218. package/build/runtime-chunk-AWUFMMKH.js.br +0 -0
  219. package/build/runtime-chunk-AWUFMMKH.js.gz +0 -0
  220. package/build/runtime-chunk-B3ARQO3Z.js.gz +0 -0
  221. package/build/runtime-chunk-BEWSX4P6.js.br +0 -0
  222. package/build/runtime-chunk-BEWSX4P6.js.gz +0 -0
  223. package/build/runtime-chunk-D7JBGVG7.js.br +0 -0
  224. package/build/runtime-chunk-D7JBGVG7.js.gz +0 -0
  225. package/build/runtime-chunk-EYCGSFF7.js.br +0 -0
  226. package/build/runtime-chunk-EYCGSFF7.js.gz +0 -0
  227. package/build/runtime-chunk-GPEQDP4A.js.br +0 -0
  228. package/build/runtime-chunk-GPEQDP4A.js.gz +0 -0
  229. package/build/runtime-chunk-HKN5JQH2.js +0 -1
  230. package/build/runtime-chunk-HKN5JQH2.js.br +0 -0
  231. package/build/runtime-chunk-HKN5JQH2.js.gz +0 -0
  232. package/build/runtime-chunk-HUSJ7KZG.js.br +0 -0
  233. package/build/runtime-chunk-HUSJ7KZG.js.gz +0 -0
  234. package/build/runtime-chunk-IIR3Y2PX.js.br +0 -0
  235. package/build/runtime-chunk-IIR3Y2PX.js.gz +0 -0
  236. package/build/runtime-chunk-JBRM62V6.js.br +0 -0
  237. package/build/runtime-chunk-JBRM62V6.js.gz +0 -0
  238. package/build/runtime-chunk-MIPG36RU.js.br +0 -0
  239. package/build/runtime-chunk-MIPG36RU.js.gz +0 -0
  240. package/build/runtime-chunk-OSFWHAMN.js.br +0 -0
  241. package/build/runtime-chunk-OSFWHAMN.js.gz +0 -0
  242. package/build/runtime-chunk-Q7BYLYP7.js.br +0 -0
  243. package/build/runtime-chunk-Q7BYLYP7.js.gz +0 -0
  244. package/build/runtime-chunk-SXHQLHLW.js.gz +0 -0
  245. package/build/runtime-chunk-VA6WKZXP.js.br +0 -0
  246. package/build/runtime-chunk-VA6WKZXP.js.gz +0 -0
  247. package/build/runtime-chunk-WK3XJ2YB.js.br +0 -0
  248. package/build/runtime-chunk-WK3XJ2YB.js.gz +0 -0
  249. package/build/runtime-chunk-YDR7MZGF.js.br +0 -0
  250. package/build/runtime-chunk-YDR7MZGF.js.gz +0 -0
  251. package/build/runtime-chunk-YH7N5LRF.js.br +0 -0
  252. package/build/runtime-chunk-YH7N5LRF.js.gz +0 -0
  253. package/build/runtime-chunk-YPL52E4O.js.br +0 -0
  254. package/build/runtime-chunk-YPL52E4O.js.gz +0 -0
  255. package/build/runtime-classicRuntime-IYA2AK5E.js.br +0 -0
  256. package/build/runtime-classicRuntime-IYA2AK5E.js.gz +0 -0
  257. package/build/runtime-cloners-IP4B45UK.js.br +0 -3
  258. package/build/runtime-cloners-IP4B45UK.js.gz +0 -0
  259. package/build/runtime-components-BF3GMZ52.js.br +0 -0
  260. package/build/runtime-components-BF3GMZ52.js.gz +0 -0
  261. package/build/runtime-createDestroy-BIQXIAYO.js.br +0 -0
  262. package/build/runtime-createDestroy-BIQXIAYO.js.gz +0 -0
  263. package/build/runtime-depthOfField-PSOUFSGP.js.br +0 -0
  264. package/build/runtime-depthOfField-PSOUFSGP.js.gz +0 -0
  265. package/build/runtime-dragDrop-WYJRT22Q.js.br +0 -0
  266. package/build/runtime-dragDrop-WYJRT22Q.js.gz +0 -0
  267. package/build/runtime-gameControls-YYSSAWFT.js.br +0 -0
  268. package/build/runtime-gameControls-YYSSAWFT.js.gz +0 -0
  269. package/build/runtime-hair-KEXD7S64.js.br +0 -1
  270. package/build/runtime-hair-KEXD7S64.js.gz +0 -0
  271. package/build/runtime-hueSaturation-G2JT6P4G.js.br +0 -0
  272. package/build/runtime-hueSaturation-G2JT6P4G.js.gz +0 -0
  273. package/build/runtime-mergeStaticGeometries-RDDTTVN2.js.br +0 -0
  274. package/build/runtime-mergeStaticGeometries-RDDTTVN2.js.gz +0 -0
  275. package/build/runtime-miscActions-SQEVCHD6.js.br +0 -0
  276. package/build/runtime-miscActions-SQEVCHD6.js.gz +0 -0
  277. package/build/runtime-mouseHover-PVE2QUFI.js.br +0 -0
  278. package/build/runtime-mouseHover-PVE2QUFI.js.gz +0 -0
  279. package/build/runtime-noise-UZ5EXJW7.js.br +0 -0
  280. package/build/runtime-noise-UZ5EXJW7.js.gz +0 -0
  281. package/build/runtime-particles-QMKT2E2M.js.br +0 -0
  282. package/build/runtime-paths-G2QXI7II.js.br +0 -0
  283. package/build/runtime-paths-G2QXI7II.js.gz +0 -0
  284. package/build/runtime-pixelation-REH3LYGQ.js.br +0 -0
  285. package/build/runtime-pixelation-REH3LYGQ.js.gz +0 -0
  286. package/build/runtime-resize-U6VSAW63.js.br +0 -0
  287. package/build/runtime-resize-U6VSAW63.js.gz +0 -0
  288. package/build/runtime-sceneTransition-IFTVI4XL.js.br +0 -0
  289. package/build/runtime-sceneTransition-IFTVI4XL.js.gz +0 -0
  290. package/build/runtime-scroll-4TIXCG7C.js.br +0 -0
  291. package/build/runtime-scroll-4TIXCG7C.js.gz +0 -0
  292. package/build/runtime-shapeBlends-4HPDCYMY.js +0 -1
  293. package/build/runtime-shapeBlends-4HPDCYMY.js.br +0 -0
  294. package/build/runtime-shapeBlends-4HPDCYMY.js.gz +0 -0
  295. package/build/runtime-text-3GGOC64X.js.br +0 -0
  296. package/build/runtime-text-3GGOC64X.js.gz +0 -0
  297. package/build/runtime-textInputs-LKHFZZIA.js.br +0 -0
  298. package/build/runtime-textInputs-LKHFZZIA.js.gz +0 -0
  299. package/build/runtime-timeline-SICDYTVP.js.br +0 -0
  300. package/build/runtime-timeline-SICDYTVP.js.gz +0 -0
  301. package/build/runtime-tracking-AZFZEWAF.js.br +0 -0
  302. package/build/runtime-tracking-AZFZEWAF.js.gz +0 -0
  303. package/build/runtime-transitions-S6E7WME3.js.br +0 -0
  304. package/build/runtime-transitions-S6E7WME3.js.gz +0 -0
  305. package/build/runtime-ui2d-IU6BMLCA.js.br +0 -0
  306. package/build/runtime-ui2d-IU6BMLCA.js.gz +0 -0
  307. package/build/runtime-vectorShapes-ZGLU5TLJ.js.br +0 -0
  308. package/build/runtime-vectorShapes-ZGLU5TLJ.js.gz +0 -0
  309. package/build/runtime-vignette-HK6KS66E.js.br +0 -0
  310. package/build/runtime-vignette-HK6KS66E.js.gz +0 -0
  311. package/build/runtime-webgpu-YDFMWVCK.js.br +0 -0
  312. package/build/runtime-webgpu-YDFMWVCK.js.gz +0 -0
@@ -1 +1 @@
1
- import{j as e}from"./runtime-chunk-OBB4M3GU.js";import{Gd as t,Hc as r,Qc as i,Ye as n,ed as a,ld as o}from"./runtime-chunk-KPOUV3HD.js";var s;(s||(s={})).is=e=>"objectHelper"in e;var l=(r,i)=>class extends(e(r)){constructor(){super(...arguments),this.objectHelper=new i(this),this.gizmos={}}get geometryHelper(){return i.geometryHelper}raycast(e,t){this.objectHelper.raycast(e,t)}showGizmos(){for(let e in this.gizmos){let t=this.gizmos[e];t instanceof n&&(t.visible=!0)}}updateEntityBoxSize(e,r){this.objectHelper.visible&&this.geometryHelper instanceof t?(e.setScalar(0),r.set(this.geometryHelper.parameters.width,this.geometryHelper.parameters.height,this.geometryHelper.parameters.height).multiplyScalar(.5)):super.updateEntityBoxSize(e,r)}hideGizmos(){for(let e in this.gizmos){let t=this.gizmos[e];t instanceof n&&(t.visible=!1)}}},c=e=>{var r;return(r=class extends e{}).geometryHelper=new t(30,30,30),r},p=new o,u=new a,m=new i,f=(e,t,i,n,a=!1,o=e)=>{let s=t,l=o.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),u.copy(s.boundingSphere),u.applyMatrix4(l),!1===i.ray.intersectsSphere(u)||(m.copy(l).invert(),p.copy(i.ray).applyMatrix4(m),null!==s.boundingBox&&!1===p.intersectsBox(s.boundingBox)))return;let c,f,h,d,g,y,x=s.index,b=s.attributes.position,w=s.drawRange;if(!1===a){for(g=Math.max(0,w.start),y=Math.min(x.count,w.start+w.count);g<y;g+=3)if(f=x.getX(g),h=x.getX(g+1),d=x.getX(g+2),c=B(e,i,p,b,f,h,d),c)return c.faceIndex=Math.floor(g/3),void n.push(c)}else{let t=s.attributes.position,a=new r,l=new r,c=new r,u=new r,m=2,f=1/((o.scale.x+o.scale.y+o.scale.z)/3),h=f*f;for(let r=Math.max(0,w.start),s=Math.min(t.count,w.start+w.count)-1;r<s;r+=m){if(a.fromBufferAttribute(t,r),l.fromBufferAttribute(t,r+1),p.distanceSqToSegment(a,l,u,c)>h)continue;u.applyMatrix4(o.matrixWorld);let s=i.ray.origin.distanceTo(u);s<i.near||s>i.far||n.push({distance:s,point:c.clone().applyMatrix4(o.matrixWorld),object:e})}}function B(e,t,i,n,a,o,s){let l=new r,c=new r,p=new r,u=new r,m=new r;if(l.fromBufferAttribute(n,a),c.fromBufferAttribute(n,o),p.fromBufferAttribute(n,s),null===i.intersectTriangle(l,c,p,!1,u))return null;m.copy(u),m.applyMatrix4(e.matrixWorld);let f=t.ray.origin.distanceTo(m);return f<t.near||f>t.far?null:{faceIndex:1,distance:f,point:m.clone(),object:e}}};export{c as a,f as b,s as c,l as d};
1
+ import{j as e}from"./runtime-chunk-RZTJOEEJ.js";import{Gd as t,Hc as r,Qc as i,Ye as n,ed as a,ld as o}from"./runtime-chunk-KPOUV3HD.js";var s;(s||(s={})).is=e=>"objectHelper"in e;var l=(r,i)=>class extends(e(r)){constructor(){super(...arguments),this.objectHelper=new i(this),this.gizmos={}}get geometryHelper(){return i.geometryHelper}raycast(e,t){this.objectHelper.raycast(e,t)}showGizmos(){for(let e in this.gizmos){let t=this.gizmos[e];t instanceof n&&(t.visible=!0)}}updateEntityBoxSize(e,r){this.objectHelper.visible&&this.geometryHelper instanceof t?(e.setScalar(0),r.set(this.geometryHelper.parameters.width,this.geometryHelper.parameters.height,this.geometryHelper.parameters.height).multiplyScalar(.5)):super.updateEntityBoxSize(e,r)}hideGizmos(){for(let e in this.gizmos){let t=this.gizmos[e];t instanceof n&&(t.visible=!1)}}},c=e=>{var r;return(r=class extends e{}).geometryHelper=new t(30,30,30),r},p=new o,u=new a,m=new i,f=(e,t,i,n,a=!1,o=e)=>{let s=t,l=o.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),u.copy(s.boundingSphere),u.applyMatrix4(l),!1===i.ray.intersectsSphere(u)||(m.copy(l).invert(),p.copy(i.ray).applyMatrix4(m),null!==s.boundingBox&&!1===p.intersectsBox(s.boundingBox)))return;let c,f,h,d,g,y,x=s.index,b=s.attributes.position,w=s.drawRange;if(!1===a){for(g=Math.max(0,w.start),y=Math.min(x.count,w.start+w.count);g<y;g+=3)if(f=x.getX(g),h=x.getX(g+1),d=x.getX(g+2),c=H(e,i,p,b,f,h,d),c)return c.faceIndex=Math.floor(g/3),void n.push(c)}else{let t=s.attributes.position,a=new r,l=new r,c=new r,u=new r,m=2,f=1/((o.scale.x+o.scale.y+o.scale.z)/3),h=f*f;for(let r=Math.max(0,w.start),s=Math.min(t.count,w.start+w.count)-1;r<s;r+=m){if(a.fromBufferAttribute(t,r),l.fromBufferAttribute(t,r+1),p.distanceSqToSegment(a,l,u,c)>h)continue;u.applyMatrix4(o.matrixWorld);let s=i.ray.origin.distanceTo(u);s<i.near||s>i.far||n.push({distance:s,point:c.clone().applyMatrix4(o.matrixWorld),object:e})}}function H(e,t,i,n,a,o,s){let l=new r,c=new r,p=new r,u=new r,m=new r;if(l.fromBufferAttribute(n,a),c.fromBufferAttribute(n,o),p.fromBufferAttribute(n,s),null===i.intersectTriangle(l,c,p,!1,u))return null;m.copy(u),m.applyMatrix4(e.matrixWorld);let f=t.ray.origin.distanceTo(m);return f<t.near||f>t.far?null:{faceIndex:1,distance:f,point:m.clone(),object:e}}};export{c as a,f as b,s as c,l as d};
@@ -1 +1 @@
1
- import{a as e,b as t}from"./runtime-chunk-7MEZ2KDU.js";import{a as r,b as i,c as s,d as o}from"./runtime-chunk-YDR7MZGF.js";import{ia as a}from"./runtime-chunk-AORANPJP.js";import{h as n,o as h,p,q as c,r as m,s as d,t as l,v as u}from"./runtime-chunk-OBB4M3GU.js";import{f}from"./runtime-chunk-RTLL6WIB.js";import{i as g}from"./runtime-chunk-2PT2WH66.js";import{K as y,za as v}from"./runtime-chunk-NY4SLVL4.js";import{Ce as C,Gc as b,Hc as T,Qc as j,Tc as w,Vc as M,dd as P,fd as x,wd as O,we as A,yd as _,ye as S,ze as F}from"./runtime-chunk-KPOUV3HD.js";var D=new T,W=new S,U=class extends _{constructor(e){let t=new x,r=new O({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],s=[],o={},a=new M(15711266),n=new M(15711266),h=new M(2857471);function p(e,t,r){c(e,r),c(t,r)}function c(e,t){i.push(0,0,0),s.push(t.r,t.g,t.b),void 0===o[e]&&(o[e]=[]),o[e].push(i.length/3-1)}p("n1","n2",a),p("n2","n4",a),p("n4","n3",a),p("n3","n1",a),p("f1","f2",a),p("f2","f4",a),p("f4","f3",a),p("f3","f1",a),p("n1","f1",a),p("n2","f2",a),p("n3","f3",a),p("n4","f4",a),p("p","n1",n),p("p","n2",n),p("p","n3",n),p("p","n4",n),p("u1","u2",h),p("u2","u3",h),p("u3","u1",h),t.setAttribute("position",new P(i,3)),t.setAttribute("color",new P(s,3)),super(t,r),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){let e=this.geometry,t=this.pointMap;W.projectionMatrixInverse.elements=[.5112609807824982,-0,-0,-0,-0,.41421356237309503,-0,-0,-0,-0,-0,-.099999,-0,-0,-1.0000000000000002,.100001];let r=.8;V("n1",t,e,W,-1,-1,r),V("n2",t,e,W,1,-1,r),V("n3",t,e,W,-1,1,r),V("n4",t,e,W,1,1,r);let i=r;V("f1",t,e,W,-1,-1,i),V("f2",t,e,W,1,-1,i),V("f3",t,e,W,-1,1,i),V("f4",t,e,W,1,1,i);let s=i;V("u1",t,e,W,.35,1.1,s),V("u2",t,e,W,-.35,1.1,s),V("u3",t,e,W,0,1.55,s),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function V(e,t,r,i,s,o,a){D.set(s,o,a).unproject(i);let n=t[e];if(void 0!==n){let e=r.getAttribute("position");for(let t=0,r=n.length;t<r;t++)e.setXYZ(n[t],D.x,D.y,D.z)}}var z=class extends(r(U)){constructor(e){super(e),this.object=e,this.name=`CombinedCameraHelper: ${e.uuid}`}updateMatrixWorld(e){super.updateMatrixWorld(e),this.updateTarget()}updateTarget(){let e=this.object.getTarget();this.updateWorldMatrix(!0,!1),this.worldToLocal(e)}raycast(e,t){i(this.object,this.geometry,e,t,!0)}};function B(e){return 1-Math.pow(1-e,3)}var I=new T,R=new T,H=new b,k=new T,E=new T,L=new T,q=class extends(o(S,z)){constructor(e="",t={...v.defaultData,name:""}){super(),this._cameraType="OrthographicCamera",this.targetOffset=y.DefaultTargetOffset,this.isUpVectorFlipped=!1,this.angleOffsetFromUp=0,this.wasMovedByUser=!1,this.wasMovedBySwitchCameraAction=!1,this._createdAt=typeof performance<"u"?performance.now():0,this._tickProjectionTransition=()=>{let e=this._projectionTransition;if(void 0===e)return;if(this.disposed)return void this._endProjectionTransition();e.raf=requestAnimationFrame(this._tickProjectionTransition);let t=q.projectionTransitionRequestRender??e.requestRender;this.updateProjectionMatrix(),t?.()},this.super_Entity(e,t),this.previousProjectionMatrix=new j,this.matrixAutoUpdate=!0,this.width=window.innerWidth,this.height=window.innerHeight;let r=this.width,i=this.height;this.orthoCamera=new C(-.5*r,.5*r,.5*i,-.5*i,-5e4,1e4),this.perspCamera=new F(45,r/i,50,1e4),this.left=this.orthoCamera.left,this.right=this.orthoCamera.right,this.top=this.orthoCamera.top,this.bottom=this.orthoCamera.bottom,this.far=this.orthoCamera.far,this.view=this.orthoCamera.view,this.aspect=this.perspCamera.aspect,this.focus=this.perspCamera.focus,this.filmGauge=this.perspCamera.filmGauge,this.filmOffset=this.perspCamera.filmOffset,this.objectHelper.update()}static withoutProjectionTransition(e){let t=q.projectionTransitionsEnabled;q.projectionTransitionsEnabled=!1;try{return e()}finally{q.projectionTransitionsEnabled=t}}get isPerspectiveCamera(){return"PerspectiveCamera"===this.cameraType}get isOrthographicCamera(){return!this.isPerspectiveCamera}get cameraType(){return this._cameraType}set fov(e){this.perspCamera.fov=e}get fov(){return this.perspCamera.fov}setNear(e,t){"PerspectiveCamera"===e?this.perspCamera.near=t:this.orthoCamera.near=t}setZoom(e,t){t>=0&&("PerspectiveCamera"===e?this.perspCamera.zoom=t:this.orthoCamera.zoom=t)}set cameraType(e){"PerspectiveCamera"===e?this.toPerspective():"OrthographicCamera"===e&&this.toOrthographic()}get near(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.near:this.orthoCamera.near}set near(e){"PerspectiveCamera"===this._cameraType?this.perspCamera.near=e:this.orthoCamera.near=e}get zoom(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.zoom:this.orthoCamera.zoom}set zoom(e){e>=0&&("PerspectiveCamera"===this._cameraType?this.perspCamera.zoom=e:this.orthoCamera.zoom=e)}lookAt(e,t,r){"number"==typeof e&&(e=new T(e,t,r)),super.lookAt(e),this.getWorldPosition(I),this.targetOffset=I.distanceTo(e)}getTarget(e=new T){return this.getWorldDirection(R),this.getWorldPosition(I),R.multiplyScalar(this.targetOffset),e.copy(I).add(R),e}getDistanceToTarget(){let e=this.getTarget();return this.getWorldPosition(I),I.distanceTo(e)}updateUp(){this.getWorldQuaternion(H),k.set(0,0,1).applyQuaternion(H),E.copy(w.DEFAULT_UP),this.isUpVectorFlipped&&E.negate(),E.applyQuaternion(H),L.copy(w.DEFAULT_UP).projectOnPlane(k),this.angleOffsetFromUp=L.angleTo(E),this.angleOffsetFromUp*=L.cross(E).dot(k)>=0?1:-1}updateTransformState(e,t){let r=super.updateTransformState(e,t);return void 0!==e.isUpVectorFlipped&&(this.isUpVectorFlipped=e.isUpVectorFlipped),this.updateUp(),r}getViewFrontToObject(e){let t=e.getWorldPosition(new T),r=e.getWorldDirection(new T).multiplyScalar(this.targetOffset);return{position:t.clone().add(r),target:t}}getViewToTarget(e){let t=this.getWorldDirection(new T).multiplyScalar(this.targetOffset);return{position:e.clone().sub(t),target:e}}getViewToObject(e){let t=new T;return e.getWorldPosition(t),this.getViewToTarget(t)}setViewplaneSize(e,t,r=!1){if(this.aspect=e/t,r){let r=e>t?this.aspect:1,i=e>t?1:this.aspect;this.left=-395*r,this.right=395*r,this.top=1/i*395,this.bottom=1/i*-395}else this.left=.5*-e,this.right=.5*e,this.top=.5*t,this.bottom=.5*-t;this.updateProjectionMatrix()}copyViewPlaneSize(e){this.aspect=e.aspect,this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.updateProjectionMatrix()}toOrthographic(){this.orthoCamera.left=this.left,this.orthoCamera.right=this.right,this.orthoCamera.top=this.top,this.orthoCamera.bottom=this.bottom,this.orthoCamera.view=this.view,this.orthoCamera.far=this.far,this.orthoCamera.updateProjectionMatrix(),this.projectionMatrix=this.orthoCamera.projectionMatrix,this.projectionMatrixInverse=this.orthoCamera.projectionMatrixInverse,this._cameraType="OrthographicCamera",this._applyProjectionTransition(),this.objectHelper&&this.objectHelper.update()}toPerspective(){this.perspCamera.aspect=this.aspect,this.perspCamera.fov=this.fov,this.perspCamera.view=this.view,this.perspCamera.far=this.far,this.perspCamera.updateProjectionMatrix(),this.projectionMatrix=this.perspCamera.projectionMatrix,this.projectionMatrixInverse=this.perspCamera.projectionMatrixInverse,this._cameraType="PerspectiveCamera",this._applyProjectionTransition(),this.objectHelper&&this.objectHelper.update()}get isProjectionTransitioning(){return void 0!==this._projectionTransition}get projectionTransitionProgress(){let e=this._projectionTransition;if(void 0===e)return 1;let t=(performance.now()-e.start)/e.duration;return t>=1?1:t<=0?0:B(t)}get _activeSubCamera(){return"PerspectiveCamera"===this._cameraType?this.perspCamera:this.orthoCamera}_canAnimateProjection(){return q.projectionTransitionsEnabled&&"function"==typeof requestAnimationFrame&&typeof performance<"u"&&performance.now()-this._createdAt>=q.projectionTransitionMinAgeMs}_beginProjectionTransition(e){let t=this._projectionTransition;void 0===t&&(t={from:new j,blend:new j,blendInverse:new j,start:0,duration:q.projectionTransitionDuration,referenceDepth:1,raf:0,requestRender:e},this._projectionTransition=t),t.from.copy(this.projectionMatrix),t.start=performance.now(),t.duration=q.projectionTransitionDuration,t.referenceDepth=Number.isFinite(this.targetOffset)?Math.max(1,this.targetOffset):1,e&&(t.requestRender=e),0!==t.raf&&cancelAnimationFrame(t.raf),t.raf=requestAnimationFrame(this._tickProjectionTransition)}_applyProjectionTransition(){let e=this._projectionTransition;if(void 0===e)return;let t=(performance.now()-e.start)/e.duration;if(t>=1)return void this._endProjectionTransition();let r=B(t),i=e.from.elements,s=this._activeSubCamera.projectionMatrix.elements,o=e.blend.elements,a=e.referenceDepth,n=Math.max(1e-6,i[15]-i[11]*a),h=r*n/(r*n+(1-r)*Math.max(1e-6,s[15]-s[11]*a));for(let e=0;e<16;e++)o[e]=i[e]+(s[e]-i[e])*h;e.blendInverse.copy(e.blend).invert(),this.projectionMatrix=e.blend,this.projectionMatrixInverse=e.blendInverse}_endProjectionTransition(){let e=this._projectionTransition;if(void 0===e)return;0!==e.raf&&cancelAnimationFrame(e.raf),this._projectionTransition=void 0;let t=this._activeSubCamera;this.projectionMatrix=t.projectionMatrix,this.projectionMatrixInverse=t.projectionMatrixInverse}_syncProjectionTransition(e){let t=e._projectionTransition;if(void 0===t)return void(void 0!==this._projectionTransition&&this._endProjectionTransition());let r=this._projectionTransition;void 0===r?(r={from:new j,blend:new j,blendInverse:new j,start:0,duration:1,referenceDepth:1,raf:0,requestRender:void 0},this._projectionTransition=r):0!==r.raf&&(cancelAnimationFrame(r.raf),r.raf=0),r.requestRender=void 0,r.from.copy(t.from),r.start=t.start,r.duration=t.duration,r.referenceDepth=t.referenceDepth,this._applyProjectionTransition()}setFocalLength(e){this.perspCamera.setFocalLength(e),this.toPerspective()}getFocalLength(){return this.perspCamera.getFocalLength()}getEffectiveFOV(){return this.perspCamera.getEffectiveFOV()}getFilmWidth(){return this.perspCamera.getFilmWidth()}getFilmHeight(){return this.perspCamera.getFilmHeight()}setViewOffset(e,t,r,i,s,o){"PerspectiveCamera"===this._cameraType?this.perspCamera.setViewOffset(e,t,r,i,s,o):this.orthoCamera.setViewOffset(e,t,r,i,s,o),this._applyProjectionTransition()}clearViewOffset(){"PerspectiveCamera"===this._cameraType?(this.perspCamera.clearViewOffset(),this.toPerspective()):(this.orthoCamera.clearViewOffset(),this.toOrthographic())}copyHistory(){this.previousProjectionMatrix&&this.previousProjectionMatrix.copy(this.projectionMatrix)}updateProjectionMatrix(){"PerspectiveCamera"===this._cameraType?this.toPerspective():"OrthographicCamera"===this._cameraType&&this.toOrthographic()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}copy(e,t){return super.copy(e,t),this.parent=e.parent,this.orthoCamera.copy(e.orthoCamera),this.perspCamera.copy(e.perspCamera),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.far=e.far,this.view=null===e.view?null:Object.assign({},e.view),this._cameraType=e._cameraType,this.aspect=e.aspect,this.fov=e.fov,this.focus=e.focus,this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this.targetOffset=y.sanitizeTargetOffset(e.targetOffset),this.updateProjectionMatrix(),this._syncProjectionTransition(e),this}toCameraState(e=[]){let t={type:this.cameraType,far:this.far,orthographic:{near:this.orthoCamera.near,zoom:this.orthoCamera.zoom},perspective:{near:this.perspCamera.near,fov:this.perspCamera.fov,zoom:this.perspCamera.zoom},up:this.up.toArray(),targetOffset:this.targetOffset,isUpVectorFlipped:this.isUpVectorFlipped};return f(t,e)}updateCameraSubtype(e,t){let r="perspective"===e?"PerspectiveCamera":"OrthographicCamera";void 0!==t.zoom&&this.setZoom(r,t.zoom),void 0!==t.near&&this.setNear(r,t.near),void 0!==t.fov&&"PerspectiveCamera"===r&&(this.fov=t.fov)}updateState(e,t){this.updateCameraState(e,t)}updateCameraState(e,t){this.updateState_Entity(e,t),void 0!==e.far&&(this.far=e.far),void 0!==e.orthographic&&this.updateCameraSubtype("orthographic",e.orthographic),void 0!==e.perspective&&this.updateCameraSubtype("perspective",e.perspective),void 0!==e.type&&(e.type!==this._cameraType&&this._canAnimateProjection()&&this._beginProjectionTransition(t?.shared.requestRender),this.cameraType=e.type),void 0!==e.up&&this.up.fromArray(e.up.map(e=>"number"==typeof e?e:0)),void 0!==e.targetOffset&&(this.targetOffset=y.sanitizeTargetOffset(e.targetOffset)),void 0!==e.isUpVectorFlipped&&(this.isUpVectorFlipped=e.isUpVectorFlipped),this.updateProjectionMatrix()}updateByPatchedOp(e,t,r){super.updateByPatchedOp(e,t,r),1===e.path.length&&0===e.type&&this.updateCameraSubtype(e.path[0],e.props)}toState(e){return{...super.toState(e),...this.toCameraState(e),type:this.cameraType}}},G=q;G.projectionTransitionsEnabled=!1,G.projectionTransitionDuration=350,G.projectionTransitionMinAgeMs=1e3;var N=new j,Z=new j,Q=new j,K=new j,Y=new j;function J(e){let t=!1;return e.scene.objects.traverse((e,r)=>{"BooleanGeometry"===r.geometry?.type&&(t=!0)}),t}function X(e,t){let r=e.cloner;return void 0!==r&&r.parent===t?r:void 0}var $=new Float32Array(0);function ee(e,t,r,i){let s=16*(t.children.length+1);$.length<s&&($=new Float32Array(s));let o=0,a=e=>{e.toArray($,16*o),o++},n=!0!==t.parameters.hideBase;n&&a(i),Q.copy(e.matrix);for(let e of t.children)!g(e)||!1===e.playModeVisible||(K.copy(e.matrix).multiply(e.pivotMatrix),Y.multiplyMatrices(Q,K),(!n||!Y.equals(i))&&a(Y));try{return 0===o?0:l(r,$.subarray(0,16*o))}finally{d(r)}}var te,re=class extends a{constructor(e,t,r){super(e,t),this.data=t,this.meshSetAddresses=[],this.needsTransformForDownstream=!1,this.geometry=new x,this.onAfterRender=(e,t,r,i,s,o)=>{super.onAfterRender(e,t,r,i,s,o),this.recomputeBoolean()},this.geometry.userData.parameters={width:0,height:0,depth:0}}get booleanOp(){return this.data.geometry.operation}get phongAngle(){return this.data.geometry.phongAngle??45}get isLOD(){return this.recomputeBoolean(),!1}updateByPatchedOp(e,t,r){super.updateByPatchedOp(e,t,r),1===e.path.length&&"geometry"===e.path[0]&&0===e.type&&void 0!==e.props.operation&&(this.freeBooleanPointer(),this.resetBBoxNeedsUpdate())}freeBooleanPointer(){super.freeBooleanPointer(),this.geometry.dispose()}recomputeBoolean(r,i=!0){if(-1!==this.booleanMeshSetAddress&&!r)return;for(let e=0;e<this.children.length;e++){let t=this.children[e];t instanceof re&&!0===t.dataPatched.visible&&t.recomputeBoolean(!0===r,i)}this.meshSetAddresses=[];for(let e=0;e<this.children.length;e++){let t=this.children[e];if(t instanceof u&&!0===t.dataPatched.visible&&t.geometry.attributes.position?.count>0&&t.geometry.drawRange.count>0&&0!==t.booleanMeshSetAddress){N.copy(t.matrix).multiply(t.pivotMatrix);try{let e=X(t,this);if(-1===t.booleanMeshSetAddress){if((t.geometry.index??t.geometry.getAttribute("position")).count/3<15e5){let s=h(t.geometry,!0===r,i);t.booleanMeshSetAddress=void 0===e||-1===s?s:ee(t,e,s,N)}if(-1===t.booleanMeshSetAddress)return;void 0===e&&m(t.booleanMeshSetAddress,N),t.booleanMatrixInvOld.copy(N).invert(),t.booleanWasTransformed=!1}else t instanceof re&&!0===t.needsTransformForDownstream?(void 0===e?m(t.booleanMeshSetAddress,N):t.booleanMeshSetAddress=ee(t,e,t.booleanMeshSetAddress,N),t.needsTransformForDownstream=!1):!0===t.booleanWasTransformed&&(m(t.booleanMeshSetAddress,Z.multiplyMatrices(N,t.booleanMatrixInvOld)),t.booleanMatrixInvOld.copy(N).invert(),t.booleanWasTransformed=!1)}catch(e){console.error(e),t.booleanMeshSetAddress=0,t.geometry.userData.booleanOperationDidFail=!0;continue}if(0===t.booleanMeshSetAddress)continue;this.meshSetAddresses.push(t.booleanMeshSetAddress),t.geometry.userData.booleanOperationDidFail=!1}}if(0===this.meshSetAddresses.length){if(0!==this.geometry.getAttribute("position")?.array.length){let e=this.geometry;e.dispose(),this.geometry=new x,this.geometry.userData=e.userData,this.geometry.boundingSphere=e.boundingSphere,this.geometry.setAttribute("position",new P([],3))}return void this.geometry.setDrawRange(0,0)}if(!0===r)return c(this.meshSetAddresses,this.booleanOp);let s=this.geometry;s.dispose(),this.geometry=new x,this.geometry.userData=s.userData,this.geometry.boundingSphere=s.boundingSphere;try{this.booleanMeshSetAddress=p(this.meshSetAddresses,this.booleanOp,this.geometry,this.phongAngle)}catch(e){this.booleanMeshSetAddress=0,this.geometry.userData.booleanOperationDidFail=!0,console.error(e)}this.booleanMatrixInvOld.copy(this.matrix).invert(),this.needsTransformForDownstream=!0,e(this),t(this)}dispose(){super.dispose(),this.geometry.dispose()}};(te||(te={})).is=function(e){return n.is(e)&&e instanceof A};var ie=(e,t)=>class extends(o(e,t)){updateState_Light(e,t){if(this.updateState_Entity(e,t),void 0!==e.color&&(this.color=t.shared.color(e.color)),void 0!==e.intensity&&(this.intensity=e.intensity*Math.PI),void 0!==e.depth){let t=this.shadow;t.camera.far=e.depth,t.needsUpdate=!0}void 0!==e.shadows&&(this.castShadow=e.shadows)}},se=e=>e instanceof u,oe=e=>null!==e&&e instanceof re,ae=e=>s.is(e);export{G as a,J as b,re as c,te as d,ie as e,se as f,oe as g,ae as h};
1
+ import{a as e,b as t}from"./runtime-chunk-J73B5O64.js";import{a as r,b as i,c as s,d as o}from"./runtime-chunk-EZEGMMTB.js";import{ia as a}from"./runtime-chunk-ERDBNMCW.js";import{h as n,o as h,p,q as c,r as m,s as d,t as l,v as u}from"./runtime-chunk-RZTJOEEJ.js";import{f}from"./runtime-chunk-RTLL6WIB.js";import{i as g}from"./runtime-chunk-2PT2WH66.js";import{K as y,za as v}from"./runtime-chunk-NY4SLVL4.js";import{Ce as C,Gc as T,Hc as b,Qc as j,Tc as w,Vc as M,dd as P,fd as x,wd as O,we as A,yd as _,ye as S,ze as F}from"./runtime-chunk-KPOUV3HD.js";var D=new b,W=new S,V=class extends _{constructor(e){let t=new x,r=new O({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],s=[],o={},a=new M(15711266),n=new M(15711266),h=new M(2857471);function p(e,t,r){c(e,r),c(t,r)}function c(e,t){i.push(0,0,0),s.push(t.r,t.g,t.b),void 0===o[e]&&(o[e]=[]),o[e].push(i.length/3-1)}p("n1","n2",a),p("n2","n4",a),p("n4","n3",a),p("n3","n1",a),p("f1","f2",a),p("f2","f4",a),p("f4","f3",a),p("f3","f1",a),p("n1","f1",a),p("n2","f2",a),p("n3","f3",a),p("n4","f4",a),p("p","n1",n),p("p","n2",n),p("p","n3",n),p("p","n4",n),p("u1","u2",h),p("u2","u3",h),p("u3","u1",h),t.setAttribute("position",new P(i,3)),t.setAttribute("color",new P(s,3)),super(t,r),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){let e=this.geometry,t=this.pointMap;W.projectionMatrixInverse.elements=[.5112609807824982,-0,-0,-0,-0,.41421356237309503,-0,-0,-0,-0,-0,-.099999,-0,-0,-1.0000000000000002,.100001];let r=.8;U("n1",t,e,W,-1,-1,r),U("n2",t,e,W,1,-1,r),U("n3",t,e,W,-1,1,r),U("n4",t,e,W,1,1,r);let i=r;U("f1",t,e,W,-1,-1,i),U("f2",t,e,W,1,-1,i),U("f3",t,e,W,-1,1,i),U("f4",t,e,W,1,1,i);let s=i;U("u1",t,e,W,.35,1.1,s),U("u2",t,e,W,-.35,1.1,s),U("u3",t,e,W,0,1.55,s),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function U(e,t,r,i,s,o,a){D.set(s,o,a).unproject(i);let n=t[e];if(void 0!==n){let e=r.getAttribute("position");for(let t=0,r=n.length;t<r;t++)e.setXYZ(n[t],D.x,D.y,D.z)}}var z=class extends(r(V)){constructor(e){super(e),this.object=e,this.name=`CombinedCameraHelper: ${e.uuid}`}updateMatrixWorld(e){super.updateMatrixWorld(e),this.updateTarget()}updateTarget(){let e=this.object.getTarget();this.updateWorldMatrix(!0,!1),this.worldToLocal(e)}raycast(e,t){i(this.object,this.geometry,e,t,!0)}};function B(e){return 1-Math.pow(1-e,3)}var I=new b,E=new b,R=new T,H=new b,k=new b,L=new b,q=class extends(o(S,z)){constructor(e="",t={...v.defaultData,name:""}){super(),this._cameraType="OrthographicCamera",this.targetOffset=y.DefaultTargetOffset,this.isUpVectorFlipped=!1,this.angleOffsetFromUp=0,this.wasMovedByUser=!1,this.wasMovedBySwitchCameraAction=!1,this._createdAt=typeof performance<"u"?performance.now():0,this._tickProjectionTransition=()=>{let e=this._projectionTransition;if(void 0===e)return;if(this.disposed)return void this._endProjectionTransition();e.raf=requestAnimationFrame(this._tickProjectionTransition);let t=q.projectionTransitionRequestRender??e.requestRender;this.updateProjectionMatrix(),t?.()},this.super_Entity(e,t),this.previousProjectionMatrix=new j,this.matrixAutoUpdate=!0,this.width=window.innerWidth,this.height=window.innerHeight;let r=this.width,i=this.height;this.orthoCamera=new C(-.5*r,.5*r,.5*i,-.5*i,-5e4,1e4),this.perspCamera=new F(45,r/i,50,1e4),this.left=this.orthoCamera.left,this.right=this.orthoCamera.right,this.top=this.orthoCamera.top,this.bottom=this.orthoCamera.bottom,this.far=this.orthoCamera.far,this.view=this.orthoCamera.view,this.aspect=this.perspCamera.aspect,this.focus=this.perspCamera.focus,this.filmGauge=this.perspCamera.filmGauge,this.filmOffset=this.perspCamera.filmOffset,this.objectHelper.update()}static withoutProjectionTransition(e){let t=q.projectionTransitionsEnabled;q.projectionTransitionsEnabled=!1;try{return e()}finally{q.projectionTransitionsEnabled=t}}get isPerspectiveCamera(){return"PerspectiveCamera"===this.cameraType}get isOrthographicCamera(){return!this.isPerspectiveCamera}get cameraType(){return this._cameraType}set fov(e){this.perspCamera.fov=e}get fov(){return this.perspCamera.fov}setNear(e,t){"PerspectiveCamera"===e?this.perspCamera.near=t:this.orthoCamera.near=t}setZoom(e,t){t>=0&&("PerspectiveCamera"===e?this.perspCamera.zoom=t:this.orthoCamera.zoom=t)}set cameraType(e){"PerspectiveCamera"===e?this.toPerspective():"OrthographicCamera"===e&&this.toOrthographic()}get near(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.near:this.orthoCamera.near}set near(e){"PerspectiveCamera"===this._cameraType?this.perspCamera.near=e:this.orthoCamera.near=e}get zoom(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.zoom:this.orthoCamera.zoom}set zoom(e){e>=0&&("PerspectiveCamera"===this._cameraType?this.perspCamera.zoom=e:this.orthoCamera.zoom=e)}lookAt(e,t,r){"number"==typeof e&&(e=new b(e,t,r)),super.lookAt(e),this.getWorldPosition(I),this.targetOffset=I.distanceTo(e)}getTarget(e=new b){return this.getWorldDirection(E),this.getWorldPosition(I),E.multiplyScalar(this.targetOffset),e.copy(I).add(E),e}getDistanceToTarget(){let e=this.getTarget();return this.getWorldPosition(I),I.distanceTo(e)}updateUp(){this.getWorldQuaternion(R),H.set(0,0,1).applyQuaternion(R),k.copy(w.DEFAULT_UP),this.isUpVectorFlipped&&k.negate(),k.applyQuaternion(R),L.copy(w.DEFAULT_UP).projectOnPlane(H),this.angleOffsetFromUp=L.angleTo(k),this.angleOffsetFromUp*=L.cross(k).dot(H)>=0?1:-1}updateTransformState(e,t){let r=super.updateTransformState(e,t);return void 0!==e.isUpVectorFlipped&&(this.isUpVectorFlipped=e.isUpVectorFlipped),this.updateUp(),r}getViewFrontToObject(e){let t=e.getWorldPosition(new b),r=e.getWorldDirection(new b).multiplyScalar(this.targetOffset);return{position:t.clone().add(r),target:t}}getViewToTarget(e){let t=this.getWorldDirection(new b).multiplyScalar(this.targetOffset);return{position:e.clone().sub(t),target:e}}getViewToObject(e){let t=new b;return e.getWorldPosition(t),this.getViewToTarget(t)}setViewplaneSize(e,t,r=!1){if(this.aspect=e/t,r){let r=e>t?this.aspect:1,i=e>t?1:this.aspect;this.left=-395*r,this.right=395*r,this.top=1/i*395,this.bottom=1/i*-395}else this.left=.5*-e,this.right=.5*e,this.top=.5*t,this.bottom=.5*-t;this.updateProjectionMatrix()}copyViewPlaneSize(e){this.aspect=e.aspect,this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.updateProjectionMatrix()}toOrthographic(){this.orthoCamera.left=this.left,this.orthoCamera.right=this.right,this.orthoCamera.top=this.top,this.orthoCamera.bottom=this.bottom,this.orthoCamera.view=this.view,this.orthoCamera.far=this.far,this.orthoCamera.updateProjectionMatrix(),this.projectionMatrix=this.orthoCamera.projectionMatrix,this.projectionMatrixInverse=this.orthoCamera.projectionMatrixInverse,this._cameraType="OrthographicCamera",this._applyProjectionTransition(),this.objectHelper&&this.objectHelper.update()}toPerspective(){this.perspCamera.aspect=this.aspect,this.perspCamera.fov=this.fov,this.perspCamera.view=this.view,this.perspCamera.far=this.far,this.perspCamera.updateProjectionMatrix(),this.projectionMatrix=this.perspCamera.projectionMatrix,this.projectionMatrixInverse=this.perspCamera.projectionMatrixInverse,this._cameraType="PerspectiveCamera",this._applyProjectionTransition(),this.objectHelper&&this.objectHelper.update()}get isProjectionTransitioning(){return void 0!==this._projectionTransition}get projectionTransitionProgress(){let e=this._projectionTransition;if(void 0===e)return 1;let t=(performance.now()-e.start)/e.duration;return t>=1?1:t<=0?0:B(t)}get _activeSubCamera(){return"PerspectiveCamera"===this._cameraType?this.perspCamera:this.orthoCamera}_canAnimateProjection(){return q.projectionTransitionsEnabled&&"function"==typeof requestAnimationFrame&&typeof performance<"u"&&performance.now()-this._createdAt>=q.projectionTransitionMinAgeMs}_beginProjectionTransition(e){let t=this._projectionTransition;void 0===t&&(t={from:new j,blend:new j,blendInverse:new j,start:0,duration:q.projectionTransitionDuration,referenceDepth:1,raf:0,requestRender:e},this._projectionTransition=t),t.from.copy(this.projectionMatrix),t.start=performance.now(),t.duration=q.projectionTransitionDuration,t.referenceDepth=Number.isFinite(this.targetOffset)?Math.max(1,this.targetOffset):1,e&&(t.requestRender=e),0!==t.raf&&cancelAnimationFrame(t.raf),t.raf=requestAnimationFrame(this._tickProjectionTransition)}_applyProjectionTransition(){let e=this._projectionTransition;if(void 0===e)return;let t=(performance.now()-e.start)/e.duration;if(t>=1)return void this._endProjectionTransition();let r=B(t),i=e.from.elements,s=this._activeSubCamera.projectionMatrix.elements,o=e.blend.elements,a=e.referenceDepth,n=Math.max(1e-6,i[15]-i[11]*a),h=r*n/(r*n+(1-r)*Math.max(1e-6,s[15]-s[11]*a));for(let e=0;e<16;e++)o[e]=i[e]+(s[e]-i[e])*h;e.blendInverse.copy(e.blend).invert(),this.projectionMatrix=e.blend,this.projectionMatrixInverse=e.blendInverse}_endProjectionTransition(){let e=this._projectionTransition;if(void 0===e)return;0!==e.raf&&cancelAnimationFrame(e.raf),this._projectionTransition=void 0;let t=this._activeSubCamera;this.projectionMatrix=t.projectionMatrix,this.projectionMatrixInverse=t.projectionMatrixInverse}_syncProjectionTransition(e){let t=e._projectionTransition;if(void 0===t)return void(void 0!==this._projectionTransition&&this._endProjectionTransition());let r=this._projectionTransition;void 0===r?(r={from:new j,blend:new j,blendInverse:new j,start:0,duration:1,referenceDepth:1,raf:0,requestRender:void 0},this._projectionTransition=r):0!==r.raf&&(cancelAnimationFrame(r.raf),r.raf=0),r.requestRender=void 0,r.from.copy(t.from),r.start=t.start,r.duration=t.duration,r.referenceDepth=t.referenceDepth,this._applyProjectionTransition()}setFocalLength(e){this.perspCamera.setFocalLength(e),this.toPerspective()}getFocalLength(){return this.perspCamera.getFocalLength()}getEffectiveFOV(){return this.perspCamera.getEffectiveFOV()}getFilmWidth(){return this.perspCamera.getFilmWidth()}getFilmHeight(){return this.perspCamera.getFilmHeight()}setViewOffset(e,t,r,i,s,o){"PerspectiveCamera"===this._cameraType?this.perspCamera.setViewOffset(e,t,r,i,s,o):this.orthoCamera.setViewOffset(e,t,r,i,s,o),this._applyProjectionTransition()}clearViewOffset(){"PerspectiveCamera"===this._cameraType?(this.perspCamera.clearViewOffset(),this.toPerspective()):(this.orthoCamera.clearViewOffset(),this.toOrthographic())}copyHistory(){this.previousProjectionMatrix&&this.previousProjectionMatrix.copy(this.projectionMatrix)}updateProjectionMatrix(){"PerspectiveCamera"===this._cameraType?this.toPerspective():"OrthographicCamera"===this._cameraType&&this.toOrthographic()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}copy(e,t){return super.copy(e,t),this.parent=e.parent,this.orthoCamera.copy(e.orthoCamera),this.perspCamera.copy(e.perspCamera),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.far=e.far,this.view=null===e.view?null:Object.assign({},e.view),this._cameraType=e._cameraType,this.aspect=e.aspect,this.fov=e.fov,this.focus=e.focus,this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this.targetOffset=y.sanitizeTargetOffset(e.targetOffset),this.updateProjectionMatrix(),this._syncProjectionTransition(e),this}toCameraState(e=[]){let t={type:this.cameraType,far:this.far,orthographic:{near:this.orthoCamera.near,zoom:this.orthoCamera.zoom},perspective:{near:this.perspCamera.near,fov:this.perspCamera.fov,zoom:this.perspCamera.zoom},up:this.up.toArray(),targetOffset:this.targetOffset,isUpVectorFlipped:this.isUpVectorFlipped};return f(t,e)}updateCameraSubtype(e,t){let r="perspective"===e?"PerspectiveCamera":"OrthographicCamera";void 0!==t.zoom&&this.setZoom(r,t.zoom),void 0!==t.near&&this.setNear(r,t.near),void 0!==t.fov&&"PerspectiveCamera"===r&&(this.fov=t.fov)}updateState(e,t){this.updateCameraState(e,t)}updateCameraState(e,t){this.updateState_Entity(e,t),void 0!==e.far&&(this.far=e.far),void 0!==e.orthographic&&this.updateCameraSubtype("orthographic",e.orthographic),void 0!==e.perspective&&this.updateCameraSubtype("perspective",e.perspective),void 0!==e.type&&(e.type!==this._cameraType&&this._canAnimateProjection()&&this._beginProjectionTransition(t?.shared.requestRender),this.cameraType=e.type),void 0!==e.up&&this.up.fromArray(e.up.map(e=>"number"==typeof e?e:0)),void 0!==e.targetOffset&&(this.targetOffset=y.sanitizeTargetOffset(e.targetOffset)),void 0!==e.isUpVectorFlipped&&(this.isUpVectorFlipped=e.isUpVectorFlipped),this.updateProjectionMatrix()}updateByPatchedOp(e,t,r){super.updateByPatchedOp(e,t,r),1===e.path.length&&0===e.type&&this.updateCameraSubtype(e.path[0],e.props)}toState(e){return{...super.toState(e),...this.toCameraState(e),type:this.cameraType}}},G=q;G.projectionTransitionsEnabled=!1,G.projectionTransitionDuration=350,G.projectionTransitionMinAgeMs=1e3;var N=new j,Z=new j,Q=new j,J=new j,K=new j;function Y(e){let t=!1;return e.scene.objects.traverse((e,r)=>{"BooleanGeometry"===r.geometry?.type&&(t=!0)}),t}function X(e,t){let r=e.cloner;return void 0!==r&&r.parent===t?r:void 0}var $=new Float32Array(0);function ee(e,t,r,i){let s=16*(t.children.length+1);$.length<s&&($=new Float32Array(s));let o=0,a=e=>{e.toArray($,16*o),o++},n=!0!==t.parameters.hideBase;n&&a(i),Q.copy(e.matrix);for(let e of t.children)!g(e)||!1===e.playModeVisible||(J.copy(e.matrix).multiply(e.pivotMatrix),K.multiplyMatrices(Q,J),(!n||!K.equals(i))&&a(K));try{return 0===o?0:l(r,$.subarray(0,16*o))}finally{d(r)}}var te,re=class extends a{constructor(e,t,r){super(e,t),this.data=t,this.meshSetAddresses=[],this.needsTransformForDownstream=!1,this.geometry=new x,this.onAfterRender=(e,t,r,i,s,o)=>{super.onAfterRender(e,t,r,i,s,o),this.recomputeBoolean()},this.geometry.userData.parameters={width:0,height:0,depth:0}}get booleanOp(){return this.data.geometry.operation}get phongAngle(){return this.data.geometry.phongAngle??45}get isLOD(){return this.recomputeBoolean(),!1}updateByPatchedOp(e,t,r){super.updateByPatchedOp(e,t,r),1===e.path.length&&"geometry"===e.path[0]&&0===e.type&&void 0!==e.props.operation&&(this.freeBooleanPointer(),this.resetBBoxNeedsUpdate())}freeBooleanPointer(){super.freeBooleanPointer(),this.geometry.dispose()}recomputeBoolean(r,i=!0){if(-1!==this.booleanMeshSetAddress&&!r)return;for(let e=0;e<this.children.length;e++){let t=this.children[e];t instanceof re&&!0===t.dataPatched.visible&&t.recomputeBoolean(!0===r,i)}this.meshSetAddresses=[];for(let e=0;e<this.children.length;e++){let t=this.children[e];if(t instanceof u&&!0===t.dataPatched.visible&&t.geometry.attributes.position?.count>0&&t.geometry.drawRange.count>0&&0!==t.booleanMeshSetAddress){N.copy(t.matrix).multiply(t.pivotMatrix);try{let e=X(t,this);if(-1===t.booleanMeshSetAddress){if((t.geometry.index??t.geometry.getAttribute("position")).count/3<15e5){let s=h(t.geometry,!0===r,i);t.booleanMeshSetAddress=void 0===e||-1===s?s:ee(t,e,s,N)}if(-1===t.booleanMeshSetAddress)return;void 0===e&&m(t.booleanMeshSetAddress,N),t.booleanMatrixInvOld.copy(N).invert(),t.booleanWasTransformed=!1}else t instanceof re&&!0===t.needsTransformForDownstream?(void 0===e?m(t.booleanMeshSetAddress,N):t.booleanMeshSetAddress=ee(t,e,t.booleanMeshSetAddress,N),t.needsTransformForDownstream=!1):!0===t.booleanWasTransformed&&(m(t.booleanMeshSetAddress,Z.multiplyMatrices(N,t.booleanMatrixInvOld)),t.booleanMatrixInvOld.copy(N).invert(),t.booleanWasTransformed=!1)}catch(e){console.error(e),t.booleanMeshSetAddress=0,t.geometry.userData.booleanOperationDidFail=!0;continue}if(0===t.booleanMeshSetAddress)continue;this.meshSetAddresses.push(t.booleanMeshSetAddress),t.geometry.userData.booleanOperationDidFail=!1}}if(0===this.meshSetAddresses.length){if(0!==this.geometry.getAttribute("position")?.array.length){let e=this.geometry;e.dispose(),this.geometry=new x,this.geometry.userData=e.userData,this.geometry.boundingSphere=e.boundingSphere,this.geometry.setAttribute("position",new P([],3))}return void this.geometry.setDrawRange(0,0)}if(!0===r)return c(this.meshSetAddresses,this.booleanOp);let s=this.geometry;s.dispose(),this.geometry=new x,this.geometry.userData=s.userData,this.geometry.boundingSphere=s.boundingSphere;try{this.booleanMeshSetAddress=p(this.meshSetAddresses,this.booleanOp,this.geometry,this.phongAngle)}catch(e){this.booleanMeshSetAddress=0,this.geometry.userData.booleanOperationDidFail=!0,console.error(e)}this.booleanMatrixInvOld.copy(this.matrix).invert(),this.needsTransformForDownstream=!0,e(this),t(this)}dispose(){super.dispose(),this.geometry.dispose()}};(te||(te={})).is=function(e){return n.is(e)&&e instanceof A};var ie=(e,t)=>class extends(o(e,t)){updateState_Light(e,t){if(this.updateState_Entity(e,t),void 0!==e.color&&(this.color=t.shared.color(e.color)),void 0!==e.intensity&&(this.intensity=e.intensity*Math.PI),void 0!==e.depth){let t=this.shadow;t.camera.far=e.depth,t.needsUpdate=!0}void 0!==e.shadows&&(this.castShadow=e.shadows)}},se=e=>e instanceof u,oe=e=>null!==e&&e instanceof re,ae=e=>s.is(e);export{G as a,Y as b,re as c,te as d,ie as e,se as f,oe as g,ae as h};
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-B3ARQO3Z.js";import{b as e}from"./runtime-chunk-6GYTYA7C.js";import{H as r,ea as i}from"./runtime-chunk-AORANPJP.js";import{f as n,v as s}from"./runtime-chunk-OBB4M3GU.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-NY4SLVL4.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 g}from"./runtime-chunk-ML3Z74BL.js";var x=g(b((t,e)=>{var r,i;r=t,i=function(){return t.importState=function(e){var r=new t;return r.importState(e),r},t;function t(){return function(t){var e=0,r=0,i=0,n=1;0==t.length&&(t=[+new Date]);var s=function(){var t=4022871197,e=function(e){e=e.toString();for(var r=0;r<e.length;r++){var i=.02519603282416938*(t+=e.charCodeAt(r));i-=t=i>>>0,t=(i*=t)>>>0,t+=4294967296*(i-=t)}return 2.3283064365386963e-10*(t>>>0)};return e.version="Mash 0.9",e}();e=s(" "),r=s(" "),i=s(" ");for(var o=0;o<t.length;o++)(e-=s(t[o]))<0&&(e+=1),(r-=s(t[o]))<0&&(r+=1),(i-=s(t[o]))<0&&(i+=1);s=null;var a=function(){var t=2091639*e+2.3283064365386963e-10*n;return e=r,r=i,i=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,r,i,n]},a.importState=function(t){e=+t[0]||0,r=+t[1]||0,i=+t[2]||0,n=+t[3]||0},a}(Array.prototype.slice.call(arguments))}},"object"==typeof t?e.exports=i():"function"==typeof define&&define.amd?define(i):r.Alea=i()})()),v=.5*(Math.sqrt(3)-1),M=(3-Math.sqrt(3))/6,w=1/3,A=1/6,j=(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 r=0;r<255;r++){let i=r+~~(t()*(256-r)),n=e[r];e[r]=e[i],e[i]=n}for(let t=256;t<512;t++)e[t]=e[t-256];return e}var z=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 r=0;r<t.count;r+=3){let i=1;z.a.fromBufferAttribute(t,r),z.b.fromBufferAttribute(t,r+1),z.c.fromBufferAttribute(t,r+2),i*=z.getArea(),e[r/3]=i}this.distribution=new Float32Array(t.count/3);let r=0;for(let t=0;t<e.length;t++)r+=e[t],this.distribution[t]=r;return this}setRandomGenerator(t){return this.randomFunction=t,this}sample(t,e){if(this.distribution){let r=this.distribution[this.distribution.length-1],i=this.binarySearch(this.randomFunction()*r);return this.sampleFace(i,t,e)}}binarySearch(t){if(!this.distribution)return 0;let e=this.distribution,r=0,i=e.length-1,n=-1;for(;r<=i;){let s=Math.ceil((r+i)/2);if(0===s||e[s-1]<=t&&e[s]>t){n=s;break}t<e[s]?i=s-1:r=s+1}return n}sampleFace(t,e,r){let i=this.randomFunction(),n=this.randomFunction();return i+n>1&&(i=1-i,n=1-n),z.a.fromBufferAttribute(this.positionAttribute,3*t),z.b.fromBufferAttribute(this.positionAttribute,3*t+1),z.c.fromBufferAttribute(this.positionAttribute,3*t+2),e.set(0,0,0).addScaledVector(z.a,i).addScaledVector(z.b,n).addScaledVector(z.c,1-(i+n)),z.getNormal(r),this}},C={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)=>(r,i)=>e&&0!==r&&0!==t?t*i/100:0,P=(t,e)=>{let r=Math.abs(e),i=-1*r;return(t- -1)*(r-i)/2+i},T=new d,B=new d,R=new d,V=new d;function k(t,e){let r=R.fromArray(t),i=V.fromArray(e);B.copy(i).sub(r);let n=B.length();return B.normalize().multiplyScalar(.5*n),T.copy(r).add(B).toArray()}var U,I,D,L,q=new f,E=new d,G=new d,$=new d,H=class extends y{},Y=class extends H{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 r=this.parent;if(t&&null!==r&&r.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,r,i,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,r=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),r<0&&(r=-r);let i,n,s,o,a,l=Math.floor(t),h=Math.floor(e),c=Math.floor(r),d=t-l,u=e-h,p=r-c,m=0,f=.5;for(let t=0;t<4;t++){let t=l+(h<<4)+(c<<8);i=Q(d),n=Q(u),s=this.perlin[4095&t],s+=i*(this.perlin[t+1&4095]-s),o=this.perlin[t+16&4095],o+=i*(this.perlin[t+16+1&4095]-o),s+=n*(o-s),t+=256,o=this.perlin[4095&t],o+=i*(this.perlin[t+1&4095]-o),a=this.perlin[t+16&4095],a+=i*(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(r){e=t=(r??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,K=new d,X=new d;r.then(t=>{I=[(U=t).get_face_center,U.get_edge_midpoint,U.get_vertex_position],D=[U.get_face_normal,U.get_edge_normal,U.get_vertex_normal],L=[U.face_count,U.edge_count,U.vertex_count]}),new u;var tt=new u,et=new u,rt=new u,it=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,gt=new c;function xt(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,r)=>this.perlin.noise(t,e,r):t=>this.perlin.noise(t)):this.noise=e?function(t=Math.random){let e=_(t),r=new Float64Array(e).map(t=>F[t%12*3]),i=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,g=j(t+b),x=j(s+b),v=j(o+b),M=(g+x+v)*A,S=t-(g-M),F=s-(x-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 z=S-d+A,O=F-u+A,C=_-p+A,W=S-m+2*A,N=F-f+2*A,P=_-y+2*A,T=S-1+.5,B=F-1+.5,R=_-1+.5,V=255&g,k=255&x,U=255&v,I=.6-S*S-F*F-_*_;if(I<0)a=0;else{let t=V+e[k+e[U]];I*=I,a=I*I*(r[t]*S+i[t]*F+n[t]*_)}let D=.6-z*z-O*O-C*C;if(D<0)l=0;else{let t=V+d+e[k+u+e[U+p]];D*=D,l=D*D*(r[t]*z+i[t]*O+n[t]*C)}let L=.6-W*W-N*N-P*P;if(L<0)h=0;else{let t=V+m+e[k+f+e[U+y]];L*=L,h=L*L*(r[t]*W+i[t]*N+n[t]*P)}let q=.6-T*T-B*B-R*R;if(q<0)c=0;else{let t=V+1+e[k+1+e[U+1]];q*=q,c=q*q*(r[t]*T+i[t]*B+n[t]*R)}return 32*(a+l+h+c)}}((0,x.default)(t.seed)):function(t=Math.random){let e=_(t),r=new Float64Array(e).map(t=>S[t%12*2]),i=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=j(t+c),u=j(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,g=m-1+2*M,x=f-1+2*M,w=255&d,A=255&u,S=.5-m*m-f*f;if(S>=0){let t=w+e[A];S*=S,a=S*S*(r[t]*m+i[t]*f)}let F=.5-y*y-b*b;if(F>=0){let t=w+s+e[A+o];F*=F,l=F*F*(r[t]*y+i[t]*b)}let _=.5-g*g-x*x;if(_>=0){let t=w+1+e[A+1];_*=_,h=_*_*(r[t]*g+i[t]*x)}return 70*(a+l+h)}}((0,x.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()}_invalidateBoolean(){this.object instanceof s&&this.object.onClonerLayoutUpdated()}expandClones(t){if(null===this.parent)this.updateState(this.parameters,t);else{for(let t of this.children)t instanceof i&&t.expand();this._syncInstancedMesh()}}invalidateTransform(t){this.matrixWorldNeedsUpdate=!0}onObjUpdateMatrix(){"toObject"!==this.parameters.type&&(this.matrixWorldNeedsUpdate=!0)}update(t){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())}this._syncInstancedMesh(),this._invalidateBoolean()}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 Y(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 r of this.children)!1!==r.playModeVisible&&(et.copy(r.matrix).multiply(r.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 r;if(void 0!==e)r=e;else{let e=vt(this.parameters.grid.count,t);r="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 r=0;if(this.children.length!==r)if(this.children.length<r)for(let t=0,e=r-this.children.length;t<e;++t){let t=new i(this.object);t.expand(),this.add(t)}else for(;this.children.length>r;){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 r,i=t.radial,n=i.start*h.DEG2RAD,s=n-i.end*h.DEG2RAD,o=vt(i.rotation,e),a=new p(o[0],o[1],o[2]);switch(i.axis){case"z":r=new d(0,0,1);break;case"y":r=new d(0,1,0);break;default:r=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(i.scale,e),f=vt(i.position,e),y=vt(c.scale,e),b=vt(c.position,e),g=vt(c.rotation,e),x=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=x*t-n;switch(i.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(r).applyQuaternion(gt.setFromEuler(bt)).multiplyScalar(i.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,g[0])),p=v(l,P(o,g[1])),M=v(l,P(o,g[2]));!0===i.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 r=t.linear,i=vt(r.rotation,e),n=vt(r.scale,e),s=vt(r.position,e),o=new p(i[0]??0,i[1]??0,i[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 r=t*(a.freqScale/10)+a.movement,i=null===u?0:u.noise(r,r,r),l=t+1,p=m(l,P(i,h[0])),f=m(l,P(i,h[1])),y=m(l,P(i,h[2]));e.scale.x=1+(n[0]-1)*t+m(l,P(i,c[0]))||J,e.scale.y=1+(n[1]-1)*t+m(l,P(i,c[1]))||J,e.scale.z=1+(n[2]-1)*t+m(l,P(i,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(i,d[0])),e.position.y=s[1]*t+m(l,P(i,d[1])),e.position.z=s[2]*t+m(l,P(i,d[2]))}}_updateGrid(t,e){let r=0,i=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(i.count,e),p=vt(i.size,e);if(!0===i.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 i=0;i<u[1];i++)for(let l=0;l<u[2];l++){let d=this.children[r++];if(!d)continue;let u=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(i+1)*(n.freqScale/10)+n.movement,(l+1)*(n.freqScale/10)+n.movement);d.scale.x=1+c(r,P(u,s[0]))||J,d.scale.y=1+c(r,P(u,s[1]))||J,d.scale.z=1+c(r,P(u,s[2]))||J;let m=c(r,P(u,o[0])),f=c(r,P(u,o[1])),y=c(r,P(u,o[2]));d.rotation.set(m,f,y),d.position.x=p[0]*t-e.x+c(r,P(u,a[0])),d.position.y=p[1]*i-e.y+c(r,P(u,a[1])),d.position.z=p[2]*l-e.z+c(r,P(u,a[2]))}}else for(let t=0;t<u[0];t++)for(let e=0;e<u[1];e++)for(let i=0;i<u[2];i++){let l=this.children[r++];if(!l)continue;let d=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(e+1)*(n.freqScale/10)+n.movement,(i+1)*(n.freqScale/10)+n.movement);l.scale.x=1+c(r,P(d,s[0]))||J,l.scale.y=1+c(r,P(d,s[1]))||J,l.scale.z=1+c(r,P(d,s[2]))||J;let u=c(r,P(d,o[0])),m=c(r,P(d,o[1])),f=c(r,P(d,o[2]));l.rotation.set(u,m,f),l.position.x=p[0]*t+c(r,P(d,a[0])),l.position.y=-p[1]*e+c(r,P(d,a[1])),l.position.z=-p[2]*i+c(r,P(d,a[2]))}}_updateToObject(r,i){if("toObject"!==r.type)throw new Error;let{toObject:n}=r,s=vt(n.rotation,i),o=vt(n.position,i),a=vt(n.scale,i),h=new p(s[0],s[1],s[2]),c=r.randomnessObject??l.defaultData([1,1,1]).randomnessObject,d=vt(c.rotation,i),u=vt(c.position,i),m=vt(c.scale,i),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(i,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 g="random"===n.spreadType,v=null;g&&(v=this.getSurfaceSampler(),v.setRandomGenerator((0,x.default)(this.object.uuid+n.seed)));let M=C[n.axis],w=this.children;ot.fromArray(M);let A=this.objectForSample instanceof e;A&&rt.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 r=t*(c.freqScale/10)+c.movement,i=null===f?0:f.noise(r,r,r),s=t+1,l=y(s,P(i,d[0])),p=y(s,P(i,d[1])),x=y(s,P(i,d[2]));g?v.sample(lt,ht):(b.length&&(lt.fromArray(b[t].pos),ht.fromArray(b[t].norm)),A&&lt.applyMatrix4(rt)),e.position.copy(lt);let M="normal"===n.align?ht:dt,w=at.fromArray(o);at.x+=y(s,P(i,u[0])),at.y+=y(s,P(i,u[1])),at.z+=y(s,P(i,u[2]));let j=Math.acos(M.dot(ot)),S=ct.crossVectors(ot,M).normalize(),F=tt.makeRotationAxis(S,j);pt.copy(M).cross(this.object.up).normalize(),mt.copy(pt).cross(M).normalize(),it.makeBasis(pt,M,mt),st.multiplyMatrices(it,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+x),e.scale.set(1+a[0]+y(s,P(i,m[0]))||J,1+a[1]+y(s,P(i,m[1]))||J,1+a[2]+y(s,P(i,m[2]))||J),e.scale.multiply(this.object.scale)}}getSurfaceSampler(){let t=this.objectForSample,e=t.geometry,r=e.getAttribute("position"),i=e.index,n=this.surfaceSamplerCache;if(null!==n&&n.geometry===e&&n.position===r&&n.positionVersion===xt(r)&&n.index===i&&n.indexVersion===(null===i?-1:i.version))return n.sampler;let s=new O(t).build();return this.surfaceSamplerCache={geometry:e,position:r,positionVersion:xt(r),index:i,indexVersion:null===i?-1:i.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 r=this.objectForSample instanceof e,i=this.objectForSample.geometry;if(!r&&i){let e=this.surfacePointsCache,r=i.getAttribute("position");if(null!==e&&e.spreadType===t&&e.geometry===i&&e.position===r&&e.positionVersion===xt(r)&&e.index===i.index&&e.indexVersion===(null===i.index?-1:i.index.version))return e.points}let n=new Map,s=(t,e)=>{let r=Math.round(1e4*t[0])+"_"+Math.round(1e4*t[1])+"_"+Math.round(1e4*t[2]),i=n.get(r);i?(i.pos[0]+=t[0],i.pos[1]+=t[1],i.pos[2]+=t[2],i.norm[0]+=e[0],i.norm[1]+=e[1],i.norm[2]+=e[2],i.count+=1):n.set(r,{pos:[...t],norm:[...e],count:1})};if(r){let e=this.objectForSample,r=W[t],i=L[r],n=I[r],o=D[r],a=i(e.subdivPointerNew);for(let t=0;t<=a-1;t++){let r=n(e.subdivPointerNew,t),i=o(e.subdivPointerNew,t);K.fromArray(r).applyMatrix4(e.matrixWorld),X.fromArray(i),s(K.toArray(),X.toArray())}}else(i.index?function(t){let e=[],r=Math.floor(t.index.count/3);for(let i=0;i<r;i++)if(E.fromArray(t.index.array,3*i),q.setFromAttributeAndIndices(t.attributes.position,E.x,E.y,E.z),q.getNormal(G),q.getMidpoint($),!(isNaN($.x)||isNaN($.y)||isNaN($.z))){let{a:t,b:r,c:i}=q,n=t.toArray(),s=r.toArray(),o=i.toArray(),a=t.distanceTo(r),l=r.distanceTo(i),h=i.distanceTo(t),c=k(n,s),d=k(s,o),u=k(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($).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}(i):function(t){let e=[],{position:r}=t.attributes;for(let t=0;t<r.count;t++){q.setFromAttributeAndIndices(r,3*t,3*t+1,3*t+2),q.getNormal(G),q.getMidpoint($);let i=q.a.toArray(),n=q.b.toArray(),s=q.c.toArray();e.push({vertices:[i,n,s],faceCenters:[k(i,n),k(n,s),k(s,i)],midpoint:$.toArray(),norm:G.toArray()})}return e}(i)).forEach((e,r)=>{"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(!r&&i){let e=i.getAttribute("position");this.surfacePointsCache={spreadType:t,geometry:i,position:e,positionVersion:xt(e),index:i.index,indexVersion:null===i.index?-1:i.index.version,points:o}}return o}updateState(t,e){if(this.parameters=o(t),"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)}this.update(e)}get pendingMediaLoad(){return this._pendingMediaLoad}};export{wt as a};
1
+ import{a as t}from"./runtime-chunk-4DMKO7YJ.js";import{b as e}from"./runtime-chunk-L2PJDZH7.js";import{H as r,ea as i}from"./runtime-chunk-ERDBNMCW.js";import{f as n,v as s}from"./runtime-chunk-RZTJOEEJ.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-NY4SLVL4.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 g}from"./runtime-chunk-ML3Z74BL.js";var x=g(b((t,e)=>{var r,i;r=t,i=function(){return t.importState=function(e){var r=new t;return r.importState(e),r},t;function t(){return function(t){var e=0,r=0,i=0,n=1;0==t.length&&(t=[+new Date]);var s=function(){var t=4022871197,e=function(e){e=e.toString();for(var r=0;r<e.length;r++){var i=.02519603282416938*(t+=e.charCodeAt(r));i-=t=i>>>0,t=(i*=t)>>>0,t+=4294967296*(i-=t)}return 2.3283064365386963e-10*(t>>>0)};return e.version="Mash 0.9",e}();e=s(" "),r=s(" "),i=s(" ");for(var o=0;o<t.length;o++)(e-=s(t[o]))<0&&(e+=1),(r-=s(t[o]))<0&&(r+=1),(i-=s(t[o]))<0&&(i+=1);s=null;var a=function(){var t=2091639*e+2.3283064365386963e-10*n;return e=r,r=i,i=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,r,i,n]},a.importState=function(t){e=+t[0]||0,r=+t[1]||0,i=+t[2]||0,n=+t[3]||0},a}(Array.prototype.slice.call(arguments))}},"object"==typeof t?e.exports=i():"function"==typeof define&&define.amd?define(i):r.Alea=i()})()),v=.5*(Math.sqrt(3)-1),M=(3-Math.sqrt(3))/6,w=1/3,j=1/6,S=(Math.sqrt(5),Math.sqrt(5),t=>0|Math.floor(t)),A=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 r=0;r<255;r++){let i=r+~~(t()*(256-r)),n=e[r];e[r]=e[i],e[i]=n}for(let t=256;t<512;t++)e[t]=e[t-256];return e}var z=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 r=0;r<t.count;r+=3){let i=1;z.a.fromBufferAttribute(t,r),z.b.fromBufferAttribute(t,r+1),z.c.fromBufferAttribute(t,r+2),i*=z.getArea(),e[r/3]=i}this.distribution=new Float32Array(t.count/3);let r=0;for(let t=0;t<e.length;t++)r+=e[t],this.distribution[t]=r;return this}setRandomGenerator(t){return this.randomFunction=t,this}sample(t,e){if(this.distribution){let r=this.distribution[this.distribution.length-1],i=this.binarySearch(this.randomFunction()*r);return this.sampleFace(i,t,e)}}binarySearch(t){if(!this.distribution)return 0;let e=this.distribution,r=0,i=e.length-1,n=-1;for(;r<=i;){let s=Math.ceil((r+i)/2);if(0===s||e[s-1]<=t&&e[s]>t){n=s;break}t<e[s]?i=s-1:r=s+1}return n}sampleFace(t,e,r){let i=this.randomFunction(),n=this.randomFunction();return i+n>1&&(i=1-i,n=1-n),z.a.fromBufferAttribute(this.positionAttribute,3*t),z.b.fromBufferAttribute(this.positionAttribute,3*t+1),z.c.fromBufferAttribute(this.positionAttribute,3*t+2),e.set(0,0,0).addScaledVector(z.a,i).addScaledVector(z.b,n).addScaledVector(z.c,1-(i+n)),z.getNormal(r),this}},C={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)=>(r,i)=>e&&0!==r&&0!==t?t*i/100:0,P=(t,e)=>{let r=Math.abs(e),i=-1*r;return(t- -1)*(r-i)/2+i},T=new d,R=new d,V=new d,k=new d;function B(t,e){let r=V.fromArray(t),i=k.fromArray(e);R.copy(i).sub(r);let n=R.length();return R.normalize().multiplyScalar(.5*n),T.copy(r).add(R).toArray()}var D,I,U,E,L=new f,q=new d,G=new d,H=new d,$=class extends y{},J=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 r=this.parent;if(t&&null!==r&&r.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,r,i,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){}},Y=t=>.5*(1-Math.cos(t*Math.PI)),Z=class{constructor(){this.perlin=new Array(4096)}noise(t,e=0,r=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),r<0&&(r=-r);let i,n,s,o,a,l=Math.floor(t),h=Math.floor(e),c=Math.floor(r),d=t-l,u=e-h,p=r-c,m=0,f=.5;for(let t=0;t<4;t++){let t=l+(h<<4)+(c<<8);i=Y(d),n=Y(u),s=this.perlin[4095&t],s+=i*(this.perlin[t+1&4095]-s),o=this.perlin[t+16&4095],o+=i*(this.perlin[t+16+1&4095]-o),s+=n*(o-s),t+=256,o=this.perlin[4095&t],o+=i*(this.perlin[t+1&4095]-o),a=this.perlin[t+16&4095],a+=i*(this.perlin[t+16+1&4095]-a),o+=n*(a-o),s+=Y(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(r){e=t=(r??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()}},K=1e-4,Q=new d,X=new d;r.then(t=>{I=[(D=t).get_face_center,D.get_edge_midpoint,D.get_vertex_position],U=[D.get_face_normal,D.get_edge_normal,D.get_vertex_normal],E=[D.face_count,D.edge_count,D.vertex_count]}),new u;var tt=new u,et=new u,rt=new u,it=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,gt=new c;function xt(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,r)=>this.perlin.noise(t,e,r):t=>this.perlin.noise(t)):this.noise=e?function(t=Math.random){let e=_(t),r=new Float64Array(e).map(t=>F[t%12*3]),i=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,g=S(t+b),x=S(s+b),v=S(o+b),M=(g+x+v)*j,A=t-(g-M),F=s-(x-M),_=o-(v-M);A>=F?F>=_?(d=1,u=0,p=0,m=1,f=1,y=0):A>=_?(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):A<_?(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 z=A-d+j,O=F-u+j,C=_-p+j,W=A-m+2*j,N=F-f+2*j,P=_-y+2*j,T=A-1+.5,R=F-1+.5,V=_-1+.5,k=255&g,B=255&x,D=255&v,I=.6-A*A-F*F-_*_;if(I<0)a=0;else{let t=k+e[B+e[D]];I*=I,a=I*I*(r[t]*A+i[t]*F+n[t]*_)}let U=.6-z*z-O*O-C*C;if(U<0)l=0;else{let t=k+d+e[B+u+e[D+p]];U*=U,l=U*U*(r[t]*z+i[t]*O+n[t]*C)}let E=.6-W*W-N*N-P*P;if(E<0)h=0;else{let t=k+m+e[B+f+e[D+y]];E*=E,h=E*E*(r[t]*W+i[t]*N+n[t]*P)}let L=.6-T*T-R*R-V*V;if(L<0)c=0;else{let t=k+1+e[B+1+e[D+1]];L*=L,c=L*L*(r[t]*T+i[t]*R+n[t]*V)}return 32*(a+l+h+c)}}((0,x.default)(t.seed)):function(t=Math.random){let e=_(t),r=new Float64Array(e).map(t=>A[t%12*2]),i=new Float64Array(e).map(t=>A[t%12*2+1]);return function(t,n){let s,o,a=0,l=0,h=0,c=(t+n)*v,d=S(t+c),u=S(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,g=m-1+2*M,x=f-1+2*M,w=255&d,j=255&u,A=.5-m*m-f*f;if(A>=0){let t=w+e[j];A*=A,a=A*A*(r[t]*m+i[t]*f)}let F=.5-y*y-b*b;if(F>=0){let t=w+s+e[j+o];F*=F,l=F*F*(r[t]*y+i[t]*b)}let _=.5-g*g-x*x;if(_>=0){let t=w+1+e[j+1];_*=_,h=_*_*(r[t]*g+i[t]*x)}return 70*(a+l+h)}}((0,x.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()}_invalidateBoolean(){this.object instanceof s&&this.object.onClonerLayoutUpdated()}expandClones(t){if(null===this.parent)this.updateState(this.parameters,t);else{for(let t of this.children)t instanceof i&&t.expand();this._syncInstancedMesh()}}invalidateTransform(t){this.matrixWorldNeedsUpdate=!0}onObjUpdateMatrix(){"toObject"!==this.parameters.type&&(this.matrixWorldNeedsUpdate=!0)}update(t){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())}this._syncInstancedMesh(),this._invalidateBoolean()}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 J(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 r of this.children)!1!==r.playModeVisible&&(et.copy(r.matrix).multiply(r.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 r;if(void 0!==e)r=e;else{let e=vt(this.parameters.grid.count,t);r="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 r=0;if(this.children.length!==r)if(this.children.length<r)for(let t=0,e=r-this.children.length;t<e;++t){let t=new i(this.object);t.expand(),this.add(t)}else for(;this.children.length>r;){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 r,i=t.radial,n=i.start*h.DEG2RAD,s=n-i.end*h.DEG2RAD,o=vt(i.rotation,e),a=new p(o[0],o[1],o[2]);switch(i.axis){case"z":r=new d(0,0,1);break;case"y":r=new d(0,1,0);break;default:r=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(i.scale,e),f=vt(i.position,e),y=vt(c.scale,e),b=vt(c.position,e),g=vt(c.rotation,e),x=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]))||K,e.scale.y=m[1]+v(l,P(o,y[1]))||K,e.scale.z=m[2]+v(l,P(o,y[2]))||K;let h=x*t-n;switch(i.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(r).applyQuaternion(gt.setFromEuler(bt)).multiplyScalar(i.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,g[0])),p=v(l,P(o,g[1])),M=v(l,P(o,g[2]));!0===i.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 r=t.linear,i=vt(r.rotation,e),n=vt(r.scale,e),s=vt(r.position,e),o=new p(i[0]??0,i[1]??0,i[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 r=t*(a.freqScale/10)+a.movement,i=null===u?0:u.noise(r,r,r),l=t+1,p=m(l,P(i,h[0])),f=m(l,P(i,h[1])),y=m(l,P(i,h[2]));e.scale.x=1+(n[0]-1)*t+m(l,P(i,c[0]))||K,e.scale.y=1+(n[1]-1)*t+m(l,P(i,c[1]))||K,e.scale.z=1+(n[2]-1)*t+m(l,P(i,c[2]))||K,e.rotation.set(o.x*t+p,o.y*t+f,o.z*t+y),e.position.x=s[0]*t+m(l,P(i,d[0])),e.position.y=s[1]*t+m(l,P(i,d[1])),e.position.z=s[2]*t+m(l,P(i,d[2]))}}_updateGrid(t,e){let r=0,i=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(i.count,e),p=vt(i.size,e);if(!0===i.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 i=0;i<u[1];i++)for(let l=0;l<u[2];l++){let d=this.children[r++];if(!d)continue;let u=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(i+1)*(n.freqScale/10)+n.movement,(l+1)*(n.freqScale/10)+n.movement);d.scale.x=1+c(r,P(u,s[0]))||K,d.scale.y=1+c(r,P(u,s[1]))||K,d.scale.z=1+c(r,P(u,s[2]))||K;let m=c(r,P(u,o[0])),f=c(r,P(u,o[1])),y=c(r,P(u,o[2]));d.rotation.set(m,f,y),d.position.x=p[0]*t-e.x+c(r,P(u,a[0])),d.position.y=p[1]*i-e.y+c(r,P(u,a[1])),d.position.z=p[2]*l-e.z+c(r,P(u,a[2]))}}else for(let t=0;t<u[0];t++)for(let e=0;e<u[1];e++)for(let i=0;i<u[2];i++){let l=this.children[r++];if(!l)continue;let d=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(e+1)*(n.freqScale/10)+n.movement,(i+1)*(n.freqScale/10)+n.movement);l.scale.x=1+c(r,P(d,s[0]))||K,l.scale.y=1+c(r,P(d,s[1]))||K,l.scale.z=1+c(r,P(d,s[2]))||K;let u=c(r,P(d,o[0])),m=c(r,P(d,o[1])),f=c(r,P(d,o[2]));l.rotation.set(u,m,f),l.position.x=p[0]*t+c(r,P(d,a[0])),l.position.y=-p[1]*e+c(r,P(d,a[1])),l.position.z=-p[2]*i+c(r,P(d,a[2]))}}_updateToObject(r,i){if("toObject"!==r.type)throw new Error;let{toObject:n}=r,s=vt(n.rotation,i),o=vt(n.position,i),a=vt(n.scale,i),h=new p(s[0],s[1],s[2]),c=r.randomnessObject??l.defaultData([1,1,1]).randomnessObject,d=vt(c.rotation,i),u=vt(c.position,i),m=vt(c.scale,i),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(i,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 g="random"===n.spreadType,v=null;g&&(v=this.getSurfaceSampler(),v.setRandomGenerator((0,x.default)(this.object.uuid+n.seed)));let M=C[n.axis],w=this.children;ot.fromArray(M);let j=this.objectForSample instanceof e;j&&rt.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 r=t*(c.freqScale/10)+c.movement,i=null===f?0:f.noise(r,r,r),s=t+1,l=y(s,P(i,d[0])),p=y(s,P(i,d[1])),x=y(s,P(i,d[2]));g?v.sample(lt,ht):(b.length&&(lt.fromArray(b[t].pos),ht.fromArray(b[t].norm)),j&&lt.applyMatrix4(rt)),e.position.copy(lt);let M="normal"===n.align?ht:dt,w=at.fromArray(o);at.x+=y(s,P(i,u[0])),at.y+=y(s,P(i,u[1])),at.z+=y(s,P(i,u[2]));let S=Math.acos(M.dot(ot)),A=ct.crossVectors(ot,M).normalize(),F=tt.makeRotationAxis(A,S);pt.copy(M).cross(this.object.up).normalize(),mt.copy(pt).cross(M).normalize(),it.makeBasis(pt,M,mt),st.multiplyMatrices(it,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+x),e.scale.set(1+a[0]+y(s,P(i,m[0]))||K,1+a[1]+y(s,P(i,m[1]))||K,1+a[2]+y(s,P(i,m[2]))||K),e.scale.multiply(this.object.scale)}}getSurfaceSampler(){let t=this.objectForSample,e=t.geometry,r=e.getAttribute("position"),i=e.index,n=this.surfaceSamplerCache;if(null!==n&&n.geometry===e&&n.position===r&&n.positionVersion===xt(r)&&n.index===i&&n.indexVersion===(null===i?-1:i.version))return n.sampler;let s=new O(t).build();return this.surfaceSamplerCache={geometry:e,position:r,positionVersion:xt(r),index:i,indexVersion:null===i?-1:i.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 r=this.objectForSample instanceof e,i=this.objectForSample.geometry;if(!r&&i){let e=this.surfacePointsCache,r=i.getAttribute("position");if(null!==e&&e.spreadType===t&&e.geometry===i&&e.position===r&&e.positionVersion===xt(r)&&e.index===i.index&&e.indexVersion===(null===i.index?-1:i.index.version))return e.points}let n=new Map,s=(t,e)=>{let r=Math.round(1e4*t[0])+"_"+Math.round(1e4*t[1])+"_"+Math.round(1e4*t[2]),i=n.get(r);i?(i.pos[0]+=t[0],i.pos[1]+=t[1],i.pos[2]+=t[2],i.norm[0]+=e[0],i.norm[1]+=e[1],i.norm[2]+=e[2],i.count+=1):n.set(r,{pos:[...t],norm:[...e],count:1})};if(r){let e=this.objectForSample,r=W[t],i=E[r],n=I[r],o=U[r],a=i(e.subdivPointerNew);for(let t=0;t<=a-1;t++){let r=n(e.subdivPointerNew,t),i=o(e.subdivPointerNew,t);Q.fromArray(r).applyMatrix4(e.matrixWorld),X.fromArray(i),s(Q.toArray(),X.toArray())}}else(i.index?function(t){let e=[],r=Math.floor(t.index.count/3);for(let i=0;i<r;i++)if(q.fromArray(t.index.array,3*i),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:r,c:i}=L,n=t.toArray(),s=r.toArray(),o=i.toArray(),a=t.distanceTo(r),l=r.distanceTo(i),h=i.distanceTo(t),c=B(n,s),d=B(s,o),u=B(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}(i):function(t){let e=[],{position:r}=t.attributes;for(let t=0;t<r.count;t++){L.setFromAttributeAndIndices(r,3*t,3*t+1,3*t+2),L.getNormal(G),L.getMidpoint(H);let i=L.a.toArray(),n=L.b.toArray(),s=L.c.toArray();e.push({vertices:[i,n,s],faceCenters:[B(i,n),B(n,s),B(s,i)],midpoint:H.toArray(),norm:G.toArray()})}return e}(i)).forEach((e,r)=>{"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(!r&&i){let e=i.getAttribute("position");this.surfacePointsCache={spreadType:t,geometry:i,position:e,positionVersion:xt(e),index:i.index,indexVersion:null===i.index?-1:i.index.version,points:o}}return o}updateState(t,e){if(this.parameters=o(t),"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)}this.update(e)}get pendingMediaLoad(){return this._pendingMediaLoad}};export{wt as a};
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-VA6WKZXP.js";import{f as e}from"./runtime-chunk-YPL52E4O.js";import{c as i}from"./runtime-chunk-AORANPJP.js";import{i as r}from"./runtime-chunk-OBB4M3GU.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-OZQMQXCI.js";import{f as e}from"./runtime-chunk-G6TFLOKQ.js";import{c as i}from"./runtime-chunk-ERDBNMCW.js";import{i as r}from"./runtime-chunk-RZTJOEEJ.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{h as e,ja as t}from"./runtime-chunk-AORANPJP.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,ja as t}from"./runtime-chunk-ERDBNMCW.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 e,b as i}from"./runtime-chunk-7MEZ2KDU.js";import{J as t,K as s,ja as o}from"./runtime-chunk-AORANPJP.js";import{v as r}from"./runtime-chunk-OBB4M3GU.js";import{Hc as a,Zc as d,ed as h}from"./runtime-chunk-KPOUV3HD.js";var n=new d,u=new a;function l(e){let i=!1;return e.scene.objects.traverse((e,t)=>{"Mesh"===t.type&&"SubdivGeometry"===t.geometry.type&&(i=!0)}),i}var m=class extends o{constructor(e,i,t){super(e,i,t),this.data=i,this.smoothShading=!0,this.skipReactionUpdate=!1,this.shearCompensationIsActive=!1}chooseGeoemtryCache(e){return this.dataPatched.flatShading?e.geometryCache:e.geometryCache2}get subdivPointerNew(){return void 0!==this.localGeometry?this.subdivPointer:this.geometry.ensureSubdivPointer()}get originalGeometryNew(){return void 0!==this.localGeometry?this.originalGeometry:this.geometry.originalGeometry}get phongAngle(){return this.data.geometry.phongAngle??45}updateEntityBoxSize(e,i){let t=this.geometry.userData.parameters;e.copy(this.originalGeometryNew.boundingSphere.center),i.set(t.width,t.height,t.depth??0).multiplyScalar(.5)}createGeometryByControls(s){if(!0===this.skipReactionUpdate)return;let o=this.localGeometry?.uuid,{originalGeometry:r,subdividedGeometry:a,subdivPointer:d}=t.build(s,this.subdivPointer,this.smoothShading,this.shearScale);this.subdivPointer=d,void 0!==r&&(this.originalGeometry?.dispose(),this.originalGeometry=r),void 0!==a&&(this.subdividedGeometry?.dispose(),this.subdividedGeometry=a??void 0),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),this.calcBoundingBox(),o&&(this.localGeometry.uuid=o)}updateState(e,i){if(super.updateState(e,i),void 0!==e.flatShading){let t=this.material;this.material=Array.isArray(t)?t.map(e=>e.getFlavor(!1,e.side,e.wireframe)):t.getFlavor(!1,t.side,t.wireframe),this.smoothShading=!e.flatShading,this.createGeometryDelayed(i)}}updateMesh(e=!1,i=!1,s=!1){i&&this.subdividedGeometry||t.buildLevel(this.subdivPointer,!0,this.smoothShading?this.phongAngle:-1,this.originalGeometry,e?this.shearScaleInv:void 0,s),this.subdividedGeometry&&t.buildLevel(this.subdivPointer,!1,this.smoothShading?this.phongAngle:-1,this.subdividedGeometry,e?this.shearScaleInv:void 0)}updateTopology(){let s=this.localGeometry?.uuid;this.originalGeometry.dispose(),this.originalGeometry=t.buildLevel(this.subdivPointer,!0,this.smoothShading?this.phongAngle:-1),this.subdividedGeometry&&(this.subdividedGeometry.dispose(),this.subdividedGeometry=t.buildLevel(this.subdivPointer,!1,this.smoothShading?this.phongAngle:-1)),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),this.calcBoundingBox(),s&&(this.localGeometry.uuid=s)}raycast(e,i){let t=this.localGeometry;this.localGeometry=this.originalGeometryNew,r.prototype.raycast.call(this,e,i),this.localGeometry=t}activateShearCompensation(){this.shearCompensationIsActive=!0,this.matrixWorld.copy(this.matrixWorldRigid)}deactivateShearCompensation(){this.shearCompensationIsActive=!1,this.updateMatrixWorld(!0)}updateMatrixWorld(e){!0!==this.shearCompensationIsActive&&super.updateMatrixWorld(e)}updateWorldMatrix(e,i){!0!==this.shearCompensationIsActive&&super.updateWorldMatrix(e,i)}calcBoundingBox(){let e=this.originalGeometry;null===e.boundingSphere&&(e.boundingSphere=new h,this.subdividedGeometry&&(this.subdividedGeometry.boundingSphere=e.boundingSphere));let i=e.attributes.position,t=e.boundingSphere.center;n.setFromBufferAttribute(i),n.getCenter(t),e.boundingSphere.radius=t.distanceTo(n.max),isNaN(e.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this),n.getSize(u),u.divide(this.scale);let s={width:u.x,height:u.y,depth:u.z};return this.geometry.userData.parameters=s,s}updateBoundingSphere(e){let i=this.originalGeometry;n.min.set(e[0],e[2],e[4]),n.max.set(e[1],e[3],e[5]),n.min.applyMatrix4(this.shearScaleInv),n.max.applyMatrix4(this.shearScaleInv),null===i.boundingSphere&&(i.boundingSphere=new h);let t=i.boundingSphere.center;n.getCenter(t),i.boundingSphere.radius=t.distanceTo(n.max)}freeSubdivPointer(){this.subdivPointer&&(t.freeSubdivPointer(this.subdivPointer),this.subdivPointer=0),this.localGeometry=void 0,this.originalGeometry?.dispose(),this.subdividedGeometry?.dispose()}dispose(){super.dispose(),this.freeSubdivPointer()}updateSubdivisionLevel(s){if(!0===this.skipReactionUpdate)return;let o=this.localGeometry,r=o?.uuid,a=o?.userData.parameters,d=s.subdivisions>0?t.buildRefined(this.subdivPointer,s.subdivisions,this.smoothShading?s.phongAngle??35:-1):null;this.subdividedGeometry?.dispose(),this.subdividedGeometry=d??void 0,this.subdividedGeometry&&this.originalGeometry.boundingSphere&&(this.subdividedGeometry.boundingSphere=this.originalGeometry.boundingSphere),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),void 0!==a&&(this.localGeometry.userData.parameters=a),r&&(this.localGeometry.uuid=r)}updateByPatchedOpGeometry(e,i,t){super.updateByPatchedOpGeometry(e,i,t),this.localGeometry&&(0===e.type&&0===e.path.length&&s(e.props)&&this.subdivPointer?this.updateSubdivisionLevel(i):this.createGeometryByControls(i))}};export{l as a,m as b};
1
+ import{a as e,b as i}from"./runtime-chunk-J73B5O64.js";import{J as t,K as s,ja as o}from"./runtime-chunk-ERDBNMCW.js";import{v as r}from"./runtime-chunk-RZTJOEEJ.js";import{Hc as a,Zc as d,ed as h}from"./runtime-chunk-KPOUV3HD.js";var n=new d,u=new a;function l(e){let i=!1;return e.scene.objects.traverse((e,t)=>{"Mesh"===t.type&&"SubdivGeometry"===t.geometry.type&&(i=!0)}),i}var m=class extends o{constructor(e,i,t){super(e,i,t),this.data=i,this.smoothShading=!0,this.skipReactionUpdate=!1,this.shearCompensationIsActive=!1}chooseGeoemtryCache(e){return this.dataPatched.flatShading?e.geometryCache:e.geometryCache2}get subdivPointerNew(){return void 0!==this.localGeometry?this.subdivPointer:this.geometry.ensureSubdivPointer()}get originalGeometryNew(){return void 0!==this.localGeometry?this.originalGeometry:this.geometry.originalGeometry}get phongAngle(){return this.data.geometry.phongAngle??45}updateEntityBoxSize(e,i){let t=this.geometry.userData.parameters;e.copy(this.originalGeometryNew.boundingSphere.center),i.set(t.width,t.height,t.depth??0).multiplyScalar(.5)}createGeometryByControls(s){if(!0===this.skipReactionUpdate)return;let o=this.localGeometry?.uuid,{originalGeometry:r,subdividedGeometry:a,subdivPointer:d}=t.build(s,this.subdivPointer,this.smoothShading,this.shearScale);this.subdivPointer=d,void 0!==r&&(this.originalGeometry?.dispose(),this.originalGeometry=r),void 0!==a&&(this.subdividedGeometry?.dispose(),this.subdividedGeometry=a??void 0),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),this.calcBoundingBox(),o&&(this.localGeometry.uuid=o)}updateState(e,i){if(super.updateState(e,i),void 0!==e.flatShading){let t=this.material;this.material=Array.isArray(t)?t.map(e=>e.getFlavor(!1,e.side,e.wireframe)):t.getFlavor(!1,t.side,t.wireframe),this.smoothShading=!e.flatShading,this.createGeometryDelayed(i)}}updateMesh(e=!1,i=!1,s=!1){i&&this.subdividedGeometry||t.buildLevel(this.subdivPointer,!0,this.smoothShading?this.phongAngle:-1,this.originalGeometry,e?this.shearScaleInv:void 0,s),this.subdividedGeometry&&t.buildLevel(this.subdivPointer,!1,this.smoothShading?this.phongAngle:-1,this.subdividedGeometry,e?this.shearScaleInv:void 0)}updateTopology(){let s=this.localGeometry?.uuid;this.originalGeometry.dispose(),this.originalGeometry=t.buildLevel(this.subdivPointer,!0,this.smoothShading?this.phongAngle:-1),this.subdividedGeometry&&(this.subdividedGeometry.dispose(),this.subdividedGeometry=t.buildLevel(this.subdivPointer,!1,this.smoothShading?this.phongAngle:-1)),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),this.calcBoundingBox(),s&&(this.localGeometry.uuid=s)}raycast(e,i){let t=this.localGeometry;this.localGeometry=this.originalGeometryNew,r.prototype.raycast.call(this,e,i),this.localGeometry=t}activateShearCompensation(){this.shearCompensationIsActive=!0,this.matrixWorld.copy(this.matrixWorldRigid)}deactivateShearCompensation(){this.shearCompensationIsActive=!1,this.updateMatrixWorld(!0)}updateMatrixWorld(e){!0!==this.shearCompensationIsActive&&super.updateMatrixWorld(e)}updateWorldMatrix(e,i){!0!==this.shearCompensationIsActive&&super.updateWorldMatrix(e,i)}calcBoundingBox(){let e=this.originalGeometry;null===e.boundingSphere&&(e.boundingSphere=new h,this.subdividedGeometry&&(this.subdividedGeometry.boundingSphere=e.boundingSphere));let i=e.attributes.position,t=e.boundingSphere.center;n.setFromBufferAttribute(i),n.getCenter(t),e.boundingSphere.radius=t.distanceTo(n.max),isNaN(e.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this),n.getSize(u),u.divide(this.scale);let s={width:u.x,height:u.y,depth:u.z};return this.geometry.userData.parameters=s,s}updateBoundingSphere(e){let i=this.originalGeometry;n.min.set(e[0],e[2],e[4]),n.max.set(e[1],e[3],e[5]),n.min.applyMatrix4(this.shearScaleInv),n.max.applyMatrix4(this.shearScaleInv),null===i.boundingSphere&&(i.boundingSphere=new h);let t=i.boundingSphere.center;n.getCenter(t),i.boundingSphere.radius=t.distanceTo(n.max)}freeSubdivPointer(){this.subdivPointer&&(t.freeSubdivPointer(this.subdivPointer),this.subdivPointer=0),this.localGeometry=void 0,this.originalGeometry?.dispose(),this.subdividedGeometry?.dispose()}dispose(){super.dispose(),this.freeSubdivPointer()}updateSubdivisionLevel(s){if(!0===this.skipReactionUpdate)return;let o=this.localGeometry,r=o?.uuid,a=o?.userData.parameters,d=s.subdivisions>0?t.buildRefined(this.subdivPointer,s.subdivisions,this.smoothShading?s.phongAngle??35:-1):null;this.subdividedGeometry?.dispose(),this.subdividedGeometry=d??void 0,this.subdividedGeometry&&this.originalGeometry.boundingSphere&&(this.subdividedGeometry.boundingSphere=this.originalGeometry.boundingSphere),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),void 0!==a&&(this.localGeometry.userData.parameters=a),r&&(this.localGeometry.uuid=r)}updateByPatchedOpGeometry(e,i,t){super.updateByPatchedOpGeometry(e,i,t),this.localGeometry&&(0===e.type&&0===e.path.length&&s(e.props)&&this.subdivPointer?this.updateSubdivisionLevel(i):this.createGeometryByControls(i))}};export{l as a,m as b};
@@ -1 +1 @@
1
- import{h as n}from"./runtime-chunk-OBB4M3GU.js";function e(o){if(o.component){let t=o.component.instances.indexOf(o);t>=0&&o.component.instances.splice(t,1);for(let t of o.children)n.is(t)&&e(t)}}export{e as a};
1
+ import{h as n}from"./runtime-chunk-RZTJOEEJ.js";function e(o){if(o.component){let t=o.component.instances.indexOf(o);t>=0&&o.component.instances.splice(t,1);for(let t of o.children)n.is(t)&&e(t)}}export{e as a};