@splinetool/runtime 2.0.3 → 2.0.5

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 (334) hide show
  1. package/build/hana-ui.js +46 -31
  2. package/build/hana-ui.js.br +0 -0
  3. package/build/hana-ui.js.gz +0 -0
  4. package/build/hana-ui.wasm +0 -0
  5. package/build/hana-ui.wasm.br +0 -0
  6. package/build/hana-ui.wasm.gz +0 -0
  7. package/build/runtime-aiAssistant-RMA2DMFU.js +1 -0
  8. package/build/runtime-aiAssistant-RMA2DMFU.js.br +0 -0
  9. package/build/runtime-aiAssistant-RMA2DMFU.js.gz +0 -0
  10. package/build/runtime-apiServices-KA4FEP5Y.js +1 -0
  11. package/build/runtime-apiServices-KA4FEP5Y.js.br +0 -0
  12. package/build/runtime-apiServices-KA4FEP5Y.js.gz +0 -0
  13. package/build/{runtime-audio-Y3GYW4YQ.js → runtime-audio-BQSRM3W2.js} +1 -1
  14. package/build/runtime-audio-BQSRM3W2.js.br +0 -0
  15. package/build/runtime-audio-BQSRM3W2.js.gz +0 -0
  16. package/build/{runtime-chunk-RAAW7WHN.js → runtime-chunk-243VQV5T.js} +1 -1
  17. package/build/runtime-chunk-243VQV5T.js.br +0 -0
  18. package/build/runtime-chunk-243VQV5T.js.gz +0 -0
  19. package/build/{runtime-chunk-W7THORYR.js → runtime-chunk-2657LZHS.js} +1 -1
  20. package/build/runtime-chunk-2657LZHS.js.br +0 -0
  21. package/build/runtime-chunk-2657LZHS.js.gz +0 -0
  22. package/build/{runtime-chunk-Z5OH244S.js → runtime-chunk-5XUI4Z6R.js} +1 -1
  23. package/build/runtime-chunk-5XUI4Z6R.js.br +0 -0
  24. package/build/runtime-chunk-5XUI4Z6R.js.gz +0 -0
  25. package/build/{runtime-chunk-MC3OVJQU.js → runtime-chunk-6WHNEYAL.js} +1 -1
  26. package/build/runtime-chunk-6WHNEYAL.js.br +0 -0
  27. package/build/runtime-chunk-6WHNEYAL.js.gz +0 -0
  28. package/build/{runtime-chunk-D2IFC55F.js → runtime-chunk-CDZQF4NV.js} +1 -1
  29. package/build/runtime-chunk-CDZQF4NV.js.br +0 -0
  30. package/build/runtime-chunk-CDZQF4NV.js.gz +0 -0
  31. package/build/{runtime-chunk-ZHNGVKGZ.js → runtime-chunk-DNWPGXEC.js} +1 -1
  32. package/build/runtime-chunk-DNWPGXEC.js.br +0 -0
  33. package/build/runtime-chunk-DNWPGXEC.js.gz +0 -0
  34. package/build/{runtime-chunk-TQBPVLGB.js → runtime-chunk-DSGSWXCQ.js} +1 -1
  35. package/build/runtime-chunk-DSGSWXCQ.js.br +0 -0
  36. package/build/runtime-chunk-DSGSWXCQ.js.gz +0 -0
  37. package/build/{runtime-chunk-6UQ4Z4JG.js → runtime-chunk-DZOSSY2K.js} +1 -1
  38. package/build/runtime-chunk-DZOSSY2K.js.br +0 -0
  39. package/build/runtime-chunk-DZOSSY2K.js.gz +0 -0
  40. package/build/{runtime-chunk-BCJEHBXX.js → runtime-chunk-EGI7ABC6.js} +1 -1
  41. package/build/runtime-chunk-EGI7ABC6.js.br +0 -0
  42. package/build/runtime-chunk-EGI7ABC6.js.gz +0 -0
  43. package/build/{runtime-chunk-D6NWJJTR.js → runtime-chunk-F7OUYIT6.js} +1 -1
  44. package/build/runtime-chunk-F7OUYIT6.js.br +0 -0
  45. package/build/runtime-chunk-F7OUYIT6.js.gz +0 -0
  46. package/build/{runtime-chunk-4FAMJWEB.js → runtime-chunk-IGBRWWDI.js} +1 -1
  47. package/build/runtime-chunk-IGBRWWDI.js.br +0 -0
  48. package/build/runtime-chunk-IGBRWWDI.js.gz +0 -0
  49. package/build/{runtime-chunk-Y2GFSK5L.js → runtime-chunk-IK4H7UNI.js} +1 -1
  50. package/build/runtime-chunk-IK4H7UNI.js.br +0 -0
  51. package/build/runtime-chunk-IK4H7UNI.js.gz +0 -0
  52. package/build/{runtime-chunk-SQKBNW2G.js → runtime-chunk-J4FFQBNR.js} +1 -1
  53. package/build/runtime-chunk-J4FFQBNR.js.br +0 -0
  54. package/build/runtime-chunk-J4FFQBNR.js.gz +0 -0
  55. package/build/runtime-chunk-LALFWESO.js +1 -0
  56. package/build/runtime-chunk-LALFWESO.js.br +0 -0
  57. package/build/runtime-chunk-LALFWESO.js.gz +0 -0
  58. package/build/{runtime-chunk-PXPQZ7SX.js → runtime-chunk-NIDXMSZY.js} +1 -1
  59. package/build/runtime-chunk-NIDXMSZY.js.br +0 -0
  60. package/build/runtime-chunk-NIDXMSZY.js.gz +0 -0
  61. package/build/{runtime-chunk-U5ACSO5E.js → runtime-chunk-OTAMLWBD.js} +1 -1
  62. package/build/runtime-chunk-OTAMLWBD.js.br +0 -0
  63. package/build/runtime-chunk-OTAMLWBD.js.gz +0 -0
  64. package/build/{runtime-chunk-NGWM5WPD.js → runtime-chunk-P2QJHRIH.js} +1 -1
  65. package/build/runtime-chunk-P2QJHRIH.js.br +0 -0
  66. package/build/runtime-chunk-P2QJHRIH.js.gz +0 -0
  67. package/build/runtime-chunk-PLJ25O2X.js +1 -0
  68. package/build/runtime-chunk-PLJ25O2X.js.br +0 -0
  69. package/build/runtime-chunk-PLJ25O2X.js.gz +0 -0
  70. package/build/runtime-chunk-PRQYD4EW.js +1 -0
  71. package/build/runtime-chunk-PRQYD4EW.js.br +0 -0
  72. package/build/runtime-chunk-PRQYD4EW.js.gz +0 -0
  73. package/build/runtime-chunk-QPB2TL3G.js +1 -0
  74. package/build/runtime-chunk-QPB2TL3G.js.br +0 -0
  75. package/build/runtime-chunk-QPB2TL3G.js.gz +0 -0
  76. package/build/runtime-chunk-QVC5UDJO.js +1 -0
  77. package/build/runtime-chunk-QVC5UDJO.js.br +0 -0
  78. package/build/runtime-chunk-QVC5UDJO.js.gz +0 -0
  79. package/build/{runtime-chunk-MVRGHRTL.js → runtime-chunk-RSPDUS6G.js} +1 -1
  80. package/build/runtime-chunk-RSPDUS6G.js.br +0 -0
  81. package/build/runtime-chunk-RSPDUS6G.js.gz +0 -0
  82. package/build/{runtime-chunk-EXHPAC6T.js → runtime-chunk-RWL6KR5S.js} +1 -1
  83. package/build/runtime-chunk-RWL6KR5S.js.br +0 -0
  84. package/build/runtime-chunk-RWL6KR5S.js.gz +0 -0
  85. package/build/{runtime-chunk-ZULFQKQK.js → runtime-chunk-SXDO5LXF.js} +1 -1
  86. package/build/runtime-chunk-SXDO5LXF.js.br +0 -0
  87. package/build/runtime-chunk-SXDO5LXF.js.gz +0 -0
  88. package/build/{runtime-chunk-Q4H7PFTE.js → runtime-chunk-U6S2BBR7.js} +1 -1
  89. package/build/runtime-chunk-U6S2BBR7.js.br +0 -0
  90. package/build/runtime-chunk-U6S2BBR7.js.gz +0 -0
  91. package/build/{runtime-chunk-G5XH52BM.js → runtime-chunk-V3U2TPGQ.js} +1 -1
  92. package/build/runtime-chunk-V3U2TPGQ.js.br +0 -0
  93. package/build/runtime-chunk-V3U2TPGQ.js.gz +0 -0
  94. package/build/{runtime-chunk-32ZE2X4C.js → runtime-chunk-Y365A3K5.js} +1 -1
  95. package/build/runtime-chunk-Y365A3K5.js.br +0 -0
  96. package/build/runtime-chunk-Y365A3K5.js.gz +0 -0
  97. package/build/runtime-chunk-YWT6AWL4.js +1 -0
  98. package/build/runtime-chunk-YWT6AWL4.js.br +0 -0
  99. package/build/runtime-chunk-YWT6AWL4.js.gz +0 -0
  100. package/build/{runtime-classicRuntime-IFIIFBNS.js → runtime-classicRuntime-BD2WFYXF.js} +1 -1
  101. package/build/runtime-classicRuntime-BD2WFYXF.js.br +0 -0
  102. package/build/runtime-classicRuntime-BD2WFYXF.js.gz +0 -0
  103. package/build/runtime-cloners-ST66KGZH.js +1 -0
  104. package/build/runtime-cloners-ST66KGZH.js.br +1 -0
  105. package/build/runtime-cloners-ST66KGZH.js.gz +0 -0
  106. package/build/{runtime-components-LNJJ3QLB.js → runtime-components-RLXFVT5A.js} +1 -1
  107. package/build/runtime-components-RLXFVT5A.js.br +0 -0
  108. package/build/runtime-components-RLXFVT5A.js.gz +0 -0
  109. package/build/runtime-conditional-DCOFCW5I.js +1 -0
  110. package/build/runtime-conditional-DCOFCW5I.js.br +0 -0
  111. package/build/runtime-conditional-DCOFCW5I.js.gz +0 -0
  112. package/build/{runtime-createDestroy-DWI7C4WO.js → runtime-createDestroy-4PG4ZWLI.js} +1 -1
  113. package/build/runtime-createDestroy-4PG4ZWLI.js.br +0 -0
  114. package/build/runtime-createDestroy-4PG4ZWLI.js.gz +0 -0
  115. package/build/{runtime-dragDrop-46CHKTIE.js → runtime-dragDrop-CTXPZ6OW.js} +1 -1
  116. package/build/runtime-dragDrop-CTXPZ6OW.js.br +0 -0
  117. package/build/runtime-dragDrop-CTXPZ6OW.js.gz +0 -0
  118. package/build/runtime-gameControls-LUALVLF5.js +1 -0
  119. package/build/runtime-gameControls-LUALVLF5.js.br +0 -0
  120. package/build/runtime-gameControls-LUALVLF5.js.gz +0 -0
  121. package/build/runtime-hair-JNRT3G3X.js +1 -0
  122. package/build/runtime-hair-JNRT3G3X.js.br +1 -0
  123. package/build/runtime-hair-JNRT3G3X.js.gz +0 -0
  124. package/build/{runtime-mergeStaticGeometries-O5XKFANJ.js → runtime-mergeStaticGeometries-QDKIDV27.js} +1 -1
  125. package/build/runtime-mergeStaticGeometries-QDKIDV27.js.br +0 -0
  126. package/build/runtime-mergeStaticGeometries-QDKIDV27.js.gz +0 -0
  127. package/build/{runtime-miscActions-IRARI4E6.js → runtime-miscActions-FCQTXDEH.js} +1 -1
  128. package/build/runtime-miscActions-FCQTXDEH.js.br +0 -0
  129. package/build/runtime-miscActions-FCQTXDEH.js.gz +0 -0
  130. package/build/runtime-mouseHover-GP5TEPLG.js +1 -0
  131. package/build/runtime-mouseHover-GP5TEPLG.js.br +0 -0
  132. package/build/runtime-mouseHover-GP5TEPLG.js.gz +0 -0
  133. package/build/{runtime-particles-INK4LA4P.js → runtime-particles-VMYZZSAL.js} +1 -1
  134. package/build/runtime-particles-VMYZZSAL.js.br +0 -0
  135. package/build/runtime-particles-VMYZZSAL.js.gz +0 -0
  136. package/build/{runtime-paths-LRTW3RNL.js → runtime-paths-TGU7JOOY.js} +1 -1
  137. package/build/runtime-paths-TGU7JOOY.js.br +0 -0
  138. package/build/runtime-paths-TGU7JOOY.js.gz +0 -0
  139. package/build/runtime-resize-O3Y2XS2Q.js +1 -0
  140. package/build/runtime-resize-O3Y2XS2Q.js.br +0 -0
  141. package/build/runtime-resize-O3Y2XS2Q.js.gz +0 -0
  142. package/build/{runtime-sceneTransition-X7RGRC3W.js → runtime-sceneTransition-4DDTFDJN.js} +1 -1
  143. package/build/runtime-sceneTransition-4DDTFDJN.js.br +0 -0
  144. package/build/runtime-sceneTransition-4DDTFDJN.js.gz +0 -0
  145. package/build/{runtime-scroll-VK7XXJPE.js → runtime-scroll-ET44H7JC.js} +1 -1
  146. package/build/runtime-scroll-ET44H7JC.js.br +0 -0
  147. package/build/runtime-scroll-ET44H7JC.js.gz +0 -0
  148. package/build/runtime-shapeBlends-3FCSH6PN.js +1 -0
  149. package/build/runtime-shapeBlends-3FCSH6PN.js.br +2 -0
  150. package/build/runtime-shapeBlends-3FCSH6PN.js.gz +0 -0
  151. package/build/{runtime-text-KC66JGLC.js → runtime-text-UQIUL5X6.js} +1 -1
  152. package/build/runtime-text-UQIUL5X6.js.br +0 -0
  153. package/build/runtime-text-UQIUL5X6.js.gz +0 -0
  154. package/build/{runtime-textInputs-Y7CREUMS.js → runtime-textInputs-E72WPYQU.js} +1 -1
  155. package/build/runtime-textInputs-E72WPYQU.js.br +0 -0
  156. package/build/runtime-textInputs-E72WPYQU.js.gz +0 -0
  157. package/build/runtime-timeline-2VAMFUOE.js +1 -0
  158. package/build/runtime-timeline-2VAMFUOE.js.br +0 -0
  159. package/build/runtime-timeline-2VAMFUOE.js.gz +0 -0
  160. package/build/{runtime-tracking-FA45SGZJ.js → runtime-tracking-E72XXGER.js} +1 -1
  161. package/build/runtime-tracking-E72XXGER.js.br +0 -0
  162. package/build/runtime-tracking-E72XXGER.js.gz +0 -0
  163. package/build/{runtime-transitions-A7UP5OMB.js → runtime-transitions-JOHZRI2L.js} +1 -1
  164. package/build/runtime-transitions-JOHZRI2L.js.br +0 -0
  165. package/build/runtime-transitions-JOHZRI2L.js.gz +0 -0
  166. package/build/runtime-ui2d-PJKKRE32.js +1 -0
  167. package/build/runtime-ui2d-PJKKRE32.js.br +0 -0
  168. package/build/runtime-ui2d-PJKKRE32.js.gz +0 -0
  169. package/build/{runtime-variables-U36KPJ5V.js → runtime-variables-Q6Q2JCGI.js} +1 -1
  170. package/build/runtime-variables-Q6Q2JCGI.js.br +0 -0
  171. package/build/runtime-variables-Q6Q2JCGI.js.gz +0 -0
  172. package/build/{runtime-vectorShapes-MA6PKTF5.js → runtime-vectorShapes-FKC6EQWI.js} +1 -1
  173. package/build/runtime-vectorShapes-FKC6EQWI.js.br +0 -0
  174. package/build/runtime-vectorShapes-FKC6EQWI.js.gz +0 -0
  175. package/build/{runtime-video-7GHZOZRJ.js → runtime-video-DUDXGADJ.js} +1 -1
  176. package/build/runtime-video-DUDXGADJ.js.br +0 -0
  177. package/build/runtime-video-DUDXGADJ.js.gz +0 -0
  178. package/build/runtime-webgpu-TBHSGHNI.js +1 -0
  179. package/build/runtime-webgpu-TBHSGHNI.js.br +0 -0
  180. package/build/runtime-webgpu-TBHSGHNI.js.gz +0 -0
  181. package/build/runtime.cjs +325 -325
  182. package/build/runtime.js +1 -1
  183. package/build/runtime.js.br +0 -0
  184. package/build/runtime.js.gz +0 -0
  185. package/build/runtime.standalone.js +1 -1
  186. package/build/runtime.standalone.js.br +0 -0
  187. package/build/runtime.standalone.js.gz +0 -0
  188. package/build/runtime.standalone.webgl.js +1 -1
  189. package/build/runtime.standalone.webgl.js.br +0 -0
  190. package/build/runtime.standalone.webgl.js.gz +0 -0
  191. package/build/runtime.standalone.webgpu.js +1 -1
  192. package/build/runtime.standalone.webgpu.js.br +0 -0
  193. package/build/runtime.standalone.webgpu.js.gz +0 -0
  194. package/build/runtime.standalone.webgpu.micro.js +1 -1
  195. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  196. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  197. package/build/runtime.standalone.webgpu.min.js +1 -1
  198. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  199. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  200. package/package.json +1 -1
  201. package/build/runtime-aiAssistant-XJVJ7TQB.js +0 -1
  202. package/build/runtime-aiAssistant-XJVJ7TQB.js.br +0 -0
  203. package/build/runtime-aiAssistant-XJVJ7TQB.js.gz +0 -0
  204. package/build/runtime-apiServices-KAO5SQJZ.js +0 -1
  205. package/build/runtime-apiServices-KAO5SQJZ.js.br +0 -0
  206. package/build/runtime-apiServices-KAO5SQJZ.js.gz +0 -0
  207. package/build/runtime-audio-Y3GYW4YQ.js.br +0 -0
  208. package/build/runtime-audio-Y3GYW4YQ.js.gz +0 -0
  209. package/build/runtime-chunk-32ZE2X4C.js.br +0 -0
  210. package/build/runtime-chunk-32ZE2X4C.js.gz +0 -0
  211. package/build/runtime-chunk-4FAMJWEB.js.br +0 -0
  212. package/build/runtime-chunk-4FAMJWEB.js.gz +0 -0
  213. package/build/runtime-chunk-6UQ4Z4JG.js.br +0 -0
  214. package/build/runtime-chunk-6UQ4Z4JG.js.gz +0 -0
  215. package/build/runtime-chunk-BCJEHBXX.js.br +0 -0
  216. package/build/runtime-chunk-BCJEHBXX.js.gz +0 -0
  217. package/build/runtime-chunk-D2IFC55F.js.br +0 -0
  218. package/build/runtime-chunk-D2IFC55F.js.gz +0 -0
  219. package/build/runtime-chunk-D6NWJJTR.js.br +0 -0
  220. package/build/runtime-chunk-D6NWJJTR.js.gz +0 -0
  221. package/build/runtime-chunk-EXHPAC6T.js.br +0 -0
  222. package/build/runtime-chunk-EXHPAC6T.js.gz +0 -0
  223. package/build/runtime-chunk-G5XH52BM.js.br +0 -0
  224. package/build/runtime-chunk-G5XH52BM.js.gz +0 -0
  225. package/build/runtime-chunk-MC3OVJQU.js.br +0 -0
  226. package/build/runtime-chunk-MC3OVJQU.js.gz +0 -0
  227. package/build/runtime-chunk-MM75L5X4.js +0 -1
  228. package/build/runtime-chunk-MM75L5X4.js.br +0 -0
  229. package/build/runtime-chunk-MM75L5X4.js.gz +0 -0
  230. package/build/runtime-chunk-MVRGHRTL.js.br +0 -0
  231. package/build/runtime-chunk-MVRGHRTL.js.gz +0 -0
  232. package/build/runtime-chunk-NGWM5WPD.js.br +0 -0
  233. package/build/runtime-chunk-NGWM5WPD.js.gz +0 -0
  234. package/build/runtime-chunk-NRJDJMQZ.js +0 -1
  235. package/build/runtime-chunk-NRJDJMQZ.js.br +0 -0
  236. package/build/runtime-chunk-NRJDJMQZ.js.gz +0 -0
  237. package/build/runtime-chunk-PXPQZ7SX.js.br +0 -0
  238. package/build/runtime-chunk-PXPQZ7SX.js.gz +0 -0
  239. package/build/runtime-chunk-Q4H7PFTE.js.br +0 -0
  240. package/build/runtime-chunk-Q4H7PFTE.js.gz +0 -0
  241. package/build/runtime-chunk-QFGFABLH.js +0 -1
  242. package/build/runtime-chunk-QFGFABLH.js.br +0 -0
  243. package/build/runtime-chunk-QFGFABLH.js.gz +0 -0
  244. package/build/runtime-chunk-RAAW7WHN.js.br +0 -0
  245. package/build/runtime-chunk-RAAW7WHN.js.gz +0 -0
  246. package/build/runtime-chunk-SQKBNW2G.js.br +0 -0
  247. package/build/runtime-chunk-SQKBNW2G.js.gz +0 -0
  248. package/build/runtime-chunk-TQBPVLGB.js.br +0 -0
  249. package/build/runtime-chunk-TQBPVLGB.js.gz +0 -0
  250. package/build/runtime-chunk-U5ACSO5E.js.br +0 -0
  251. package/build/runtime-chunk-U5ACSO5E.js.gz +0 -0
  252. package/build/runtime-chunk-W7THORYR.js.br +0 -0
  253. package/build/runtime-chunk-W7THORYR.js.gz +0 -0
  254. package/build/runtime-chunk-XTKPUDRE.js +0 -1
  255. package/build/runtime-chunk-XTKPUDRE.js.br +0 -0
  256. package/build/runtime-chunk-XTKPUDRE.js.gz +0 -0
  257. package/build/runtime-chunk-XV2ZLRKD.js +0 -1
  258. package/build/runtime-chunk-XV2ZLRKD.js.br +0 -0
  259. package/build/runtime-chunk-XV2ZLRKD.js.gz +0 -0
  260. package/build/runtime-chunk-Y2GFSK5L.js.br +0 -0
  261. package/build/runtime-chunk-Y2GFSK5L.js.gz +0 -0
  262. package/build/runtime-chunk-Z5OH244S.js.br +0 -0
  263. package/build/runtime-chunk-Z5OH244S.js.gz +0 -0
  264. package/build/runtime-chunk-ZHNGVKGZ.js.br +0 -0
  265. package/build/runtime-chunk-ZHNGVKGZ.js.gz +0 -0
  266. package/build/runtime-chunk-ZLW3UWOA.js +0 -1
  267. package/build/runtime-chunk-ZLW3UWOA.js.br +0 -0
  268. package/build/runtime-chunk-ZLW3UWOA.js.gz +0 -0
  269. package/build/runtime-chunk-ZULFQKQK.js.br +0 -0
  270. package/build/runtime-chunk-ZULFQKQK.js.gz +0 -0
  271. package/build/runtime-classicRuntime-IFIIFBNS.js.br +0 -0
  272. package/build/runtime-classicRuntime-IFIIFBNS.js.gz +0 -0
  273. package/build/runtime-cloners-WEF7XIM4.js +0 -1
  274. package/build/runtime-cloners-WEF7XIM4.js.br +0 -2
  275. package/build/runtime-cloners-WEF7XIM4.js.gz +0 -0
  276. package/build/runtime-components-LNJJ3QLB.js.br +0 -0
  277. package/build/runtime-components-LNJJ3QLB.js.gz +0 -0
  278. package/build/runtime-conditional-3A423CXW.js +0 -1
  279. package/build/runtime-conditional-3A423CXW.js.br +0 -0
  280. package/build/runtime-conditional-3A423CXW.js.gz +0 -0
  281. package/build/runtime-createDestroy-DWI7C4WO.js.br +0 -0
  282. package/build/runtime-createDestroy-DWI7C4WO.js.gz +0 -0
  283. package/build/runtime-dragDrop-46CHKTIE.js.br +0 -0
  284. package/build/runtime-dragDrop-46CHKTIE.js.gz +0 -0
  285. package/build/runtime-gameControls-YA2YP4UH.js +0 -1
  286. package/build/runtime-gameControls-YA2YP4UH.js.br +0 -0
  287. package/build/runtime-gameControls-YA2YP4UH.js.gz +0 -0
  288. package/build/runtime-hair-XVWLJEZC.js +0 -1
  289. package/build/runtime-hair-XVWLJEZC.js.br +0 -3
  290. package/build/runtime-hair-XVWLJEZC.js.gz +0 -0
  291. package/build/runtime-mergeStaticGeometries-O5XKFANJ.js.br +0 -0
  292. package/build/runtime-mergeStaticGeometries-O5XKFANJ.js.gz +0 -0
  293. package/build/runtime-miscActions-IRARI4E6.js.br +0 -0
  294. package/build/runtime-miscActions-IRARI4E6.js.gz +0 -0
  295. package/build/runtime-mouseHover-3LVJJIFG.js +0 -1
  296. package/build/runtime-mouseHover-3LVJJIFG.js.br +0 -0
  297. package/build/runtime-mouseHover-3LVJJIFG.js.gz +0 -0
  298. package/build/runtime-particles-INK4LA4P.js.br +0 -0
  299. package/build/runtime-particles-INK4LA4P.js.gz +0 -0
  300. package/build/runtime-paths-LRTW3RNL.js.br +0 -0
  301. package/build/runtime-paths-LRTW3RNL.js.gz +0 -0
  302. package/build/runtime-resize-4OIVU46M.js +0 -1
  303. package/build/runtime-resize-4OIVU46M.js.br +0 -0
  304. package/build/runtime-resize-4OIVU46M.js.gz +0 -0
  305. package/build/runtime-sceneTransition-X7RGRC3W.js.br +0 -0
  306. package/build/runtime-sceneTransition-X7RGRC3W.js.gz +0 -0
  307. package/build/runtime-scroll-VK7XXJPE.js.br +0 -0
  308. package/build/runtime-scroll-VK7XXJPE.js.gz +0 -0
  309. package/build/runtime-shapeBlends-VLITROES.js +0 -1
  310. package/build/runtime-shapeBlends-VLITROES.js.br +0 -2
  311. package/build/runtime-shapeBlends-VLITROES.js.gz +0 -0
  312. package/build/runtime-text-KC66JGLC.js.br +0 -0
  313. package/build/runtime-text-KC66JGLC.js.gz +0 -0
  314. package/build/runtime-textInputs-Y7CREUMS.js.br +0 -0
  315. package/build/runtime-textInputs-Y7CREUMS.js.gz +0 -0
  316. package/build/runtime-timeline-KTMKRAZU.js +0 -1
  317. package/build/runtime-timeline-KTMKRAZU.js.br +0 -0
  318. package/build/runtime-timeline-KTMKRAZU.js.gz +0 -0
  319. package/build/runtime-tracking-FA45SGZJ.js.br +0 -0
  320. package/build/runtime-tracking-FA45SGZJ.js.gz +0 -0
  321. package/build/runtime-transitions-A7UP5OMB.js.br +0 -0
  322. package/build/runtime-transitions-A7UP5OMB.js.gz +0 -0
  323. package/build/runtime-ui2d-XLYMHVMW.js +0 -1
  324. package/build/runtime-ui2d-XLYMHVMW.js.br +0 -0
  325. package/build/runtime-ui2d-XLYMHVMW.js.gz +0 -0
  326. package/build/runtime-variables-U36KPJ5V.js.br +0 -0
  327. package/build/runtime-variables-U36KPJ5V.js.gz +0 -0
  328. package/build/runtime-vectorShapes-MA6PKTF5.js.br +0 -0
  329. package/build/runtime-vectorShapes-MA6PKTF5.js.gz +0 -0
  330. package/build/runtime-video-7GHZOZRJ.js.br +0 -0
  331. package/build/runtime-video-7GHZOZRJ.js.gz +0 -0
  332. package/build/runtime-webgpu-JPQ4VPBY.js +0 -1
  333. package/build/runtime-webgpu-JPQ4VPBY.js.br +0 -0
  334. package/build/runtime-webgpu-JPQ4VPBY.js.gz +0 -0
package/build/hana-ui.js CHANGED
@@ -523,6 +523,21 @@ export class SceneController {
523
523
  const ret = wasm.scenecontroller_isObjectInViewport(this.__wbg_ptr, addHeapObject(id));
524
524
  return ret !== 0;
525
525
  }
526
+ /**
527
+ * Whether the built-in editor/UI font (the single font the immediate-mode
528
+ * `updateUiShapes` overlay renders text with) has been fetched and parsed.
529
+ * The load kicks off asynchronously at controller creation
530
+ * (`Assets::load_ui_font`), so overlay text pushed before it lands
531
+ * tessellates to nothing until the next frame after the load completes.
532
+ * Hosts that rasterize on demand (the spline editor / runtime UI-frame
533
+ * canvases) poll this to know when to re-render — without it a canvas
534
+ * rasterized once at boot shows every shape except its texts.
535
+ * @returns {boolean}
536
+ */
537
+ isUiFontLoaded() {
538
+ const ret = wasm.scenecontroller_isUiFontLoaded(this.__wbg_ptr);
539
+ return ret !== 0;
540
+ }
526
541
  /**
527
542
  * @returns {boolean}
528
543
  */
@@ -2391,7 +2406,7 @@ function __wbg_get_imports() {
2391
2406
  const a = state0.a;
2392
2407
  state0.a = 0;
2393
2408
  try {
2394
- return __wasm_bindgen_func_elem_12882(a, state0.b, arg0, arg1);
2409
+ return __wasm_bindgen_func_elem_12885(a, state0.b, arg0, arg1);
2395
2410
  } finally {
2396
2411
  state0.a = a;
2397
2412
  }
@@ -2437,7 +2452,7 @@ function __wbg_get_imports() {
2437
2452
  const a = state0.a;
2438
2453
  state0.a = 0;
2439
2454
  try {
2440
- return __wasm_bindgen_func_elem_12882(a, state0.b, arg0, arg1);
2455
+ return __wasm_bindgen_func_elem_12885(a, state0.b, arg0, arg1);
2441
2456
  } finally {
2442
2457
  state0.a = a;
2443
2458
  }
@@ -3538,47 +3553,47 @@ function __wbg_get_imports() {
3538
3553
  }, arguments); },
3539
3554
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
3540
3555
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 800, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3541
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12874);
3556
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12877);
3542
3557
  return addHeapObject(ret);
3543
3558
  },
3544
3559
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
3545
3560
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3546
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2919);
3561
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2921);
3547
3562
  return addHeapObject(ret);
3548
3563
  },
3549
3564
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
3550
3565
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUComputePipeline")], shim_idx: 679, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3551
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9850);
3566
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9853);
3552
3567
  return addHeapObject(ret);
3553
3568
  },
3554
3569
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
3555
3570
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 679, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3556
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9850_3);
3571
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9853_3);
3557
3572
  return addHeapObject(ret);
3558
3573
  },
3559
3574
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
3560
3575
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 680, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3561
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9852);
3576
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9855);
3562
3577
  return addHeapObject(ret);
3563
3578
  },
3564
3579
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
3565
3580
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPURenderPipeline")], shim_idx: 679, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3566
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9850_5);
3581
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9853_5);
3567
3582
  return addHeapObject(ret);
3568
3583
  },
3569
3584
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
3570
3585
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 679, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3571
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9850_6);
3586
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9853_6);
3572
3587
  return addHeapObject(ret);
3573
3588
  },
3574
3589
  __wbindgen_cast_0000000000000008: function(arg0, arg1) {
3575
3590
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 679, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3576
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9850_7);
3591
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9853_7);
3577
3592
  return addHeapObject(ret);
3578
3593
  },
3579
3594
  __wbindgen_cast_0000000000000009: function(arg0, arg1) {
3580
3595
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 795, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3581
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11260);
3596
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11263);
3582
3597
  return addHeapObject(ret);
3583
3598
  },
3584
3599
  __wbindgen_cast_000000000000000a: function(arg0) {
@@ -3652,22 +3667,22 @@ function __wbg_get_imports() {
3652
3667
  };
3653
3668
  }
3654
3669
 
3655
- function __wasm_bindgen_func_elem_11260(arg0, arg1) {
3656
- wasm.__wasm_bindgen_func_elem_11260(arg0, arg1);
3670
+ function __wasm_bindgen_func_elem_11263(arg0, arg1) {
3671
+ wasm.__wasm_bindgen_func_elem_11263(arg0, arg1);
3657
3672
  }
3658
3673
 
3659
- function __wasm_bindgen_func_elem_2919(arg0, arg1, arg2) {
3660
- wasm.__wasm_bindgen_func_elem_2919(arg0, arg1, addHeapObject(arg2));
3674
+ function __wasm_bindgen_func_elem_2921(arg0, arg1, arg2) {
3675
+ wasm.__wasm_bindgen_func_elem_2921(arg0, arg1, addHeapObject(arg2));
3661
3676
  }
3662
3677
 
3663
- function __wasm_bindgen_func_elem_9852(arg0, arg1, arg2) {
3664
- wasm.__wasm_bindgen_func_elem_9852(arg0, arg1, addHeapObject(arg2));
3678
+ function __wasm_bindgen_func_elem_9855(arg0, arg1, arg2) {
3679
+ wasm.__wasm_bindgen_func_elem_9855(arg0, arg1, addHeapObject(arg2));
3665
3680
  }
3666
3681
 
3667
- function __wasm_bindgen_func_elem_12874(arg0, arg1, arg2) {
3682
+ function __wasm_bindgen_func_elem_12877(arg0, arg1, arg2) {
3668
3683
  try {
3669
3684
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3670
- wasm.__wasm_bindgen_func_elem_12874(retptr, arg0, arg1, addHeapObject(arg2));
3685
+ wasm.__wasm_bindgen_func_elem_12877(retptr, arg0, arg1, addHeapObject(arg2));
3671
3686
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3672
3687
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3673
3688
  if (r1) {
@@ -3678,10 +3693,10 @@ function __wasm_bindgen_func_elem_12874(arg0, arg1, arg2) {
3678
3693
  }
3679
3694
  }
3680
3695
 
3681
- function __wasm_bindgen_func_elem_9850(arg0, arg1, arg2) {
3696
+ function __wasm_bindgen_func_elem_9853(arg0, arg1, arg2) {
3682
3697
  try {
3683
3698
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3684
- wasm.__wasm_bindgen_func_elem_9850(retptr, arg0, arg1, addHeapObject(arg2));
3699
+ wasm.__wasm_bindgen_func_elem_9853(retptr, arg0, arg1, addHeapObject(arg2));
3685
3700
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3686
3701
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3687
3702
  if (r1) {
@@ -3692,10 +3707,10 @@ function __wasm_bindgen_func_elem_9850(arg0, arg1, arg2) {
3692
3707
  }
3693
3708
  }
3694
3709
 
3695
- function __wasm_bindgen_func_elem_9850_3(arg0, arg1, arg2) {
3710
+ function __wasm_bindgen_func_elem_9853_3(arg0, arg1, arg2) {
3696
3711
  try {
3697
3712
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3698
- wasm.__wasm_bindgen_func_elem_9850_3(retptr, arg0, arg1, addHeapObject(arg2));
3713
+ wasm.__wasm_bindgen_func_elem_9853_3(retptr, arg0, arg1, addHeapObject(arg2));
3699
3714
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3700
3715
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3701
3716
  if (r1) {
@@ -3706,10 +3721,10 @@ function __wasm_bindgen_func_elem_9850_3(arg0, arg1, arg2) {
3706
3721
  }
3707
3722
  }
3708
3723
 
3709
- function __wasm_bindgen_func_elem_9850_5(arg0, arg1, arg2) {
3724
+ function __wasm_bindgen_func_elem_9853_5(arg0, arg1, arg2) {
3710
3725
  try {
3711
3726
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3712
- wasm.__wasm_bindgen_func_elem_9850_5(retptr, arg0, arg1, addHeapObject(arg2));
3727
+ wasm.__wasm_bindgen_func_elem_9853_5(retptr, arg0, arg1, addHeapObject(arg2));
3713
3728
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3714
3729
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3715
3730
  if (r1) {
@@ -3720,10 +3735,10 @@ function __wasm_bindgen_func_elem_9850_5(arg0, arg1, arg2) {
3720
3735
  }
3721
3736
  }
3722
3737
 
3723
- function __wasm_bindgen_func_elem_9850_6(arg0, arg1, arg2) {
3738
+ function __wasm_bindgen_func_elem_9853_6(arg0, arg1, arg2) {
3724
3739
  try {
3725
3740
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3726
- wasm.__wasm_bindgen_func_elem_9850_6(retptr, arg0, arg1, addHeapObject(arg2));
3741
+ wasm.__wasm_bindgen_func_elem_9853_6(retptr, arg0, arg1, addHeapObject(arg2));
3727
3742
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3728
3743
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3729
3744
  if (r1) {
@@ -3734,10 +3749,10 @@ function __wasm_bindgen_func_elem_9850_6(arg0, arg1, arg2) {
3734
3749
  }
3735
3750
  }
3736
3751
 
3737
- function __wasm_bindgen_func_elem_9850_7(arg0, arg1, arg2) {
3752
+ function __wasm_bindgen_func_elem_9853_7(arg0, arg1, arg2) {
3738
3753
  try {
3739
3754
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3740
- wasm.__wasm_bindgen_func_elem_9850_7(retptr, arg0, arg1, addHeapObject(arg2));
3755
+ wasm.__wasm_bindgen_func_elem_9853_7(retptr, arg0, arg1, addHeapObject(arg2));
3741
3756
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3742
3757
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3743
3758
  if (r1) {
@@ -3748,8 +3763,8 @@ function __wasm_bindgen_func_elem_9850_7(arg0, arg1, arg2) {
3748
3763
  }
3749
3764
  }
3750
3765
 
3751
- function __wasm_bindgen_func_elem_12882(arg0, arg1, arg2, arg3) {
3752
- wasm.__wasm_bindgen_func_elem_12882(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
3766
+ function __wasm_bindgen_func_elem_12885(arg0, arg1, arg2, arg3) {
3767
+ wasm.__wasm_bindgen_func_elem_12885(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
3753
3768
  }
3754
3769
 
3755
3770
 
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{c as i}from"./runtime-chunk-4YV3EXSU.js";import{f as a}from"./runtime-chunk-QVC5UDJO.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as n}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var r=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onVoice=({value:e,frequencies:t})=>{this.events.forEach(e=>{e.dispatch()})}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantListener"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new o(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("voice",this.onVoice))}disconnect(){this.openAIRealtime?.off("voice",this.onVoice)}},o=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}dispatch(){this.dispatchActions(this.actions)}dispatchActions(e){e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}},c=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onTriggerEvent=({description:e,direction:t})=>{let s=this.events.find(t=>t.data.description===e);s&&("backward"===t?s.dispatchReverse():s.dispatch())}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantTrigger"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new h(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("trigger_event",this.onTriggerEvent))}disconnect(){this.openAIRealtime?.off("trigger_event",this.onTriggerEvent)}},h=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}dispatch(){let e=this.actions;e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}dispatchReverse(){let e=this.actions;e.Transition.forEach(e=>e.reverseFromCurrent()),e.Particles.forEach(e=>e.reverseFromCurrent()),e.Animation.forEach(e=>e.reverseFromCurrent()),e.SwitchCamera.forEach(e=>e.reverseFromCurrent()),e.Create.forEach(e=>e.dispatchStop())}},l=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,s,i)=>String(t+t+s+s+i+i));let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},d=[4186.01,4434.92,4698.63,4978.03,5274.04,5587.65,5919.91,6271.93,6644.88,7040,7458.62,7902.13],p=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],u=[],f=[];for(let e=1;e<=8;e++)for(let t=0;t<d.length;t++){let s=d[t];u.push(s/Math.pow(2,8-e)),f.push(p[t]+e)}var v=[32,2e3],m=u.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),y=f.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),g=class{static getFrequencies(e,t,s,i="frequency",a=-100,n=-30){s||(s=new Float32Array(e.frequencyBinCount),e.getFloatFrequencyData(s));let r,o,c,h=t/2,l=1/s.length*h;if("music"===i||"voice"===i){let e="voice"===i?m:u,t=Array(e.length).fill(a);for(let i=0;i<s.length;i++){let a=i*l,n=s[i];for(let s=e.length-1;s>=0;s--)if(a>e[s]){t[s]=Math.max(t[s],n);break}}r=t,o="voice"===i?m:u,c="voice"===i?y:f}else r=Array.from(s),o=r.map((e,t)=>l*t),c=o.map(e=>`${e.toFixed(2)} Hz`);let d=r.map(e=>Math.max(0,Math.min((e-a)/(n-a),1)));return{values:new Float32Array(d),frequencies:o,labels:c}}},E=class{constructor(e){this.value=0,this.frequencies=new Float32Array(0);let t=new AudioContext;this.source=t.createMediaStreamSource(e),this.analyser=t.createAnalyser(),this.source.connect(this.analyser),this.analyser.fftSize=8192,this.analyser.smoothingTimeConstant=.1}getFrequencies(e=-100,t=-30){if(!this.analyser)throw new Error("Not connected, please call .connect() first");return g.getFrequencies(this.analyser,44100,void 0,"voice",e,t)}update(){let e=this.getFrequencies(),t=e.values.reduce((e,t)=>e+t,0)/e.values.length;this.value=t,this.frequencies=e.values}disconnect(){this.source.disconnect(),this.analyser.disconnect()}},b=class{constructor(e){this.callbacks=e,this.rafId=0,this.isOpen=!1,this.onMessage=e=>{this.callbacks.onMessage(e.data)},this.onOpen=()=>{this.isOpen=!0,this.callbacks.onOpen()},this.animate=()=>{this.rafId=requestAnimationFrame(this.animate),this.isOpen&&this.analyser&&(this.analyser.update(),this.callbacks.onVoice(this.analyser.value,this.analyser.frequencies))}}async connect(e){let t=await async function(e){try{return(await(await fetch("https://relayserver.spline.design/session?uuidfile="+e)).json()).token}catch(e){console.error("Token generation error:",e)}}(e);this.pc=new RTCPeerConnection,this.audioElement=document.createElement("audio"),this.audioElement.autoplay=!0,this.pc.ontrack=e=>{let t=e.streams[0];this.audioElement.srcObject=t,this.analyser=new E(t)};let s=await navigator.mediaDevices.getUserMedia({audio:!0});this.pc.addTrack(s.getTracks()[0]),this.dc=this.pc.createDataChannel("oai-events"),this.dc.addEventListener("message",this.onMessage),this.dc.addEventListener("open",this.onOpen);let i=await this.pc.createOffer();await this.pc.setLocalDescription(i);let a={type:"answer",sdp:await(await fetch("https://api.openai.com/v1/realtime/calls?model=gpt-realtime",{method:"POST",body:i.sdp,headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/sdp"}})).text()};await this.pc.setRemoteDescription(a),this.animate()}send(e){return!!this.dc&&(this.dc.send(e),!0)}disconnect(){cancelAnimationFrame(this.rafId),this.analyser?.disconnect(),this.isOpen=!1,this.dc?.removeEventListener("message",this.onMessage),this.dc?.removeEventListener("open",this.onOpen),this.dc?.close(),this.pc?.getSenders().forEach(e=>{e.track&&e.track.stop()}),this.pc?.close(),this.pc=void 0}};var w=class{constructor(t,s,i){this.data=t,this.id=s,this.shared=i,this.emitter=e(),this.voice=0,this.frequencies=new Float32Array([0]),this.events=[],this.isConnected=!1,this.isToolsAdded=!1,this.tools=[],this.onServerEvent=e=>{let t=JSON.parse(e);if(this.appendEvent(t),"session.created"===t.type&&this.onSessionCreated(),"response.done"===t.type&&t.response?.output)for(let e of t.response.output)if("function_call"===e.type)for(let[t,s]of this.tools)e.name===t.name&&(s(JSON.parse(e.arguments)),setTimeout(()=>{this.sendClientEvent({type:"response.create",response:{instructions:"notice the user about what you just did"}})}))},this.onSessionCreated=()=>{this.isToolsAdded||this.registerTools()},this.onOpen=()=>{this.events=[],this.isConnected=!0,this.sendClientEvent({type:"response.create",response:{instructions:"Say hi"}})}}update(e){this.data=e}setColorByName(e,t){let s=this.shared.getColorByName(e);if(s){let{id:e}=s,{r:i,g:a,b:n}=l(t)??{r:0,g:0,b:0};this.shared.updateColor(e,{r:i/255,g:a/255,b:n/255})}}async connect(){if(this.isConnected||this.session||this.hosted)return;let e={onMessage:this.onServerEvent,onOpen:this.onOpen,onVoice:(e,t)=>{this.voice=e,this.frequencies=t,this.emitter.emit("voice",{value:e,frequencies:t})}};this.hosted=function(e,t,s){if(!function(){try{return!0===window.__SPLINE_PLAY_VOICE_HOST__&&window.parent!==window}catch{return!1}}())return null;let i=!1,a=e=>{window.parent.postMessage({__splinePlayFrame:!0,...e},"*")},n=t=>{if(t.source!==window.parent)return;let a=t.data;!a||!0!==a.__splinePlayFrameHost||a.id!==e||("voice-open"===a.type?(i=!0,s.onOpen()):"voice-message"===a.type&&"string"==typeof a.data?s.onMessage(a.data):"voice-level"===a.type&&"number"==typeof a.value?s.onVoice(a.value,a.frequencies instanceof Float32Array?a.frequencies:new Float32Array(0)):"voice-error"===a.type&&console.error("Voice assistant host error:",a.message))};return window.addEventListener("message",n),a({type:"voice-connect",id:e,hash:t}),{send:t=>!!i&&(a({type:"voice-send",id:e,message:t}),!0),disconnect:()=>{i=!1,window.removeEventListener("message",n),a({type:"voice-disconnect",id:e})}}}(this.id,this.data.integration.hash,e),!this.hosted&&(this.session=new b(e),await this.session.connect(this.data.integration.hash))}appendEvent(e){this.events=[e,...this.events]}sendClientEvent(e){e.event_id=e.event_id||crypto.randomUUID();let t=JSON.stringify(e);(this.hosted?this.hosted.send(t):this.session?.send(t))?this.appendEvent(e):console.error("Failed to send message - no data channel available",e)}registerTools(){this.isToolsAdded=!0,this.registerTool({type:"function",name:"set_personality_color",description:"returns a color based on the voice personality of the ai assistant. This should be called by the voice assistant each time it is asks to speak differently. If a color cannot be associated to the personality, the color should be a neutral color.",parameters:{type:"object",properties:{color:{type:"string",description:"css hex color string, reflecting the personality"},personality:{type:"string",description:"the personality of the voice assistant"}},required:["color","personality"]}},({color:e})=>{this.setColorByName("Voice Assistant Color",e)});let e=this.shared.getVariablesNames().join(", ");this.registerTool({type:"function",name:"set_variable",description:"Sets a Spline variable value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the variable that needs to be set. Here's a list of available variables: ${e}. It the variable does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"The new value for this variable, should always be a string even for number and boolean variables, assume that the value will be cast to the proper type afterwards."}},required:["name","value","type"]}},({name:e,value:t})=>{let s=this.shared.getVariableByName(e);if(s){let e,i=this.shared.getVariable(s.id);e="number"==typeof i?parseFloat(t):"boolean"==typeof i?"true"===t.toLowerCase():{textValue:t},this.shared.updateVariable(s.id,e)}});let t=this.shared.getColorNames().join(", ");this.registerTool({type:"function",name:"set_color",description:"Sets a Spline color asset value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the color asset that needs to be set. Here's a list of available color assets: ${t}. It the color asset does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"css hex color string"}},required:["name","value"]}},({name:e,value:t})=>{this.setColorByName(e,t)});let s=this.shared.scene,i=[];s.traverseEntity(e=>{e.data.events.forEach(e=>{if("AIAssistantTrigger"===e.data.type){let{description:t}=e.data;i.push(t)}})}),this.registerTool({type:"function",name:"trigger_event",description:"Trigger an event by name, here are the available events, please match what the user is asking for to one of these if it applies, otherwise don't call the function and warn the user.",parameters:{type:"object",properties:{description:{type:"string",description:`The name of the event that needs to be triggered. Here's a list of available events: ${JSON.stringify(i)}.`},direction:{type:"string",description:"default is forward, but can be forward or backward. Always set to forward unless the user ask to reverse or cancel the event, then set to backward."}},required:["description","direction"]}},({description:e,direction:t})=>{this.emitter.emit("trigger_event",{description:e,direction:t})}),this.sendClientEvent({type:"session.update",session:{type:"realtime",tools:this.tools.map(([e])=>e)}})}registerTool(e,t){this.tools.push([e,t])}disconnect(){this.voice=0,this.isConnected=!1,this.isToolsAdded=!1,this.session?.disconnect(),this.session=void 0,this.hosted?.disconnect(),this.hosted=null}computeAnalysisForListenerEvent(e){if("range"===e.analysis){let t=this.frequencies.slice(...e.analysisRange);return t.reduce((e,t)=>e+t,0)/t.length}return"single"===e.analysis?this.frequencies[e.analysisSingle]:this.voice}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}};s("AIAssistantListener",({eventContext:e,eventManager:t})=>new r(e,t)),s("AIAssistantTrigger",({eventContext:e,eventManager:t})=>new c(e,t)),i((e,t,s)=>new w(e,t,s)),n("ai-assistant");
@@ -0,0 +1 @@
1
+ import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{a as r}from"./runtime-chunk-4YV3EXSU.js";import{b as i,e as n,f as o}from"./runtime-chunk-QVC5UDJO.js";import{a}from"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as h}from"./runtime-chunk-TZCHGFVF.js";import{Ga as c,Ha as d,o as u}from"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var l=class extends t{constructor(e,t){super(e),this.eventManager=t,this.userAPIs={},this.events=[],this.onSuccess=({userAPIId:e})=>{this.events.forEach(t=>{t.data.userAPIId===e&&t.dispatchSuccess()})},this.onError=({userAPIId:e})=>{this.events.forEach(t=>{t.data.userAPIId===e&&t.dispatchError()})},this.userAPIs=e.sharedAssets.getUserAPIs()}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"API"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new p(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),Object.entries(this.userAPIs).forEach(([e,t])=>{t.on("success",this.onSuccess),t.on("error",this.onError),t.autostart&&t.callUserAPI(this.eventContext.sharedAssets)})}disconnect(){Object.entries(this.userAPIs).forEach(([e,t])=>{t.off("success",this.onSuccess),t.off("error",this.onError)})}},p=class{constructor(e,t,s,r,i,n){this.id=e,this.data=t,this.object=s,this.successActions=o(t,t.successActions,r,i,n,s),this.errorActions=o(t,t.errorActions,r,i,n,s)}dispatchSuccess(){this.dispatchActions(this.successActions)}dispatchError(){this.dispatchActions(this.errorActions)}dispatchActions(e){e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}},f=class extends t{constructor(e,t){super(e),this.eventManager=t,this.userWebhooks={},this.events=[],this.onMessage=({userWebhookId:e})=>{this.events.forEach(t=>{t.data.userWebhookId===e&&t.dispatch()})},this.userWebhooks=e.sharedAssets.getUserWebhooks()}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"WEBHOOK"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new m(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),Object.entries(this.userWebhooks).forEach(([e,t])=>{t.connect(),t.on("message",this.onMessage)})}disconnect(){Object.entries(this.userWebhooks).forEach(([e,t])=>{t.off("message",this.onMessage),t.disconnect()})}},m=class{constructor(e,t,s,r,i,n){this.id=e,this.data=t,this.object=s,this.actions=o(t,t.actions,r,i,n,s)}dispatch(){let e=this.actions;e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}},v=class{constructor(e,t,s,r){this.data=e,this.page=t,this.shared=s,this.condition=r}dispatch(){if(!1===n(this.shared,this.condition))return!1;if(this.data.userAPIId){let e=this.shared.getUserAPI(this.data.userAPIId);e&&"callUserAPI"in e&&e.callUserAPI(this.shared)}}dispose(){}},E=class{constructor(t,s,r){this.id=t,this.userAPI=s,this.result=void 0,this.error="null",this.isPrefetched=!1,this.isLoading=!1,this.isLoaded=!1,this.prefetchPromise=new Promise(e=>e()),this.emitter=e(),this._innerCallUserAPI=async e=>{this.emitter.emit("start",{userAPIId:this.id}),this.isLoading=!0,this.isLoading=!1;try{this.result=await async function(e,t,s=new AbortController){let r,i,n=e.url,o=e.proxy?.enabled??!1;if("OpenAI"===e.integration?.type){let s=b(""===e.integration.prompt?[]:JSON.parse(e.integration.prompt),t),r=""===e.integration.behavior?[]:b(JSON.parse(e.integration.behavior),t);i=`{\n\t\t"model": "${e.integration.model}",\n\t\t"messages": [${e.integration.useBehavior?`\n\t\t{\n\t\t\t"role": "system",\n\t\t\t"content": "${r}"\n\t\t},`:""}\n\t\t{\n\t\t\t"role": "user",\n\t\t\t"content": "${s}"\n\t\t}\n\t\t]\n\t}`}if(o){let s;n=`https://apis.spline.design/file/${e.proxy.fileId}/external-api/request?uuidexternalapi=${e.proxy.proxyId}`,void 0!==i?s=i:"POST"===e.method&&e.body&&(s=b(JSON.parse(e.body),t)),void 0!==s&&(n+=`&data=${encodeURIComponent(s.replace(/(\r\n|\n|\r|\t)/gm,""))}`)}else"OpenAI"===e.integration?.type?r=i:"POST"===e.method&&e.body&&(r=b(JSON.parse(e.body),t));let a=await fetch(n,{method:o?"GET":e.method,headers:o?void 0:g(e),signal:s.signal,body:r});if(!a.ok)throw new Error("status:"+a.status+"_:_"+a.statusText);if("OpenAI"===e.integration?.type){let e=await a.json();return o&&(e=e.response),{content:e.choices[0].message.content}}{let e=await a.json();return o&&(e=e.response),e}}(this.userAPI,e),this.error="null",this.emitter.emit("success",{userAPIId:this.id})}catch(e){let t=e.message?.split("_:_")?.[0]?.replace("status:","")??"null";this.error=t,this.result=null,this.emitter.emit("error",{userAPIId:this.id})}this.isLoading=!1,this.isPrefetched=!0,this.isLoaded=!0},"OpenAI"===s?.integration?.type?this.result={content:""}:"GET"===s.method&&""!==s.url&&(this.prefetchPromise=this.prefetch(r)),this._debouncedCallUserAPI=this._innerCallUserAPI,this._updateDebouncedCallUserAPI(),this._debouncedPrefetch=a(this.prefetch,1e3,{trailing:!0})}_updateDebouncedCallUserAPI(){this._debouncedCallUserAPI=void 0!==this.userAPI.debounce&&this.userAPI.debounce>0?a(this._innerCallUserAPI,this.userAPI.debounce,{leading:!0,trailing:!0}):this._innerCallUserAPI}async prefetch(e){await this.callUserAPI(e)}async callUserAPI(e){await this._debouncedCallUserAPI(e)}update(e,t,s=!0){this.userAPI=e,this._updateDebouncedCallUserAPI(),""!==this.userAPI.url&&"GET"===this.userAPI.method&&s&&this._debouncedPrefetch(t)}retrieveValue(e){if(this.result)try{return u.zoom(this.result,e)}catch(e){console.error(e)}}retrieveZoomedKeyValues(e){if(this.result){let s=e&&e.length?u.zoom(this.result,e):this.result;if("object"==typeof(t=s)&&null!==t)return Object.entries(s);if(function(e){return Array.isArray(e)}(s))return s.map((e,t)=>[t.toString(),e]);throw function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null===e}(s)?new Error("This path points to a value, use retrieveValue() instead. "+e?.join(".")):new Error("Path error"+e?.join("."))}var t}dispose(){}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}get autostart(){return this.userAPI.autoStart}};function g(e){let t=new Headers;return e.headers.forEach(e=>{""!==e.data.key&&t.append(e.data.key,e.data.value)}),t}var A=(e,t)=>{if("string"==typeof e){let s=t.getVariable(e);if(s)return A(s,t)}return d.isBoolean(e)?d.getDisplayedValue(e).toLowerCase():d.getDisplayedValue(e)},b=(e,t)=>e.map((e,s)=>{if("text"in e)return e.text;if("type"in e){if("paragraph"===e.type)return(s>0?"\n":"")+b(e.children,t);if("variable"===e.type){let s=t.getVariable(e.variableId);if(void 0!==s)return A(s,t)}}return""}).join(""),I=1e3,P=512*I,y=class{constructor(t,s){this.id=t,this.userWebhook=s,this.result=void 0,this._connected=!1,this.emitter=e(),this.reconnectWaitFor=I,this._onError=e=>{this.eventSource?.removeEventListener("message",this._onMessage),this.eventSource?.removeEventListener("error",this._onError),this.eventSource?.removeEventListener("open",this._onConnected),this._scheduleReconnect()},this._onConnected=e=>{clearTimeout(this.scheduledReconnectHandle),this.reconnectWaitFor=I,this._connected=!0},this._onDisconnected=()=>{clearTimeout(this.scheduledReconnectHandle),this.reconnectWaitFor=I,this._connected=!1},this._onMessage=e=>{let t,s=e.data;try{t=JSON.parse(s)}catch(e){console.error("Error parsing webhook message",e)}if(t){let e=!1;this.userWebhook.parametersSchemas.forEach(({data:s})=>{void 0!==t[s.name]&&function(e,t){let s=typeof e;return!!(("string"===t||"number"===t)&&s===t||"boolean"===t&&("true"===e||"false"===e||!0===e||!1===e)||"image"===t&&"string"===s&&e.startsWith("http"))}(t[s.name],s.type)&&(void 0===this.result&&(this.result={}),this.result[s.name]=t[s.name],e=!0)}),e&&this.emitter.emit("message",{userWebhookId:this.id})}}}connect(){clearTimeout(this.scheduledReconnectHandle),this.userWebhook.url&&(this.eventSource=new EventSource("https://hooks.spline.design/events?hashFile="+this.userWebhook.url),this.eventSource.addEventListener("message",this._onMessage),this.eventSource.addEventListener("error",this._onError),this.eventSource.addEventListener("open",this._onConnected))}disconnect(){this.eventSource?.removeEventListener("message",this._onMessage),this.eventSource?.removeEventListener("error",this._onError),this.eventSource?.removeEventListener("open",this._onConnected),this.eventSource?.close(),this._onDisconnected(),clearTimeout(this.scheduledReconnectHandle)}_scheduleReconnect(){this.reconnectWaitFor*=2,this.reconnectWaitFor>P&&(this.reconnectWaitFor=P),clearTimeout(this.scheduledReconnectHandle),this.scheduledReconnectHandle=setTimeout(()=>{this.scheduledReconnectHandle=void 0,this.connect()},this.reconnectWaitFor)}update(e){this.userWebhook=e}dispose(){this._connected&&this.disconnect()}get connected(){return this._connected}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}getParametersKeys(){return this.userWebhook.parametersSchemas.map(e=>e.data.name)}getParameterValue(e){if(this.getParametersKeys().includes(e)){if(this.result)return this.result?.[e];for(let t of this.userWebhook.parametersSchemas)if(t.data.name===e)return c.defaultParameterValueByType(t.data.type)}}};s("API",({eventContext:e,eventManager:t})=>new l(e,t)),s("WEBHOOK",({eventContext:e,eventManager:t})=>new f(e,t)),i("UserAPI",({data:e,page:t,shared:s,actionCondition:r})=>new v(e,t,s,r)),r({createUserAPI:(e,t,s)=>new E(e,t,s),createUserWebhook:(e,t)=>new y(e,t)}),h("api-services");
@@ -1 +1 @@
1
- import{c as t}from"./runtime-chunk-NSD7DU3P.js";import{b as i,e as a}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-Z5OH244S.js";import{a as s}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var e=new Map,o=new Map,d=class{constructor(i,a,s,d){this.data=a,this.isPlayAudioAction=!0;let{audio:n,volume:r,delay:h,loop:u}=a;if(!n)throw new Error("Missing property");try{let i="string"==typeof n?d.getAudio(n).src:n.data;this.audioPlayer=new t({src:i,volume:r,delay:h,loop:u})}catch{console.warn(`Could not create an audio player for this object: "${s.name}" and this audio: "${n}"`)}o.has(s.uuid)?o.get(s.uuid).push(this):o.set(s.uuid,[this]),e.set(i,this)}playByToggle(){"stop"===this.data.toggle?"playing"===this.audioPlayer?.status?this.audioPlayer.stop():(this.audioPlayer?.stop(),this.audioPlayer?.play()):"pause"===this.data.toggle?"playing"===this.audioPlayer?.status?this.audioPlayer?.pause():this.audioPlayer?.play():(this.audioPlayer?.stop(),this.audioPlayer?.play())}dispose(){this.audioPlayer?.stop()}},n=class{constructor(t){this.data=t,this.isPauseAudioAction=!0}dispatch(){this.data.playAudio?this.pauseAudio(this.data.playAudio):this.data.object?this.pauseAllAudiosFromObject(this.data.object):this.pauseAllAudios()}pauseAudio(t){let i=e.get(t);!i||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.audioPlayer?.[this.data.interaction](),this.disposeDelay()},this.data.delay)):i.audioPlayer?.[this.data.interaction]())}pauseAllAudiosFromObject(t){let i=o.get(t);!i?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.forEach(t=>t.audioPlayer?.[this.data.interaction]()),this.disposeDelay()},this.data.delay)):i.forEach(t=>t.audioPlayer?.[this.data.interaction]()))}pauseAllAudios(){let t=[...o.values()];!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(t=>{t.forEach(t=>{t.audioPlayer?.[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):t.forEach(t=>{t.forEach(t=>{t.audioPlayer?.[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},r=class{constructor(t,i,a,s,e){if(this.data=i,this.shared=s,this.condition=e,"play"===i.interaction)this.interaction=new d(t,i,a,s);else{if("pause"!==i.interaction&&"stop"!==i.interaction)throw new Error("Missing property");this.interaction=new n(i)}}dispatchBasic(){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.playByToggle():this.interaction.dispatch()}dispatchConditional(){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.audioPlayer?.play():this.interaction.dispatch()}dispatchGameControl(t){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d&&("start"===t?this.interaction.audioPlayer?.play():this.interaction.audioPlayer?.stop())}dispose(){this.interaction.dispose()}};i("Audio",({id:t,data:i,object:a,shared:s,actionCondition:e})=>new r(t,i,a,s,e)),s("audio");
1
+ import{c as t}from"./runtime-chunk-NSD7DU3P.js";import{b as i,e as a}from"./runtime-chunk-QVC5UDJO.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as s}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var e=new Map,o=new Map,d=class{constructor(i,a,s,d){this.data=a,this.isPlayAudioAction=!0;let{audio:n,volume:r,delay:h,loop:u}=a;if(!n)throw new Error("Missing property");try{let i="string"==typeof n?d.getAudio(n).src:n.data;this.audioPlayer=new t({src:i,volume:r,delay:h,loop:u})}catch{console.warn(`Could not create an audio player for this object: "${s.name}" and this audio: "${n}"`)}o.has(s.uuid)?o.get(s.uuid).push(this):o.set(s.uuid,[this]),e.set(i,this)}playByToggle(){"stop"===this.data.toggle?"playing"===this.audioPlayer?.status?this.audioPlayer.stop():(this.audioPlayer?.stop(),this.audioPlayer?.play()):"pause"===this.data.toggle?"playing"===this.audioPlayer?.status?this.audioPlayer?.pause():this.audioPlayer?.play():(this.audioPlayer?.stop(),this.audioPlayer?.play())}dispose(){this.audioPlayer?.stop()}},n=class{constructor(t){this.data=t,this.isPauseAudioAction=!0}dispatch(){this.data.playAudio?this.pauseAudio(this.data.playAudio):this.data.object?this.pauseAllAudiosFromObject(this.data.object):this.pauseAllAudios()}pauseAudio(t){let i=e.get(t);!i||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.audioPlayer?.[this.data.interaction](),this.disposeDelay()},this.data.delay)):i.audioPlayer?.[this.data.interaction]())}pauseAllAudiosFromObject(t){let i=o.get(t);!i?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.forEach(t=>t.audioPlayer?.[this.data.interaction]()),this.disposeDelay()},this.data.delay)):i.forEach(t=>t.audioPlayer?.[this.data.interaction]()))}pauseAllAudios(){let t=[...o.values()];!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(t=>{t.forEach(t=>{t.audioPlayer?.[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):t.forEach(t=>{t.forEach(t=>{t.audioPlayer?.[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},r=class{constructor(t,i,a,s,e){if(this.data=i,this.shared=s,this.condition=e,"play"===i.interaction)this.interaction=new d(t,i,a,s);else{if("pause"!==i.interaction&&"stop"!==i.interaction)throw new Error("Missing property");this.interaction=new n(i)}}dispatchBasic(){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.playByToggle():this.interaction.dispatch()}dispatchConditional(){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.audioPlayer?.play():this.interaction.dispatch()}dispatchGameControl(t){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d&&("start"===t?this.interaction.audioPlayer?.play():this.interaction.audioPlayer?.stop())}dispose(){this.interaction.dispose()}};i("Audio",({id:t,data:i,object:a,shared:s,actionCondition:e})=>new r(t,i,a,s,e)),s("audio");
@@ -1 +1 @@
1
- import{ea as t}from"./runtime-chunk-NRJDJMQZ.js";import{Fc as e,Oc as r,jd as i}from"./runtime-chunk-VGN7YHB7.js";var s=new e,n=new r,a=new i,h=class extends t{constructor(t,e,r){super(t,e,r),this.data=e}get textGeometry(){return this.geometry}get charWidths(){return this.textGeometry.charWidths}get charCoords(){return this.textGeometry.charCoords}get wrappedText(){return this.textGeometry.wrappedText}get font(){return this.textGeometry.font}get initialOffsetY(){let t=this.dataPatched;return this.font?.getLineInitialOffsetY(this.lineHeight,this.wrappedText.length,"number"==typeof t.geometry.height?t.geometry.height:1,this.fontScale,t.geometry.verticalAlign)??0}get fontScale(){let t=this.dataPatched;return this.font?t.geometry.fontSize/this.font.unitsPerEm:1}get AD(){return Math.abs(this.ascender-this.descender)}get ascender(){return(this.font?.ascender??1)*this.fontScale}get descender(){return(this.font?.descender??1)*this.fontScale}get lineHeight(){let t=this.dataPatched;return t.geometry.fontSize*t.geometry.lineHeight}raycast(t,e){let{matrixWorld:r}=this;if(!isNaN(t.ray.origin.x)&&0!==this.scale.x&&0!==this.scale.y&&0!==this.scale.z&&(n.copy(r).invert(),a.copy(t.ray).applyMatrix4(n),a.intersectBox(this.singleBBox,s))){let i=s.applyMatrix4(r),n=t.ray.origin.distanceTo(i);e.push({distance:n,point:i.clone(),object:this})}}};export{h as a};
1
+ import{ea as t}from"./runtime-chunk-LALFWESO.js";import{Fc as e,Oc as r,jd as i}from"./runtime-chunk-VGN7YHB7.js";var s=new e,n=new r,a=new i,h=class extends t{constructor(t,e,r){super(t,e,r),this.data=e}get textGeometry(){return this.geometry}get charWidths(){return this.textGeometry.charWidths}get charCoords(){return this.textGeometry.charCoords}get wrappedText(){return this.textGeometry.wrappedText}get font(){return this.textGeometry.font}get initialOffsetY(){let t=this.dataPatched;return this.font?.getLineInitialOffsetY(this.lineHeight,this.wrappedText.length,"number"==typeof t.geometry.height?t.geometry.height:1,this.fontScale,t.geometry.verticalAlign)??0}get fontScale(){let t=this.dataPatched;return this.font?t.geometry.fontSize/this.font.unitsPerEm:1}get AD(){return Math.abs(this.ascender-this.descender)}get ascender(){return(this.font?.ascender??1)*this.fontScale}get descender(){return(this.font?.descender??1)*this.fontScale}get lineHeight(){let t=this.dataPatched;return t.geometry.fontSize*t.geometry.lineHeight}raycast(t,e){let{matrixWorld:r}=this;if(!isNaN(t.ray.origin.x)&&0!==this.scale.x&&0!==this.scale.y&&0!==this.scale.z&&(n.copy(r).invert(),a.copy(t.ray).applyMatrix4(n),a.intersectBox(this.singleBBox,s))){let i=s.applyMatrix4(r),n=t.ray.origin.distanceTo(i);e.push({distance:n,point:i.clone(),object:this})}}};export{h as a};
@@ -1 +1 @@
1
- import{a as t,b as e,d as r}from"./runtime-chunk-D2IFC55F.js";import{g as i}from"./runtime-chunk-4KZXQGUQ.js";import{L as a,za as o}from"./runtime-chunk-OW6T4XFV.js";import{Ae as s,Ec as n,Fc as p,Oc as h,Rc as c,Tc as m,bd as f,dd as u,ud as d,wd as l,we as g,xe as v}from"./runtime-chunk-VGN7YHB7.js";var C=new p,j=new g,T=class extends l{constructor(t){let e=new u,r=new d({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],a=[],o={},s=new m(15711266),n=new m(15711266),p=new m(2857471);function h(t,e,r){c(t,r),c(e,r)}function c(t,e){i.push(0,0,0),a.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(i.length/3-1)}h("n1","n2",s),h("n2","n4",s),h("n4","n3",s),h("n3","n1",s),h("f1","f2",s),h("f2","f4",s),h("f4","f3",s),h("f3","f1",s),h("n1","f1",s),h("n2","f2",s),h("n3","f3",s),h("n4","f4",s),h("p","n1",n),h("p","n2",n),h("p","n3",n),h("p","n4",n),h("u1","u2",p),h("u2","u3",p),h("u3","u1",p),e.setAttribute("position",new f(i,3)),e.setAttribute("color",new f(a,3)),super(e,r),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){let t=this.geometry,e=this.pointMap;j.projectionMatrixInverse.elements=[.5112609807824982,-0,-0,-0,-0,.41421356237309503,-0,-0,-0,-0,-0,-.099999,-0,-0,-1.0000000000000002,.100001];let r=.8;y("n1",e,t,j,-1,-1,r),y("n2",e,t,j,1,-1,r),y("n3",e,t,j,-1,1,r),y("n4",e,t,j,1,1,r);let i=r;y("f1",e,t,j,-1,-1,i),y("f2",e,t,j,1,-1,i),y("f3",e,t,j,-1,1,i),y("f4",e,t,j,1,1,i);let a=i;y("u1",e,t,j,.35,1.1,a),y("u2",e,t,j,-.35,1.1,a),y("u3",e,t,j,0,1.55,a),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function y(t,e,r,i,a,o,s){C.set(a,o,s).unproject(i);let n=e[t];if(void 0!==n){let t=r.getAttribute("position");for(let e=0,r=n.length;e<r;e++)t.setXYZ(n[e],C.x,C.y,C.z)}}var w=class extends(t(T)){constructor(t){super(t),this.object=t,this.name=`CombinedCameraHelper: ${t.uuid}`}updateMatrixWorld(t){super.updateMatrixWorld(t),this.updateTarget()}updateTarget(){let t=this.object.getTarget();this.updateWorldMatrix(!0,!1),this.worldToLocal(t)}raycast(t,r){e(this.object,this.geometry,t,r,!0)}};function P(t){return 1-Math.pow(1-t,3)}var b=new p,x=new p,_=new n,M=new p,O=new p,F=new p,A=class extends(r(g,w)){constructor(t="",e={...o.defaultData,name:""}){super(),this._cameraType="OrthographicCamera",this.targetOffset=a.DefaultTargetOffset,this.isUpVectorFlipped=!1,this.angleOffsetFromUp=0,this.wasMovedByUser=!1,this.wasMovedBySwitchCameraAction=!1,this._createdAt=typeof performance<"u"?performance.now():0,this._tickProjectionTransition=()=>{let t=this._projectionTransition;if(void 0===t)return;if(this.disposed)return void this._endProjectionTransition();t.raf=requestAnimationFrame(this._tickProjectionTransition);let e=A.projectionTransitionRequestRender??t.requestRender;this.updateProjectionMatrix(),e?.()},this.super_Entity(t,e),this.previousProjectionMatrix=new h,this.matrixAutoUpdate=!0,this.width=window.innerWidth,this.height=window.innerHeight;let r=this.width,i=this.height;this.orthoCamera=new s(-.5*r,.5*r,.5*i,-.5*i,-5e4,1e4),this.perspCamera=new v(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(t){let e=A.projectionTransitionsEnabled;A.projectionTransitionsEnabled=!1;try{return t()}finally{A.projectionTransitionsEnabled=e}}get isPerspectiveCamera(){return"PerspectiveCamera"===this.cameraType}get isOrthographicCamera(){return!this.isPerspectiveCamera}get cameraType(){return this._cameraType}set fov(t){this.perspCamera.fov=t}get fov(){return this.perspCamera.fov}setNear(t,e){"PerspectiveCamera"===t?this.perspCamera.near=e:this.orthoCamera.near=e}setZoom(t,e){e>=0&&("PerspectiveCamera"===t?this.perspCamera.zoom=e:this.orthoCamera.zoom=e)}set cameraType(t){"PerspectiveCamera"===t?this.toPerspective():"OrthographicCamera"===t&&this.toOrthographic()}get near(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.near:this.orthoCamera.near}set near(t){"PerspectiveCamera"===this._cameraType?this.perspCamera.near=t:this.orthoCamera.near=t}get zoom(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.zoom:this.orthoCamera.zoom}set zoom(t){t>=0&&("PerspectiveCamera"===this._cameraType?this.perspCamera.zoom=t:this.orthoCamera.zoom=t)}lookAt(t,e,r){"number"==typeof t&&(t=new p(t,e,r)),super.lookAt(t),this.getWorldPosition(b),this.targetOffset=b.distanceTo(t)}getTarget(t=new p){return this.getWorldDirection(x),this.getWorldPosition(b),x.multiplyScalar(this.targetOffset),t.copy(b).add(x),t}getDistanceToTarget(){let t=this.getTarget();return this.getWorldPosition(b),b.distanceTo(t)}updateUp(){this.getWorldQuaternion(_),M.set(0,0,1).applyQuaternion(_),O.copy(c.DEFAULT_UP),this.isUpVectorFlipped&&O.negate(),O.applyQuaternion(_),F.copy(c.DEFAULT_UP).projectOnPlane(M),this.angleOffsetFromUp=F.angleTo(O),this.angleOffsetFromUp*=F.cross(O).dot(M)>=0?1:-1}updateTransformState(t,e){let r=super.updateTransformState(t,e);return void 0!==t.isUpVectorFlipped&&(this.isUpVectorFlipped=t.isUpVectorFlipped),this.updateUp(),r}getViewFrontToObject(t){let e=t.getWorldPosition(new p),r=t.getWorldDirection(new p).multiplyScalar(this.targetOffset);return{position:e.clone().add(r),target:e}}getViewToTarget(t){let e=this.getWorldDirection(new p).multiplyScalar(this.targetOffset);return{position:t.clone().sub(e),target:t}}getViewToObject(t){let e=new p;return t.getWorldPosition(e),this.getViewToTarget(e)}setViewplaneSize(t,e,r=!1){if(this.aspect=t/e,r){let r=t>e?this.aspect:1,i=t>e?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*-t,this.right=.5*t,this.top=.5*e,this.bottom=.5*-e;this.updateProjectionMatrix()}copyViewPlaneSize(t){this.aspect=t.aspect,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.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 t=this._projectionTransition;if(void 0===t)return 1;let e=(performance.now()-t.start)/t.duration;return e>=1?1:e<=0?0:P(e)}get _activeSubCamera(){return"PerspectiveCamera"===this._cameraType?this.perspCamera:this.orthoCamera}_canAnimateProjection(){return A.projectionTransitionsEnabled&&"function"==typeof requestAnimationFrame&&typeof performance<"u"&&performance.now()-this._createdAt>=A.projectionTransitionMinAgeMs}_beginProjectionTransition(t){let e=this._projectionTransition;void 0===e&&(e={from:new h,blend:new h,blendInverse:new h,start:0,duration:A.projectionTransitionDuration,referenceDepth:1,raf:0,requestRender:t},this._projectionTransition=e),e.from.copy(this.projectionMatrix),e.start=performance.now(),e.duration=A.projectionTransitionDuration,e.referenceDepth=Number.isFinite(this.targetOffset)?Math.max(1,this.targetOffset):1,t&&(e.requestRender=t),0!==e.raf&&cancelAnimationFrame(e.raf),e.raf=requestAnimationFrame(this._tickProjectionTransition)}_applyProjectionTransition(){let t=this._projectionTransition;if(void 0===t)return;let e=(performance.now()-t.start)/t.duration;if(e>=1)return void this._endProjectionTransition();let r=P(e),i=t.from.elements,a=this._activeSubCamera.projectionMatrix.elements,o=t.blend.elements,s=t.referenceDepth,n=Math.max(1e-6,i[15]-i[11]*s),p=r*n/(r*n+(1-r)*Math.max(1e-6,a[15]-a[11]*s));for(let t=0;t<16;t++)o[t]=i[t]+(a[t]-i[t])*p;t.blendInverse.copy(t.blend).invert(),this.projectionMatrix=t.blend,this.projectionMatrixInverse=t.blendInverse}_endProjectionTransition(){let t=this._projectionTransition;if(void 0===t)return;0!==t.raf&&cancelAnimationFrame(t.raf),this._projectionTransition=void 0;let e=this._activeSubCamera;this.projectionMatrix=e.projectionMatrix,this.projectionMatrixInverse=e.projectionMatrixInverse}_syncProjectionTransition(t){let e=t._projectionTransition;if(void 0===e)return void(void 0!==this._projectionTransition&&this._endProjectionTransition());let r=this._projectionTransition;void 0===r?(r={from:new h,blend:new h,blendInverse:new h,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(e.from),r.start=e.start,r.duration=e.duration,r.referenceDepth=e.referenceDepth,this._applyProjectionTransition()}setFocalLength(t){this.perspCamera.setFocalLength(t),this.toPerspective()}getFocalLength(){return this.perspCamera.getFocalLength()}getEffectiveFOV(){return this.perspCamera.getEffectiveFOV()}getFilmWidth(){return this.perspCamera.getFilmWidth()}getFilmHeight(){return this.perspCamera.getFilmHeight()}setViewOffset(t,e,r,i,a,o){"PerspectiveCamera"===this._cameraType?this.perspCamera.setViewOffset(t,e,r,i,a,o):this.orthoCamera.setViewOffset(t,e,r,i,a,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(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}copy(t,e){return super.copy(t,e),this.parent=t.parent,this.orthoCamera.copy(t.orthoCamera),this.perspCamera.copy(t.perspCamera),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.far=t.far,this.view=null===t.view?null:Object.assign({},t.view),this._cameraType=t._cameraType,this.aspect=t.aspect,this.fov=t.fov,this.focus=t.focus,this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this.targetOffset=a.sanitizeTargetOffset(t.targetOffset),this.updateProjectionMatrix(),this._syncProjectionTransition(t),this}toCameraState(t=[]){let e={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 i(e,t)}updateCameraSubtype(t,e){let r="perspective"===t?"PerspectiveCamera":"OrthographicCamera";void 0!==e.zoom&&this.setZoom(r,e.zoom),void 0!==e.near&&this.setNear(r,e.near),void 0!==e.fov&&"PerspectiveCamera"===r&&(this.fov=e.fov)}updateState(t,e){this.updateCameraState(t,e)}updateCameraState(t,e){this.updateState_Entity(t,e),void 0!==t.far&&(this.far=t.far),void 0!==t.orthographic&&this.updateCameraSubtype("orthographic",t.orthographic),void 0!==t.perspective&&this.updateCameraSubtype("perspective",t.perspective),void 0!==t.type&&(t.type!==this._cameraType&&this._canAnimateProjection()&&this._beginProjectionTransition(e?.shared.requestRender),this.cameraType=t.type),void 0!==t.up&&this.up.fromArray(t.up.map(t=>"number"==typeof t?t:0)),void 0!==t.targetOffset&&(this.targetOffset=a.sanitizeTargetOffset(t.targetOffset)),void 0!==t.isUpVectorFlipped&&(this.isUpVectorFlipped=t.isUpVectorFlipped),this.updateProjectionMatrix()}updateByPatchedOp(t,e,r){super.updateByPatchedOp(t,e,r),1===t.path.length&&0===t.type&&this.updateCameraSubtype(t.path[0],t.props)}toState(t){return{...super.toState(t),...this.toCameraState(t),type:this.cameraType}}},V=A;V.projectionTransitionsEnabled=!1,V.projectionTransitionDuration=350,V.projectionTransitionMinAgeMs=1e3;export{V as a};
1
+ import{a as t,b as e,d as r}from"./runtime-chunk-CDZQF4NV.js";import{g as i}from"./runtime-chunk-4KZXQGUQ.js";import{L as a,za as o}from"./runtime-chunk-OW6T4XFV.js";import{Ae as s,Ec as n,Fc as p,Oc as h,Rc as c,Tc as m,bd as f,dd as u,ud as d,wd as l,we as g,xe as v}from"./runtime-chunk-VGN7YHB7.js";var C=new p,j=new g,T=class extends l{constructor(t){let e=new u,r=new d({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],a=[],o={},s=new m(15711266),n=new m(15711266),p=new m(2857471);function h(t,e,r){c(t,r),c(e,r)}function c(t,e){i.push(0,0,0),a.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(i.length/3-1)}h("n1","n2",s),h("n2","n4",s),h("n4","n3",s),h("n3","n1",s),h("f1","f2",s),h("f2","f4",s),h("f4","f3",s),h("f3","f1",s),h("n1","f1",s),h("n2","f2",s),h("n3","f3",s),h("n4","f4",s),h("p","n1",n),h("p","n2",n),h("p","n3",n),h("p","n4",n),h("u1","u2",p),h("u2","u3",p),h("u3","u1",p),e.setAttribute("position",new f(i,3)),e.setAttribute("color",new f(a,3)),super(e,r),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){let t=this.geometry,e=this.pointMap;j.projectionMatrixInverse.elements=[.5112609807824982,-0,-0,-0,-0,.41421356237309503,-0,-0,-0,-0,-0,-.099999,-0,-0,-1.0000000000000002,.100001];let r=.8;y("n1",e,t,j,-1,-1,r),y("n2",e,t,j,1,-1,r),y("n3",e,t,j,-1,1,r),y("n4",e,t,j,1,1,r);let i=r;y("f1",e,t,j,-1,-1,i),y("f2",e,t,j,1,-1,i),y("f3",e,t,j,-1,1,i),y("f4",e,t,j,1,1,i);let a=i;y("u1",e,t,j,.35,1.1,a),y("u2",e,t,j,-.35,1.1,a),y("u3",e,t,j,0,1.55,a),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function y(t,e,r,i,a,o,s){C.set(a,o,s).unproject(i);let n=e[t];if(void 0!==n){let t=r.getAttribute("position");for(let e=0,r=n.length;e<r;e++)t.setXYZ(n[e],C.x,C.y,C.z)}}var w=class extends(t(T)){constructor(t){super(t),this.object=t,this.name=`CombinedCameraHelper: ${t.uuid}`}updateMatrixWorld(t){super.updateMatrixWorld(t),this.updateTarget()}updateTarget(){let t=this.object.getTarget();this.updateWorldMatrix(!0,!1),this.worldToLocal(t)}raycast(t,r){e(this.object,this.geometry,t,r,!0)}};function P(t){return 1-Math.pow(1-t,3)}var b=new p,x=new p,_=new n,M=new p,O=new p,F=new p,V=class extends(r(g,w)){constructor(t="",e={...o.defaultData,name:""}){super(),this._cameraType="OrthographicCamera",this.targetOffset=a.DefaultTargetOffset,this.isUpVectorFlipped=!1,this.angleOffsetFromUp=0,this.wasMovedByUser=!1,this.wasMovedBySwitchCameraAction=!1,this._createdAt=typeof performance<"u"?performance.now():0,this._tickProjectionTransition=()=>{let t=this._projectionTransition;if(void 0===t)return;if(this.disposed)return void this._endProjectionTransition();t.raf=requestAnimationFrame(this._tickProjectionTransition);let e=V.projectionTransitionRequestRender??t.requestRender;this.updateProjectionMatrix(),e?.()},this.super_Entity(t,e),this.previousProjectionMatrix=new h,this.matrixAutoUpdate=!0,this.width=window.innerWidth,this.height=window.innerHeight;let r=this.width,i=this.height;this.orthoCamera=new s(-.5*r,.5*r,.5*i,-.5*i,-5e4,1e4),this.perspCamera=new v(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(t){let e=V.projectionTransitionsEnabled;V.projectionTransitionsEnabled=!1;try{return t()}finally{V.projectionTransitionsEnabled=e}}get isPerspectiveCamera(){return"PerspectiveCamera"===this.cameraType}get isOrthographicCamera(){return!this.isPerspectiveCamera}get cameraType(){return this._cameraType}set fov(t){this.perspCamera.fov=t}get fov(){return this.perspCamera.fov}setNear(t,e){"PerspectiveCamera"===t?this.perspCamera.near=e:this.orthoCamera.near=e}setZoom(t,e){e>=0&&("PerspectiveCamera"===t?this.perspCamera.zoom=e:this.orthoCamera.zoom=e)}set cameraType(t){"PerspectiveCamera"===t?this.toPerspective():"OrthographicCamera"===t&&this.toOrthographic()}get near(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.near:this.orthoCamera.near}set near(t){"PerspectiveCamera"===this._cameraType?this.perspCamera.near=t:this.orthoCamera.near=t}get zoom(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.zoom:this.orthoCamera.zoom}set zoom(t){t>=0&&("PerspectiveCamera"===this._cameraType?this.perspCamera.zoom=t:this.orthoCamera.zoom=t)}lookAt(t,e,r){"number"==typeof t&&(t=new p(t,e,r)),super.lookAt(t),this.getWorldPosition(b),this.targetOffset=b.distanceTo(t)}getTarget(t=new p){return this.getWorldDirection(x),this.getWorldPosition(b),x.multiplyScalar(this.targetOffset),t.copy(b).add(x),t}getDistanceToTarget(){let t=this.getTarget();return this.getWorldPosition(b),b.distanceTo(t)}updateUp(){this.getWorldQuaternion(_),M.set(0,0,1).applyQuaternion(_),O.copy(c.DEFAULT_UP),this.isUpVectorFlipped&&O.negate(),O.applyQuaternion(_),F.copy(c.DEFAULT_UP).projectOnPlane(M),this.angleOffsetFromUp=F.angleTo(O),this.angleOffsetFromUp*=F.cross(O).dot(M)>=0?1:-1}updateTransformState(t,e){let r=super.updateTransformState(t,e);return void 0!==t.isUpVectorFlipped&&(this.isUpVectorFlipped=t.isUpVectorFlipped),this.updateUp(),r}getViewFrontToObject(t){let e=t.getWorldPosition(new p),r=t.getWorldDirection(new p).multiplyScalar(this.targetOffset);return{position:e.clone().add(r),target:e}}getViewToTarget(t){let e=this.getWorldDirection(new p).multiplyScalar(this.targetOffset);return{position:t.clone().sub(e),target:t}}getViewToObject(t){let e=new p;return t.getWorldPosition(e),this.getViewToTarget(e)}setViewplaneSize(t,e,r=!1){if(this.aspect=t/e,r){let r=t>e?this.aspect:1,i=t>e?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*-t,this.right=.5*t,this.top=.5*e,this.bottom=.5*-e;this.updateProjectionMatrix()}copyViewPlaneSize(t){this.aspect=t.aspect,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.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 t=this._projectionTransition;if(void 0===t)return 1;let e=(performance.now()-t.start)/t.duration;return e>=1?1:e<=0?0:P(e)}get _activeSubCamera(){return"PerspectiveCamera"===this._cameraType?this.perspCamera:this.orthoCamera}_canAnimateProjection(){return V.projectionTransitionsEnabled&&"function"==typeof requestAnimationFrame&&typeof performance<"u"&&performance.now()-this._createdAt>=V.projectionTransitionMinAgeMs}_beginProjectionTransition(t){let e=this._projectionTransition;void 0===e&&(e={from:new h,blend:new h,blendInverse:new h,start:0,duration:V.projectionTransitionDuration,referenceDepth:1,raf:0,requestRender:t},this._projectionTransition=e),e.from.copy(this.projectionMatrix),e.start=performance.now(),e.duration=V.projectionTransitionDuration,e.referenceDepth=Number.isFinite(this.targetOffset)?Math.max(1,this.targetOffset):1,t&&(e.requestRender=t),0!==e.raf&&cancelAnimationFrame(e.raf),e.raf=requestAnimationFrame(this._tickProjectionTransition)}_applyProjectionTransition(){let t=this._projectionTransition;if(void 0===t)return;let e=(performance.now()-t.start)/t.duration;if(e>=1)return void this._endProjectionTransition();let r=P(e),i=t.from.elements,a=this._activeSubCamera.projectionMatrix.elements,o=t.blend.elements,s=t.referenceDepth,n=Math.max(1e-6,i[15]-i[11]*s),p=r*n/(r*n+(1-r)*Math.max(1e-6,a[15]-a[11]*s));for(let t=0;t<16;t++)o[t]=i[t]+(a[t]-i[t])*p;t.blendInverse.copy(t.blend).invert(),this.projectionMatrix=t.blend,this.projectionMatrixInverse=t.blendInverse}_endProjectionTransition(){let t=this._projectionTransition;if(void 0===t)return;0!==t.raf&&cancelAnimationFrame(t.raf),this._projectionTransition=void 0;let e=this._activeSubCamera;this.projectionMatrix=e.projectionMatrix,this.projectionMatrixInverse=e.projectionMatrixInverse}_syncProjectionTransition(t){let e=t._projectionTransition;if(void 0===e)return void(void 0!==this._projectionTransition&&this._endProjectionTransition());let r=this._projectionTransition;void 0===r?(r={from:new h,blend:new h,blendInverse:new h,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(e.from),r.start=e.start,r.duration=e.duration,r.referenceDepth=e.referenceDepth,this._applyProjectionTransition()}setFocalLength(t){this.perspCamera.setFocalLength(t),this.toPerspective()}getFocalLength(){return this.perspCamera.getFocalLength()}getEffectiveFOV(){return this.perspCamera.getEffectiveFOV()}getFilmWidth(){return this.perspCamera.getFilmWidth()}getFilmHeight(){return this.perspCamera.getFilmHeight()}setViewOffset(t,e,r,i,a,o){"PerspectiveCamera"===this._cameraType?this.perspCamera.setViewOffset(t,e,r,i,a,o):this.orthoCamera.setViewOffset(t,e,r,i,a,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(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}copy(t,e){return super.copy(t,e),this.parent=t.parent,this.orthoCamera.copy(t.orthoCamera),this.perspCamera.copy(t.perspCamera),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.far=t.far,this.view=null===t.view?null:Object.assign({},t.view),this._cameraType=t._cameraType,this.aspect=t.aspect,this.fov=t.fov,this.focus=t.focus,this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this.targetOffset=a.sanitizeTargetOffset(t.targetOffset),this.updateProjectionMatrix(),this._syncProjectionTransition(t),this}toCameraState(t=[]){let e={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 i(e,t)}updateCameraSubtype(t,e){let r="perspective"===t?"PerspectiveCamera":"OrthographicCamera";void 0!==e.zoom&&this.setZoom(r,e.zoom),void 0!==e.near&&this.setNear(r,e.near),void 0!==e.fov&&"PerspectiveCamera"===r&&(this.fov=e.fov)}updateState(t,e){this.updateCameraState(t,e)}updateCameraState(t,e){this.updateState_Entity(t,e),void 0!==t.far&&(this.far=t.far),void 0!==t.orthographic&&this.updateCameraSubtype("orthographic",t.orthographic),void 0!==t.perspective&&this.updateCameraSubtype("perspective",t.perspective),void 0!==t.type&&(t.type!==this._cameraType&&this._canAnimateProjection()&&this._beginProjectionTransition(e?.shared.requestRender),this.cameraType=t.type),void 0!==t.up&&this.up.fromArray(t.up.map(t=>"number"==typeof t?t:0)),void 0!==t.targetOffset&&(this.targetOffset=a.sanitizeTargetOffset(t.targetOffset)),void 0!==t.isUpVectorFlipped&&(this.isUpVectorFlipped=t.isUpVectorFlipped),this.updateProjectionMatrix()}updateByPatchedOp(t,e,r){super.updateByPatchedOp(t,e,r),1===t.path.length&&0===t.type&&this.updateCameraSubtype(t.path[0],t.props)}toState(t){return{...super.toState(t),...this.toCameraState(t),type:this.cameraType}}},A=V;A.projectionTransitionsEnabled=!1,A.projectionTransitionDuration=350,A.projectionTransitionMinAgeMs=1e3;export{A as a};
@@ -1 +1 @@
1
- import{E as e,G as a,H as t,d as i,f as r,g as n,x as o,z as s}from"./runtime-chunk-OW6T4XFV.js";var l,u,d,c,f,h,p,m,g,b,y,w,A,D,v,B,k,_,z,S,x,O,j,C;function P(e,a=[0,0]){return[e&&!isNaN(e[0])?e[0]:a[0],e&&!isNaN(e[1])?e[1]:a[1]]}function R(e,i,r){switch(e){case 0:return"cubicBezier( 0, 0, 1, 1 )";case 1:return"cubicBezier( .25, .1, .25, 1 )";case 2:return"cubicBezier( .42, 0, 1, 1 )";case 3:return"cubicBezier( 0, 0, .58, 1 )";case 4:return"cubicBezier( .42, 0, .58, 1 )";case 7:return"cubicBezier( .25, 1, .5, 1 )";case 5:{let{control1:e,control2:a}=i??{...t.defaultData};return`cubicBezier( ${e[0]}, ${e[1]}, ${a[0]}, ${a[1]} )`}case 6:{let{mass:e,stiffness:t,damping:i,velocity:n}=r??{...a.defaultData},o=new G(e,t,i,n),s=o.solve(1);return()=>e=>o.solve(e)/s}case 8:return()=>e=>Math.floor(e)}}function E(e,a,t){return{id:a,fi:t,data:{id:a,path:e,keyframes:new n}}}(l||(l={})).emptyImage={data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=",name:"empty"},(u||(u={})).is=function(e){return!0},(c=d||(d={})).defaultData={position:[0,0],scale:[1,1],rotation:0,shear:[0,0]},c.merge=function(e,a){return{position:a?.position??e.position,rotation:a?.rotation??e.rotation,scale:a?.scale??e.scale,shear:a?.shear??e.shear}},c.diff=function(e,a){return i({position:s.isEqual(e.position,a.position)?void 0:a.position,rotation:e.rotation===a.rotation?void 0:a.rotation,scale:s.isEqual(e.scale,a.scale)?void 0:a.scale,shear:e.shear&&a.shear&&s.isEqual(e.shear,a.shear)?void 0:a.shear})},(f||(f={})).defaultData={horizontalConstraint:0,verticalConstraint:0},(h||(h={})).defaultData={direction:"row",wrap:"unwrap",align:"top-left",gap:10,rowGap:10,autoGap:!1,autoRowGap:!1,leftPadding:8,rightPadding:8,topPadding:8,bottomPadding:8},(p||(p={})).defaultData={opacity:1,fill:{color:e.fromHexAndA(o,1),enabled:!0},stroke:{color:e.from0to1([0,0,0,1]),thickness:1,enabled:!1,mode:"inside"},layerBlur:{radius:2,enabled:!1},backgroundBlur:{radius:2,enabled:!1},dropShadow:{offset:[10,10],blurRadius:10,color:e.from0to1([0,0,0,1]),enabled:!1,spread:0},innerShadow:{offset:[10,10],blurRadius:10,color:e.from0to1([0,0,0,1]),enabled:!1,spread:0}},(g=m||(m={})).newEmpty=function(e,a){return{name:a}},g.patch=function(e,a){if(void 0===a)return e;let t={...e};return Object.assign(t,d.merge(t,a)),t=function(e,a){if(void 0===a)return e;let t={...e},i=["width","height","cornerRadius"];for(let e of i)e in t&&e in a&&void 0!==a[e]&&Object.assign(t,{[e]:a[e]});return t}(t,a),t=function(e,a){if(void 0===a)return e;let t={...e};return"fill"in t&&"fill"in a&&void 0!==a.fill&&Object.assign(t,{fill:{...t.fill,...a.fill}}),"stroke"in t&&"stroke"in a&&void 0!==a.stroke&&Object.assign(t,{stroke:{...t.stroke,...a.stroke}}),"layerBlur"in t&&"layerBlur"in a&&void 0!==a.layerBlur&&Object.assign(t,{layerBlur:{...t.layerBlur,...a.layerBlur}}),"backgroundBlur"in t&&"backgroundBlur"in a&&void 0!==a.backgroundBlur&&Object.assign(t,{backgroundBlur:{...t.backgroundBlur,...a.backgroundBlur}}),"dropShadow"in t&&"dropShadow"in a&&void 0!==a.dropShadow&&Object.assign(t,{dropShadow:{...t.dropShadow,...a.dropShadow}}),"innerShadow"in t&&"innerShadow"in a&&void 0!==a.innerShadow&&Object.assign(t,{innerShadow:{...t.innerShadow,...a.innerShadow}}),t}(t,a),t},g.toOps=function(e,a){let t,i=[];for(let[e,r]of Object.entries(a))"name"!==e&&(void 0===t&&(t={path:[],props:{},type:0},i.push(t)),t.props[e]=r);return i},(b||(b={})).defaultData={...d.defaultData,...f.defaultData,states:new n,events:new n,visible:!0,raycastLock:!1},(y||(y={})).defaultData={...b.defaultData,...p.defaultData},(w||(w={})).defaultData={cornerRadius:[0,0,0,0]},(A||(A={})).defaultData={...y.defaultData,type:"ellipse2d",width:100,height:100,name:"Ellipse"},(D||(D={})).defaultData={...y.defaultData,...w.defaultData,type:"rectangle2d",width:100,height:100,name:"Rectangle"},(v||(v={})).defaultData={...y.defaultData,type:"text2d",width:100,height:100,fontSize:12,lineHeight:1.2,letterSpacing:0,text:{textValue:"Hello world"},horizontalAlign:1,verticalAlign:1,textTransform:1,font:"Roboto_regular",name:"Text"},(B||(B={})).defaultData={...y.defaultData,type:"path2d",path:"",name:"Path"},(k||(k={})).is=function(e){return"ellipse2d"===e.type||"rectangle2d"===e.type||"text2d"===e.type||"vector2d"===e.type||"path2d"===e.type},(_||(_={})).defaultData={...b.defaultData,name:"Group",type:"group2d"},(z||(z={})).defaultData=()=>({...b.defaultData,...w.defaultData,...p.defaultData,name:"Frame",type:"frame2d",clipped:!0,width:200,height:200,fill:{color:e.fromHexAndA(4737101,1),enabled:!0},stroke:{color:e.fromHexAndA(0,1),thickness:1,enabled:!1,mode:"inside"},backgroundBlur:{radius:2,enabled:!1},layerBlur:{radius:2,enabled:!1}}),(e=>{e.defaultData=function(e){switch(e){case"rectangle2d":case"vector2d":return{...D.defaultData};case"ellipse2d":return{...A.defaultData};case"text2d":return{...v.defaultData};case"path2d":return{...B.defaultData};case"frame2d":return{...z.defaultData()};case"group2d":return{..._.defaultData}}},e.getPivot=function(e){return"width"in e&&"height"in e?["number"==typeof e.width?.5*e.width:0,"number"==typeof e.height?.5*e.height:0]:[0,0]},e.isResizeable=function(e){return"rectangle2d"===e.type||"ellipse2d"===e.type||"text2d"===e.type||"frame2d"===e.type},e.isAutoLayoutable=function(e){return"frame2d"===e.type&&void 0!==e.autoLayout},e.hasCorners=function(e){return"rectangle2d"===e.type||"frame2d"===e.type}})(S||(S={})),(O=x||(x={})).defaultData={name:"UI",type:"scene2d",objects:new r},O.emptyData=function(){return{type:"scene2d",objects:new r}},(j||(j={})).is=function(e){return e&&"number"==typeof e.x&&"number"==typeof e.y&&"number"==typeof e.z},(e=>{e.getControlsWithDefault=function(e,a){let t=[0,0],i=[1,1];if(e?.cubicControls)t=P(e.cubicControls.control1,t);else switch(e?.type){case 2:case 4:t=[.42,0];break;case 3:case 0:t=[0,0];break;case 1:t=[.25,.1];break;case 7:t=[.25,1]}if(a?.cubicControls)i=P(a.cubicControls.control2,i);else switch(a?.type){case 2:case 0:i=[1,1];break;case 3:case 4:i=[.58,1];break;case 1:i=[.25,1];break;case 7:i=[.5,1]}return{control1:t,control2:i}},e.defaultData=function(e,a){return{id:e,name:a,to:5,properties:new n}},e.createMaterialGroup=function(e){let a=new n;return e.forEach(({data:e,id:t,fi:i})=>{if("light"===e.type){let r=E(["material",`${e.category} lighting`],t,i);a.push(r)}else{let r=E(["material",e.type],t,i);a.push(r)}}),a},e.createName=function(e){return Object.entries(e).reduce((e,[a,t])=>("string"!=typeof t&&e.push({name:t.name}),e),[])},e.Presets=[{name:"Slide in",animationParams:{translateX:{value:[-20,0],easing:R(3),duration:1e3},opacity:{value:[0,1],easing:R(3),duration:1e3},endDelay:250,loop:!0}},{name:"Rotate",animationParams:{rotate:{value:[0,"1turn"],easing:R(5),duration:700},endDelay:250,loop:!0}},{name:"Scale Out",animationParams:{scale:{value:[1,1.5],easing:R(4),duration:1e3},endDelay:250,loop:!0}},{name:"Jump",animationParams:{translateY:[{value:0,duration:200,easing:"linear"},{value:-20,easing:"linear",duration:200},{value:0,easing:"linear",duration:100}],endDelay:500,loop:!0}},{name:"Jump Rotate",animationParams:{translateY:[{value:0,duration:200,easing:"linear"},{value:-20,easing:"linear",duration:200},{value:0,easing:"linear",duration:100}],rotate:{value:[0,"1turn"],easing:R(5),duration:500},endDelay:500,loop:!0}},{name:"Bounce",animationParams:{translateY:{value:["20px","-20px"],duration:575,easing:"easeOutQuad"},direction:"alternate",loop:!0}}]})(C||(C={}));var M=["x","y","z"],G=class{constructor(e=1,a=100,t=10,i=0){this.mass=e,this.stiffness=a,this.damping=t,this.initialVelocity=i,this.m_w0=Math.sqrt(a/e),this.m_zeta=t/(2*Math.sqrt(a*e)),this.m_zeta<1?(this.m_wd=this.m_w0*Math.sqrt(1-this.m_zeta*this.m_zeta),this.m_A=1,this.m_B=(this.m_zeta*this.m_w0-i)/this.m_wd):(this.m_wd=0,this.m_A=1,this.m_B=-i+this.m_w0)}solve(e){return 1-(this.m_zeta<1?Math.exp(-e*this.m_zeta*this.m_w0)*(this.m_A*Math.cos(this.m_wd*e)+this.m_B*Math.sin(this.m_wd*e)):(this.m_A+this.m_B*e)*Math.exp(-e*this.m_w0))}getDuration(){let e=.16666666666666666,a=0,t=0;for(;;)if(a+=e,1===this.solve(a)){if(t++,t>=16)break}else t=0;return a*e*1e3}},H=!0;export{H as a,l as b,m as c,D as d,_ as e,S as f,x as g,P as h,R as i,M as j};
1
+ import{E as e,G as a,H as t,d as i,f as r,g as n,x as o,z as s}from"./runtime-chunk-OW6T4XFV.js";var l,u,d,c,f,h,p,m,g,b,y,w,A,D,v,B,k,_,z,S,x,O,j,C;function P(e,a=[0,0]){return[e&&!isNaN(e[0])?e[0]:a[0],e&&!isNaN(e[1])?e[1]:a[1]]}function R(e,i,r){switch(e){case 0:return"cubicBezier( 0, 0, 1, 1 )";case 1:return"cubicBezier( .25, .1, .25, 1 )";case 2:return"cubicBezier( .42, 0, 1, 1 )";case 3:return"cubicBezier( 0, 0, .58, 1 )";case 4:return"cubicBezier( .42, 0, .58, 1 )";case 7:return"cubicBezier( .25, 1, .5, 1 )";case 5:{let{control1:e,control2:a}=i??{...t.defaultData};return`cubicBezier( ${e[0]}, ${e[1]}, ${a[0]}, ${a[1]} )`}case 6:{let{mass:e,stiffness:t,damping:i,velocity:n}=r??{...a.defaultData},o=new G(e,t,i,n),s=o.solve(1);return()=>e=>o.solve(e)/s}case 8:return()=>e=>Math.floor(e)}}function E(e,a,t){return{id:a,fi:t,data:{id:a,path:e,keyframes:new n}}}(l||(l={})).emptyImage={data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=",name:"empty"},(u||(u={})).is=function(e){return!0},(c=d||(d={})).defaultData={position:[0,0],scale:[1,1],rotation:0,shear:[0,0]},c.merge=function(e,a){return{position:a?.position??e.position,rotation:a?.rotation??e.rotation,scale:a?.scale??e.scale,shear:a?.shear??e.shear}},c.diff=function(e,a){return i({position:s.isEqual(e.position,a.position)?void 0:a.position,rotation:e.rotation===a.rotation?void 0:a.rotation,scale:s.isEqual(e.scale,a.scale)?void 0:a.scale,shear:e.shear&&a.shear&&s.isEqual(e.shear,a.shear)?void 0:a.shear})},(f||(f={})).defaultData={horizontalConstraint:0,verticalConstraint:0},(h||(h={})).defaultData={direction:"row",wrap:"unwrap",align:"top-left",gap:10,rowGap:10,autoGap:!1,autoRowGap:!1,leftPadding:8,rightPadding:8,topPadding:8,bottomPadding:8},(p||(p={})).defaultData={opacity:1,fill:{color:e.fromHexAndA(o,1),enabled:!0},stroke:{color:e.from0to1([0,0,0,1]),thickness:1,enabled:!1,mode:"inside"},layerBlur:{radius:2,enabled:!1},backgroundBlur:{radius:2,enabled:!1},dropShadow:{offset:[10,10],blurRadius:10,color:e.from0to1([0,0,0,1]),enabled:!1,spread:0},innerShadow:{offset:[10,10],blurRadius:10,color:e.from0to1([0,0,0,1]),enabled:!1,spread:0}},(g=m||(m={})).newEmpty=function(e,a){return{name:a}},g.patch=function(e,a){if(void 0===a)return e;let t={...e};return Object.assign(t,d.merge(t,a)),t=function(e,a){if(void 0===a)return e;let t={...e},i=["width","height","cornerRadius"];for(let e of i)e in t&&e in a&&void 0!==a[e]&&Object.assign(t,{[e]:a[e]});return t}(t,a),t=function(e,a){if(void 0===a)return e;let t={...e};return"fill"in t&&"fill"in a&&void 0!==a.fill&&Object.assign(t,{fill:{...t.fill,...a.fill}}),"stroke"in t&&"stroke"in a&&void 0!==a.stroke&&Object.assign(t,{stroke:{...t.stroke,...a.stroke}}),"layerBlur"in t&&"layerBlur"in a&&void 0!==a.layerBlur&&Object.assign(t,{layerBlur:{...t.layerBlur,...a.layerBlur}}),"backgroundBlur"in t&&"backgroundBlur"in a&&void 0!==a.backgroundBlur&&Object.assign(t,{backgroundBlur:{...t.backgroundBlur,...a.backgroundBlur}}),"dropShadow"in t&&"dropShadow"in a&&void 0!==a.dropShadow&&Object.assign(t,{dropShadow:{...t.dropShadow,...a.dropShadow}}),"innerShadow"in t&&"innerShadow"in a&&void 0!==a.innerShadow&&Object.assign(t,{innerShadow:{...t.innerShadow,...a.innerShadow}}),t}(t,a),t},g.toOps=function(e,a){let t,i=[];for(let[e,r]of Object.entries(a))"name"!==e&&(void 0===t&&(t={path:[],props:{},type:0},i.push(t)),t.props[e]=r);return i},(b||(b={})).defaultData={...d.defaultData,...f.defaultData,states:new n,events:new n,visible:!0,raycastLock:!1},(y||(y={})).defaultData={...b.defaultData,...p.defaultData},(w||(w={})).defaultData={cornerRadius:[0,0,0,0]},(A||(A={})).defaultData={...y.defaultData,type:"ellipse2d",width:100,height:100,name:"Ellipse"},(D||(D={})).defaultData={...y.defaultData,...w.defaultData,type:"rectangle2d",width:100,height:100,name:"Rectangle"},(v||(v={})).defaultData={...y.defaultData,type:"text2d",width:100,height:100,fontSize:12,lineHeight:1.2,letterSpacing:0,text:{textValue:"Hello world"},horizontalAlign:1,verticalAlign:1,textTransform:1,font:"Roboto_regular",name:"Text"},(B||(B={})).defaultData={...y.defaultData,type:"path2d",path:"",name:"Path"},(k||(k={})).is=function(e){return"ellipse2d"===e.type||"rectangle2d"===e.type||"text2d"===e.type||"vector2d"===e.type||"path2d"===e.type},(_||(_={})).defaultData={...b.defaultData,name:"Group",type:"group2d"},(z||(z={})).defaultData=()=>({...b.defaultData,...w.defaultData,...p.defaultData,name:"Frame",type:"frame2d",clipped:!0,width:200,height:200,fill:{color:e.fromHexAndA(4737101,1),enabled:!0},stroke:{color:e.fromHexAndA(0,1),thickness:1,enabled:!1,mode:"inside"},backgroundBlur:{radius:2,enabled:!1},layerBlur:{radius:2,enabled:!1}}),(e=>{e.defaultData=function(e){switch(e){case"rectangle2d":case"vector2d":return{...D.defaultData};case"ellipse2d":return{...A.defaultData};case"text2d":return{...v.defaultData};case"path2d":return{...B.defaultData};case"frame2d":return{...z.defaultData()};case"group2d":return{..._.defaultData}}},e.getPivot=function(e){return"width"in e&&"height"in e?["number"==typeof e.width?.5*e.width:0,"number"==typeof e.height?.5*e.height:0]:[0,0]},e.isResizeable=function(e){return"rectangle2d"===e.type||"ellipse2d"===e.type||"text2d"===e.type||"frame2d"===e.type},e.isAutoLayoutable=function(e){return"frame2d"===e.type&&void 0!==e.autoLayout},e.hasCorners=function(e){return"rectangle2d"===e.type||"frame2d"===e.type}})(S||(S={})),(O=x||(x={})).defaultData={name:"UI",type:"scene2d",objects:new r},O.emptyData=function(){return{type:"scene2d",objects:new r}},(j||(j={})).is=function(e){return e&&"number"==typeof e.x&&"number"==typeof e.y&&"number"==typeof e.z},(e=>{e.getControlsWithDefault=function(e,a){let t=[0,0],i=[1,1];if(e?.cubicControls)t=P(e.cubicControls.control1,t);else switch(e?.type){case 2:case 4:t=[.42,0];break;case 3:case 0:t=[0,0];break;case 1:t=[.25,.1];break;case 7:t=[.25,1]}if(a?.cubicControls)i=P(a.cubicControls.control2,i);else switch(a?.type){case 2:case 0:i=[1,1];break;case 3:case 4:i=[.58,1];break;case 1:i=[.25,1];break;case 7:i=[.5,1]}return{control1:t,control2:i}},e.defaultData=function(e,a){return{id:e,name:a,to:5,properties:new n}},e.createMaterialGroup=function(e){let a=new n;return e.forEach(({data:e,id:t,fi:i})=>{if("light"===e.type){let r=E(["material",`${e.category} lighting`],t,i);a.push(r)}else{let r=E(["material",e.type],t,i);a.push(r)}}),a},e.createName=function(e){return Object.entries(e).reduce((e,[a,t])=>("string"!=typeof t&&e.push({name:t.name}),e),[])},e.Presets=[{name:"Slide in",animationParams:{translateX:{value:[-20,0],easing:R(3),duration:1e3},opacity:{value:[0,1],easing:R(3),duration:1e3},endDelay:250,loop:!0}},{name:"Rotate",animationParams:{rotate:{value:[0,"1turn"],easing:R(5),duration:700},endDelay:250,loop:!0}},{name:"Scale Out",animationParams:{scale:{value:[1,1.5],easing:R(4),duration:1e3},endDelay:250,loop:!0}},{name:"Jump",animationParams:{translateY:[{value:0,duration:200,easing:"linear"},{value:-20,easing:"linear",duration:200},{value:0,easing:"linear",duration:100}],endDelay:500,loop:!0}},{name:"Jump Rotate",animationParams:{translateY:[{value:0,duration:200,easing:"linear"},{value:-20,easing:"linear",duration:200},{value:0,easing:"linear",duration:100}],rotate:{value:[0,"1turn"],easing:R(5),duration:500},endDelay:500,loop:!0}},{name:"Bounce",animationParams:{translateY:{value:["20px","-20px"],duration:575,easing:"easeOutQuad"},direction:"alternate",loop:!0}}]})(C||(C={}));var M=["x","y","z"],G=class{constructor(e=1,a=100,t=10,i=0){this.mass=e,this.stiffness=a,this.damping=t,this.initialVelocity=i,this.m_w0=Math.sqrt(a/e),this.m_zeta=t/(2*Math.sqrt(a*e)),this.m_zeta<1?(this.m_wd=this.m_w0*Math.sqrt(1-this.m_zeta*this.m_zeta),this.m_A=1,this.m_B=(this.m_zeta*this.m_w0-i)/this.m_wd):(this.m_wd=0,this.m_A=1,this.m_B=-i+this.m_w0)}solve(e){return 1-(this.m_zeta<1?Math.exp(-e*this.m_zeta*this.m_w0)*(this.m_A*Math.cos(this.m_wd*e)+this.m_B*Math.sin(this.m_wd*e)):(this.m_A+this.m_B*e)*Math.exp(-e*this.m_w0))}getDuration(){let e=.16666666666666666,a=0,t=0;for(;;)if(a+=e,1===this.solve(a)){if(t++,t>=16)break}else t=0;return a*e*1e3}};export{l as a,m as b,D as c,_ as d,S as e,x as f,P as g,R as h,M as i};
@@ -1 +1 @@
1
- import{ea as e,g as t}from"./runtime-chunk-NRJDJMQZ.js";import{Cc as r,Fc as a,Zc as o,bd as n}from"./runtime-chunk-VGN7YHB7.js";function i(r){if(Array.isArray(r.material)){for(let e of r.material)if(0===e.getLayersOfType("outline").length)return}else if(!t(r.material)||0===r.material.getLayersOfType("outline").length)return;r instanceof e&&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),o=new a;for(let e=0;e<t.length;e+=3)o.set(t[e],t[e+1],t[e+2]).normalize(),r[e]=o.x,r[e+1]=o.y,r[e+2]=o.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,o=r.position.array,i=r.normal.array,l=new Float32Array(o.length);for(let e=0;e<o.length;e+=3){let r=`${o[e]}_${o[e+1]}_${o[e+2]}`,n=new a(i[e],i[e+1],i[e+2]);t.has(r)?t.get(r)?.normals.push(n):t.set(r,{normals:[n],result:new a})}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<o.length;e+=3){let r=`${o[e]}_${o[e+1]}_${o[e+2]}`,a=t.get(r)?.result;a&&(l[e]=a.x,l[e+1]=a.y,l[e+2]=a.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,a=t.position.array,n=t.randomColor;if(void 0!==n&&3*n.count===a.length)return;let i=new Float32Array(a.length),s=parseInt(e.uuid.replace(/\D/g,"")),u=[l(r.seededRandom(s)),l(r.seededRandom(s+1e4)),l(r.seededRandom(s+2e4))];for(let e=0;e<a.length;e++)i[e]=u[e%3];e.geometry.setAttribute("randomColor",new o(i,3))}export{i as a,s as b};
1
+ import{ea as e,g as t}from"./runtime-chunk-LALFWESO.js";import{Cc as r,Fc as a,Zc as o,bd as n}from"./runtime-chunk-VGN7YHB7.js";function i(r){if(Array.isArray(r.material)){for(let e of r.material)if(0===e.getLayersOfType("outline").length)return}else if(!t(r.material)||0===r.material.getLayersOfType("outline").length)return;r instanceof e&&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),o=new a;for(let e=0;e<t.length;e+=3)o.set(t[e],t[e+1],t[e+2]).normalize(),r[e]=o.x,r[e+1]=o.y,r[e+2]=o.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,o=r.position.array,i=r.normal.array,l=new Float32Array(o.length);for(let e=0;e<o.length;e+=3){let r=`${o[e]}_${o[e+1]}_${o[e+2]}`,n=new a(i[e],i[e+1],i[e+2]);t.has(r)?t.get(r)?.normals.push(n):t.set(r,{normals:[n],result:new a})}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<o.length;e+=3){let r=`${o[e]}_${o[e+1]}_${o[e+2]}`,a=t.get(r)?.result;a&&(l[e]=a.x,l[e+1]=a.y,l[e+2]=a.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,a=t.position.array,n=t.randomColor;if(void 0!==n&&3*n.count===a.length)return;let i=new Float32Array(a.length),s=parseInt(e.uuid.replace(/\D/g,"")),u=[l(r.seededRandom(s)),l(r.seededRandom(s+1e4)),l(r.seededRandom(s+2e4))];for(let e=0;e<a.length;e++)i[e]=u[e%3];e.geometry.setAttribute("randomColor",new o(i,3))}export{i as a,s as b};
@@ -1 +1 @@
1
- import{j as e}from"./runtime-chunk-ZLW3UWOA.js";import{Ed as t,Fc as r,Oc as i,We as n,cd as a,jd as o}from"./runtime-chunk-VGN7YHB7.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-PLJ25O2X.js";import{Ed as t,Fc as r,Oc as i,We as n,cd as a,jd as o}from"./runtime-chunk-VGN7YHB7.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 +1 @@
1
- import{a as e,b as t}from"./runtime-chunk-MC3OVJQU.js";import{c as s,d as o}from"./runtime-chunk-D2IFC55F.js";import{da as r}from"./runtime-chunk-NRJDJMQZ.js";import{h as i,o as a,p as n,q as d,r as h,s as l,t as m,v as p}from"./runtime-chunk-ZLW3UWOA.js";import{i as u}from"./runtime-chunk-2PT2WH66.js";import{Oc as c,bd as y,dd as g,ue as f}from"./runtime-chunk-VGN7YHB7.js";var b=new c,A=new c,M=new c,v=new c,S=new c;function w(e){let t=!1;return e.scene.objects.traverse((e,s)=>{"BooleanGeometry"===s.geometry?.type&&(t=!0)}),t}function D(e,t){let s=e.cloner;return void 0!==s&&s.parent===t?s:void 0}var x=new Float32Array(0);function O(e,t,s,o){let r=16*(t.children.length+1);x.length<r&&(x=new Float32Array(r));let i=0,a=e=>{e.toArray(x,16*i),i++},n=!0!==t.parameters.hideBase;n&&a(o),M.multiplyMatrices(e.hiddenMatrix,e.matrix);for(let e of t.children)!u(e)||!1===e.playModeVisible||(v.multiplyMatrices(e.hiddenMatrix,e.matrix).multiply(e.pivotMatrix),S.multiplyMatrices(M,v),(!n||!S.equals(o))&&a(S));try{return 0===i?0:m(s,x.subarray(0,16*i))}finally{l(s)}}var B,F=class extends r{constructor(e,t,s){super(e,t),this.data=t,this.meshSetAddresses=[],this.needsTransformForDownstream=!1,this.geometry=new g,this.onAfterRender=(e,t,s,o,r,i)=>{super.onAfterRender(e,t,s,o,r,i),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,s){super.updateByPatchedOp(e,t,s),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(s,o=!0){if(-1!==this.booleanMeshSetAddress&&!s)return;for(let e=0;e<this.children.length;e++){let t=this.children[e];t instanceof F&&!0===t.dataPatched.visible&&t.recomputeBoolean(!0===s,o)}this.meshSetAddresses=[];for(let e=0;e<this.children.length;e++){let t=this.children[e];if(t instanceof p&&!0===t.dataPatched.visible&&t.geometry.attributes.position?.count>0&&t.geometry.drawRange.count>0&&0!==t.booleanMeshSetAddress){b.multiplyMatrices(t.hiddenMatrix,t.matrix).multiply(t.pivotMatrix);try{let e=D(t,this);if(-1===t.booleanMeshSetAddress){if((t.geometry.index??t.geometry.getAttribute("position")).count/3<15e5){let r=a(t.geometry,!0===s,o);t.booleanMeshSetAddress=void 0===e||-1===r?r:O(t,e,r,b)}if(-1===t.booleanMeshSetAddress)return;void 0===e&&h(t.booleanMeshSetAddress,b),t.booleanMatrixInvOld.copy(b).invert(),t.booleanWasTransformed=!1}else t instanceof F&&!0===t.needsTransformForDownstream?(void 0===e?h(t.booleanMeshSetAddress,b):t.booleanMeshSetAddress=O(t,e,t.booleanMeshSetAddress,b),t.needsTransformForDownstream=!1):!0===t.booleanWasTransformed&&(h(t.booleanMeshSetAddress,A.multiplyMatrices(b,t.booleanMatrixInvOld)),t.booleanMatrixInvOld.copy(b).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 g,this.geometry.userData=e.userData,this.geometry.boundingSphere=e.boundingSphere,this.geometry.setAttribute("position",new y([],3))}return void this.geometry.setDrawRange(0,0)}if(!0===s)return d(this.meshSetAddresses,this.booleanOp);let r=this.geometry;r.dispose(),this.geometry=new g,this.geometry.userData=r.userData,this.geometry.boundingSphere=r.boundingSphere;try{this.booleanMeshSetAddress=n(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()}};(B||(B={})).is=function(e){return i.is(e)&&e instanceof f};var P=(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)}},T=e=>e instanceof p,j=e=>null!==e&&e instanceof F,k=e=>s.is(e);export{w as a,F as b,B as c,P as d,T as e,j as f,k as g};
1
+ import{a as e,b as t}from"./runtime-chunk-6WHNEYAL.js";import{c as s,d as o}from"./runtime-chunk-CDZQF4NV.js";import{da as r}from"./runtime-chunk-LALFWESO.js";import{h as i,o as a,p as n,q as d,r as h,s as l,t as m,v as p}from"./runtime-chunk-PLJ25O2X.js";import{i as u}from"./runtime-chunk-2PT2WH66.js";import{Oc as c,bd as y,dd as g,ue as f}from"./runtime-chunk-VGN7YHB7.js";var b=new c,A=new c,M=new c,S=new c,v=new c;function w(e){let t=!1;return e.scene.objects.traverse((e,s)=>{"BooleanGeometry"===s.geometry?.type&&(t=!0)}),t}function x(e,t){let s=e.cloner;return void 0!==s&&s.parent===t?s:void 0}var D=new Float32Array(0);function O(e,t,s,o){let r=16*(t.children.length+1);D.length<r&&(D=new Float32Array(r));let i=0,a=e=>{e.toArray(D,16*i),i++},n=!0!==t.parameters.hideBase;n&&a(o),M.multiplyMatrices(e.hiddenMatrix,e.matrix);for(let e of t.children)!u(e)||!1===e.playModeVisible||(S.multiplyMatrices(e.hiddenMatrix,e.matrix).multiply(e.pivotMatrix),v.multiplyMatrices(M,S),(!n||!v.equals(o))&&a(v));try{return 0===i?0:m(s,D.subarray(0,16*i))}finally{l(s)}}var B,F=class extends r{constructor(e,t,s){super(e,t),this.data=t,this.meshSetAddresses=[],this.needsTransformForDownstream=!1,this.geometry=new g,this.onAfterRender=(e,t,s,o,r,i)=>{super.onAfterRender(e,t,s,o,r,i),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,s){super.updateByPatchedOp(e,t,s),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(s,o=!0){if(-1!==this.booleanMeshSetAddress&&!s)return;for(let e=0;e<this.children.length;e++){let t=this.children[e];t instanceof F&&!0===t.dataPatched.visible&&t.recomputeBoolean(!0===s,o)}this.meshSetAddresses=[];for(let e=0;e<this.children.length;e++){let t=this.children[e];if(t instanceof p&&!0===t.dataPatched.visible&&t.geometry.attributes.position?.count>0&&t.geometry.drawRange.count>0&&0!==t.booleanMeshSetAddress){b.multiplyMatrices(t.hiddenMatrix,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 r=a(t.geometry,!0===s,o);t.booleanMeshSetAddress=void 0===e||-1===r?r:O(t,e,r,b)}if(-1===t.booleanMeshSetAddress)return;void 0===e&&h(t.booleanMeshSetAddress,b),t.booleanMatrixInvOld.copy(b).invert(),t.booleanWasTransformed=!1}else t instanceof F&&!0===t.needsTransformForDownstream?(void 0===e?h(t.booleanMeshSetAddress,b):t.booleanMeshSetAddress=O(t,e,t.booleanMeshSetAddress,b),t.needsTransformForDownstream=!1):!0===t.booleanWasTransformed&&(h(t.booleanMeshSetAddress,A.multiplyMatrices(b,t.booleanMatrixInvOld)),t.booleanMatrixInvOld.copy(b).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 g,this.geometry.userData=e.userData,this.geometry.boundingSphere=e.boundingSphere,this.geometry.setAttribute("position",new y([],3))}return void this.geometry.setDrawRange(0,0)}if(!0===s)return d(this.meshSetAddresses,this.booleanOp);let r=this.geometry;r.dispose(),this.geometry=new g,this.geometry.userData=r.userData,this.geometry.boundingSphere=r.boundingSphere;try{this.booleanMeshSetAddress=n(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()}};(B||(B={})).is=function(e){return i.is(e)&&e instanceof f};var P=(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)}},T=e=>e instanceof p,j=e=>null!==e&&e instanceof F,k=e=>s.is(e);export{w as a,F as b,B as c,P as d,T as e,j as f,k as g};
@@ -1 +1 @@
1
- import{h as n}from"./runtime-chunk-ZLW3UWOA.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-PLJ25O2X.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 +1 @@
1
- import{a as t,b as e}from"./runtime-chunk-D2IFC55F.js";import{Ec as s,Fc as r,Sc as a,Xe as i}from"./runtime-chunk-VGN7YHB7.js";var o=new r(1,1,1),m=new r,d=new r,u=new s,c=class extends(t(i)){constructor(t,e=15){super(e),this.object=t,this.dummy=new a,this.object.updateMatrixWorld(),this.name=`EmptyObjectHelper: ${t.uuid}`,this.matrix=this.dummy.matrixWorld,this.matrixAutoUpdate=!1,this.object.isBone&&(this.visible=!1)}raycast(t,s){e(this.object,c.geometryHelper,t,s,!1,this.dummy)}update(){}updateMatrix(){}updateMatrixWorld(t){this.object.matrixWorld.decompose(m,u,d),this.matrix.compose(m,u,o),super.updateMatrixWorld(t)}updateWorldMatrix(t,e){}};export{c as a};
1
+ import{a as t,b as e}from"./runtime-chunk-CDZQF4NV.js";import{Ec as s,Fc as r,Sc as a,Xe as i}from"./runtime-chunk-VGN7YHB7.js";var o=new r(1,1,1),m=new r,d=new r,u=new s,c=class extends(t(i)){constructor(t,e=15){super(e),this.object=t,this.dummy=new a,this.object.updateMatrixWorld(),this.name=`EmptyObjectHelper: ${t.uuid}`,this.matrix=this.dummy.matrixWorld,this.matrixAutoUpdate=!1,this.object.isBone&&(this.visible=!1)}raycast(t,s){e(this.object,c.geometryHelper,t,s,!1,this.dummy)}update(){}updateMatrix(){}updateMatrixWorld(t){this.object.matrixWorld.decompose(m,u,d),this.matrix.compose(m,u,o),super.updateMatrixWorld(t)}updateWorldMatrix(t,e){}};export{c as a};