@splinetool/runtime 2.0.128 → 2.0.129

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 (313) hide show
  1. package/build/{runtime-bloom-URFNOCH3.js → runtime-bloom-ELP3UPXW.js} +1 -1
  2. package/build/runtime-bloom-ELP3UPXW.js.br +0 -0
  3. package/build/runtime-bloom-ELP3UPXW.js.gz +0 -0
  4. package/build/{runtime-brightnessContrast-XKYRRHNN.js → runtime-brightnessContrast-6ULLCEUM.js} +1 -1
  5. package/build/runtime-brightnessContrast-6ULLCEUM.js.br +0 -0
  6. package/build/runtime-brightnessContrast-6ULLCEUM.js.gz +0 -0
  7. package/build/{runtime-chromaticAberration-ENWFIH4R.js → runtime-chromaticAberration-RVAKO37L.js} +1 -1
  8. package/build/runtime-chromaticAberration-RVAKO37L.js.br +0 -0
  9. package/build/runtime-chromaticAberration-RVAKO37L.js.gz +0 -0
  10. package/build/{runtime-chunk-YD26A6JG.js → runtime-chunk-2JYBRDEP.js} +1 -1
  11. package/build/runtime-chunk-2JYBRDEP.js.br +0 -0
  12. package/build/runtime-chunk-2JYBRDEP.js.gz +0 -0
  13. package/build/{runtime-chunk-N344KUVJ.js → runtime-chunk-3TSCX4IJ.js} +1 -1
  14. package/build/runtime-chunk-3TSCX4IJ.js.br +0 -0
  15. package/build/runtime-chunk-3TSCX4IJ.js.gz +0 -0
  16. package/build/{runtime-chunk-MAWW4RWA.js → runtime-chunk-4LWGVJ3W.js} +1 -1
  17. package/build/runtime-chunk-4LWGVJ3W.js.br +0 -0
  18. package/build/runtime-chunk-4LWGVJ3W.js.gz +0 -0
  19. package/build/{runtime-chunk-JFOQIV5A.js → runtime-chunk-4PCZFCTB.js} +1 -1
  20. package/build/runtime-chunk-4PCZFCTB.js.br +0 -0
  21. package/build/runtime-chunk-4PCZFCTB.js.gz +0 -0
  22. package/build/{runtime-chunk-I2YI4ZWP.js → runtime-chunk-5KNE4PJT.js} +1 -1
  23. package/build/runtime-chunk-5KNE4PJT.js.br +0 -0
  24. package/build/runtime-chunk-5KNE4PJT.js.gz +0 -0
  25. package/build/{runtime-chunk-HS36GMDR.js → runtime-chunk-6ALENV43.js} +1 -1
  26. package/build/runtime-chunk-6ALENV43.js.br +0 -0
  27. package/build/runtime-chunk-6ALENV43.js.gz +0 -0
  28. package/build/{runtime-chunk-VJKY3X3K.js → runtime-chunk-7DZPYJ74.js} +1 -1
  29. package/build/runtime-chunk-7DZPYJ74.js.br +0 -0
  30. package/build/runtime-chunk-7DZPYJ74.js.gz +0 -0
  31. package/build/{runtime-chunk-C36GMBSO.js → runtime-chunk-7JHMLFOT.js} +1 -1
  32. package/build/runtime-chunk-7JHMLFOT.js.br +0 -0
  33. package/build/runtime-chunk-7JHMLFOT.js.gz +0 -0
  34. package/build/{runtime-chunk-57UG4BXD.js → runtime-chunk-7VIF7NXA.js} +1 -1
  35. package/build/runtime-chunk-7VIF7NXA.js.br +0 -0
  36. package/build/runtime-chunk-7VIF7NXA.js.gz +0 -0
  37. package/build/{runtime-chunk-BJUTOC7W.js → runtime-chunk-B2A7L7QA.js} +1 -1
  38. package/build/runtime-chunk-B2A7L7QA.js.br +0 -0
  39. package/build/runtime-chunk-B2A7L7QA.js.gz +0 -0
  40. package/build/{runtime-chunk-4LILIUU5.js → runtime-chunk-B2FKONWI.js} +1 -1
  41. package/build/runtime-chunk-B2FKONWI.js.br +0 -0
  42. package/build/runtime-chunk-B2FKONWI.js.gz +0 -0
  43. package/build/{runtime-chunk-RMRNR3WL.js → runtime-chunk-C6IGXHVB.js} +1 -1
  44. package/build/{runtime-chunk-RMRNR3WL.js.br → runtime-chunk-C6IGXHVB.js.br} +0 -0
  45. package/build/runtime-chunk-C6IGXHVB.js.gz +0 -0
  46. package/build/{runtime-chunk-ZHNFVXMR.js → runtime-chunk-CBCEISZY.js} +1 -1
  47. package/build/runtime-chunk-CBCEISZY.js.br +0 -0
  48. package/build/runtime-chunk-CBCEISZY.js.gz +0 -0
  49. package/build/{runtime-chunk-563HZQ2M.js → runtime-chunk-H5ITHIOM.js} +1 -1
  50. package/build/runtime-chunk-H5ITHIOM.js.br +0 -0
  51. package/build/runtime-chunk-H5ITHIOM.js.gz +0 -0
  52. package/build/{runtime-chunk-WCRA7QD5.js → runtime-chunk-JKQYVX5I.js} +1 -1
  53. package/build/runtime-chunk-JKQYVX5I.js.br +0 -0
  54. package/build/runtime-chunk-JKQYVX5I.js.gz +0 -0
  55. package/build/{runtime-chunk-KZ4UWLTF.js → runtime-chunk-KPNZSB2K.js} +1 -1
  56. package/build/runtime-chunk-KPNZSB2K.js.br +0 -0
  57. package/build/runtime-chunk-KPNZSB2K.js.gz +0 -0
  58. package/build/{runtime-chunk-SXLCU2XM.js → runtime-chunk-LYRBXF3A.js} +1 -1
  59. package/build/runtime-chunk-LYRBXF3A.js.br +0 -0
  60. package/build/runtime-chunk-LYRBXF3A.js.gz +0 -0
  61. package/build/{runtime-chunk-O6UEIHFU.js → runtime-chunk-NDLGVFNP.js} +1 -1
  62. package/build/{runtime-chunk-O6UEIHFU.js.br → runtime-chunk-NDLGVFNP.js.br} +0 -0
  63. package/build/runtime-chunk-NDLGVFNP.js.gz +0 -0
  64. package/build/{runtime-chunk-AAN5XAVU.js → runtime-chunk-PKBPWJ52.js} +1 -1
  65. package/build/runtime-chunk-PKBPWJ52.js.br +0 -0
  66. package/build/runtime-chunk-PKBPWJ52.js.gz +0 -0
  67. package/build/{runtime-chunk-YRATESHS.js → runtime-chunk-PW6LZJPO.js} +1 -1
  68. package/build/runtime-chunk-PW6LZJPO.js.br +0 -0
  69. package/build/runtime-chunk-PW6LZJPO.js.gz +0 -0
  70. package/build/{runtime-chunk-5WFET3TN.js → runtime-chunk-R43GBZS7.js} +1 -1
  71. package/build/runtime-chunk-R43GBZS7.js.br +0 -0
  72. package/build/runtime-chunk-R43GBZS7.js.gz +0 -0
  73. package/build/{runtime-chunk-OYL4WU65.js → runtime-chunk-S7WSFSWR.js} +1 -1
  74. package/build/runtime-chunk-S7WSFSWR.js.br +0 -0
  75. package/build/runtime-chunk-S7WSFSWR.js.gz +0 -0
  76. package/build/{runtime-chunk-27ASYFNR.js → runtime-chunk-SCWIIYME.js} +1 -1
  77. package/build/runtime-chunk-SCWIIYME.js.br +0 -0
  78. package/build/runtime-chunk-SCWIIYME.js.gz +0 -0
  79. package/build/{runtime-chunk-OOCUAV7O.js → runtime-chunk-SMUIV7EU.js} +1 -1
  80. package/build/{runtime-chunk-OOCUAV7O.js.br → runtime-chunk-SMUIV7EU.js.br} +0 -0
  81. package/build/runtime-chunk-SMUIV7EU.js.gz +0 -0
  82. package/build/{runtime-chunk-2MQW42US.js → runtime-chunk-SXAB4UXS.js} +1 -1
  83. package/build/runtime-chunk-SXAB4UXS.js.br +0 -0
  84. package/build/runtime-chunk-SXAB4UXS.js.gz +0 -0
  85. package/build/{runtime-chunk-W27LHLDG.js → runtime-chunk-VL2Y54A7.js} +1 -1
  86. package/build/runtime-chunk-VL2Y54A7.js.br +0 -0
  87. package/build/runtime-chunk-VL2Y54A7.js.gz +0 -0
  88. package/build/{runtime-chunk-ANC27YLO.js → runtime-chunk-WVULR6IR.js} +1 -1
  89. package/build/runtime-chunk-WVULR6IR.js.br +0 -0
  90. package/build/runtime-chunk-WVULR6IR.js.gz +0 -0
  91. package/build/{runtime-classicRuntime-ZNFPGJBN.js → runtime-classicRuntime-BEGI3O2W.js} +1 -1
  92. package/build/runtime-classicRuntime-BEGI3O2W.js.br +0 -0
  93. package/build/runtime-classicRuntime-BEGI3O2W.js.gz +0 -0
  94. package/build/{runtime-cloners-CABUNUN4.js → runtime-cloners-BZ5VPCTL.js} +1 -1
  95. package/build/runtime-cloners-BZ5VPCTL.js.br +0 -0
  96. package/build/runtime-cloners-BZ5VPCTL.js.gz +0 -0
  97. package/build/{runtime-components-SW4YPTBB.js → runtime-components-VWGSOMN4.js} +1 -1
  98. package/build/runtime-components-VWGSOMN4.js.br +0 -0
  99. package/build/runtime-components-VWGSOMN4.js.gz +0 -0
  100. package/build/{runtime-createDestroy-PMVWNBLM.js → runtime-createDestroy-4T4POSE2.js} +1 -1
  101. package/build/runtime-createDestroy-4T4POSE2.js.br +0 -0
  102. package/build/runtime-createDestroy-4T4POSE2.js.gz +0 -0
  103. package/build/{runtime-depthOfField-EUXXKHVA.js → runtime-depthOfField-3QSJTTRR.js} +1 -1
  104. package/build/runtime-depthOfField-3QSJTTRR.js.br +0 -0
  105. package/build/runtime-depthOfField-3QSJTTRR.js.gz +0 -0
  106. package/build/{runtime-dragDrop-IBZY5BD4.js → runtime-dragDrop-WFJ53HF2.js} +1 -1
  107. package/build/runtime-dragDrop-WFJ53HF2.js.br +0 -0
  108. package/build/runtime-dragDrop-WFJ53HF2.js.gz +0 -0
  109. package/build/{runtime-gameControls-PXI6CEPK.js → runtime-gameControls-NTBSRIOU.js} +1 -1
  110. package/build/runtime-gameControls-NTBSRIOU.js.br +0 -0
  111. package/build/runtime-gameControls-NTBSRIOU.js.gz +0 -0
  112. package/build/{runtime-hair-WBS5LPXS.js → runtime-hair-YWB25NVL.js} +1 -1
  113. package/build/runtime-hair-YWB25NVL.js.br +2 -0
  114. package/build/runtime-hair-YWB25NVL.js.gz +0 -0
  115. package/build/{runtime-hueSaturation-4BVZM3CD.js → runtime-hueSaturation-QAZQBPNB.js} +1 -1
  116. package/build/runtime-hueSaturation-QAZQBPNB.js.br +0 -0
  117. package/build/runtime-hueSaturation-QAZQBPNB.js.gz +0 -0
  118. package/build/{runtime-mergeStaticGeometries-Y2ORDF3C.js → runtime-mergeStaticGeometries-XDQUR7BU.js} +1 -1
  119. package/build/runtime-mergeStaticGeometries-XDQUR7BU.js.br +0 -0
  120. package/build/runtime-mergeStaticGeometries-XDQUR7BU.js.gz +0 -0
  121. package/build/{runtime-miscActions-GC5JRESN.js → runtime-miscActions-WECOMUWV.js} +1 -1
  122. package/build/runtime-miscActions-WECOMUWV.js.br +0 -0
  123. package/build/runtime-miscActions-WECOMUWV.js.gz +0 -0
  124. package/build/{runtime-mouseHover-4WXHCDYL.js → runtime-mouseHover-X2CIS5OG.js} +1 -1
  125. package/build/runtime-mouseHover-X2CIS5OG.js.br +0 -0
  126. package/build/runtime-mouseHover-X2CIS5OG.js.gz +0 -0
  127. package/build/{runtime-noise-3HLOCPCN.js → runtime-noise-ZSGEX7V4.js} +1 -1
  128. package/build/runtime-noise-ZSGEX7V4.js.br +0 -0
  129. package/build/runtime-noise-ZSGEX7V4.js.gz +0 -0
  130. package/build/{runtime-particles-XB7DYVCH.js → runtime-particles-52DKUELC.js} +1 -1
  131. package/build/runtime-particles-52DKUELC.js.br +0 -0
  132. package/build/runtime-particles-52DKUELC.js.gz +0 -0
  133. package/build/{runtime-paths-YB5NKOJI.js → runtime-paths-QQBOHIUC.js} +1 -1
  134. package/build/runtime-paths-QQBOHIUC.js.br +0 -0
  135. package/build/runtime-paths-QQBOHIUC.js.gz +0 -0
  136. package/build/{runtime-pixelation-SIL77ELE.js → runtime-pixelation-5JOXTVDS.js} +1 -1
  137. package/build/runtime-pixelation-5JOXTVDS.js.br +0 -0
  138. package/build/runtime-pixelation-5JOXTVDS.js.gz +0 -0
  139. package/build/{runtime-resize-VNMZXGCW.js → runtime-resize-737BCCFK.js} +1 -1
  140. package/build/runtime-resize-737BCCFK.js.br +0 -0
  141. package/build/runtime-resize-737BCCFK.js.gz +0 -0
  142. package/build/{runtime-sceneTransition-CI4Y3WON.js → runtime-sceneTransition-LXNROCN3.js} +1 -1
  143. package/build/runtime-sceneTransition-LXNROCN3.js.br +0 -0
  144. package/build/runtime-sceneTransition-LXNROCN3.js.gz +0 -0
  145. package/build/{runtime-scroll-DFDIW6AA.js → runtime-scroll-GOL55F2T.js} +1 -1
  146. package/build/runtime-scroll-GOL55F2T.js.br +0 -0
  147. package/build/runtime-scroll-GOL55F2T.js.gz +0 -0
  148. package/build/runtime-shapeBlends-FYON7MF5.js +1 -0
  149. package/build/runtime-shapeBlends-FYON7MF5.js.br +0 -0
  150. package/build/runtime-shapeBlends-FYON7MF5.js.gz +0 -0
  151. package/build/{runtime-text-QLNJ3WAM.js → runtime-text-YF5DH4QM.js} +1 -1
  152. package/build/runtime-text-YF5DH4QM.js.br +0 -0
  153. package/build/runtime-text-YF5DH4QM.js.gz +0 -0
  154. package/build/{runtime-textInputs-BKEOJSH6.js → runtime-textInputs-LE7JX7MG.js} +1 -1
  155. package/build/runtime-textInputs-LE7JX7MG.js.br +0 -0
  156. package/build/runtime-textInputs-LE7JX7MG.js.gz +0 -0
  157. package/build/{runtime-timeline-WZ7L4RCC.js → runtime-timeline-3GYM6KIA.js} +1 -1
  158. package/build/runtime-timeline-3GYM6KIA.js.br +0 -0
  159. package/build/runtime-timeline-3GYM6KIA.js.gz +0 -0
  160. package/build/{runtime-tracking-Z4LWCYDS.js → runtime-tracking-OYZJHJGL.js} +1 -1
  161. package/build/runtime-tracking-OYZJHJGL.js.br +0 -0
  162. package/build/runtime-tracking-OYZJHJGL.js.gz +0 -0
  163. package/build/{runtime-transitions-WGBXYGUC.js → runtime-transitions-SLNJEV2C.js} +1 -1
  164. package/build/runtime-transitions-SLNJEV2C.js.br +0 -0
  165. package/build/runtime-transitions-SLNJEV2C.js.gz +0 -0
  166. package/build/{runtime-ui2d-KJLWOYIQ.js → runtime-ui2d-7HPQAEUB.js} +1 -1
  167. package/build/runtime-ui2d-7HPQAEUB.js.br +0 -0
  168. package/build/runtime-ui2d-7HPQAEUB.js.gz +0 -0
  169. package/build/{runtime-vectorShapes-UECKTV75.js → runtime-vectorShapes-PX6S7XH2.js} +1 -1
  170. package/build/runtime-vectorShapes-PX6S7XH2.js.br +0 -0
  171. package/build/runtime-vectorShapes-PX6S7XH2.js.gz +0 -0
  172. package/build/{runtime-vignette-NTBENEFQ.js → runtime-vignette-5XNIIA5T.js} +1 -1
  173. package/build/runtime-vignette-5XNIIA5T.js.br +0 -0
  174. package/build/runtime-vignette-5XNIIA5T.js.gz +0 -0
  175. package/build/{runtime-webgpu-QWMIJIKS.js → runtime-webgpu-GJAOEHGA.js} +1 -1
  176. package/build/runtime-webgpu-GJAOEHGA.js.br +0 -0
  177. package/build/runtime-webgpu-GJAOEHGA.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-URFNOCH3.js.br +0 -0
  199. package/build/runtime-bloom-URFNOCH3.js.gz +0 -0
  200. package/build/runtime-brightnessContrast-XKYRRHNN.js.br +0 -0
  201. package/build/runtime-brightnessContrast-XKYRRHNN.js.gz +0 -0
  202. package/build/runtime-chromaticAberration-ENWFIH4R.js.br +0 -0
  203. package/build/runtime-chromaticAberration-ENWFIH4R.js.gz +0 -0
  204. package/build/runtime-chunk-27ASYFNR.js.br +0 -0
  205. package/build/runtime-chunk-27ASYFNR.js.gz +0 -0
  206. package/build/runtime-chunk-2MQW42US.js.br +0 -0
  207. package/build/runtime-chunk-2MQW42US.js.gz +0 -0
  208. package/build/runtime-chunk-4LILIUU5.js.br +0 -0
  209. package/build/runtime-chunk-4LILIUU5.js.gz +0 -0
  210. package/build/runtime-chunk-563HZQ2M.js.br +0 -0
  211. package/build/runtime-chunk-563HZQ2M.js.gz +0 -0
  212. package/build/runtime-chunk-57UG4BXD.js.br +0 -0
  213. package/build/runtime-chunk-57UG4BXD.js.gz +0 -0
  214. package/build/runtime-chunk-5WFET3TN.js.br +0 -0
  215. package/build/runtime-chunk-5WFET3TN.js.gz +0 -0
  216. package/build/runtime-chunk-AAN5XAVU.js.br +0 -0
  217. package/build/runtime-chunk-AAN5XAVU.js.gz +0 -0
  218. package/build/runtime-chunk-ANC27YLO.js.br +0 -0
  219. package/build/runtime-chunk-ANC27YLO.js.gz +0 -0
  220. package/build/runtime-chunk-BJUTOC7W.js.br +0 -0
  221. package/build/runtime-chunk-BJUTOC7W.js.gz +0 -0
  222. package/build/runtime-chunk-C36GMBSO.js.br +0 -0
  223. package/build/runtime-chunk-C36GMBSO.js.gz +0 -0
  224. package/build/runtime-chunk-HS36GMDR.js.br +0 -0
  225. package/build/runtime-chunk-HS36GMDR.js.gz +0 -0
  226. package/build/runtime-chunk-I2YI4ZWP.js.br +0 -1
  227. package/build/runtime-chunk-I2YI4ZWP.js.gz +0 -0
  228. package/build/runtime-chunk-JFOQIV5A.js.br +0 -0
  229. package/build/runtime-chunk-JFOQIV5A.js.gz +0 -0
  230. package/build/runtime-chunk-KZ4UWLTF.js.br +0 -0
  231. package/build/runtime-chunk-KZ4UWLTF.js.gz +0 -0
  232. package/build/runtime-chunk-MAWW4RWA.js.br +0 -0
  233. package/build/runtime-chunk-MAWW4RWA.js.gz +0 -0
  234. package/build/runtime-chunk-N344KUVJ.js.br +0 -0
  235. package/build/runtime-chunk-N344KUVJ.js.gz +0 -0
  236. package/build/runtime-chunk-O6UEIHFU.js.gz +0 -0
  237. package/build/runtime-chunk-OOCUAV7O.js.gz +0 -0
  238. package/build/runtime-chunk-OYL4WU65.js.br +0 -0
  239. package/build/runtime-chunk-OYL4WU65.js.gz +0 -0
  240. package/build/runtime-chunk-RMRNR3WL.js.gz +0 -0
  241. package/build/runtime-chunk-SXLCU2XM.js.br +0 -0
  242. package/build/runtime-chunk-SXLCU2XM.js.gz +0 -0
  243. package/build/runtime-chunk-VJKY3X3K.js.br +0 -0
  244. package/build/runtime-chunk-VJKY3X3K.js.gz +0 -0
  245. package/build/runtime-chunk-W27LHLDG.js.br +0 -0
  246. package/build/runtime-chunk-W27LHLDG.js.gz +0 -0
  247. package/build/runtime-chunk-WCRA7QD5.js.br +0 -0
  248. package/build/runtime-chunk-WCRA7QD5.js.gz +0 -0
  249. package/build/runtime-chunk-YD26A6JG.js.br +0 -0
  250. package/build/runtime-chunk-YD26A6JG.js.gz +0 -0
  251. package/build/runtime-chunk-YRATESHS.js.br +0 -0
  252. package/build/runtime-chunk-YRATESHS.js.gz +0 -0
  253. package/build/runtime-chunk-ZHNFVXMR.js.br +0 -0
  254. package/build/runtime-chunk-ZHNFVXMR.js.gz +0 -0
  255. package/build/runtime-classicRuntime-ZNFPGJBN.js.br +0 -0
  256. package/build/runtime-classicRuntime-ZNFPGJBN.js.gz +0 -0
  257. package/build/runtime-cloners-CABUNUN4.js.br +0 -0
  258. package/build/runtime-cloners-CABUNUN4.js.gz +0 -0
  259. package/build/runtime-components-SW4YPTBB.js.br +0 -0
  260. package/build/runtime-components-SW4YPTBB.js.gz +0 -0
  261. package/build/runtime-createDestroy-PMVWNBLM.js.br +0 -0
  262. package/build/runtime-createDestroy-PMVWNBLM.js.gz +0 -0
  263. package/build/runtime-depthOfField-EUXXKHVA.js.br +0 -0
  264. package/build/runtime-depthOfField-EUXXKHVA.js.gz +0 -0
  265. package/build/runtime-dragDrop-IBZY5BD4.js.br +0 -0
  266. package/build/runtime-dragDrop-IBZY5BD4.js.gz +0 -0
  267. package/build/runtime-gameControls-PXI6CEPK.js.br +0 -0
  268. package/build/runtime-gameControls-PXI6CEPK.js.gz +0 -0
  269. package/build/runtime-hair-WBS5LPXS.js.br +0 -2
  270. package/build/runtime-hair-WBS5LPXS.js.gz +0 -0
  271. package/build/runtime-hueSaturation-4BVZM3CD.js.br +0 -0
  272. package/build/runtime-hueSaturation-4BVZM3CD.js.gz +0 -0
  273. package/build/runtime-mergeStaticGeometries-Y2ORDF3C.js.br +0 -0
  274. package/build/runtime-mergeStaticGeometries-Y2ORDF3C.js.gz +0 -0
  275. package/build/runtime-miscActions-GC5JRESN.js.br +0 -0
  276. package/build/runtime-miscActions-GC5JRESN.js.gz +0 -0
  277. package/build/runtime-mouseHover-4WXHCDYL.js.br +0 -0
  278. package/build/runtime-mouseHover-4WXHCDYL.js.gz +0 -0
  279. package/build/runtime-noise-3HLOCPCN.js.br +0 -0
  280. package/build/runtime-noise-3HLOCPCN.js.gz +0 -0
  281. package/build/runtime-particles-XB7DYVCH.js.br +0 -0
  282. package/build/runtime-particles-XB7DYVCH.js.gz +0 -0
  283. package/build/runtime-paths-YB5NKOJI.js.br +0 -0
  284. package/build/runtime-paths-YB5NKOJI.js.gz +0 -0
  285. package/build/runtime-pixelation-SIL77ELE.js.br +0 -0
  286. package/build/runtime-pixelation-SIL77ELE.js.gz +0 -0
  287. package/build/runtime-resize-VNMZXGCW.js.br +0 -0
  288. package/build/runtime-resize-VNMZXGCW.js.gz +0 -0
  289. package/build/runtime-sceneTransition-CI4Y3WON.js.br +0 -0
  290. package/build/runtime-sceneTransition-CI4Y3WON.js.gz +0 -0
  291. package/build/runtime-scroll-DFDIW6AA.js.br +0 -0
  292. package/build/runtime-scroll-DFDIW6AA.js.gz +0 -0
  293. package/build/runtime-shapeBlends-5AMJACSS.js +0 -1
  294. package/build/runtime-shapeBlends-5AMJACSS.js.br +0 -4
  295. package/build/runtime-shapeBlends-5AMJACSS.js.gz +0 -0
  296. package/build/runtime-text-QLNJ3WAM.js.br +0 -0
  297. package/build/runtime-text-QLNJ3WAM.js.gz +0 -0
  298. package/build/runtime-textInputs-BKEOJSH6.js.br +0 -0
  299. package/build/runtime-textInputs-BKEOJSH6.js.gz +0 -0
  300. package/build/runtime-timeline-WZ7L4RCC.js.br +0 -0
  301. package/build/runtime-timeline-WZ7L4RCC.js.gz +0 -0
  302. package/build/runtime-tracking-Z4LWCYDS.js.br +0 -0
  303. package/build/runtime-tracking-Z4LWCYDS.js.gz +0 -0
  304. package/build/runtime-transitions-WGBXYGUC.js.br +0 -0
  305. package/build/runtime-transitions-WGBXYGUC.js.gz +0 -0
  306. package/build/runtime-ui2d-KJLWOYIQ.js.br +0 -0
  307. package/build/runtime-ui2d-KJLWOYIQ.js.gz +0 -0
  308. package/build/runtime-vectorShapes-UECKTV75.js.br +0 -0
  309. package/build/runtime-vectorShapes-UECKTV75.js.gz +0 -0
  310. package/build/runtime-vignette-NTBENEFQ.js.br +0 -0
  311. package/build/runtime-vignette-NTBENEFQ.js.gz +0 -0
  312. package/build/runtime-webgpu-QWMIJIKS.js.br +0 -0
  313. package/build/runtime-webgpu-QWMIJIKS.js.gz +0 -0
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-YRATESHS.js";import{g as e}from"./runtime-chunk-ANC27YLO.js";import{c as i}from"./runtime-chunk-VJKY3X3K.js";import{i as r}from"./runtime-chunk-RMRNR3WL.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-PW6LZJPO.js";import{g as e}from"./runtime-chunk-WVULR6IR.js";import{c as i}from"./runtime-chunk-7DZPYJ74.js";import{i as r}from"./runtime-chunk-C6IGXHVB.js";import{j as s}from"./runtime-chunk-2PT2WH66.js";import{Hc as n,Pe as o,fd as a,wd as h,xd as c}from"./runtime-chunk-KPOUV3HD.js";var d=class extends o{constructor(){super(),i(this.layers)}setFromCamera(t,e){e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,-1).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):e.isPerspectiveCamera?(this.ray.origin.set(t.x,t.y,-1).unproject(e),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):console.error("Raycaster: Unsupported camera type.")}intersectVisibleObjects(t,e=!0,i=[]){return t.forEach(t=>{t.visible&&this.intersectObject(t,e,i)}),i}createRaycastLineHelper(){let t=new h({color:65280,linewidth:10}),e=new n(this.ray.origin.x,this.ray.origin.y,this.ray.origin.z),i=new n(this.ray.direction.x,this.ray.direction.y,this.ray.direction.z),r=this.camera.far-this.camera.near,s=(new n).addVectors(e,i.multiplyScalar(r)),o=new a;return o.setFromPoints([e,s]),new c(o,t)}},u=e=>e instanceof t||s(e);function l(t,e){return t.distance-e.distance}function m(t,i,s){if(r(i)&&i.visible){e(i)&&i.raycast(t,s);for(let e of i.children)m(t,e,s)}}function f(t,e,i,r=!1){if(!r&&!i.some(e=>void 0!==y(t,e)))return[];let s=[];return e.children.forEach(e=>m(t,e,s)),s.sort(l),s}function p(t){let e=[];if(t.length){let i=t[0].object;r(i)&&e.push(i);let s=i.parent;for(;s;)u(s)&&e.push(s),s=s.parent}return e}function w(t,e,i,r){let s=t.frame;if(s){let t=e[0]*s.width,n=(1-e[1])*s.height;for(let e of i){let i=e===s.uuid?s:s.find(e);if(i?.intersects(t,n))return r(i),!0}}return!1}function y(t,i){if(e(i)){if(i.visible){let e=[];return i.raycast(t,e),e.length?e[0]:void 0}}else if(u(i))return g(t,i)}function g(t,i){if(r(i)&&i.visible){if(e(i)){let e=[];if(i.raycast(t,e),e.length)return e[0]}for(let e of i.children){let i=g(t,e);if(i)return i}}}var v=class{constructor(t,e,i,r,s,n,o,a){this.renderer=t,this.publish=e,this.scene=i,this.getCamera=r,this.sharedAssets=s,this.requestRender=n,this.isExport=o,this.frame=a,this.raycaster=new d,this._useWindowEvents=!1,this.pointerWorld={x:0,y:0},this.pointerScreen={x:0,y:0},this._useWindowEvents="window"===e.mouseEventTarget,this.domElement=t.domElement,this.eventElement=this._useWindowEvents?window:t.domElement,this._domRect=this.domElement.getBoundingClientRect()}get stopRaycast(){return this.publish.stopRaycast}get page(){return this.scene.activePage}set useWindowEvents(t){this._useWindowEvents=t,this.eventElement=t?window:this.renderer.domElement}get useWindowEvents(){return this._useWindowEvents}set domRect(t){this._domRect=t}get domRect(){return this._domRect}updateRaycaster(t){let{pageX:e,pageY:i}=t.touches?.length>0?t.touches[0]:t;this.pointerWorld=function(t,e,i){return{x:(t-(i.left+window.scrollX))/i.width*2-1,y:-(e-(i.top+window.scrollY))/i.height*2+1}}(e,i,this._domRect),this.pointerScreen=function(t,e,i){return{x:(t-(i.left+window.scrollX))/i.width,y:1-(e-(i.top+window.scrollY))/i.height}}(e,i,this._domRect),this.raycaster.setFromCamera(this.pointerWorld,this.getCamera())}dispose(){this.scene=void 0,this.sharedAssets=void 0,this.publish=void 0,this.getCamera=void 0,this.requestRender=void 0,this.frame=void 0,this.isExport=void 0}};export{f as a,p as b,w as c,y as d,v as e};
@@ -1 +1 @@
1
- import{f as t}from"./runtime-chunk-ANC27YLO.js";import{a as s,b as a}from"./runtime-chunk-O6UEIHFU.js";import{Ae as e,De as i,Ec as o,Gc as h,Hc as r,Ue as d,We as n,Xe as c}from"./runtime-chunk-KPOUV3HD.js";var l=class extends(s(n)){constructor(t,s=15,a=10066329){super(t,s,a),this.object=t,this.added=!1,this.name=`DirectionalLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,l.geometryHelper,t,s)}},p=class extends(t(i,l)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=2048,this.shadow.mapSize.height=2048,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.top=1250,e.bottom=-1250,e.right=1250,e.left=-1250,e.near=-1e4,e.far=2500;let i=new c(this.shadow.camera);i.visible=!1,this.gizmos.shadowmap=i}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof c&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s);let a=void 0!==t.depth&&t.depth!==this.shadow.camera.far||void 0!==t.size&&t.size/2!==this.shadow.camera.right;void 0!==t.size&&function(t,s){t.shadow.camera.right=s/2,t.shadow.camera.left=-s/2,t.shadow.camera.top=s/2,t.shadow.camera.bottom=-s/2,t.shadow.needsUpdate=!0}(this,t.size),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null)),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),a&&this.update()}},m=class extends(s(d)){constructor(t,s=6710886){super(t,s),this.object=t,this.matrix=t.matrixWorld,this.name=`SpotLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,m.geometryHelper,t,s)}update(){if(void 0!==this.object){let t=m._vector,s=this.object.distance?this.object.distance:1e3,a=s*Math.tan(this.object.angle);this.cone.scale.set(a,a,s),t.setFromMatrixPosition(this.object.target.matrixWorld),this.cone.lookAt(t);let e=void 0!==this.color?this.color:this.light.color;if(this.cone.material instanceof Array)for(let t=0,s=this.cone.material.length;t<s;t++)this.cone.material[t].color.set(e);else this.cone.material.color.set(e)}}},u=m;u._vector=new r;var w=new r,b=new r,g=new h,v=class extends(t(e,u)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=1024,this.shadow.mapSize.height=1024,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.fov=2*o.RAD2DEG*this.angle,e.aspect=1,e.near=100,e.far=2500;let i=new c(this.shadow.camera);i.visible=!1,this.gizmos.shadowmap=i,this.update()}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof c&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),b.setFromMatrixPosition(this.matrixWorld),g.setFromRotationMatrix(this.matrixWorld),w.copy(this.up).applyQuaternion(g).negate().multiplyScalar(this.distance),this.target.position.copy(b).add(w),this.target.updateMatrixWorld(),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.angle&&(this.angle=t.angle),void 0!==t.penumbra&&(this.penumbra=t.penumbra),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null))}};export{p as a,v as b};
1
+ import{f as t}from"./runtime-chunk-WVULR6IR.js";import{a as s,b as a}from"./runtime-chunk-NDLGVFNP.js";import{Ae as e,De as i,Ec as o,Gc as h,Hc as r,Ue as d,We as n,Xe as c}from"./runtime-chunk-KPOUV3HD.js";var l=class extends(s(n)){constructor(t,s=15,a=10066329){super(t,s,a),this.object=t,this.added=!1,this.name=`DirectionalLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,l.geometryHelper,t,s)}},p=class extends(t(i,l)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=2048,this.shadow.mapSize.height=2048,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.top=1250,e.bottom=-1250,e.right=1250,e.left=-1250,e.near=-1e4,e.far=2500;let i=new c(this.shadow.camera);i.visible=!1,this.gizmos.shadowmap=i}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof c&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s);let a=void 0!==t.depth&&t.depth!==this.shadow.camera.far||void 0!==t.size&&t.size/2!==this.shadow.camera.right;void 0!==t.size&&function(t,s){t.shadow.camera.right=s/2,t.shadow.camera.left=-s/2,t.shadow.camera.top=s/2,t.shadow.camera.bottom=-s/2,t.shadow.needsUpdate=!0}(this,t.size),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null)),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),a&&this.update()}},m=class extends(s(d)){constructor(t,s=6710886){super(t,s),this.object=t,this.matrix=t.matrixWorld,this.name=`SpotLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,m.geometryHelper,t,s)}update(){if(void 0!==this.object){let t=m._vector,s=this.object.distance?this.object.distance:1e3,a=s*Math.tan(this.object.angle);this.cone.scale.set(a,a,s),t.setFromMatrixPosition(this.object.target.matrixWorld),this.cone.lookAt(t);let e=void 0!==this.color?this.color:this.light.color;if(this.cone.material instanceof Array)for(let t=0,s=this.cone.material.length;t<s;t++)this.cone.material[t].color.set(e);else this.cone.material.color.set(e)}}},u=m;u._vector=new r;var w=new r,b=new r,g=new h,v=class extends(t(e,u)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=1024,this.shadow.mapSize.height=1024,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.fov=2*o.RAD2DEG*this.angle,e.aspect=1,e.near=100,e.far=2500;let i=new c(this.shadow.camera);i.visible=!1,this.gizmos.shadowmap=i,this.update()}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof c&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),b.setFromMatrixPosition(this.matrixWorld),g.setFromRotationMatrix(this.matrixWorld),w.copy(this.up).applyQuaternion(g).negate().multiplyScalar(this.distance),this.target.position.copy(b).add(w),this.target.updateMatrixWorld(),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.angle&&(this.angle=t.angle),void 0!==t.penumbra&&(this.penumbra=t.penumbra),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null))}};export{p as a,v as b};
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-OOCUAV7O.js";import{d as e}from"./runtime-chunk-O6UEIHFU.js";import{Uc as s}from"./runtime-chunk-KPOUV3HD.js";var r=class extends(e(s,t)){constructor(t,e,s){super(),this.super_Entity(t,e),this.context=s,this.objectHelper.update()}updateState(t,e){this.updateState_Entity(t,e)}};export{r as a};
1
+ import{a as t}from"./runtime-chunk-SMUIV7EU.js";import{d as e}from"./runtime-chunk-NDLGVFNP.js";import{Uc as s}from"./runtime-chunk-KPOUV3HD.js";var r=class extends(e(s,t)){constructor(t,e,s){super(),this.super_Entity(t,e),this.context=s,this.objectHelper.update()}updateState(t,e){this.updateState_Entity(t,e)}};export{r as a};
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-5WFET3TN.js";import{b as e}from"./runtime-chunk-W27LHLDG.js";import{H as i,ia as r}from"./runtime-chunk-VJKY3X3K.js";import{f as n,v as s}from"./runtime-chunk-RMRNR3WL.js";import{c as o}from"./runtime-chunk-RTLL6WIB.js";import{c as a}from"./runtime-chunk-2PT2WH66.js";import{L as l}from"./runtime-chunk-ADHKZQMB.js";import{Ec as h,Gc as c,Hc as d,Qc as u,Rc as p,Tc as m,Yc as f,sd as y}from"./runtime-chunk-KPOUV3HD.js";import{a as b,b as x}from"./runtime-chunk-ML3Z74BL.js";var g=x(b((t,e)=>{var i,r;i=t,r=function(){return t.importState=function(e){var i=new t;return i.importState(e),i},t;function t(){return function(t){var e=0,i=0,r=0,n=1;0==t.length&&(t=[+new Date]);var s=function(){var t=4022871197,e=function(e){e=e.toString();for(var i=0;i<e.length;i++){var r=.02519603282416938*(t+=e.charCodeAt(i));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)};return e.version="Mash 0.9",e}();e=s(" "),i=s(" "),r=s(" ");for(var o=0;o<t.length;o++)(e-=s(t[o]))<0&&(e+=1),(i-=s(t[o]))<0&&(i+=1),(r-=s(t[o]))<0&&(r+=1);s=null;var a=function(){var t=2091639*e+2.3283064365386963e-10*n;return e=i,i=r,r=t-(n=0|t)};return a.next=a,a.uint32=function(){return 4294967296*a()},a.fract53=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.version="Alea 0.9",a.args=t,a.exportState=function(){return[e,i,r,n]},a.importState=function(t){e=+t[0]||0,i=+t[1]||0,r=+t[2]||0,n=+t[3]||0},a}(Array.prototype.slice.call(arguments))}},"object"==typeof t?e.exports=r():"function"==typeof define&&define.amd?define(r):i.Alea=r()})()),v=.5*(Math.sqrt(3)-1),M=(3-Math.sqrt(3))/6,w=1/3,j=1/6,A=(Math.sqrt(5),Math.sqrt(5),t=>0|Math.floor(t)),S=new Float64Array([1,1,-1,1,1,-1,-1,-1,1,0,-1,0,1,0,-1,0,0,1,0,-1,0,1,0,-1]),_=new Float64Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);function F(t){let e=new Uint8Array(512);for(let t=0;t<256;t++)e[t]=t;for(let i=0;i<255;i++){let r=i+~~(t()*(256-i)),n=e[i];e[i]=e[r],e[r]=n}for(let t=256;t<512;t++)e[t]=e[t-256];return e}var C=new f,z=class{constructor(t){this.weightAttribute=null;let e=t.geometry;if(!e.isBufferGeometry||3!==e.attributes.position.itemSize)throw new Error("THREE.MeshSurfaceSampler: Requires BufferGeometry triangle mesh.");e.index&&(e=e.toNonIndexed()),this.geometry=e,this.randomFunction=Math.random,this.positionAttribute=this.geometry.getAttribute("position"),this.distribution=null}build(){let t=this.positionAttribute,e=new Float32Array(t.count/3);for(let i=0;i<t.count;i+=3){let r=1;C.a.fromBufferAttribute(t,i),C.b.fromBufferAttribute(t,i+1),C.c.fromBufferAttribute(t,i+2),r*=C.getArea(),e[i/3]=r}this.distribution=new Float32Array(t.count/3);let i=0;for(let t=0;t<e.length;t++)i+=e[t],this.distribution[t]=i;return this}setRandomGenerator(t){return this.randomFunction=t,this}sample(t,e){if(this.distribution){let i=this.distribution[this.distribution.length-1],r=this.binarySearch(this.randomFunction()*i);return this.sampleFace(r,t,e)}}binarySearch(t){if(!this.distribution)return 0;let e=this.distribution,i=0,r=e.length-1,n=-1;for(;i<=r;){let s=Math.ceil((i+r)/2);if(0===s||e[s-1]<=t&&e[s]>t){n=s;break}t<e[s]?r=s-1:i=s+1}return n}sampleFace(t,e,i){let r=this.randomFunction(),n=this.randomFunction();return r+n>1&&(r=1-r,n=1-n),C.a.fromBufferAttribute(this.positionAttribute,3*t),C.b.fromBufferAttribute(this.positionAttribute,3*t+1),C.c.fromBufferAttribute(this.positionAttribute,3*t+2),e.set(0,0,0).addScaledVector(C.a,r).addScaledVector(C.b,n).addScaledVector(C.c,1-(r+n)),C.getNormal(i),this}},W={x:[1,0,0],"-x":[-1,0,0],y:[0,1,0],"-y":[0,-1,0],z:[0,0,1],"-z":[0,0,-1]},O={polygon_center:0,edge:1,vertex:2},N=(t,e)=>(i,r)=>e&&0!==i&&0!==t?t*r/100:0,T=(t,e)=>{let i=Math.abs(e),r=-1*i;return(t- -1)*(i-r)/2+r},P=new d,B=new d,R=new d,U=new d;function V(t,e){let i=R.fromArray(t),r=U.fromArray(e);B.copy(r).sub(i);let n=B.length();return B.normalize().multiplyScalar(.5*n),P.copy(i).add(B).toArray()}var k,E,D,I,L=new f,q=new d,G=new d,H=new d,$=class extends y{},K=class extends ${constructor(t,e){super(void 0,void 0,e),this.source=t,this.isClonerInstancedMesh=!0,this.pivotMatrix=new u,this.previousModelViewMatrix=new u,this.copyPreviousMatrix=!0,this.capacity=e,this.count=0,this.matrixAutoUpdate=!1}raycast(t,e){}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}onAfterRender(t,e,i,r,n,s){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}get visible(){return!0!==this.source.cloner?.insideBoolean&&(this.source.visible||this.source.dataPatched.visible&&!0===this.source.dataPatched.cloner?.hideBase)}set visible(t){}get castShadow(){return this.source.castShadow}set castShadow(t){}get receiveShadow(){return this.source.receiveShadow}set receiveShadow(t){}get layers(){return this.source.layers}set layers(t){}get geometry(){return this.source.geometry}set geometry(t){}get material(){return this.source.material}set material(t){}get morphTargetInfluences(){return this.source.morphTargetInfluences}set morphTargetInfluences(t){}},Q=t=>.5*(1-Math.cos(t*Math.PI)),Y=class{constructor(){this.perlin=new Array(4096)}noise(t,e=0,i=0){if(null==this.perlin){this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=Math.random()}t<0&&(t=-t),e<0&&(e=-e),i<0&&(i=-i);let r,n,s,o,a,l=Math.floor(t),h=Math.floor(e),c=Math.floor(i),d=t-l,u=e-h,p=i-c,m=0,f=.5;for(let t=0;t<4;t++){let t=l+(h<<4)+(c<<8);r=Q(d),n=Q(u),s=this.perlin[4095&t],s+=r*(this.perlin[t+1&4095]-s),o=this.perlin[t+16&4095],o+=r*(this.perlin[t+16+1&4095]-o),s+=n*(o-s),t+=256,o=this.perlin[4095&t],o+=r*(this.perlin[t+1&4095]-o),a=this.perlin[t+16&4095],a+=r*(this.perlin[t+16+1&4095]-a),o+=n*(a-o),s+=Q(p)*(o-s),m+=s*f,f*=.5,l<<=1,d*=2,h<<=1,u*=2,c<<=1,p*=2,d>=1&&(l++,d--),u>=1&&(h++,u--),p>=1&&(c++,p--)}return m}noiseSeed(t){let e=(()=>{let t,e;return{setSeed(i){e=t=(i??4294967296*Math.random())>>>0},getSeed:()=>t,rand:()=>(e=(1664525*e+1013904223)%4294967296,e/4294967296)}})();e.setSeed(t),this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=e.rand()}},Z=1e-4,J=new d,X=new d;i.then(t=>{E=[(k=t).get_face_center,k.get_edge_midpoint,k.get_vertex_position],D=[k.get_face_normal,k.get_edge_normal,k.get_vertex_normal],I=[k.face_count,k.edge_count,k.vertex_count]}),new u;var tt=new u,et=new u,it=new u,rt=new u,nt=new u,st=new u,ot=new d,at=new d,lt=new d,ht=new d,ct=new d,dt=new d,ut=new d,pt=new d,mt=new d,ft=new d,yt=new d,bt=new p,xt=new c;function gt(t){return t?t.version??t.data?.version??0:-1}function vt(t,e){return["number"==typeof t?.[0]?t[0]:"string"==typeof t?.[0]&&e?parseFloat(String(e.shared.getVariable(t[0])??"0")):0,"number"==typeof t?.[1]?t[1]:"string"==typeof t?.[1]&&e?parseFloat(String(e.shared.getVariable(t[1])??"0")):0,"number"==typeof t?.[2]?t[2]:"string"==typeof t?.[2]&&e?parseFloat(String(e.shared.getVariable(t[2])??"0")):0]}var Mt=class{constructor(t,e){this.data=t,this.is3D=e,this.perlin=new Y,"perlin"===t.noiseType?(this.perlin.noiseSeed(t.seed),this.noise=e?(t,e,i)=>this.perlin.noise(t,e,i):t=>this.perlin.noise(t)):this.noise=e?function(t=Math.random){let e=F(t),i=new Float64Array(e).map(t=>_[t%12*3]),r=new Float64Array(e).map(t=>_[t%12*3+1]),n=new Float64Array(e).map(t=>_[t%12*3+2]);return function(t,s,o){let a,l,h,c,d,u,p,m,f,y,b=(t+s+o)*w,x=A(t+b),g=A(s+b),v=A(o+b),M=(x+g+v)*j,S=t-(x-M),_=s-(g-M),F=o-(v-M);S>=_?_>=F?(d=1,u=0,p=0,m=1,f=1,y=0):S>=F?(d=1,u=0,p=0,m=1,f=0,y=1):(d=0,u=0,p=1,m=1,f=0,y=1):_<F?(d=0,u=0,p=1,m=0,f=1,y=1):S<F?(d=0,u=1,p=0,m=0,f=1,y=1):(d=0,u=1,p=0,m=1,f=1,y=0);let C=S-d+j,z=_-u+j,W=F-p+j,O=S-m+2*j,N=_-f+2*j,T=F-y+2*j,P=S-1+.5,B=_-1+.5,R=F-1+.5,U=255&x,V=255&g,k=255&v,E=.6-S*S-_*_-F*F;if(E<0)a=0;else{let t=U+e[V+e[k]];E*=E,a=E*E*(i[t]*S+r[t]*_+n[t]*F)}let D=.6-C*C-z*z-W*W;if(D<0)l=0;else{let t=U+d+e[V+u+e[k+p]];D*=D,l=D*D*(i[t]*C+r[t]*z+n[t]*W)}let I=.6-O*O-N*N-T*T;if(I<0)h=0;else{let t=U+m+e[V+f+e[k+y]];I*=I,h=I*I*(i[t]*O+r[t]*N+n[t]*T)}let L=.6-P*P-B*B-R*R;if(L<0)c=0;else{let t=U+1+e[V+1+e[k+1]];L*=L,c=L*L*(i[t]*P+r[t]*B+n[t]*R)}return 32*(a+l+h+c)}}((0,g.default)(t.seed)):function(t=Math.random){let e=F(t),i=new Float64Array(e).map(t=>S[t%12*2]),r=new Float64Array(e).map(t=>S[t%12*2+1]);return function(t,n){let s,o,a=0,l=0,h=0,c=(t+n)*v,d=A(t+c),u=A(n+c),p=(d+u)*M,m=t-(d-p),f=n-(u-p);m>f?(s=1,o=0):(s=0,o=1);let y=m-s+M,b=f-o+M,x=m-1+2*M,g=f-1+2*M,w=255&d,j=255&u,S=.5-m*m-f*f;if(S>=0){let t=w+e[j];S*=S,a=S*S*(i[t]*m+r[t]*f)}let _=.5-y*y-b*b;if(_>=0){let t=w+s+e[j+o];_*=_,l=_*_*(i[t]*y+r[t]*b)}let F=.5-x*x-g*g;if(F>=0){let t=w+1+e[j+1];F*=F,h=F*F*(i[t]*x+r[t]*g)}return 70*(a+l+h)}}((0,g.default)(t.seed??""))}},wt=class extends(n(m)){constructor(t,e){super(),this.parameters=e,this.isCloner=!0,this.objectForSample=void 0,this._pendingMediaLoad=!1,this.random=null,this.surfaceSamplerCache=null,this.surfacePointsCache=null,this.object=t}resetOnMove(){this.removeFromParent(),this.parent=null}removeFromParent(){return super.removeFromParent(),this.instancedMesh?.removeFromParent(),this}dispose(){this.removeFromParent(),this._disposeInstancedMesh(),this._invalidateBoolean(),this._syncEnclosingCopies(!0)}createCopy(){return new jt(this)}_syncEnclosingCopies(t){!t&&this.parent!==this.object.parent||this.object.traverseEntityAncestors(e=>{let i=e.cloner;void 0===i||null===i.parent||(t&&i.expandCopies(),i.invalidateTransform(this.object))})}_invalidateBoolean(){this.object instanceof s&&this.object.onClonerLayoutUpdated()}expandClones(t){null===this.parent?this.updateState(this.parameters,t):this.expandCopies()}expandCopies(){for(let t of this.children)t instanceof r&&t.expand();this._syncInstancedMesh()}invalidateTransform(t){this.matrixWorldNeedsUpdate=!0}onObjUpdateMatrix(){"toObject"!==this.parameters.type&&(this.matrixWorldNeedsUpdate=!0)}update(t){this._syncEnclosingCopies(this._layout(t))}_layout(t){let e=this.children.length;switch(this._updateCount(t),this.parameters.type){case"radial":this._updateRadial(this.parameters,t);break;case"linear":this._updateLinear(this.parameters,t);break;case"grid":this._updateGrid(this.parameters,t);break;case"toObject":this._updateToObject(this.parameters,t)}for(let t of this.children){let e=t.transformOverride;void 0!==e&&(t.position.fromArray(e.position),t.rotation.fromArray(e.rotation),t.scale.fromArray(e.scale)),t.updateMatrix(),t.hasNonUniformScale&&(t.updateMatrixWorld(),t.updateMatrixWorldRigid())}return this._syncInstancedMesh(),this._invalidateBoolean(),this.children.length!==e}get instancingActive(){return void 0!==this.instancedMesh}get insideBoolean(){return null!==this.parent&&"booleanOp"in this.parent}_instancingEligible(){if(!0!==this.parameters.instanced)return!1;let t=this.object;return!(t.entityChildrenCount()>0||!0!==t.isMesh||a(t)||!0===t.isDecalObject)}_syncInstancedMesh(){if(!this._instancingEligible())return void this._disposeInstancedMesh();let t=this.instancedMesh;if(void 0!==t&&t.capacity<this.children.length&&(this._disposeInstancedMesh(),t=void 0),void 0===t){let e=Math.max(8,Math.ceil(1.5*this.children.length));t=this.instancedMesh=new K(this.object,e)}t.matrix=this.matrix,t.matrixWorldNeedsUpdate=!0,t.parent!==this.parent&&(t.removeFromParent(),this.parent?.add(t)),this.syncInstanceMatrices()}syncInstanceMatrices(){this._invalidateBoolean();let t=this.instancedMesh;if(void 0===t)return;let e=0;for(let i of this.children)!1!==i.playModeVisible&&(et.copy(i.matrix).multiply(i.pivotMatrix),t.setMatrixAt(e++,et));t.count=e,t.instanceMatrix.needsUpdate=!0,t.boundingSphere=null}_disposeInstancedMesh(){let t=this.instancedMesh;void 0!==t&&(this.instancedMesh=void 0,t.removeFromParent(),t.dispose())}_updateCount(t,e){let i;if(void 0!==e)i=e;else{let e=vt(this.parameters.grid.count,t);i="grid"===this.parameters.type?Math.round(e[0])*Math.round(e[1])*Math.round(e[2]):this.parameters.count}if("toObject"===this.parameters.type)if(this.parameters.toObject.object){if(void 0===e&&"random"!==this.parameters.toObject.spreadType)return}else i=0;if(this.children.length!==i)if(this.children.length<i)for(let t=0,e=i-this.children.length;t<e;++t){let t=new r(this.object);t.expand(),this.add(t)}else for(;this.children.length>i;){let t=this.children.pop();t.parent=null,t.dispatchEvent({type:"removed"}),this.dispatchEvent({type:"childremoved",child:t})}}getRandom(t,e=!1){return(null===this.random||this.random.data.seed!==t.seed||this.random.data.noiseType!==t.noiseType||this.random.is3D!==e)&&(this.random=new Mt(t,e)),this.random}_updateRadial(t,e){let i,r=t.radial,n=r.start*h.DEG2RAD,s=n-r.end*h.DEG2RAD,o=vt(r.rotation,e),a=new p(o[0],o[1],o[2]);switch(r.axis){case"z":i=new d(0,0,1);break;case"y":i=new d(0,1,0);break;default:i=new d(1,0,0)}let c=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,u=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,m=vt(r.scale,e),f=vt(r.position,e),y=vt(c.scale,e),b=vt(c.position,e),x=vt(c.rotation,e),g=s/t.count,v=N(c.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let s=t*(c.freqScale/10)+c.movement,o=null===u?0:u.noise(s,s,s),l=t+1;e.scale.x=m[0]+v(l,T(o,y[0]))||Z,e.scale.y=m[1]+v(l,T(o,y[1]))||Z,e.scale.z=m[2]+v(l,T(o,y[2]))||Z;let h=g*t-n;switch(r.axis){default:case"x":bt.set(0,h,0);break;case"y":bt.set(0,0,h);break;case"z":bt.set(h,0,0)}ut.copy(i).applyQuaternion(xt.setFromEuler(bt)).multiplyScalar(r.radius),e.position.set(ut.x+(f[0]+v(l,T(o,b[0]))),ut.y+(f[1]+v(l,T(o,b[1]))),ut.z+(f[2]+v(l,T(o,b[2]))));let d=v(l,T(o,x[0])),p=v(l,T(o,x[1])),M=v(l,T(o,x[2]));!0===r.alignment?e.rotation.set(bt.x+(a.x+d),bt.y+(a.y+p),bt.z+(a.z+M)):e.rotation.set(a.x+d,a.y+p,a.z+M)}}_updateLinear(t,e){if("linear"!==t.type)throw new Error;let i=t.linear,r=vt(i.rotation,e),n=vt(i.scale,e),s=vt(i.position,e),o=new p(r[0]??0,r[1]??0,r[2]??0),a=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,h=vt(a.rotation,e),c=vt(a.scale,e),d=vt(a.position,e),u=!0===this.parameters.randomness&&0!==a.strength?this.getRandom(a):null,m=N(a.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let i=t*(a.freqScale/10)+a.movement,r=null===u?0:u.noise(i,i,i),l=t+1,p=m(l,T(r,h[0])),f=m(l,T(r,h[1])),y=m(l,T(r,h[2]));e.scale.x=1+(n[0]-1)*t+m(l,T(r,c[0]))||Z,e.scale.y=1+(n[1]-1)*t+m(l,T(r,c[1]))||Z,e.scale.z=1+(n[2]-1)*t+m(l,T(r,c[2]))||Z,e.rotation.set(o.x*t+p,o.y*t+f,o.z*t+y),e.position.x=s[0]*t+m(l,T(r,d[0])),e.position.y=s[1]*t+m(l,T(r,d[1])),e.position.z=s[2]*t+m(l,T(r,d[2]))}}_updateGrid(t,e){let i=0,r=t.grid,n=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,s=vt(n.scale,e),o=vt(n.rotation,e),a=vt(n.position,e),h=!0===this.parameters.randomness&&0!==n.strength?this.getRandom(n,!0):null,c=N(n.strength,this.parameters.randomness),u=vt(r.count,e),p=vt(r.size,e);if(!0===r.useCenter){let t={x:u[0]%2==0?2:1,y:u[1]%2==0?2:1,z:u[2]%2==0?2:1},e=new d(p[0]*(u[0]-t.x)*.5,p[1]*(u[1]-t.y)*.5,p[2]*(u[2]-t.z)*.5);for(let t=0;t<u[0];t++)for(let r=0;r<u[1];r++)for(let l=0;l<u[2];l++){let d=this.children[i++];if(!d)continue;let u=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement,(l+1)*(n.freqScale/10)+n.movement);d.scale.x=1+c(i,T(u,s[0]))||Z,d.scale.y=1+c(i,T(u,s[1]))||Z,d.scale.z=1+c(i,T(u,s[2]))||Z;let m=c(i,T(u,o[0])),f=c(i,T(u,o[1])),y=c(i,T(u,o[2]));d.rotation.set(m,f,y),d.position.x=p[0]*t-e.x+c(i,T(u,a[0])),d.position.y=p[1]*r-e.y+c(i,T(u,a[1])),d.position.z=p[2]*l-e.z+c(i,T(u,a[2]))}}else for(let t=0;t<u[0];t++)for(let e=0;e<u[1];e++)for(let r=0;r<u[2];r++){let l=this.children[i++];if(!l)continue;let d=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(e+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement);l.scale.x=1+c(i,T(d,s[0]))||Z,l.scale.y=1+c(i,T(d,s[1]))||Z,l.scale.z=1+c(i,T(d,s[2]))||Z;let u=c(i,T(d,o[0])),m=c(i,T(d,o[1])),f=c(i,T(d,o[2]));l.rotation.set(u,m,f),l.position.x=p[0]*t+c(i,T(d,a[0])),l.position.y=-p[1]*e+c(i,T(d,a[1])),l.position.z=-p[2]*r+c(i,T(d,a[2]))}}_updateToObject(i,r){if("toObject"!==i.type)throw new Error;let{toObject:n}=i,s=vt(n.rotation,r),o=vt(n.position,r),a=vt(n.scale,r),h=new p(s[0],s[1],s[2]),c=i.randomnessObject??l.defaultData([1,1,1]).randomnessObject,d=vt(c.rotation,r),u=vt(c.position,r),m=vt(c.scale,r),f=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,y=N(c.strength,this.parameters.randomness);if(!n.object){for(let[,t]of this.children.entries())t.position.set(0,0,0),t.scale.setScalar(1),t.rotation.set(0,0,0);return this.objectForSample=void 0,void this.invalidateSurfaceCaches()}if(!this.objectForSample)return;if(this.objectForSample instanceof t){if(!this.objectForSample.font?.isLoaded||void 0===this.objectForSample.geometry.attributes.position)return void(this._pendingMediaLoad=!0);this._pendingMediaLoad=!1}if(void 0===this.objectForSample.geometry&&this.objectForSample.isAncestorOf(this.object.uuid))return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) seem to be a child/descendant of the object it's being cloned to. Please re-parent it so that they are siblings instead.`);let b=this.getSubdivData();if(b.length>0){let t=Math.round(b.length*n.count/100);this._updateCount(r,t)}else{let t=this.objectForSample.geometry.getAttribute("position");if(!t||isNaN(t.count)||0===t.count)return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) cannot be cloned on the surface of "${this.objectForSample.name}" (${this.objectForSample.uuid}) because the latter does not have a valid geometry.`)}this.objectForSample.updateMatrixWorld();let x="random"===n.spreadType,v=null;x&&(v=this.getSurfaceSampler(),v.setRandomGenerator((0,g.default)(this.object.uuid+n.seed)));let M=W[n.axis],w=this.children;ot.fromArray(M);let j=this.objectForSample instanceof e;j&&it.copy(this.objectForSample.matrixWorld).invert(),"normal"!==n.align&&this.object.getWorldDirection(dt),ft.set(ot.y,ot.z,ot.x).normalize(),yt.copy(ft).cross(ot).normalize(),nt.makeBasis(ft,ot,yt).invert();for(let[t,e]of w.entries()){let i=t*(c.freqScale/10)+c.movement,r=null===f?0:f.noise(i,i,i),s=t+1,l=y(s,T(r,d[0])),p=y(s,T(r,d[1])),g=y(s,T(r,d[2]));x?v.sample(lt,ht):(b.length&&(lt.fromArray(b[t].pos),ht.fromArray(b[t].norm)),j&&lt.applyMatrix4(it)),e.position.copy(lt);let M="normal"===n.align?ht:dt,w=at.fromArray(o);at.x+=y(s,T(r,u[0])),at.y+=y(s,T(r,u[1])),at.z+=y(s,T(r,u[2]));let A=Math.acos(M.dot(ot)),S=ct.crossVectors(ot,M).normalize(),_=tt.makeRotationAxis(S,A);pt.copy(M).cross(this.object.up).normalize(),mt.copy(pt).cross(M).normalize(),rt.makeBasis(pt,M,mt),st.multiplyMatrices(rt,nt),bt.setFromRotationMatrix(st),w.applyMatrix4(_),e.position.add(w),e.rotation.set(bt.x+h.x+l,bt.y+h.y+p,bt.z+h.z+g),e.scale.set(1+a[0]+y(s,T(r,m[0]))||Z,1+a[1]+y(s,T(r,m[1]))||Z,1+a[2]+y(s,T(r,m[2]))||Z),e.scale.multiply(this.object.scale)}}getSurfaceSampler(){let t=this.objectForSample,e=t.geometry,i=e.getAttribute("position"),r=e.index,n=this.surfaceSamplerCache;if(null!==n&&n.geometry===e&&n.position===i&&n.positionVersion===gt(i)&&n.index===r&&n.indexVersion===(null===r?-1:r.version))return n.sampler;let s=new z(t).build();return this.surfaceSamplerCache={geometry:e,position:i,positionVersion:gt(i),index:r,indexVersion:null===r?-1:r.version,sampler:s},s}invalidateSurfaceCaches(){this.surfaceSamplerCache=null,this.surfacePointsCache=null}getSubdivData(){if(!this.objectForSample)return[];let t=this.parameters.toObject.spreadType;if("random"===t)return[];let i=this.objectForSample instanceof e,r=this.objectForSample.geometry;if(!i&&r){let e=this.surfacePointsCache,i=r.getAttribute("position");if(null!==e&&e.spreadType===t&&e.geometry===r&&e.position===i&&e.positionVersion===gt(i)&&e.index===r.index&&e.indexVersion===(null===r.index?-1:r.index.version))return e.points}let n=new Map,s=(t,e)=>{let i=Math.round(1e4*t[0])+"_"+Math.round(1e4*t[1])+"_"+Math.round(1e4*t[2]),r=n.get(i);r?(r.pos[0]+=t[0],r.pos[1]+=t[1],r.pos[2]+=t[2],r.norm[0]+=e[0],r.norm[1]+=e[1],r.norm[2]+=e[2],r.count+=1):n.set(i,{pos:[...t],norm:[...e],count:1})};if(i){let e=this.objectForSample,i=O[t],r=I[i],n=E[i],o=D[i],a=r(e.subdivPointerNew);for(let t=0;t<=a-1;t++){let i=n(e.subdivPointerNew,t),r=o(e.subdivPointerNew,t);J.fromArray(i).applyMatrix4(e.matrixWorld),X.fromArray(r),s(J.toArray(),X.toArray())}}else(r.index?function(t){let e=[],i=Math.floor(t.index.count/3);for(let r=0;r<i;r++)if(q.fromArray(t.index.array,3*r),L.setFromAttributeAndIndices(t.attributes.position,q.x,q.y,q.z),L.getNormal(G),L.getMidpoint(H),!(isNaN(H.x)||isNaN(H.y)||isNaN(H.z))){let{a:t,b:i,c:r}=L,n=t.toArray(),s=i.toArray(),o=r.toArray(),a=t.distanceTo(i),l=i.distanceTo(r),h=r.distanceTo(t),c=V(n,s),d=V(s,o),u=V(o,n),p=[a,l,h],m=Math.max(...p),f=p.filter(t=>Math.round(t)===Math.round(m)).length>1,y=[],b=L.getMidpoint(H).toArray();m===a&&!f&&(y=[d,u,u],b=c),m===l&&!f&&(y=[c,u,u],b=d),m===h&&!f&&(y=[c,d,d],b=u),f&&(y=[c,d,u]),e.push({vertices:[n,s,o],faceCenters:y,midpoint:b,norm:L.getNormal(G).toArray()})}return e}(r):function(t){let e=[],{position:i}=t.attributes;for(let t=0;t<i.count;t++){L.setFromAttributeAndIndices(i,3*t,3*t+1,3*t+2),L.getNormal(G),L.getMidpoint(H);let r=L.a.toArray(),n=L.b.toArray(),s=L.c.toArray();e.push({vertices:[r,n,s],faceCenters:[V(r,n),V(n,s),V(s,r)],midpoint:H.toArray(),norm:G.toArray()})}return e}(r)).forEach((e,i)=>{"polygon_center"===t&&s(e.midpoint,e.norm),"vertex"===t&&(s(e.vertices[0],e.norm),s(e.vertices[1],e.norm),s(e.vertices[2],e.norm)),"edge"===t&&(s(e.faceCenters[0],e.norm),s(e.faceCenters[1],e.norm),s(e.faceCenters[2],e.norm))});let o=Array.from(n.values());for(let t of o)t.pos[0]/=t.count,t.pos[1]/=t.count,t.pos[2]/=t.count,t.norm[0]/=t.count,t.norm[1]/=t.count,t.norm[2]/=t.count;if(!i&&r){let e=r.getAttribute("position");this.surfacePointsCache={spreadType:t,geometry:r,position:e,positionVersion:gt(e),index:r.index,indexVersion:null===r.index?-1:r.index.version,points:o}}return o}updateState(t,e){this.parameters=o(t);let{parent:i,matrix:r}=this;if("toObject"!==this.parameters.type)this.invalidateSurfaceCaches(),(null===this.parent||this.parent!==this.object)&&(this.removeFromParent(),this.object.parent?.add(this),this.matrix=this.object.matrix,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1);else if(null===this.parent||this.parent.uuid!==this.parameters.toObject.object){this.removeFromParent(),this.invalidateSurfaceCaches();let t=e.scene.find(this.parameters.toObject.object);this.objectForSample=t instanceof s?t:void 0,this.matrix=new u,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1,t&&t.add(this)}let n=this._layout(e);this._syncEnclosingCopies(n||this.parent!==i||this.matrix!==r)}get pendingMediaLoad(){return this._pendingMediaLoad}},jt=class extends wt{constructor(t){super(t.object,t.parameters),this.source=t,this.matrixAutoUpdate=!1}get insideBoolean(){return this.source.insideBoolean}expand(){this.matrix=this.source.matrix,this.matrixWorldNeedsUpdate=!0;let t=0;for(let e of this.source.children){if(!(e instanceof r))continue;let i=this.children[t];void 0===i&&(i=new r(this.object),this.add(i)),i.matrix=e.matrix,i.matrixWorldNeedsUpdate=!0,i.expand(),t+=1}for(;this.children.length>t;)this.remove(this.children[t])}};export{wt as a};
1
+ import{a as t}from"./runtime-chunk-R43GBZS7.js";import{b as e}from"./runtime-chunk-VL2Y54A7.js";import{H as i,ia as r}from"./runtime-chunk-7DZPYJ74.js";import{f as n,v as s}from"./runtime-chunk-C6IGXHVB.js";import{c as o}from"./runtime-chunk-RTLL6WIB.js";import{c as a}from"./runtime-chunk-2PT2WH66.js";import{L as l}from"./runtime-chunk-ADHKZQMB.js";import{Ec as h,Gc as c,Hc as d,Qc as u,Rc as p,Tc as m,Yc as f,sd as y}from"./runtime-chunk-KPOUV3HD.js";import{a as b,b as x}from"./runtime-chunk-ML3Z74BL.js";var g=x(b((t,e)=>{var i,r;i=t,r=function(){return t.importState=function(e){var i=new t;return i.importState(e),i},t;function t(){return function(t){var e=0,i=0,r=0,n=1;0==t.length&&(t=[+new Date]);var s=function(){var t=4022871197,e=function(e){e=e.toString();for(var i=0;i<e.length;i++){var r=.02519603282416938*(t+=e.charCodeAt(i));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)};return e.version="Mash 0.9",e}();e=s(" "),i=s(" "),r=s(" ");for(var o=0;o<t.length;o++)(e-=s(t[o]))<0&&(e+=1),(i-=s(t[o]))<0&&(i+=1),(r-=s(t[o]))<0&&(r+=1);s=null;var a=function(){var t=2091639*e+2.3283064365386963e-10*n;return e=i,i=r,r=t-(n=0|t)};return a.next=a,a.uint32=function(){return 4294967296*a()},a.fract53=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.version="Alea 0.9",a.args=t,a.exportState=function(){return[e,i,r,n]},a.importState=function(t){e=+t[0]||0,i=+t[1]||0,r=+t[2]||0,n=+t[3]||0},a}(Array.prototype.slice.call(arguments))}},"object"==typeof t?e.exports=r():"function"==typeof define&&define.amd?define(r):i.Alea=r()})()),v=.5*(Math.sqrt(3)-1),M=(3-Math.sqrt(3))/6,w=1/3,j=1/6,A=(Math.sqrt(5),Math.sqrt(5),t=>0|Math.floor(t)),S=new Float64Array([1,1,-1,1,1,-1,-1,-1,1,0,-1,0,1,0,-1,0,0,1,0,-1,0,1,0,-1]),_=new Float64Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);function F(t){let e=new Uint8Array(512);for(let t=0;t<256;t++)e[t]=t;for(let i=0;i<255;i++){let r=i+~~(t()*(256-i)),n=e[i];e[i]=e[r],e[r]=n}for(let t=256;t<512;t++)e[t]=e[t-256];return e}var C=new f,z=class{constructor(t){this.weightAttribute=null;let e=t.geometry;if(!e.isBufferGeometry||3!==e.attributes.position.itemSize)throw new Error("THREE.MeshSurfaceSampler: Requires BufferGeometry triangle mesh.");e.index&&(e=e.toNonIndexed()),this.geometry=e,this.randomFunction=Math.random,this.positionAttribute=this.geometry.getAttribute("position"),this.distribution=null}build(){let t=this.positionAttribute,e=new Float32Array(t.count/3);for(let i=0;i<t.count;i+=3){let r=1;C.a.fromBufferAttribute(t,i),C.b.fromBufferAttribute(t,i+1),C.c.fromBufferAttribute(t,i+2),r*=C.getArea(),e[i/3]=r}this.distribution=new Float32Array(t.count/3);let i=0;for(let t=0;t<e.length;t++)i+=e[t],this.distribution[t]=i;return this}setRandomGenerator(t){return this.randomFunction=t,this}sample(t,e){if(this.distribution){let i=this.distribution[this.distribution.length-1],r=this.binarySearch(this.randomFunction()*i);return this.sampleFace(r,t,e)}}binarySearch(t){if(!this.distribution)return 0;let e=this.distribution,i=0,r=e.length-1,n=-1;for(;i<=r;){let s=Math.ceil((i+r)/2);if(0===s||e[s-1]<=t&&e[s]>t){n=s;break}t<e[s]?r=s-1:i=s+1}return n}sampleFace(t,e,i){let r=this.randomFunction(),n=this.randomFunction();return r+n>1&&(r=1-r,n=1-n),C.a.fromBufferAttribute(this.positionAttribute,3*t),C.b.fromBufferAttribute(this.positionAttribute,3*t+1),C.c.fromBufferAttribute(this.positionAttribute,3*t+2),e.set(0,0,0).addScaledVector(C.a,r).addScaledVector(C.b,n).addScaledVector(C.c,1-(r+n)),C.getNormal(i),this}},O={x:[1,0,0],"-x":[-1,0,0],y:[0,1,0],"-y":[0,-1,0],z:[0,0,1],"-z":[0,0,-1]},W={polygon_center:0,edge:1,vertex:2},N=(t,e)=>(i,r)=>e&&0!==i&&0!==t?t*r/100:0,P=(t,e)=>{let i=Math.abs(e),r=-1*i;return(t- -1)*(i-r)/2+r},B=new d,T=new d,V=new d,U=new d;function k(t,e){let i=V.fromArray(t),r=U.fromArray(e);T.copy(r).sub(i);let n=T.length();return T.normalize().multiplyScalar(.5*n),B.copy(i).add(T).toArray()}var R,E,I,D,L=new f,q=new d,G=new d,H=new d,$=class extends y{},Z=class extends ${constructor(t,e){super(void 0,void 0,e),this.source=t,this.isClonerInstancedMesh=!0,this.pivotMatrix=new u,this.previousModelViewMatrix=new u,this.copyPreviousMatrix=!0,this.capacity=e,this.count=0,this.matrixAutoUpdate=!1}raycast(t,e){}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}onAfterRender(t,e,i,r,n,s){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}get visible(){return!0!==this.source.cloner?.insideBoolean&&(this.source.visible||this.source.dataPatched.visible&&!0===this.source.dataPatched.cloner?.hideBase)}set visible(t){}get castShadow(){return this.source.castShadow}set castShadow(t){}get receiveShadow(){return this.source.receiveShadow}set receiveShadow(t){}get layers(){return this.source.layers}set layers(t){}get geometry(){return this.source.geometry}set geometry(t){}get material(){return this.source.material}set material(t){}get morphTargetInfluences(){return this.source.morphTargetInfluences}set morphTargetInfluences(t){}},Q=t=>.5*(1-Math.cos(t*Math.PI)),Y=class{constructor(){this.perlin=new Array(4096)}noise(t,e=0,i=0){if(null==this.perlin){this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=Math.random()}t<0&&(t=-t),e<0&&(e=-e),i<0&&(i=-i);let r,n,s,o,a,l=Math.floor(t),h=Math.floor(e),c=Math.floor(i),d=t-l,u=e-h,p=i-c,m=0,f=.5;for(let t=0;t<4;t++){let t=l+(h<<4)+(c<<8);r=Q(d),n=Q(u),s=this.perlin[4095&t],s+=r*(this.perlin[t+1&4095]-s),o=this.perlin[t+16&4095],o+=r*(this.perlin[t+16+1&4095]-o),s+=n*(o-s),t+=256,o=this.perlin[4095&t],o+=r*(this.perlin[t+1&4095]-o),a=this.perlin[t+16&4095],a+=r*(this.perlin[t+16+1&4095]-a),o+=n*(a-o),s+=Q(p)*(o-s),m+=s*f,f*=.5,l<<=1,d*=2,h<<=1,u*=2,c<<=1,p*=2,d>=1&&(l++,d--),u>=1&&(h++,u--),p>=1&&(c++,p--)}return m}noiseSeed(t){let e=(()=>{let t,e;return{setSeed(i){e=t=(i??4294967296*Math.random())>>>0},getSeed:()=>t,rand:()=>(e=(1664525*e+1013904223)%4294967296,e/4294967296)}})();e.setSeed(t),this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=e.rand()}},K=1e-4,J=new d,X=new d;i.then(t=>{E=[(R=t).get_face_center,R.get_edge_midpoint,R.get_vertex_position],I=[R.get_face_normal,R.get_edge_normal,R.get_vertex_normal],D=[R.face_count,R.edge_count,R.vertex_count]}),new u;var tt=new u,et=new u,it=new u,rt=new u,nt=new u,st=new u,ot=new d,at=new d,lt=new d,ht=new d,ct=new d,dt=new d,ut=new d,pt=new d,mt=new d,ft=new d,yt=new d,bt=new p,xt=new c;function gt(t){return t?t.version??t.data?.version??0:-1}function vt(t,e){return["number"==typeof t?.[0]?t[0]:"string"==typeof t?.[0]&&e?parseFloat(String(e.shared.getVariable(t[0])??"0")):0,"number"==typeof t?.[1]?t[1]:"string"==typeof t?.[1]&&e?parseFloat(String(e.shared.getVariable(t[1])??"0")):0,"number"==typeof t?.[2]?t[2]:"string"==typeof t?.[2]&&e?parseFloat(String(e.shared.getVariable(t[2])??"0")):0]}var Mt=class{constructor(t,e){this.data=t,this.is3D=e,this.perlin=new Y,"perlin"===t.noiseType?(this.perlin.noiseSeed(t.seed),this.noise=e?(t,e,i)=>this.perlin.noise(t,e,i):t=>this.perlin.noise(t)):this.noise=e?function(t=Math.random){let e=F(t),i=new Float64Array(e).map(t=>_[t%12*3]),r=new Float64Array(e).map(t=>_[t%12*3+1]),n=new Float64Array(e).map(t=>_[t%12*3+2]);return function(t,s,o){let a,l,h,c,d,u,p,m,f,y,b=(t+s+o)*w,x=A(t+b),g=A(s+b),v=A(o+b),M=(x+g+v)*j,S=t-(x-M),_=s-(g-M),F=o-(v-M);S>=_?_>=F?(d=1,u=0,p=0,m=1,f=1,y=0):S>=F?(d=1,u=0,p=0,m=1,f=0,y=1):(d=0,u=0,p=1,m=1,f=0,y=1):_<F?(d=0,u=0,p=1,m=0,f=1,y=1):S<F?(d=0,u=1,p=0,m=0,f=1,y=1):(d=0,u=1,p=0,m=1,f=1,y=0);let C=S-d+j,z=_-u+j,O=F-p+j,W=S-m+2*j,N=_-f+2*j,P=F-y+2*j,B=S-1+.5,T=_-1+.5,V=F-1+.5,U=255&x,k=255&g,R=255&v,E=.6-S*S-_*_-F*F;if(E<0)a=0;else{let t=U+e[k+e[R]];E*=E,a=E*E*(i[t]*S+r[t]*_+n[t]*F)}let I=.6-C*C-z*z-O*O;if(I<0)l=0;else{let t=U+d+e[k+u+e[R+p]];I*=I,l=I*I*(i[t]*C+r[t]*z+n[t]*O)}let D=.6-W*W-N*N-P*P;if(D<0)h=0;else{let t=U+m+e[k+f+e[R+y]];D*=D,h=D*D*(i[t]*W+r[t]*N+n[t]*P)}let L=.6-B*B-T*T-V*V;if(L<0)c=0;else{let t=U+1+e[k+1+e[R+1]];L*=L,c=L*L*(i[t]*B+r[t]*T+n[t]*V)}return 32*(a+l+h+c)}}((0,g.default)(t.seed)):function(t=Math.random){let e=F(t),i=new Float64Array(e).map(t=>S[t%12*2]),r=new Float64Array(e).map(t=>S[t%12*2+1]);return function(t,n){let s,o,a=0,l=0,h=0,c=(t+n)*v,d=A(t+c),u=A(n+c),p=(d+u)*M,m=t-(d-p),f=n-(u-p);m>f?(s=1,o=0):(s=0,o=1);let y=m-s+M,b=f-o+M,x=m-1+2*M,g=f-1+2*M,w=255&d,j=255&u,S=.5-m*m-f*f;if(S>=0){let t=w+e[j];S*=S,a=S*S*(i[t]*m+r[t]*f)}let _=.5-y*y-b*b;if(_>=0){let t=w+s+e[j+o];_*=_,l=_*_*(i[t]*y+r[t]*b)}let F=.5-x*x-g*g;if(F>=0){let t=w+1+e[j+1];F*=F,h=F*F*(i[t]*x+r[t]*g)}return 70*(a+l+h)}}((0,g.default)(t.seed??""))}},wt=class extends(n(m)){constructor(t,e){super(),this.parameters=e,this.isCloner=!0,this.objectForSample=void 0,this._pendingMediaLoad=!1,this.random=null,this.surfaceSamplerCache=null,this.surfacePointsCache=null,this.object=t}resetOnMove(){this.removeFromParent(),this.parent=null}removeFromParent(){return super.removeFromParent(),this.instancedMesh?.removeFromParent(),this}dispose(){this.removeFromParent(),this._disposeInstancedMesh(),this._invalidateBoolean(),this._syncEnclosingCopies(!0)}createCopy(){return new jt(this)}_syncEnclosingCopies(t){!t&&this.parent!==this.object.parent||this.object.traverseEntityAncestors(e=>{let i=e.cloner;void 0===i||null===i.parent||(t&&i.expandCopies(),i.invalidateTransform(this.object))})}_invalidateBoolean(){this.object instanceof s&&this.object.onClonerLayoutUpdated()}expandClones(t){null===this.parent?this.updateState(this.parameters,t):this.expandCopies()}expandCopies(){for(let t of this.children)t instanceof r&&t.expand();this._syncInstancedMesh()}invalidateTransform(t){this.matrixWorldNeedsUpdate=!0}onObjUpdateMatrix(){"toObject"!==this.parameters.type&&(this.matrixWorldNeedsUpdate=!0)}update(t){this._syncEnclosingCopies(this._layout(t))}_layout(t){let e=this.children.length;switch(this._updateCount(t),this.parameters.type){case"radial":this._updateRadial(this.parameters,t);break;case"linear":this._updateLinear(this.parameters,t);break;case"grid":this._updateGrid(this.parameters,t);break;case"toObject":this._updateToObject(this.parameters,t)}for(let t of this.children){let e=t.transformOverride;void 0!==e&&(t.position.fromArray(e.position),t.rotation.fromArray(e.rotation),t.scale.fromArray(e.scale)),t.updateMatrix(),t.hasNonUniformScale&&(t.updateMatrixWorld(),t.updateMatrixWorldRigid())}return this._syncInstancedMesh(),this._invalidateBoolean(),this.children.length!==e}get instancingActive(){return void 0!==this.instancedMesh}get insideBoolean(){return null!==this.parent&&"booleanOp"in this.parent}_instancingEligible(){if(!0!==this.parameters.instanced)return!1;let t=this.object;return!(t.entityChildrenCount()>0||!0!==t.isMesh||a(t)||!0===t.isDecalObject)}_syncInstancedMesh(){if(!this._instancingEligible())return void this._disposeInstancedMesh();let t=this.instancedMesh;if(void 0!==t&&t.capacity<this.children.length&&(this._disposeInstancedMesh(),t=void 0),void 0===t){let e=Math.max(8,Math.ceil(1.5*this.children.length));t=this.instancedMesh=new Z(this.object,e)}t.matrix=this.matrix,t.matrixWorldNeedsUpdate=!0,t.parent!==this.parent&&(t.removeFromParent(),this.parent?.add(t)),this.syncInstanceMatrices()}syncInstanceMatrices(){this._invalidateBoolean();let t=this.instancedMesh;if(void 0===t)return;let e=0;for(let i of this.children)!1!==i.playModeVisible&&(et.copy(i.matrix).multiply(i.pivotMatrix),t.setMatrixAt(e++,et));t.count=e,t.instanceMatrix.needsUpdate=!0,t.boundingSphere=null}_disposeInstancedMesh(){let t=this.instancedMesh;void 0!==t&&(this.instancedMesh=void 0,t.removeFromParent(),t.dispose())}_updateCount(t,e){let i;if(void 0!==e)i=e;else{let e=vt(this.parameters.grid.count,t);i="grid"===this.parameters.type?Math.round(e[0])*Math.round(e[1])*Math.round(e[2]):this.parameters.count}if("toObject"===this.parameters.type)if(this.parameters.toObject.object){if(void 0===e&&"random"!==this.parameters.toObject.spreadType)return}else i=0;if(this.children.length!==i)if(this.children.length<i)for(let t=0,e=i-this.children.length;t<e;++t){let t=new r(this.object);t.expand(),this.add(t)}else for(;this.children.length>i;){let t=this.children.pop();t.parent=null,t.dispatchEvent({type:"removed"}),this.dispatchEvent({type:"childremoved",child:t})}}getRandom(t,e=!1){return(null===this.random||this.random.data.seed!==t.seed||this.random.data.noiseType!==t.noiseType||this.random.is3D!==e)&&(this.random=new Mt(t,e)),this.random}_updateRadial(t,e){let i,r=t.radial,n=r.start*h.DEG2RAD,s=n-r.end*h.DEG2RAD,o=vt(r.rotation,e),a=new p(o[0],o[1],o[2]);switch(r.axis){case"z":i=new d(0,0,1);break;case"y":i=new d(0,1,0);break;default:i=new d(1,0,0)}let c=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,u=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,m=vt(r.scale,e),f=vt(r.position,e),y=vt(c.scale,e),b=vt(c.position,e),x=vt(c.rotation,e),g=s/t.count,v=N(c.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let s=t*(c.freqScale/10)+c.movement,o=null===u?0:u.noise(s,s,s),l=t+1;e.scale.x=m[0]+v(l,P(o,y[0]))||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=g*t-n;switch(r.axis){default:case"x":bt.set(0,h,0);break;case"y":bt.set(0,0,h);break;case"z":bt.set(h,0,0)}ut.copy(i).applyQuaternion(xt.setFromEuler(bt)).multiplyScalar(r.radius),e.position.set(ut.x+(f[0]+v(l,P(o,b[0]))),ut.y+(f[1]+v(l,P(o,b[1]))),ut.z+(f[2]+v(l,P(o,b[2]))));let d=v(l,P(o,x[0])),p=v(l,P(o,x[1])),M=v(l,P(o,x[2]));!0===r.alignment?e.rotation.set(bt.x+(a.x+d),bt.y+(a.y+p),bt.z+(a.z+M)):e.rotation.set(a.x+d,a.y+p,a.z+M)}}_updateLinear(t,e){if("linear"!==t.type)throw new Error;let i=t.linear,r=vt(i.rotation,e),n=vt(i.scale,e),s=vt(i.position,e),o=new p(r[0]??0,r[1]??0,r[2]??0),a=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,h=vt(a.rotation,e),c=vt(a.scale,e),d=vt(a.position,e),u=!0===this.parameters.randomness&&0!==a.strength?this.getRandom(a):null,m=N(a.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let i=t*(a.freqScale/10)+a.movement,r=null===u?0:u.noise(i,i,i),l=t+1,p=m(l,P(r,h[0])),f=m(l,P(r,h[1])),y=m(l,P(r,h[2]));e.scale.x=1+(n[0]-1)*t+m(l,P(r,c[0]))||K,e.scale.y=1+(n[1]-1)*t+m(l,P(r,c[1]))||K,e.scale.z=1+(n[2]-1)*t+m(l,P(r,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(r,d[0])),e.position.y=s[1]*t+m(l,P(r,d[1])),e.position.z=s[2]*t+m(l,P(r,d[2]))}}_updateGrid(t,e){let i=0,r=t.grid,n=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,s=vt(n.scale,e),o=vt(n.rotation,e),a=vt(n.position,e),h=!0===this.parameters.randomness&&0!==n.strength?this.getRandom(n,!0):null,c=N(n.strength,this.parameters.randomness),u=vt(r.count,e),p=vt(r.size,e);if(!0===r.useCenter){let t={x:u[0]%2==0?2:1,y:u[1]%2==0?2:1,z:u[2]%2==0?2:1},e=new d(p[0]*(u[0]-t.x)*.5,p[1]*(u[1]-t.y)*.5,p[2]*(u[2]-t.z)*.5);for(let t=0;t<u[0];t++)for(let r=0;r<u[1];r++)for(let l=0;l<u[2];l++){let d=this.children[i++];if(!d)continue;let u=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement,(l+1)*(n.freqScale/10)+n.movement);d.scale.x=1+c(i,P(u,s[0]))||K,d.scale.y=1+c(i,P(u,s[1]))||K,d.scale.z=1+c(i,P(u,s[2]))||K;let m=c(i,P(u,o[0])),f=c(i,P(u,o[1])),y=c(i,P(u,o[2]));d.rotation.set(m,f,y),d.position.x=p[0]*t-e.x+c(i,P(u,a[0])),d.position.y=p[1]*r-e.y+c(i,P(u,a[1])),d.position.z=p[2]*l-e.z+c(i,P(u,a[2]))}}else for(let t=0;t<u[0];t++)for(let e=0;e<u[1];e++)for(let r=0;r<u[2];r++){let l=this.children[i++];if(!l)continue;let d=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(e+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement);l.scale.x=1+c(i,P(d,s[0]))||K,l.scale.y=1+c(i,P(d,s[1]))||K,l.scale.z=1+c(i,P(d,s[2]))||K;let u=c(i,P(d,o[0])),m=c(i,P(d,o[1])),f=c(i,P(d,o[2]));l.rotation.set(u,m,f),l.position.x=p[0]*t+c(i,P(d,a[0])),l.position.y=-p[1]*e+c(i,P(d,a[1])),l.position.z=-p[2]*r+c(i,P(d,a[2]))}}_updateToObject(i,r){if("toObject"!==i.type)throw new Error;let{toObject:n}=i,s=vt(n.rotation,r),o=vt(n.position,r),a=vt(n.scale,r),h=new p(s[0],s[1],s[2]),c=i.randomnessObject??l.defaultData([1,1,1]).randomnessObject,d=vt(c.rotation,r),u=vt(c.position,r),m=vt(c.scale,r),f=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,y=N(c.strength,this.parameters.randomness);if(!n.object){for(let[,t]of this.children.entries())t.position.set(0,0,0),t.scale.setScalar(1),t.rotation.set(0,0,0);return this.objectForSample=void 0,void this.invalidateSurfaceCaches()}if(!this.objectForSample)return;if(this.objectForSample instanceof t){if(!this.objectForSample.font?.isLoaded||void 0===this.objectForSample.geometry.attributes.position)return void(this._pendingMediaLoad=!0);this._pendingMediaLoad=!1}if(void 0===this.objectForSample.geometry&&this.objectForSample.isAncestorOf(this.object.uuid))return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) seem to be a child/descendant of the object it's being cloned to. Please re-parent it so that they are siblings instead.`);let b=this.getSubdivData();if(b.length>0){let t=Math.round(b.length*n.count/100);this._updateCount(r,t)}else{let t=this.objectForSample.geometry.getAttribute("position");if(!t||isNaN(t.count)||0===t.count)return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) cannot be cloned on the surface of "${this.objectForSample.name}" (${this.objectForSample.uuid}) because the latter does not have a valid geometry.`)}this.objectForSample.updateMatrixWorld();let x="random"===n.spreadType,v=null;x&&(v=this.getSurfaceSampler(),v.setRandomGenerator((0,g.default)(this.object.uuid+n.seed)));let M=O[n.axis],w=this.children;ot.fromArray(M);let j=this.objectForSample instanceof e;j&&it.copy(this.objectForSample.matrixWorld).invert(),"normal"!==n.align&&this.object.getWorldDirection(dt),ft.set(ot.y,ot.z,ot.x).normalize(),yt.copy(ft).cross(ot).normalize(),nt.makeBasis(ft,ot,yt).invert();for(let[t,e]of w.entries()){let i=t*(c.freqScale/10)+c.movement,r=null===f?0:f.noise(i,i,i),s=t+1,l=y(s,P(r,d[0])),p=y(s,P(r,d[1])),g=y(s,P(r,d[2]));x?v.sample(lt,ht):(b.length&&(lt.fromArray(b[t].pos),ht.fromArray(b[t].norm)),j&&lt.applyMatrix4(it)),e.position.copy(lt);let M="normal"===n.align?ht:dt,w=at.fromArray(o);at.x+=y(s,P(r,u[0])),at.y+=y(s,P(r,u[1])),at.z+=y(s,P(r,u[2]));let A=Math.acos(M.dot(ot)),S=ct.crossVectors(ot,M).normalize(),_=tt.makeRotationAxis(S,A);pt.copy(M).cross(this.object.up).normalize(),mt.copy(pt).cross(M).normalize(),rt.makeBasis(pt,M,mt),st.multiplyMatrices(rt,nt),bt.setFromRotationMatrix(st),w.applyMatrix4(_),e.position.add(w),e.rotation.set(bt.x+h.x+l,bt.y+h.y+p,bt.z+h.z+g),e.scale.set(1+a[0]+y(s,P(r,m[0]))||K,1+a[1]+y(s,P(r,m[1]))||K,1+a[2]+y(s,P(r,m[2]))||K),e.scale.multiply(this.object.scale)}}getSurfaceSampler(){let t=this.objectForSample,e=t.geometry,i=e.getAttribute("position"),r=e.index,n=this.surfaceSamplerCache;if(null!==n&&n.geometry===e&&n.position===i&&n.positionVersion===gt(i)&&n.index===r&&n.indexVersion===(null===r?-1:r.version))return n.sampler;let s=new z(t).build();return this.surfaceSamplerCache={geometry:e,position:i,positionVersion:gt(i),index:r,indexVersion:null===r?-1:r.version,sampler:s},s}invalidateSurfaceCaches(){this.surfaceSamplerCache=null,this.surfacePointsCache=null}getSubdivData(){if(!this.objectForSample)return[];let t=this.parameters.toObject.spreadType;if("random"===t)return[];let i=this.objectForSample instanceof e,r=this.objectForSample.geometry;if(!i&&r){let e=this.surfacePointsCache,i=r.getAttribute("position");if(null!==e&&e.spreadType===t&&e.geometry===r&&e.position===i&&e.positionVersion===gt(i)&&e.index===r.index&&e.indexVersion===(null===r.index?-1:r.index.version))return e.points}let n=new Map,s=(t,e)=>{let i=Math.round(1e4*t[0])+"_"+Math.round(1e4*t[1])+"_"+Math.round(1e4*t[2]),r=n.get(i);r?(r.pos[0]+=t[0],r.pos[1]+=t[1],r.pos[2]+=t[2],r.norm[0]+=e[0],r.norm[1]+=e[1],r.norm[2]+=e[2],r.count+=1):n.set(i,{pos:[...t],norm:[...e],count:1})};if(i){let e=this.objectForSample,i=W[t],r=D[i],n=E[i],o=I[i],a=r(e.subdivPointerNew);for(let t=0;t<=a-1;t++){let i=n(e.subdivPointerNew,t),r=o(e.subdivPointerNew,t);J.fromArray(i).applyMatrix4(e.matrixWorld),X.fromArray(r),s(J.toArray(),X.toArray())}}else(r.index?function(t){let e=[],i=Math.floor(t.index.count/3);for(let r=0;r<i;r++)if(q.fromArray(t.index.array,3*r),L.setFromAttributeAndIndices(t.attributes.position,q.x,q.y,q.z),L.getNormal(G),L.getMidpoint(H),!(isNaN(H.x)||isNaN(H.y)||isNaN(H.z))){let{a:t,b:i,c:r}=L,n=t.toArray(),s=i.toArray(),o=r.toArray(),a=t.distanceTo(i),l=i.distanceTo(r),h=r.distanceTo(t),c=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=L.getMidpoint(H).toArray();m===a&&!f&&(y=[d,u,u],b=c),m===l&&!f&&(y=[c,u,u],b=d),m===h&&!f&&(y=[c,d,d],b=u),f&&(y=[c,d,u]),e.push({vertices:[n,s,o],faceCenters:y,midpoint:b,norm:L.getNormal(G).toArray()})}return e}(r):function(t){let e=[],{position:i}=t.attributes;for(let t=0;t<i.count;t++){L.setFromAttributeAndIndices(i,3*t,3*t+1,3*t+2),L.getNormal(G),L.getMidpoint(H);let r=L.a.toArray(),n=L.b.toArray(),s=L.c.toArray();e.push({vertices:[r,n,s],faceCenters:[k(r,n),k(n,s),k(s,r)],midpoint:H.toArray(),norm:G.toArray()})}return e}(r)).forEach((e,i)=>{"polygon_center"===t&&s(e.midpoint,e.norm),"vertex"===t&&(s(e.vertices[0],e.norm),s(e.vertices[1],e.norm),s(e.vertices[2],e.norm)),"edge"===t&&(s(e.faceCenters[0],e.norm),s(e.faceCenters[1],e.norm),s(e.faceCenters[2],e.norm))});let o=Array.from(n.values());for(let t of o)t.pos[0]/=t.count,t.pos[1]/=t.count,t.pos[2]/=t.count,t.norm[0]/=t.count,t.norm[1]/=t.count,t.norm[2]/=t.count;if(!i&&r){let e=r.getAttribute("position");this.surfacePointsCache={spreadType:t,geometry:r,position:e,positionVersion:gt(e),index:r.index,indexVersion:null===r.index?-1:r.index.version,points:o}}return o}updateState(t,e){this.parameters=o(t);let{parent:i,matrix:r}=this;if("toObject"!==this.parameters.type)this.invalidateSurfaceCaches(),(null===this.parent||this.parent!==this.object)&&(this.removeFromParent(),this.object.parent?.add(this),this.matrix=this.object.matrix,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1);else if(null===this.parent||this.parent.uuid!==this.parameters.toObject.object){this.removeFromParent(),this.invalidateSurfaceCaches();let t=e.scene.find(this.parameters.toObject.object);this.objectForSample=t instanceof s?t:void 0,this.matrix=new u,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1,t&&t.add(this)}let n=this._layout(e);this._syncEnclosingCopies(n||this.parent!==i||this.matrix!==r)}get pendingMediaLoad(){return this._pendingMediaLoad}},jt=class extends wt{constructor(t){super(t.object,t.parameters),this.source=t,this.matrixAutoUpdate=!1}get insideBoolean(){return this.source.insideBoolean}expand(){this.matrix=this.source.matrix,this.matrixWorldNeedsUpdate=!0;let t=0;for(let e of this.source.children){if(!(e instanceof r))continue;let i=this.children[t];void 0===i&&(i=new r(this.object),this.add(i)),i.matrix=e.matrix,i.matrixWorldNeedsUpdate=!0,i.expand(),t+=1}for(;this.children.length>t;)this.remove(this.children[t])}};export{wt as a};