@splinetool/runtime 1.12.98 → 2.0.1

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 (365) hide show
  1. package/README.md +195 -22
  2. package/build/boolean.js +406 -2
  3. package/build/boolean.js.br +0 -0
  4. package/build/boolean.js.gz +0 -0
  5. package/build/boolean.wasm +0 -0
  6. package/build/boolean.wasm.br +0 -0
  7. package/build/boolean.wasm.gz +0 -0
  8. package/build/gaussian-splat-compression.js.br +0 -0
  9. package/build/gaussian-splat-compression.js.gz +0 -0
  10. package/build/hana-ui.js +4299 -0
  11. package/build/hana-ui.js.br +0 -0
  12. package/build/hana-ui.js.gz +0 -0
  13. package/build/hana-ui.wasm +0 -0
  14. package/build/hana-ui.wasm.br +0 -0
  15. package/build/hana-ui.wasm.gz +0 -0
  16. package/build/howler.js.br +0 -0
  17. package/build/howler.js.gz +0 -0
  18. package/build/navmesh.js.br +0 -0
  19. package/build/navmesh.js.gz +0 -0
  20. package/build/navmesh.wasm +0 -0
  21. package/build/navmesh.wasm.br +0 -0
  22. package/build/navmesh.wasm.gz +0 -0
  23. package/build/opentype.js.br +0 -0
  24. package/build/opentype.js.gz +0 -0
  25. package/build/physics.js +1 -1
  26. package/build/physics.js.br +0 -0
  27. package/build/physics.js.gz +0 -0
  28. package/build/physics.wasm +0 -0
  29. package/build/physics.wasm.br +0 -0
  30. package/build/physics.wasm.gz +0 -0
  31. package/build/process.js +2 -2
  32. package/build/process.js.br +0 -0
  33. package/build/process.js.gz +0 -0
  34. package/build/process.wasm +0 -0
  35. package/build/process.wasm.br +0 -0
  36. package/build/process.wasm.gz +0 -0
  37. package/build/runtime-DRACOLoader-TQHJ6SJB.js +1 -0
  38. package/build/runtime-DRACOLoader-TQHJ6SJB.js.br +0 -0
  39. package/build/runtime-DRACOLoader-TQHJ6SJB.js.gz +0 -0
  40. package/build/runtime-Perfs-KMJFDYHU.js +1 -0
  41. package/build/runtime-Perfs-KMJFDYHU.js.br +0 -0
  42. package/build/runtime-Perfs-KMJFDYHU.js.gz +0 -0
  43. package/build/runtime-aiAssistant-XJVJ7TQB.js +1 -0
  44. package/build/runtime-aiAssistant-XJVJ7TQB.js.br +0 -0
  45. package/build/runtime-aiAssistant-XJVJ7TQB.js.gz +0 -0
  46. package/build/runtime-apiServices-KAO5SQJZ.js +1 -0
  47. package/build/runtime-apiServices-KAO5SQJZ.js.br +0 -0
  48. package/build/runtime-apiServices-KAO5SQJZ.js.gz +0 -0
  49. package/build/runtime-audio-Y3GYW4YQ.js +1 -0
  50. package/build/runtime-audio-Y3GYW4YQ.js.br +0 -0
  51. package/build/runtime-audio-Y3GYW4YQ.js.gz +0 -0
  52. package/build/runtime-bloom-XRHHZNNT.js +1 -0
  53. package/build/runtime-bloom-XRHHZNNT.js.br +0 -0
  54. package/build/runtime-bloom-XRHHZNNT.js.gz +0 -0
  55. package/build/runtime-brightnessContrast-RHV6X2Z4.js +1 -0
  56. package/build/runtime-brightnessContrast-RHV6X2Z4.js.br +0 -0
  57. package/build/runtime-brightnessContrast-RHV6X2Z4.js.gz +0 -0
  58. package/build/runtime-chromaticAberration-LSGAMQAK.js +1 -0
  59. package/build/runtime-chromaticAberration-LSGAMQAK.js.br +0 -0
  60. package/build/runtime-chromaticAberration-LSGAMQAK.js.gz +0 -0
  61. package/build/runtime-chunk-23QOKH2J.js +1 -0
  62. package/build/runtime-chunk-23QOKH2J.js.br +0 -0
  63. package/build/runtime-chunk-23QOKH2J.js.gz +0 -0
  64. package/build/runtime-chunk-2VFLTNIU.js +1 -0
  65. package/build/runtime-chunk-2VFLTNIU.js.br +0 -0
  66. package/build/runtime-chunk-2VFLTNIU.js.gz +0 -0
  67. package/build/runtime-chunk-44SAPZDZ.js +1 -0
  68. package/build/runtime-chunk-44SAPZDZ.js.br +0 -0
  69. package/build/runtime-chunk-44SAPZDZ.js.gz +0 -0
  70. package/build/runtime-chunk-4KZXQGUQ.js +1 -0
  71. package/build/runtime-chunk-4KZXQGUQ.js.br +0 -0
  72. package/build/runtime-chunk-4KZXQGUQ.js.gz +0 -0
  73. package/build/runtime-chunk-4YV3EXSU.js +1 -0
  74. package/build/runtime-chunk-4YV3EXSU.js.br +0 -0
  75. package/build/runtime-chunk-4YV3EXSU.js.gz +0 -0
  76. package/build/runtime-chunk-5CH7XRKY.js +1 -0
  77. package/build/runtime-chunk-5CH7XRKY.js.br +0 -0
  78. package/build/runtime-chunk-5CH7XRKY.js.gz +0 -0
  79. package/build/runtime-chunk-5VJGAC3M.js +1 -0
  80. package/build/runtime-chunk-5VJGAC3M.js.br +0 -0
  81. package/build/runtime-chunk-5VJGAC3M.js.gz +0 -0
  82. package/build/runtime-chunk-7NBWIU4W.js +1 -0
  83. package/build/runtime-chunk-7NBWIU4W.js.br +0 -0
  84. package/build/runtime-chunk-7NBWIU4W.js.gz +0 -0
  85. package/build/runtime-chunk-ARTGMJ7O.js +1 -0
  86. package/build/runtime-chunk-ARTGMJ7O.js.br +0 -0
  87. package/build/runtime-chunk-ARTGMJ7O.js.gz +0 -0
  88. package/build/runtime-chunk-BXPWRF47.js +1 -0
  89. package/build/runtime-chunk-BXPWRF47.js.br +0 -0
  90. package/build/runtime-chunk-BXPWRF47.js.gz +0 -0
  91. package/build/runtime-chunk-CRYQVRO6.js +1 -0
  92. package/build/runtime-chunk-CRYQVRO6.js.br +0 -0
  93. package/build/runtime-chunk-CRYQVRO6.js.gz +0 -0
  94. package/build/runtime-chunk-CVUJ3GMH.js +1 -0
  95. package/build/runtime-chunk-CVUJ3GMH.js.br +0 -0
  96. package/build/runtime-chunk-CVUJ3GMH.js.gz +0 -0
  97. package/build/runtime-chunk-DJJZN367.js +1 -0
  98. package/build/runtime-chunk-DJJZN367.js.br +0 -0
  99. package/build/runtime-chunk-DJJZN367.js.gz +0 -0
  100. package/build/runtime-chunk-DZNU62CT.js +1 -0
  101. package/build/runtime-chunk-DZNU62CT.js.br +0 -0
  102. package/build/runtime-chunk-DZNU62CT.js.gz +0 -0
  103. package/build/runtime-chunk-EAXCCTR5.js +1 -0
  104. package/build/runtime-chunk-EAXCCTR5.js.br +0 -0
  105. package/build/runtime-chunk-EAXCCTR5.js.gz +0 -0
  106. package/build/runtime-chunk-EOV2DL2V.js +1 -0
  107. package/build/runtime-chunk-EOV2DL2V.js.br +0 -0
  108. package/build/runtime-chunk-EOV2DL2V.js.gz +0 -0
  109. package/build/runtime-chunk-FDRTCOJ5.js +1 -0
  110. package/build/runtime-chunk-FDRTCOJ5.js.br +0 -0
  111. package/build/runtime-chunk-FDRTCOJ5.js.gz +0 -0
  112. package/build/runtime-chunk-FQNSP44B.js +1 -0
  113. package/build/runtime-chunk-FQNSP44B.js.br +0 -0
  114. package/build/runtime-chunk-FQNSP44B.js.gz +0 -0
  115. package/build/runtime-chunk-FTVQTRM7.js +1 -0
  116. package/build/runtime-chunk-FTVQTRM7.js.br +0 -0
  117. package/build/runtime-chunk-FTVQTRM7.js.gz +0 -0
  118. package/build/runtime-chunk-GFTBNL2W.js +1 -0
  119. package/build/runtime-chunk-GFTBNL2W.js.br +0 -0
  120. package/build/runtime-chunk-GFTBNL2W.js.gz +0 -0
  121. package/build/runtime-chunk-H6BPTR74.js +1 -0
  122. package/build/runtime-chunk-H6BPTR74.js.br +0 -0
  123. package/build/runtime-chunk-H6BPTR74.js.gz +0 -0
  124. package/build/runtime-chunk-H6T5LPRN.js +1 -0
  125. package/build/runtime-chunk-H6T5LPRN.js.br +0 -0
  126. package/build/runtime-chunk-H6T5LPRN.js.gz +0 -0
  127. package/build/runtime-chunk-HER7UVU3.js +1 -0
  128. package/build/runtime-chunk-HER7UVU3.js.br +0 -0
  129. package/build/runtime-chunk-HER7UVU3.js.gz +0 -0
  130. package/build/runtime-chunk-J2I4VBHR.js +1 -0
  131. package/build/runtime-chunk-J2I4VBHR.js.br +0 -0
  132. package/build/runtime-chunk-J2I4VBHR.js.gz +0 -0
  133. package/build/runtime-chunk-JFAQQYSH.js +1 -0
  134. package/build/runtime-chunk-JFAQQYSH.js.br +0 -0
  135. package/build/runtime-chunk-JFAQQYSH.js.gz +0 -0
  136. package/build/runtime-chunk-KGZNRID6.js +1 -0
  137. package/build/runtime-chunk-KGZNRID6.js.br +1 -0
  138. package/build/runtime-chunk-KGZNRID6.js.gz +0 -0
  139. package/build/runtime-chunk-LATYCOUS.js +1 -0
  140. package/build/runtime-chunk-LATYCOUS.js.br +0 -0
  141. package/build/runtime-chunk-LATYCOUS.js.gz +0 -0
  142. package/build/runtime-chunk-MBBODDV7.js +1 -0
  143. package/build/runtime-chunk-MBBODDV7.js.br +0 -0
  144. package/build/runtime-chunk-MBBODDV7.js.gz +0 -0
  145. package/build/runtime-chunk-ML3Z74BL.js +1 -0
  146. package/build/runtime-chunk-ML3Z74BL.js.br +0 -0
  147. package/build/runtime-chunk-ML3Z74BL.js.gz +0 -0
  148. package/build/runtime-chunk-MM75L5X4.js +1 -0
  149. package/build/runtime-chunk-MM75L5X4.js.br +0 -0
  150. package/build/runtime-chunk-MM75L5X4.js.gz +0 -0
  151. package/build/runtime-chunk-N2ZRGNPR.js +1 -0
  152. package/build/runtime-chunk-N2ZRGNPR.js.br +0 -0
  153. package/build/runtime-chunk-N2ZRGNPR.js.gz +0 -0
  154. package/build/runtime-chunk-NBYTQLIB.js +1 -0
  155. package/build/runtime-chunk-NBYTQLIB.js.br +0 -0
  156. package/build/runtime-chunk-NBYTQLIB.js.gz +0 -0
  157. package/build/runtime-chunk-NSD7DU3P.js +1 -0
  158. package/build/runtime-chunk-NSD7DU3P.js.br +0 -0
  159. package/build/runtime-chunk-NSD7DU3P.js.gz +0 -0
  160. package/build/runtime-chunk-NTUTXO7Q.js +1 -0
  161. package/build/runtime-chunk-NTUTXO7Q.js.br +0 -0
  162. package/build/runtime-chunk-NTUTXO7Q.js.gz +0 -0
  163. package/build/runtime-chunk-O5NBGIBR.js +1 -0
  164. package/build/runtime-chunk-O5NBGIBR.js.br +0 -0
  165. package/build/runtime-chunk-O5NBGIBR.js.gz +0 -0
  166. package/build/runtime-chunk-OFPUAZKY.js +1 -0
  167. package/build/runtime-chunk-OFPUAZKY.js.br +0 -0
  168. package/build/runtime-chunk-OFPUAZKY.js.gz +0 -0
  169. package/build/runtime-chunk-OW6T4XFV.js +1 -0
  170. package/build/runtime-chunk-OW6T4XFV.js.br +0 -0
  171. package/build/runtime-chunk-OW6T4XFV.js.gz +0 -0
  172. package/build/runtime-chunk-QZ35BPGB.js +1 -0
  173. package/build/runtime-chunk-QZ35BPGB.js.br +0 -0
  174. package/build/runtime-chunk-QZ35BPGB.js.gz +0 -0
  175. package/build/runtime-chunk-R43XZP65.js +1 -0
  176. package/build/runtime-chunk-R43XZP65.js.br +0 -0
  177. package/build/runtime-chunk-R43XZP65.js.gz +0 -0
  178. package/build/runtime-chunk-T53JMQSH.js +1 -0
  179. package/build/runtime-chunk-T53JMQSH.js.br +0 -0
  180. package/build/runtime-chunk-T53JMQSH.js.gz +0 -0
  181. package/build/runtime-chunk-T6CHRQ6N.js +1 -0
  182. package/build/runtime-chunk-T6CHRQ6N.js.br +0 -0
  183. package/build/runtime-chunk-T6CHRQ6N.js.gz +0 -0
  184. package/build/runtime-chunk-TU4KDRKR.js +1 -0
  185. package/build/runtime-chunk-TU4KDRKR.js.br +0 -0
  186. package/build/runtime-chunk-TU4KDRKR.js.gz +0 -0
  187. package/build/runtime-chunk-TZCHGFVF.js +1 -0
  188. package/build/runtime-chunk-TZCHGFVF.js.br +3 -0
  189. package/build/runtime-chunk-TZCHGFVF.js.gz +0 -0
  190. package/build/runtime-chunk-UK4GQHMO.js +1 -0
  191. package/build/runtime-chunk-UK4GQHMO.js.br +0 -0
  192. package/build/runtime-chunk-UK4GQHMO.js.gz +0 -0
  193. package/build/runtime-chunk-USXMESRF.js +1 -0
  194. package/build/runtime-chunk-USXMESRF.js.br +0 -0
  195. package/build/runtime-chunk-USXMESRF.js.gz +0 -0
  196. package/build/runtime-chunk-VAVYZ35B.js +1 -0
  197. package/build/runtime-chunk-VAVYZ35B.js.br +0 -0
  198. package/build/runtime-chunk-VAVYZ35B.js.gz +0 -0
  199. package/build/runtime-chunk-VGN7YHB7.js +1 -0
  200. package/build/runtime-chunk-VGN7YHB7.js.br +0 -0
  201. package/build/runtime-chunk-VGN7YHB7.js.gz +0 -0
  202. package/build/runtime-chunk-W7QPV37Y.js +1 -0
  203. package/build/runtime-chunk-W7QPV37Y.js.br +1 -0
  204. package/build/runtime-chunk-W7QPV37Y.js.gz +0 -0
  205. package/build/runtime-chunk-WQXDDUFV.js +1 -0
  206. package/build/runtime-chunk-WQXDDUFV.js.br +0 -0
  207. package/build/runtime-chunk-WQXDDUFV.js.gz +0 -0
  208. package/build/runtime-chunk-XLOQIQSS.js +1 -0
  209. package/build/runtime-chunk-XLOQIQSS.js.br +0 -0
  210. package/build/runtime-chunk-XLOQIQSS.js.gz +0 -0
  211. package/build/runtime-chunk-Y3BMDVJ7.js +1 -0
  212. package/build/runtime-chunk-Y3BMDVJ7.js.br +0 -0
  213. package/build/runtime-chunk-Y3BMDVJ7.js.gz +0 -0
  214. package/build/runtime-chunk-YUK55LCN.js +1 -0
  215. package/build/runtime-chunk-YUK55LCN.js.br +0 -0
  216. package/build/runtime-chunk-YUK55LCN.js.gz +0 -0
  217. package/build/runtime-chunk-YVNDW5TV.js +1 -0
  218. package/build/runtime-chunk-YVNDW5TV.js.br +0 -0
  219. package/build/runtime-chunk-YVNDW5TV.js.gz +0 -0
  220. package/build/runtime-chunk-YXATXASV.js +1 -0
  221. package/build/runtime-chunk-YXATXASV.js.br +1 -0
  222. package/build/runtime-chunk-YXATXASV.js.gz +0 -0
  223. package/build/runtime-chunk-Z5OH244S.js +1 -0
  224. package/build/runtime-chunk-Z5OH244S.js.br +0 -0
  225. package/build/runtime-chunk-Z5OH244S.js.gz +0 -0
  226. package/build/runtime-classicRuntime-F5CEZRNL.js +1 -0
  227. package/build/runtime-classicRuntime-F5CEZRNL.js.br +0 -0
  228. package/build/runtime-classicRuntime-F5CEZRNL.js.gz +0 -0
  229. package/build/runtime-cloners-BLAFVALM.js +1 -0
  230. package/build/runtime-cloners-BLAFVALM.js.br +0 -0
  231. package/build/runtime-cloners-BLAFVALM.js.gz +0 -0
  232. package/build/runtime-collisionBVH-KXZNWTEK.js +1 -0
  233. package/build/runtime-collisionBVH-KXZNWTEK.js.br +0 -0
  234. package/build/runtime-collisionBVH-KXZNWTEK.js.gz +0 -0
  235. package/build/runtime-components-DYNXEVOC.js +1 -0
  236. package/build/runtime-components-DYNXEVOC.js.br +0 -0
  237. package/build/runtime-components-DYNXEVOC.js.gz +0 -0
  238. package/build/runtime-conditional-3A423CXW.js +1 -0
  239. package/build/runtime-conditional-3A423CXW.js.br +0 -0
  240. package/build/runtime-conditional-3A423CXW.js.gz +0 -0
  241. package/build/runtime-createDestroy-FUUG7UAK.js +1 -0
  242. package/build/runtime-createDestroy-FUUG7UAK.js.br +0 -0
  243. package/build/runtime-createDestroy-FUUG7UAK.js.gz +0 -0
  244. package/build/runtime-depthOfField-BBWDHJYP.js +1 -0
  245. package/build/runtime-depthOfField-BBWDHJYP.js.br +0 -0
  246. package/build/runtime-depthOfField-BBWDHJYP.js.gz +0 -0
  247. package/build/runtime-dragDrop-GPFMU3ZB.js +1 -0
  248. package/build/runtime-dragDrop-GPFMU3ZB.js.br +0 -0
  249. package/build/runtime-dragDrop-GPFMU3ZB.js.gz +0 -0
  250. package/build/runtime-fxBloom-IGFV4KJD.js +1 -0
  251. package/build/runtime-fxBloom-IGFV4KJD.js.br +0 -0
  252. package/build/runtime-fxBloom-IGFV4KJD.js.gz +0 -0
  253. package/build/runtime-fxDepthOfField-WX7WD3K4.js +1 -0
  254. package/build/runtime-fxDepthOfField-WX7WD3K4.js.br +0 -0
  255. package/build/runtime-fxDepthOfField-WX7WD3K4.js.gz +0 -0
  256. package/build/runtime-gameControls-TGEINRCX.js +1 -0
  257. package/build/runtime-gameControls-TGEINRCX.js.br +0 -0
  258. package/build/runtime-gameControls-TGEINRCX.js.gz +0 -0
  259. package/build/runtime-hair-YOTI2EFL.js +1 -0
  260. package/build/runtime-hair-YOTI2EFL.js.br +0 -0
  261. package/build/runtime-hair-YOTI2EFL.js.gz +0 -0
  262. package/build/runtime-hueSaturation-X3HAZK2G.js +1 -0
  263. package/build/runtime-hueSaturation-X3HAZK2G.js.br +0 -0
  264. package/build/runtime-hueSaturation-X3HAZK2G.js.gz +0 -0
  265. package/build/runtime-mergeStaticGeometries-JI7YWYGH.js +1 -0
  266. package/build/runtime-mergeStaticGeometries-JI7YWYGH.js.br +3 -0
  267. package/build/runtime-mergeStaticGeometries-JI7YWYGH.js.gz +0 -0
  268. package/build/runtime-miscActions-INSZA2CP.js +1 -0
  269. package/build/runtime-miscActions-INSZA2CP.js.br +0 -0
  270. package/build/runtime-miscActions-INSZA2CP.js.gz +0 -0
  271. package/build/runtime-mouseHover-GZW7KW6H.js +1 -0
  272. package/build/runtime-mouseHover-GZW7KW6H.js.br +0 -0
  273. package/build/runtime-mouseHover-GZW7KW6H.js.gz +0 -0
  274. package/build/runtime-navmesh-UJTUAHXM.js +1 -0
  275. package/build/runtime-navmesh-UJTUAHXM.js.br +0 -0
  276. package/build/runtime-navmesh-UJTUAHXM.js.gz +0 -0
  277. package/build/runtime-noise-UF5CMIO3.js +1 -0
  278. package/build/runtime-noise-UF5CMIO3.js.br +0 -0
  279. package/build/runtime-noise-UF5CMIO3.js.gz +0 -0
  280. package/build/runtime-particles-T2CREK6M.js +1 -0
  281. package/build/runtime-particles-T2CREK6M.js.br +0 -0
  282. package/build/runtime-particles-T2CREK6M.js.gz +0 -0
  283. package/build/runtime-paths-PRHQFJ3X.js +1 -0
  284. package/build/runtime-paths-PRHQFJ3X.js.br +0 -0
  285. package/build/runtime-paths-PRHQFJ3X.js.gz +0 -0
  286. package/build/runtime-pixelation-QFSF4L6X.js +1 -0
  287. package/build/runtime-pixelation-QFSF4L6X.js.br +0 -0
  288. package/build/runtime-pixelation-QFSF4L6X.js.gz +0 -0
  289. package/build/runtime-resize-SM6PZWJY.js +1 -0
  290. package/build/runtime-resize-SM6PZWJY.js.br +0 -0
  291. package/build/runtime-resize-SM6PZWJY.js.gz +0 -0
  292. package/build/runtime-sceneTransition-JUZVB2S3.js +1 -0
  293. package/build/runtime-sceneTransition-JUZVB2S3.js.br +0 -0
  294. package/build/runtime-sceneTransition-JUZVB2S3.js.gz +0 -0
  295. package/build/runtime-scroll-Q6NRRL4F.js +1 -0
  296. package/build/runtime-scroll-Q6NRRL4F.js.br +0 -0
  297. package/build/runtime-scroll-Q6NRRL4F.js.gz +0 -0
  298. package/build/runtime-shapeBlends-CPHLT3XC.js +1 -0
  299. package/build/runtime-shapeBlends-CPHLT3XC.js.br +0 -0
  300. package/build/runtime-shapeBlends-CPHLT3XC.js.gz +0 -0
  301. package/build/runtime-text-TBHPCNPL.js +1 -0
  302. package/build/runtime-text-TBHPCNPL.js.br +0 -0
  303. package/build/runtime-text-TBHPCNPL.js.gz +0 -0
  304. package/build/runtime-textInputs-4HQER44D.js +1 -0
  305. package/build/runtime-textInputs-4HQER44D.js.br +0 -0
  306. package/build/runtime-textInputs-4HQER44D.js.gz +0 -0
  307. package/build/runtime-timeline-UKR4DEQS.js +1 -0
  308. package/build/runtime-timeline-UKR4DEQS.js.br +0 -0
  309. package/build/runtime-timeline-UKR4DEQS.js.gz +0 -0
  310. package/build/runtime-tracking-5HISHPEY.js +1 -0
  311. package/build/runtime-tracking-5HISHPEY.js.br +0 -0
  312. package/build/runtime-tracking-5HISHPEY.js.gz +0 -0
  313. package/build/runtime-transitions-FBNOSFXY.js +1 -0
  314. package/build/runtime-transitions-FBNOSFXY.js.br +0 -0
  315. package/build/runtime-transitions-FBNOSFXY.js.gz +0 -0
  316. package/build/runtime-ui2d-3AMS3CSG.js +1 -0
  317. package/build/runtime-ui2d-3AMS3CSG.js.br +0 -0
  318. package/build/runtime-ui2d-3AMS3CSG.js.gz +0 -0
  319. package/build/runtime-updater-3ELP7WMM.js +1 -0
  320. package/build/runtime-updater-3ELP7WMM.js.br +1 -0
  321. package/build/runtime-updater-3ELP7WMM.js.gz +0 -0
  322. package/build/runtime-variables-U36KPJ5V.js +1 -0
  323. package/build/runtime-variables-U36KPJ5V.js.br +0 -0
  324. package/build/runtime-variables-U36KPJ5V.js.gz +0 -0
  325. package/build/runtime-vectorShapes-GIS26ELU.js +1 -0
  326. package/build/runtime-vectorShapes-GIS26ELU.js.br +0 -0
  327. package/build/runtime-vectorShapes-GIS26ELU.js.gz +0 -0
  328. package/build/runtime-video-TZNR7MEM.js +1 -0
  329. package/build/runtime-video-TZNR7MEM.js.br +0 -0
  330. package/build/runtime-video-TZNR7MEM.js.gz +0 -0
  331. package/build/runtime-vignette-3KJD4P5D.js +1 -0
  332. package/build/runtime-vignette-3KJD4P5D.js.br +0 -0
  333. package/build/runtime-vignette-3KJD4P5D.js.gz +0 -0
  334. package/build/runtime-webgpu-LYDFJW3X.js +1 -0
  335. package/build/runtime-webgpu-LYDFJW3X.js.br +0 -0
  336. package/build/runtime-webgpu-LYDFJW3X.js.gz +0 -0
  337. package/build/runtime.cjs +6283 -4577
  338. package/build/runtime.js +1 -8186
  339. package/build/runtime.js.br +0 -0
  340. package/build/runtime.js.gz +0 -0
  341. package/build/runtime.standalone.js +1 -0
  342. package/build/runtime.standalone.js.br +0 -0
  343. package/build/runtime.standalone.js.gz +0 -0
  344. package/build/runtime.standalone.webgl.js +1 -0
  345. package/build/runtime.standalone.webgl.js.br +0 -0
  346. package/build/runtime.standalone.webgl.js.gz +0 -0
  347. package/build/runtime.standalone.webgpu.js +1 -0
  348. package/build/runtime.standalone.webgpu.js.br +0 -0
  349. package/build/runtime.standalone.webgpu.js.gz +0 -0
  350. package/build/runtime.standalone.webgpu.micro.js +1 -0
  351. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  352. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  353. package/build/runtime.standalone.webgpu.min.js +1 -0
  354. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  355. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  356. package/build/sky-alto.png +0 -0
  357. package/build/sky-cirrus.png +0 -0
  358. package/build/smaa-area.png +0 -0
  359. package/build/smaa-node-area.png +0 -0
  360. package/build/smaa-node-search.png +0 -0
  361. package/build/smaa-search.png +0 -0
  362. package/build/snippets/hana-82e9eb82a79dead4/js-imports.js +93 -0
  363. package/package.json +104 -89
  364. package/runtime.d.ts +301 -2
  365. package/build/ui.js +0 -3
@@ -0,0 +1 @@
1
+ import{a as t}from"./runtime-chunk-44SAPZDZ.js";import{a as e,b as i}from"./runtime-chunk-DZNU62CT.js";import{a as s}from"./runtime-chunk-VAVYZ35B.js";import{c as n}from"./runtime-chunk-FQNSP44B.js";import"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as r,f as a}from"./runtime-chunk-TZCHGFVF.js";import{D as o,Ha as h}from"./runtime-chunk-OW6T4XFV.js";import{Dc as l,Fc as p,Gc as u,Sc as d,Vc as c,Vd as g,bd as m,dd as x,kd as v,l as y,ld as I,rd as M}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var f=class extends t{constructor(t,e,i){super(t,e,i),this.data=e}},C=class extends d{constructor(){super(),this.caretIndex=0,this._caretVisibleAlpha=1,this._selectionVisibleAlpha=.3,this.current={start:0,end:void 0},this.matrixAutoUpdate=!1,this.caretMesh=new I(new g(1,1),new v({transparent:!0,opacity:0,side:y})),this.add(this.caretMesh),this.selectionMesh=new I(new g(1,1),new v({color:2857471,transparent:!0,depthTest:!1,depthWrite:!1,opacity:0,side:y})),this.add(this.selectionMesh),this.hide()}get caretHeight(){return this.object?.AD??0}show(t){this.visible=!0,this.object=t,this.caretMesh.scale.set(1,this.caretHeight,1),this.caretMesh.position.y=.5*-this.caretHeight,this.setCaretPosition(this.caretIndex),this.update()}hide(){this.visible=!1}update(){if(void 0===this.object)return;this.updateHelperMatrix();let{depth:t}=this.object.geometry.userData.parameters;this.caretMesh.position.z=t,this.selectionMesh.position.z=t}updateHelperMatrix(){if(void 0===this.object)return;let t=this.object,e=t.parent;null!==e&&e.updateWorldMatrix(!0,!1),t.matrixAutoUpdate&&t.updateMatrix(),null!==e?(this.matrixWorld.multiplyMatrices(e.matrixWorld,t.hiddenMatrix),this.matrixWorld.multiplyMatrices(this.matrixWorld,t.matrix)):this.matrixWorld.multiplyMatrices(t.hiddenMatrix,t.matrix),this.matrix.copy(this.matrixWorld);for(let t of this.children)t.matrixWorld.copy(this.matrixWorld);t.updateWorldMatrix(!0,!0)}setCaretColor(t){let e=this.caretMesh.material;e.color.setRGB(t.r,t.g,t.b);let i=this._caretVisibleAlpha===e.opacity;this._caretVisibleAlpha=t.a,i&&(e.opacity=this._caretVisibleAlpha)}setSelectionColor(t){this.selectionMesh.material.color.setRGB(t.r,t.g,t.b)}setCaretPosition(t,e={}){if(void 0===this.object)return;this.caretIndex=t;let i=this.object.wrappedText,[s,n]=_(i,t),[r,a]=t>0?_(i,t-1):[null,null];"\n"===(t>0&&i.length?i[r].charAt(a):null)&&(s++,n=0),this.current.start=t,this.current.end=void 0;let[o,h]=b(this.object,s,n),{AD:l,descender:p}=this.object,u=p+.5*l,{width:d,height:c,depth:g}=this.object.geometry.userData.parameters,m="string"==typeof d?0:d,x="string"==typeof c?0:c;this.caretMesh.scale.set(1,this.caretHeight,1),this.caretMesh.position.set(o-.5*m,h+u+.5*x,g),this.hideSelectionMesh(),this.showCaretMesh()}setSelection(t,e){if(void 0===this.object)return;let i=this.object.wrappedText;this.current.start=t,this.current.end=e;let s=[],n=[],r=function(t,e,i){let[s,n]=_(t,e),[r,a]=_(t,i),o=[];n>=t[s].length&&(s++,n=0);for(let e=s;e<=r;e++){let i=t[e],h=e===s?n:0,l=e===r?a:i.length;o.push([e,h,l])}return o}(i,t,e),{lineHeight:a,AD:o,descender:h}=this.object,l=h+.5*o-.5*a;for(let[t,e,i]of r)if(e!==i){let[r,o]=b(this.object,t,e),[h,p]=b(this.object,t,i),u=o,d=p;u+=l,d+=l,d+=a;let c=s.length/3;s.push(r,u,0),s.push(h,u,0),s.push(h,d,0),s.push(r,d,0),n.push(c+0,c+1,c+2),n.push(c+2,c+3,c+0)}let p=new x;p.setIndex(n),p.setAttribute("position",new m(s,3));let{width:u,height:d,depth:c}=this.object.geometry.userData.parameters,g="string"==typeof u?0:u,v="string"==typeof d?0:d;this.selectionMesh.geometry.dispose(),this.selectionMesh.geometry=p,this.selectionMesh.position.x=.5*-g,this.selectionMesh.position.y=.5*v,this.selectionMesh.position.z=c,this.showSelectionMesh(),this.hideCaretMesh()}getSelectionFromPosition(t,e,i="previous"){if(void 0===this.object||void 0===this.object.font)return;let s=this.object.wrappedText,n=s.length,r=this.object.lineHeight,a=n*r,{height:o,verticalAlign:h}=this.object.geometry.userData.parameters,l="string"==typeof o?0:o,p=0;3===h?p=l-a:2===h&&(p=.5*l-.5*a);let u=Math.min(Math.floor(Math.max(Math.min(-e-p,a),0)/r),n-1),d=this.object.charCoords[u],c=this.object.charWidths[u],g=0,m=!1;if("previous"===i){for(let e=0;e<d.length;e++)if(d[e][0]+.5*c[e]-t>0){g=e,m=!0;break}}else if("closest"===i){let e=1/0;for(let i=0;i<d.length;i++){let s=d[i][0]+.5*c[i],n=Math.abs(s-t);n<e&&(e=n,g=i,m=!0)}}else for(let e=0;e<d.length;e++){let i=d[e][0],s=d[e][0]+c[e];if(t>=i&&t<s){g=e,m=!0;break}}return m||(g=d.length),{index:this.getGlobalIndexFromLineAndCharIndexes(s,u,g),lineIndex:u,characterIndex:g}}getGlobalIndexFromLineAndCharIndexes(t,e,i){return t.slice(0,e).reduce((t,e)=>t+e.length,0)+i}showSelectionMesh(){this.selectionMesh.material.opacity=this._selectionVisibleAlpha}hideSelectionMesh(){this.selectionMesh.material.opacity=0}showCaretMesh(){this.caretMesh.material.opacity=this._caretVisibleAlpha}hideCaretMesh(){this.caretMesh.material.opacity=0}};function b(t,e,i){let{charCoords:s,charWidths:n,initialOffsetY:r,lineHeight:a}=t;if(s[e]&&0===s[e].length||0===s.length){let i=0,{horizontalAlign:s}=t.data.geometry,n=t.wrappedText,{width:o}=t.geometry.userData.parameters;return 1===n.length&&0===n[0].length&&(3===s?i=.5*o:2===s&&(i=o)),[i,r-a*e]}let o=s[e];if(void 0===o||0===o.length)return[0,0];let[h,l]=o[Math.min(i,o.length-1)],p=h;return i>=o.length&&(p+=n[e][i-1]),[p,l]}function _(t,e){let i=0;for(let s=0;s<t.length;s++){let n=t[s],r=e-i;if(r<=n.length)return[s,r];i+=n.length}return[Math.max(0,t.length-1),t[t.length-1]?.length??0]}function w(t,e){return"string"==typeof t?e.data.colors[t]:t}function k(t){return t.colors[0]}var E=class{constructor(){this._clickCount=0,this._lastTime=0,this._lastPosition=[0,0],this._delay=500,this._distance=2,this._onMouseDown=t=>{let e=[t.clientX,t.clientY],i=(new Date).getTime();if(this._clickCount>0){let t=e[0]-this._lastPosition[0],i=e[1]-this._lastPosition[1];Math.sqrt(t*t+i*i)>this._distance&&(this._clickCount=0)}this._lastPosition=e,this._clickCount=i-this._lastTime>this._delay?1:this._clickCount+1,this._lastTime=i},this._onMouseUp=t=>{}}start(t,e=500,i=2){this._target&&this.stop(),this.reset(),this._delay=e,this._distance=i,this._target=t,this._target.addEventListener("pointerdown",this._onMouseDown,!1),this._target.addEventListener("pointerup",this._onMouseUp,!1)}stop(){this._target&&(this._target.removeEventListener("pointerdown",this._onMouseDown,!1),this._target.removeEventListener("pointerup",this._onMouseUp,!1),this._target=void 0)}get clickCount(){return this._clickCount}reset(){this._clickCount=0,this._lastTime=0,this._lastPosition=[0,0]}},j=new p(0,0,1),D=new p,S=new p,T=new u,A=class{constructor(t,e,i,s,n){this.containerScene=t,this.raycaster=e,this.sharedAssets=i,this.requestRender=s,this.onExit=n,this.htmlInput=null,this.virtualInput=null,this.helper=new C,this.doubleClickHandler=new E,this.isDragging=!1,this.plane=new M,this.caretInterval=0,this.planeIntersection=new p,this.projected=new l,this._lastIndex=0,this._isFirstDragMove=!1,this.selectionOnDragStart=0,this.onTextMaterialChanged=()=>{let t=this.virtualInput?.data;if(void 0!==this.virtualInput&&t){let e=t.material,i=function(t,e){let i=o.fromHex(3223857),s=.8;for(let n of t.layers){if("light"===n.data.type||"displace"===n.data.type||"fresnel"===n.data.type||"dust"===n.data.type||"matcap"===n.data.type||"texture"===n.data.type||"toon"===n.data.type||"outline"===n.data.type||"transmission"===n.data.type||"noise"===n.data.type||"vertexColor"===n.data.type)continue;let t="string"==typeof n.data.alpha?Number(e.getVariable(n.data.alpha)):n.data.alpha;if("color"===n.data.type&&t>.3){i=w(n.data.color,e),s=t;break}if(("depth"===n.data.type||"gradient"===n.data.type)&&t>.3){let t=k(n.data);i={r:t[0],g:t[1],b:t[2]},s="string"==typeof n.data.alpha?1:n.data.alpha;break}}return{...i,a:s}}("string"==typeof e?this.sharedAssets.data.materials[e]:e,this.sharedAssets);this.helper.setCaretColor(i)}},this.stopAnimateTextCursor=()=>{clearInterval(this.caretInterval),this.helper&&(this.helper.caretMesh.visible=!1)},this.startAnimateTextCursor=()=>{this.stopAnimateTextCursor(),this.helper&&(this.helper.caretMesh.visible=!0,this.caretInterval=setInterval(()=>{this.helper&&(this.helper.caretMesh.visible=!this.helper.caretMesh.visible),this.requestRender()},600))},this.handleCaretUpdate=t=>{if(!this.htmlInput||!this.virtualInput)return;let e=this.helper,i="ArrowLeft"===t?.key||"ArrowRight"===t?.key,s="ArrowUp"===t?.key||"ArrowDown"===t?.key;this.htmlInput.selectionStart===this.htmlInput.selectionEnd?(e.setCaretPosition(this.htmlInput.selectionStart,{horizontalKeyMove:i,verticalKeyMove:s}),this.startAnimateTextCursor()):e.setSelection(this.htmlInput.selectionStart,this.htmlInput.selectionEnd),this.requestRender()},this.containerScene.add(this.helper)}createInput(){return this.htmlInput=function(){let t=document.createElement("textarea");return t.style.position="fixed",t.style.top="200px",t.style.left="400px",t.style.zIndex="-1",t.style.border="1px solid rgba(255,0,0,0.5)",t.style.width="10px",t.style.height="500px",t.style.color="white",t.style.opacity="0.5",t.style.background="transparent",t.style.display="none",t.style.margin="0px",t.style.padding="0px",t.style.boxSizing="content-box",t.style.pointerEvents="none",t}(),this.htmlInput}connect(){}disconnect(){this.stopAnimateTextCursor(),this.helper.hide(),this.htmlInput?.remove(),this.doubleClickHandler.stop()}handleMouseDown(){if(!this.htmlInput||!this.virtualInput)return!0;this.getPointOnPlane();let t=this.doubleClickHandler.clickCount,e=this.helper.getSelectionFromPosition(this.projected.x,this.projected.y,t>1?"inside":"previous")??{index:0,lineIndex:0,characterIndex:0},{lineIndex:i}=e,{index:s,characterIndex:n}=e;this.virtualInput?.wrappedText?.length&&"\n"===this.virtualInput.wrappedText[i][Math.max(0,n-1)]&&(s--,n--),this._lastIndex=s,this._isFirstDragMove=!0;let r=this.checkClickedObject();if(1===t){if(null===r)return this.onExit(this.virtualInput),!0;this.selectionOnDragStart=s,this.isDragging=!0,this.setInputSelection(s)}else r===this.virtualInput&&(2===t?this.selectClosestWord(i,n):t>2&&(this.setInputSelection(0,this.htmlInput.value.length),this.doubleClickHandler.reset()))}handleMouseUp(){this.applyRangeToTextInput(),this.isDragging=!1,this._isFirstDragMove=!1}handleMouseMove(){!this.virtualInput||(this._isFirstDragMove&&this.doubleClickHandler.clickCount>1&&(this.selectionOnDragStart=this._lastIndex,this.isDragging=!0,this.setInputSelection(this._lastIndex)),this._isFirstDragMove=!1,this.getPointOnPlane(),this.applyRangeToTextInput())}focus(t){if(this.virtualInput=t,this.updateTextInputStyles(),this.htmlInput)if(t){let t=this.data?.geometry.text;this.htmlInput.value="string"==typeof t?"":t?.textValue.toString()??""}else this.htmlInput.value=""}blur(){}get data(){let{virtualInput:t}=this;if(t)return t.dataPatched}applyRangeToTextInput(){if(!this.isDragging||!this.virtualInput||!this.htmlInput)return;let t=this.selectionOnDragStart,{index:e,lineIndex:i,characterIndex:s}=this.helper.getSelectionFromPosition(this.projected.x,this.projected.y,this.doubleClickHandler.clickCount>2?"inside":"previous")??{index:0},n=e;void 0!==i&&void 0!==s&&"\n"===this.virtualInput?.wrappedText[i][s-1]&&n--,this.htmlInput.setSelectionRange(Math.min(t,n),Math.max(t,n))}checkClickedObject(){if(this.virtualInput){let t=this.raycaster.intersectObject(this.virtualInput,!1);if(t.length>0){let e=t[0];if(e.object instanceof f)return e.object}}return null}selectClosestWord(t,e){if(!this.virtualInput)return;let i=this.virtualInput.wrappedText,s=i[t],n=e+1,r=e;" "!==s[e]&&(n=this.findNextCharOccurence(s,e,"forward"," "),r=this.findNextCharOccurence(s,e,"backward"," "),r>0&&r++,n>=s.length-1&&t===i.length-1&&n++);let a=this.helper,o=a.getGlobalIndexFromLineAndCharIndexes(i,t,r),h=a.getGlobalIndexFromLineAndCharIndexes(i,t,n);this.setInputSelection(o,h)}findNextCharOccurence(t,e,i,s=" "){let n=Math.max(0,t.length-1),r="forward"===i?n:0,a="forward"===i?1:-1,o=Math.max(Math.min(e,n),0);for(;o!==r;)if(o+=a,t.charAt(o)===s)return o;return r}getPointOnPlane(){let t=this.virtualInput?.data;if(this.virtualInput&&t&&this.raycaster.ray.intersectsPlane(this.plane)){null===this.planeIntersection&&(this.planeIntersection=new p);let e=this.raycaster.ray.intersectPlane(this.plane,this.planeIntersection);if(e){this.planeIntersection.copy(this.virtualInput.worldToLocal(e));let i="number"==typeof t.geometry.width?t.geometry.width:1,s="number"==typeof t.geometry.height?t.geometry.height:1;this.projected.set(e.x+.5*i,e.y-.5*s)}}}updatePlane(){let t=this.virtualInput?.data;this.virtualInput&&t&&(T.getNormalMatrix(this.virtualInput.matrixWorld),D.copy(j).applyMatrix3(T).normalize(),this.virtualInput.localToWorld(S.set(0,0,t.geometry.depth)),this.plane.setFromNormalAndCoplanarPoint(D,S))}setInputSelection(t,e=t){this.htmlInput?.setSelectionRange(t,e),n&&this.htmlInput?.focus(),setTimeout(()=>{this.htmlInput?.focus()})}updateTextInputStyles(){let t=this.virtualInput?.data;var e;this.virtualInput&&t&&this.htmlInput&&(this.htmlInput.style.fontSize=t.geometry.fontSize+"px",this.htmlInput.style.letterSpacing=t.geometry.letterSpacing*t.geometry.fontSize+"px",this.htmlInput.style.lineHeight=t.geometry.fontSize*t.geometry.lineHeight+"px",this.htmlInput.style.width=t.geometry.width+"px",this.htmlInput.style.height=t.geometry.height+"px",this.htmlInput.style.textAlign=4===(e=t.geometry.horizontalAlign)?"justify":2===e?"right":3===e?"center":"left")}},L=(t,e)=>{if("string"==typeof t){let i=e.data(t);if(i)return L(i.value,e)}return h.getDisplayedValue(t)};function U(t,e){let i=t.text,s="";if("string"==typeof i){let t=e.variables.data(s);t&&(s=L(t.value,e.variables))}else s=i.textValue.toString();return s}var H=class extends e{constructor(t,e){super(t),this.eventManager=e,this._textInputs=[],this.sceneHelpers=new c,this.helper=new C,this._onMouseDownFocusIn=t=>{if(s.length>1)return;this.eventContext.updateRaycaster(t);let e=null;if(this.eventContext.raycaster)for(let t of this._textInputs)if(this.eventContext.raycaster.intersectObject(t,!0).length>0){e=t;break}this.focusOnTextInput(e),this._onCaretUpdate(),this._onMouseUp(),this.textInputManager.doubleClickHandler.start(this.eventContext.domElement),this.textInputManager.doubleClickHandler._onMouseDown(t),this._onMouseDown(t)},this.onExit=()=>{let{virtualInput:t}=this.textInputManager;if(null===t)return;let e=this.textInputManager.htmlInput;this.helper.hide(),e?.setSelectionRange(e.value.length,e.value.length),this.eventManager.controlsManager.orbitControls&&(this.eventManager.controlsManager.orbitControls.enabled=!0);let{domElement:i}=this.eventContext;i.removeEventListener("pointerdown",this._onMouseDown,!1),i.removeEventListener("pointerup",this._onMouseUp,!1),i.removeEventListener("pointermove",this._onMouseMove,!1),window.removeEventListener("keydown",this._onKeyPress),this.textInputManager.doubleClickHandler.reset(),i.addEventListener("pointerdown",this._onMouseDownFocusIn),this.eventContext.renderer.sceneHelpersOnTop=void 0,this.eventContext.renderer.pipeline.disableHelpers()},this._onMouseDown=t=>{this.eventContext.updateRaycaster(t),this.textInputManager.handleMouseDown(),this.textInputManager.virtualInput&&this.eventContext.raycaster.intersectObject(this.textInputManager.virtualInput,!0).length>0&&this.eventManager.controlsManager.orbitControls&&(this.eventManager.controlsManager.orbitControls.enabled=!1)},this._onMouseUp=()=>{this.textInputManager.handleMouseUp(),this.eventManager.controlsManager.orbitControls&&!this.eventManager.controlsManager.orbitControls.enabled&&(this.eventManager.controlsManager.orbitControls.enabled=!0)},this._onMouseMove=t=>{this.eventContext.updateRaycaster(t),this.textInputManager.handleMouseMove()},this._onTextEdit=t=>{let{htmlInput:e,virtualInput:i,helper:s}=this.textInputManager;if(!e||!i)return;let n=e.value;i.textGeometry.setText(n,this.eventContext.sharedAssets).then(()=>{this.eventContext.requestRender()});let r=i.data;s.update();let a=r.geometry.text;if("string"==typeof a){let t=a;this.eventContext.sharedAssets.updateVariable(t,{textValue:n})}this.textInputManager.updateTextInputStyles(),this._onCaretUpdate()},this._onCaretUpdate=t=>{this.textInputManager.handleCaretUpdate(t)},this._onKeyPress=t=>{"Escape"===t.key&&this.onExit()},this.textInputManager=new A(this.sceneHelpers,t.raycaster,t.sharedAssets,t.requestRender,this.onExit)}connect(){let t=[];if(this.eventContext.scene.traverseEntity(e=>{e instanceof f&&t.push(e)}),this._textInputs=t,0===t.length)return;let{domElement:e}=this.eventContext;e.addEventListener("pointerdown",this._onMouseDownFocusIn),this.textInputManager.connect();let i=this.textInputManager.createInput();document.body.appendChild(i),i.style.display="none",i.addEventListener("keyup",this._onCaretUpdate),i.addEventListener("keydown",this._onCaretUpdate),i.addEventListener("beforeinput",this._onCaretUpdate),i.addEventListener("paste",this._onCaretUpdate),i.addEventListener("cut",this._onCaretUpdate),i.addEventListener("select",this._onCaretUpdate),i.addEventListener("selectstart",this._onCaretUpdate)}disconnect(){let t=this.textInputManager.htmlInput,{domElement:e,sharedAssets:i}=this.eventContext;e.removeEventListener("pointerdown",this._onMouseDownFocusIn),t?.removeEventListener("keyup",this._onCaretUpdate),t?.removeEventListener("keydown",this._onCaretUpdate),t?.removeEventListener("beforeinput",this._onCaretUpdate),t?.removeEventListener("paste",this._onCaretUpdate),t?.removeEventListener("cut",this._onCaretUpdate),t?.removeEventListener("select",this._onCaretUpdate),t?.removeEventListener("selectstart",this._onCaretUpdate),this._textInputs.forEach(t=>{let e=U(t.data.geometry,this.eventContext.sharedAssets.data);t.textGeometry.setText(e,i)}),e.removeEventListener("pointerdown",this._onMouseDown,!1),e.removeEventListener("pointerup",this._onMouseUp,!1),e.removeEventListener("pointermove",this._onMouseMove,!1),window.removeEventListener("keydown",this._onKeyPress),this.eventContext.renderer.sceneHelpersOnTop=void 0,this.eventContext.renderer.pipeline.disableHelpers(),this.textInputManager.disconnect()}focusOnTextInput(t){this.textInputManager.focus(t),this.textInputManager.onTextMaterialChanged();let e=this.textInputManager.htmlInput;if(!e||null===t)return;this.textInputManager.updateTextInputStyles(),this.eventContext.renderer.sceneHelpersOnTop=this.sceneHelpers,this.eventContext.renderer.pipeline.enableHelpers(),this.textInputManager.isDragging=!1;let i=U(t.textGeometry.userData.parameters,this.eventContext.sharedAssets.data);e.value=i,e.setSelectionRange(0,0),this.textInputManager.helper.show(t),e.style.display="block",e.addEventListener("input",this._onTextEdit),this.textInputManager.updatePlane();let{domElement:s}=this.eventContext;s.removeEventListener("pointerdown",this._onMouseDownFocusIn),s.addEventListener("pointerdown",this._onMouseDown,!1),s.addEventListener("pointerup",this._onMouseUp,!1),s.addEventListener("pointermove",this._onMouseMove,!1),window.addEventListener("keydown",this._onKeyPress)}};i("Textfields",({eventContext:t,eventManager:e})=>new H(t,e)),a("InputGeometry",(t,e,i)=>new f(t,e,i)),r("textinputs");
@@ -0,0 +1 @@
1
+ import{a as t,b as e,c as i,d as a,e as n,f as s,h as r,i as o}from"./runtime-chunk-YVNDW5TV.js";import"./runtime-chunk-T6CHRQ6N.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as l}from"./runtime-chunk-R43XZP65.js";import{a as d}from"./runtime-chunk-5VJGAC3M.js";import{a as h,b as u}from"./runtime-chunk-O5NBGIBR.js";import"./runtime-chunk-23QOKH2J.js";import"./runtime-chunk-FTVQTRM7.js";import{a as c}from"./runtime-chunk-HER7UVU3.js";import"./runtime-chunk-J2I4VBHR.js";import"./runtime-chunk-ARTGMJ7O.js";import"./runtime-chunk-FDRTCOJ5.js";import{Y as m,ca as p}from"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as g,e as f}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-DJJZN367.js";import{d as y}from"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import{a as v,h as x,i as M,j as N}from"./runtime-chunk-Z5OH244S.js";import{a as b}from"./runtime-chunk-TZCHGFVF.js";import{A as C,B as T,C as k,D as j,E as O,q as w,z as F}from"./runtime-chunk-OW6T4XFV.js";import{Bc as A,Cc as E}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var P=0;function D(){P++}function I(t,e){return(e.epoch!==P||e.t!==t.t||e.index!==t.index)&&(e.epoch=P,e.t=t.t,e.index=t.index,!0)}function L(t,e,i,a){if(e){let n={},s=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time);if("data"in t){let e=s[0];e&&i?.(e.data.value,t),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let e={t:0,index:0},r={t:NaN,index:NaN};return{targets:e,...n,update:()=>{if(!I(e,r))return;let n=Math.ceil(e.index),o=n%2==0?e.t:1-e.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value,h={},u={};if(Object.keys(l).length>0&&Object.keys(d).length>0)for(let e in t.data)if(e in l&&e in d){let t=_(l[e],d[e],o,a);void 0!==t&&(h[e]=t,u[e]={start:l,end:d,t:o})}i?.({...h},t,u)}}}}}}function _(t,e,i,a){if("string"==typeof t&&a&&(t=a.color(t)),"string"==typeof e&&a&&(e=a.color(e)),"number"==typeof t)return E.lerp(t,e,i);if(O.is(t))return O.lerp(t,e,i);if(j.is(t))return j.lerp(t,e,i);if(Array.isArray(t))return(t.length>e.length?e:t).map((a,n)=>{if(Array.isArray(a)){let a=t[n].length>e[n].length?e[n].length:t[n].length;return(4===a?T:3===a?C:F).lerp(t[n],e[n],i)}return E.lerp(t[n],e[n],i)});if("object"==typeof t&&null!==t){let n={};for(let s in t){let r=_(t[s],e[s],i,a);void 0!==r&&(n[s]=r)}return n}}var H=new Map,B=new Map,S=class extends A{constructor(s,g,f,b,C,T,j){super(),this.id=s,this.data=g,this.scene=f,this.sharedAssets=b,this.object=C,this.eventType=T,this.actionCondition=j,this.toggleIsForward=!1,this._finished=!1,this.hasPlayedOnce=!1,this._shouldForwardLoop=!1,this._shouldPauseOnNextLoopComplete=!1,this.hiddenMatrixOverrides=[],this._onLoopComplete=()=>{this._shouldPauseOnNextLoopComplete&&(this.timeline.pause(),this._shouldPauseOnNextLoopComplete=!1)};try{let s=r(this.data);"number"==typeof s.loop&&s.loop--,this.timeline=l.timeline({...s,autoplay:!1}),this._shouldForwardLoop=!0===s.loop||"number"==typeof s.loop&&s.loop>1;let g=this.sharedAssets.data.timelineAnimations[this.data.timeline].mapping;Object.entries(g).forEach(([s,r])=>{let o=this.scene.find(s);if(!o)return;let l=o.data.timelineAnimations[r];if(!l)return;let g=o.data.states.data(r);g?.hiddenMatrix&&16===g.hiddenMatrix.length&&!k.isEqual(g.hiddenMatrix,o.data.hiddenMatrix)&&this.hiddenMatrixOverrides.push({objId:s,original:o.hiddenMatrix.clone(),state:g.hiddenMatrix});let v=function(n,s,r,o){let l=[];return s.properties.forEach(s=>{let g=s.data.path?.[0];if(g&&["position","rotation","scale"].includes(g)){let t=function(t,e=()=>{}){let i=[];for(let a of N){let n=[...t.keyframes??[]].filter(t=>void 0!==t.data.value[a]).sort((t,e)=>t.data.time-e.data.time),s=n[0];s&&e?.(s.data.value);let r={index:[],t:[]};for(let t=0;t<n.length-1;t++){let e=n[t],i=n[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*n[0].data.time:0};r.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),r.index.push({...a,value:t,easing:"linear"})}if(n.length>1){let t={t:0,index:0},s={t:NaN,index:NaN};i.push({targets:t,...r,update:()=>{if(!I(t,s))return;let i=Math.ceil(t.index),r=i%2==0?t.t:1-t.t,o=n?.[i].data.value,l=n?.[i+1]?.data.value;void 0!==o&&void 0!==l&&e?.({[a]:o[a]+(l[a]-o[a])*r})}})}}return i}(s.data,r?.[g]);t&&l.push(...t)}if(g&&"shape size"===g&&"geometry"in n){let t=function(t,e,i){let a=[];for(let t of N){let n={},s=[...e.keyframes??[]].filter(e=>void 0!==e.data.value[t]).sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&i?.(r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let e={t:0,index:0},r={t:NaN,index:NaN};a.push({targets:e,...n,update:()=>{if(!I(e,r))return;let a=Math.ceil(e.index),n=a%2==0?e.t:1-e.t,o=s?.[a].data.value,l=s?.[a+1]?.data.value;void 0!==o&&void 0!==l&&i?.({[t]:o[t]+(l[t]-o[t])*n})}})}}return a}(0,s.data,r?.shapeSize);t&&l.push(...t)}if(g&&"path extrusion"===g&&y(n)){let e=function(e,i,a){let n={},s=[...i.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&a?.(e,r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let i={t:0,index:0},r={t:NaN,index:NaN};return{targets:i,...n,update:()=>{if(!I(i,r))return;let n=Math.ceil(i.index),o=n%2==0?i.t:1-i.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value;a?.(e,t(e,l,d,o))}}}}(n,s.data,r?.pathExtrusion);e&&l.push(e)}if(g&&"path snapping"===g&&n.data.pathSnapping){let t=function(t,i,a){let n={},s=[...i.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&a?.(r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let i={t:0,index:0},r={t:NaN,index:NaN};return{targets:i,...n,update:()=>{if(!I(i,r))return;let n=Math.ceil(i.index),o=n%2==0?i.t:1-i.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value;a?.(e(t,l,d,o))}}}}(n,s.data,r?.pathSnapping);t&&l.push(t)}if(g&&"material"===g&&"Mesh"===n.type&&"material"in n){let t=p(n.material)?n.material:void 0;if(t){let e=s.data.id;if(e){let i=(s.data.keyframes??[]).some(t=>m(t.data.value?.noiseStrength)),a=t.ensureRainbowNoiseCompiled,n=e=>{i&&"function"==typeof a&&a.call(t,e)};n(e);let d=t.getLayerByUuid(e);if(d){let t=L(d,s.data,r?.material,o);t&&l.push(t)}else{let e=s.data.type;for(let i of t.getLayersOfType(e))n(i.uuid);let i=t.getLayersOfType(e);if(i)for(let t of i){let e=L(t,s.data,r?.material,o);e&&l.push(e)}}}}}if(g&&"opacity"===g&&"Mesh"===n.type&&"material"in n){let t=function(t,e){if(t){let i={},a=[...t.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),n=a[0];n&&e?.(n.data.value),i={index:[],t:[]};for(let t=0;t<a.length-1;t++){let e=a[t],n=a[t+1]??e,s={duration:1e3*(n?.data?.time-e.data.time),delay:0===t?1e3*a[0].data.time:0};i.t.push({...s,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(n.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),i.index.push({...s,value:t,easing:"linear"})}if(a.length>1){let t={t:0,index:0},n={t:NaN,index:NaN};return{targets:t,...i,update:()=>{if(!I(t,n))return;let i=Math.ceil(t.index),s=i%2==0?t.t:1-t.t,r=a?.[Math.min(i,a.length-1)].data.value,o=a?.[Math.min(i,a.length-1)+1]?.data.value;e?.(E.lerp(r,o,s))}}}}}(s.data,r?.opacity);t&&l.push(t)}if(g&&"cloner"===g){let t=function(t,e,n){let s={},r=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),o=r[0];o&&n?.(t,o.data.value,o.data.value),s={index:[],t:[]};for(let t=0;t<r.length-1;t++){let e=r[t],i=r[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*r[0].data.time:0};s.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),s.index.push({...a,value:t,easing:"linear"})}if(r.length>1){let e={t:0,index:0},o={t:NaN,index:NaN};return{targets:e,...s,update:()=>{if(!I(e,o))return;let s=Math.ceil(e.index),l=s%2==0?e.t:1-e.t,d=r?.[Math.min(s,r.length-1)].data.value,h=r?.[Math.min(s,r.length-1)+1]?.data.value;n?.(t,d.randomnessObject?void 0:i(d,h,l,t),d.randomnessObject?a(d,h,l,t):void 0)}}}}(n,s.data,r?.cloner);t&&l.push(t)}if(g&&"camera"===g&&n instanceof c){let t=function(t,e,i,a){if(e){let n={[a]:[]},s=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&(t[a]=r.data.value,i?.(a,r.data.value));for(let t=0;t<s.length-1;t++){let e=s[t];if(!Number.isFinite(e.data.value))continue;let i=s[t+1]??e;n[a].push({value:i.data.value,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters),duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0})}if(s.length>1)return{targets:t,...n,update:()=>{i?.(a,t[a])}}}}(n,s.data,r?.camera,"zoom");t&&l.push(t)}if(g&&"light"===g&&(n instanceof h||n instanceof d||n instanceof u)){let t=function(t,e,i,a,n){if(e){let s={},r=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),o=r[0];if(o){let e=o.data.value;t[a]=e,i?.(a,e)}s={index:[],t:[]};for(let t=0;t<r.length-1;t++){let e=r[t],i=r[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*r[0].data.time:0};s.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),s.index.push({...a,value:t,easing:"linear"})}if(r.length>1){let t={t:0,index:0},e={t:NaN,index:NaN};return{targets:t,...s,update:()=>{if(!I(t,e))return;let s=Math.ceil(t.index),o=s%2==0?t.t:1-t.t,l=r?.[Math.min(s,r.length-1)].data.value,d=r?.[Math.min(s,r.length-1)+1]?.data.value;i?.(a,_(l,d,o,n))}}}}}(n,s.data,r?.light,s.data.path[1],o);t&&l.push(t)}}),l}(o,{...l},n(o,{scene:f,shared:b}),this.sharedAssets),C=("start"===this.data.delayDirection?this.data.delay:0)+("start-end"===this.data.delayDirection?this.data.delay:0)+("start-once"===this.data.delayDirection?this.data.delay:0);v.forEach(t=>{this.timeline.add(t,C)}),this.timeline.duration=1e3*l.to+C}),this.timeline.delay=0,this.timeline.duration+=("start"===this.data.delayDirection?this.data.delay:0)+("end"===this.data.delayDirection?this.data.delay:0)+("start-end"===this.data.delayDirection?2*this.data.delay:0)+("start-once"===this.data.delayDirection?2*this.data.delay:0),this.timeline.finished.then(()=>{Object.keys(g).forEach(t=>{let e=this.scene.find(t);e instanceof c&&e.dispatchEvent(o)}),this._finished=!0}),this.timeline.loopComplete=this._onLoopComplete}catch(t){throw v&&console.error(t),new Error("Missing property")}C&&(B.has(C.uuid)?B.get(C.uuid).push(this):B.set(C.uuid,[this])),H.set(s,this)}get playing(){return!1===this.timeline.paused}get finished(){return this._finished}get paused(){return this.timeline.paused}applyStateHiddenMatrices(){for(let{objId:t,state:e}of this.hiddenMatrixOverrides){let i=this.scene.find(t);i&&i.hiddenMatrix.fromArray(e)}}restoreOriginalHiddenMatrices(){for(let{objId:t,original:e}of this.hiddenMatrixOverrides){let i=this.scene.find(t);i&&i.hiddenMatrix.copy(e)}}play(){let t=void 0!==this.eventType&&w(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&this.paused&&this.timeline.currentTime>0&&!this._finished;if(void 0!==this.eventType&&w(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&!t||void 0===this.eventType&&this._finished)return!1;this.hasPlayedOnce=!0,this.applyStateHiddenMatrices();let e=this.sharedAssets.data.timelineAnimations[this.data.timeline].mapping;Object.keys(e).forEach(t=>{let e=this.scene.find(t);e instanceof c&&e.dispatchEvent(s)}),D(),this.paused&&this.timeline.currentTime>0?this.timeline.play():this.timeline.restart()}pauseTimeline(){this.paused||this.timeline.pause()}pause(){this.pauseTimeline()}stop(){this.pauseTimeline(),this.seek(0),this.timeline.reset(),this.restoreOriginalHiddenMatrices(),this._finished=!1}seek(t){this.timeline.seek(t*this.timeline.duration,!0)}toggle(t){let e=this.paused&&this.timeline.currentTime>0&&this.timeline.currentTime<this.timeline.duration;if(void 0!==t?this.toggleIsForward=t:e||(this.toggleIsForward=!this.toggleIsForward),this.playing){if(!this.toggleIsForward&&this.timeline.reversed&&this._shouldForwardLoop&&this.timeline.remaining%2==1)return void(this._shouldPauseOnNextLoopComplete=!0);this.timeline.reverse(this.timeline.duration-this.timeline.currentTime),this._shouldForwardLoop&&this.timeline.loop&&this.timeline.reversed&&(this._shouldPauseOnNextLoopComplete=!0)}else this.applyStateHiddenMatrices(),D(),(!this.toggleIsForward!==this.timeline.reversed||!this.toggleIsForward&&this.timeline.reversed&&"alternate"===this.timeline.direction)&&this.timeline.reverse(),"number"==typeof this.timeline.loop&&"number"==typeof this.timeline.remaining&&this.timeline.remaining<this.timeline.loop&&this.toggleIsForward&&(this.timeline.remaining=this.timeline.loop),this.timeline.play()}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){this.pauseTimeline(),this.restoreOriginalHiddenMatrices()}},V=class{constructor(t){this.data=t}dispatch(){this.data.playTimeline?this.pauseTimeline(this.data.playTimeline):this.data.object?this.pauseAllTimelinesFromObject(this.data.object):this.pauseAllTimelines()}pauseTimeline(t){let e=this.getTimelineActions(t);!e.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{e.forEach(t=>{t[this.data.interaction]()}),this.disposeDelay()},this.data.delay)):e.forEach(t=>{t[this.data.interaction]()}))}getTimelineActions(t){let e=H.get(t);return e?[e]:[...H.values()].filter(e=>e.data.timeline===t)}pauseAllTimelinesFromObject(t){let e=B.get(t);!e?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{e.forEach(t=>t[this.data.interaction]()),this.disposeDelay()},this.data.delay)):e.forEach(t=>t[this.data.interaction]()))}pauseAllTimelines(){let t=[...B.values()];!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},R=class{constructor(t,e,i,a,n,s,r){this.data=e;let o="interaction"in e?e.interaction:"play";if("play"===o||void 0===o)this.interaction=new S(t,e,i,a,n,s,r);else{if("pause"!==o&&"stop"!==o)throw new Error("Missing property");this.interaction=new V(e)}}get playing(){return this.interaction instanceof S&&this.interaction.playing}get finished(){return!(this.interaction instanceof S)||this.interaction.finished}get paused(){return!(this.interaction instanceof S)||this.interaction.paused}play(){if(this.interaction instanceof S)return this.interaction.play();this.interaction.dispatch()}stop(){this.interaction instanceof S&&this.interaction.stop()}seek(t){this.interaction instanceof S&&this.interaction.seek(t)}toggle(t){this.interaction instanceof S?this.interaction.toggle(t):this.interaction.dispatch()}playFromCurrent(){this.interaction instanceof S?this.interaction.playFromCurrent():this.interaction.dispatch()}dispatchConditional(){this.interaction instanceof S?f(this.interaction.sharedAssets,this.interaction.actionCondition)&&this.interaction.playFromCurrent():this.interaction.dispatch()}reverseFromCurrent(){this.interaction instanceof S&&this.interaction.reverseFromCurrent()}dispose(){this.interaction.dispose()}};g("TimelineAnimation",({id:t,data:e,page:i,shared:a,object:n,eventType:s,actionCondition:r})=>new R(t,e,i.scene,a,n,s,r)),b("timeline");
@@ -0,0 +1 @@
1
+ import{a as e}from"./runtime-chunk-NBYTQLIB.js";import{f as t}from"./runtime-chunk-23QOKH2J.js";import{a as n,b as i}from"./runtime-chunk-DZNU62CT.js";import{a as s}from"./runtime-chunk-VAVYZ35B.js";import{e as a}from"./runtime-chunk-FQNSP44B.js";import"./runtime-chunk-HER7UVU3.js";import"./runtime-chunk-ARTGMJ7O.js";import"./runtime-chunk-FDRTCOJ5.js";import"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as o,g as r}from"./runtime-chunk-MM75L5X4.js";import{d,t as l}from"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as u}from"./runtime-chunk-TZCHGFVF.js";import{s as h,t as c}from"./runtime-chunk-OW6T4XFV.js";import{Ec as p,Fc as m,Oc as v,rd as g}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var f=new m,E=new m,w=new m,y=new m,M=new g,F={type:"requestRender"},L=function(){let e=new m,t=new m;return(n,i,s)=>s>0?(e.subVectors(n,i),e.length()<=s?n:t.copy(i).add(e.normalize().multiplyScalar(s))):i}(),x=function(){let e=new v;return(n,i)=>{n.position.copy(i),null!==n.parent&&(e.copy(n.parent.matrixWorld).invert(),n.position.applyMatrix4(e)),e.copy(n.hiddenMatrix).invert(),n.position.applyMatrix4(e),n.updateMatrix(),n.hasNonUniformScale&&(n.updateMatrixWorld(),n.updateMatrixWorldRigid()),n instanceof l&&t(n.parent)&&n.invalidateDownstreamBooleanData(!0)}}(),D=class{constructor(e,t,n,i,s,a){this.data=e,this.id=t,this.object=n,this.paused=!1,this.currentDampingFactor=1,this.snapComplete=!1,this.isReset=!1,this.worldPosition0=new m,this.timeoutId=null,this.delayFinished=!0,this.wasOutside=!1,this.data={...h.defaultData,...e,...void 0===e.resetOnPointerLeave&&{resetOnPointerLeave:!1}},void 0===e.target||"cursor"===e.target||(this.target=i.find(e.target)),this.data.dampingFactor&&(this.currentDampingFactor=this.data.dampingFactor),this.resetDampingFactor=80/this.data.resetSpeed+1,this.object.getWorldPosition(this.worldPosition0),this.actions=o(e,e.actions,i,s,a,n)}},b=class extends n{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.pairOfEventListeners=[],this.onMouseMove=e=>{if(!(s.length>1)){this.eventContext.updateRaycaster(e);for(let e of this.events)void 0===e.target&&this.updateSingleEvent(e)}},this.onMouseEnter=e=>{for(let e of this.events)void 0===e.target&&(e.isReset=!1,e.currentDampingFactor=e.data.dampingFactor)},this.onMouseLeave=e=>{for(let e of this.events)void 0===e.target&&(e.data.resetOnPointerLeave&&(e.isReset=!0,e.currentDampingFactor=e.resetDampingFactor),this.updateSingleEvent(e))},this.onTargetChange=e=>()=>{this.updateSingleEvent(e)}}connect(){let{page:e}=this.eventContext;if(e.traverseEntity(t=>{let n=t.data?.events.find(e=>"Follow"===e.data.type&&!e.data.disabled);n&&(!e.data.globalPhysics.usePhysics||"dynamic"!==t.dataPatched.physics?.rigidBody)&&this.events.push(new D(n.data,n.id,t,e,this.eventContext.sharedAssets,this.eventManager))}),!this.events.length)return;let{domElement:t,eventElement:n}=this.eventContext;this.domEventsNeeded.clear(),a&&(this.domEventsNeeded.add("pointerdown"),t.addEventListener("pointerdown",this.onMouseMove)),this.domEventsNeeded.add("pointermove"),n.addEventListener("pointermove",this.onMouseMove),this.eventContext.useWindowEvents||(t.addEventListener("pointerenter",this.onMouseEnter),t.addEventListener("pointerleave",this.onMouseLeave));for(let e of this.events)if(void 0!==e.target){let t=e.target,n=this.onTargetChange(e);this.pairOfEventListeners.push([t,n]),t.addEventListener("requestRender",n)}}disconnect(){if(!this.events.length)return;let{domElement:e,eventElement:t}=this.eventContext;this.domEventsNeeded.clear(),a&&e.removeEventListener("pointerdown",this.onMouseMove),t.removeEventListener("pointermove",this.onMouseMove),e.removeEventListener("pointerenter",this.onMouseEnter),e.removeEventListener("pointerleave",this.onMouseLeave);for(let[e,t]of this.pairOfEventListeners)e.removeEventListener("requestRender",t);for(let e of this.events)e.paused=!0,e.isReset=!1,r(e.actions)}onAnimationFrameDamping(){for(let e of this.events)e.paused||this.updateSingleEvent(e,!0)}updateSingleEvent(e,t=!1){this.events.forEach(e=>{e.actions.Create.forEach(e=>{e.dispatchThrottled()})});let{plane:n,limitDistance:i,limitDistanceEnabled:s}=e.data;if(e.object.getWorldPosition(w),e.isReset)y.copy(e.worldPosition0);else if(e.target)e.target.getWorldPosition(y);else{let{getCamera:e,raycaster:t}=this.eventContext;if("custom"===n?(e().getWorldDirection(E),E.negate(),f.copy(E)):"xy"===n?f.set(0,0,1):"xz"===n?f.set(0,1,0):"yz"===n&&f.set(1,0,0),M.setFromNormalAndCoplanarPoint(f,w),!t.ray.intersectPlane(M,y))return}if(!e.isReset)if(y.distanceTo(e.worldPosition0)>i&&s&&e.target){if(e.snapComplete=!1,e.data.snapDelay&&(e.delayFinished=!1,typeof window<"u"&&null!==e.timeoutId&&(window.clearTimeout(e.timeoutId),e.timeoutId=null)),e.wasOutside=!0,!e.data.resetAfterDistanceLimit)return;y.copy(e.worldPosition0),e.currentDampingFactor=e.resetDampingFactor}else if(e.wasOutside&&(e.data.snapDelay&&typeof window<"u"&&(e.timeoutId=window.setTimeout(()=>{e.delayFinished=!0,e.paused=!1,this.updateSingleEvent(e)},1e3*e.data.snapDelay)),e.currentDampingFactor=e.data.dampingFactor,e.wasOutside=!1),!1===e.delayFinished)return;!1===e.data.enabledTranslation[0]&&(y.x=w.x),!1===e.data.enabledTranslation[1]&&(y.y=w.y),!1===e.data.enabledTranslation[2]&&(y.z=w.z);let a=L(w,y,e.wasOutside?0:e.data.maxDelta);if(e.currentDampingFactor>1){let n=f.subVectors(a,w).divideScalar(e.currentDampingFactor);w.add(n),t&&x(e.object,w),e.paused=n.length()<.01}else x(e.object,a),e.paused=!0;e.object?.dispatchEvent({type:"beginEvent",eventName:"Follow"}),e.object.dispatchEvent(F)}},R=new m,j=new m,C=new v,P=new p,N=new p,O=new m,S=new m,k=new m,Q=new m,z=new g,T={type:"requestRender"},W={type:"changeRotation"},V=function(){let e=new v;return function(n,i){null!==n.parent?e.multiplyMatrices(n.parent.matrixWorld,n.hiddenMatrix):e.copy(n.hiddenMatrix),i.premultiply(d(e).invert()),n.rotation.setFromRotationMatrix(i),n.updateMatrix(),n instanceof l&&t(n.parent)&&n.invalidateDownstreamBooleanData(!0)}}(),A=class{constructor(e,t,n,i){this.id=t,this.object=n,this.paused=!1,this.currentDampingFactor=1,this.isReset=!1,this.worldQuaternion0=new p,this.timeoutId=null,this.delayFinished=!0,this.wasOutside=!1,this.data={...c.defaultData,...e,...void 0===e.resetOnPointerLeave&&{resetOnPointerLeave:!1}},void 0===e.target||"cursor"===e.target||(this.target=i.find(e.target)),this.data.dampingFactor&&(this.currentDampingFactor=this.data.dampingFactor),this.object.getWorldQuaternion(this.worldQuaternion0),isNaN(this.worldQuaternion0.x)&&(this.worldQuaternion0.x=0),isNaN(this.worldQuaternion0.y)&&(this.worldQuaternion0.y=0),isNaN(this.worldQuaternion0.z)&&(this.worldQuaternion0.z=0),isNaN(this.worldQuaternion0.w)&&(this.worldQuaternion0.w=1),this.resetDampingFactor=80/this.data.resetSpeed+1}},U=class extends n{constructor(){super(...arguments),this.events=[],this.pairOfEventListeners=[],this.pairOfUserEventListeners=[],this.onMouseMove=e=>{if(!(s.length>1)){this._lastMouseEvent=e,this.eventContext.updateRaycaster(e);for(let e of this.events)void 0===e.target&&this.updateSingleEvent(e)}},this.onMouseEnter=e=>{for(let e of this.events)void 0===e.target&&(e.isReset=!1,e.currentDampingFactor=e.data.dampingFactor)},this.onMouseLeave=e=>{for(let e of this.events)void 0===e.target&&(e.data.resetOnPointerLeave&&(e.isReset=!0,e.currentDampingFactor=e.resetDampingFactor),this.updateSingleEvent(e))},this.onScroll=e=>{if(this._lastMouseEvent){let e=new PointerEvent("pointermove",{clientX:this._lastMouseEvent.clientX,clientY:this._lastMouseEvent.clientY,bubbles:!0,cancelable:!0,view:window});this.eventContext.eventElement.dispatchEvent(e)}},this.onTargetChange=e=>()=>{this.updateSingleEvent(e)},this.createUserEventListener=t=>({eventName:n,target:i})=>{if(!n||!i)return;let s=e(n);s&&"LookAt"===s&&this.updateSingleEvent(t)}}connect(){let{page:e}=this.eventContext;if(e.traverseEntity(t=>{let n=t.data?.events.find(e=>"LookAt"===e.data.type&&!e.data.disabled);n&&(!e.data.globalPhysics.usePhysics||"dynamic"!==t.dataPatched.physics?.rigidBody)&&this.events.push(new A(n.data,n.id,t,e))}),!this.events.length)return;let{domElement:t,eventElement:n}=this.eventContext;this.domEventsNeeded.clear(),a&&(this.domEventsNeeded.add("pointerdown"),t.addEventListener("pointerdown",this.onMouseMove)),this.domEventsNeeded.add("pointermove"),n.addEventListener("pointermove",this.onMouseMove),this.eventContext.useWindowEvents?n.addEventListener("scroll",this.onScroll):(t.addEventListener("pointerenter",this.onMouseEnter),t.addEventListener("pointerleave",this.onMouseLeave));for(let e of this.events){if(void 0!==e.target){let t=this.onTargetChange(e),n=e.target;this.pairOfEventListeners.push([n,t]),n.addEventListener("requestRender",t)}let t=this.createUserEventListener(e),n=e.object;this.pairOfUserEventListeners.push([n,t]),n.addEventListener("userEvent",t)}}disconnect(){if(!this.events.length)return;let{domElement:e,eventElement:t}=this.eventContext;this.domEventsNeeded.clear(),a&&e.removeEventListener("pointerdown",this.onMouseMove),t.removeEventListener("pointermove",this.onMouseMove),e.removeEventListener("pointerenter",this.onMouseEnter),e.removeEventListener("pointerleave",this.onMouseLeave),t.removeEventListener("scroll",this.onScroll);for(let[e,t]of this.pairOfEventListeners)e.removeEventListener("requestRender",t);for(let[e,t]of this.pairOfUserEventListeners)e.removeEventListener("userEvent",t);for(let e of this.events)e.paused=!0,e.isReset=!1}onAnimationFrameDamping(){for(let e of this.events)e.paused||this.updateSingleEvent(e)}updateSingleEvent(e){let{tilt:t,axis:n,distance:i,plane:s,limitDistance:a,enabledRotation:o,limitDistanceEnabled:r}=e.data,{getCamera:l,raycaster:u}=this.eventContext,{object:h,target:c}=e;if(h.getWorldPosition(O),!e.isReset)if(e.target)e.target.getWorldPosition(S);else{if("custom"===s?(l().getWorldDirection(j),j.negate(),z.setFromNormalAndCoplanarPoint(j,O)):("xy"===s?R.set(0,0,1):"xz"===s?R.set(0,1,0):"yz"===s&&R.set(1,0,0),z.setFromNormalAndCoplanarPoint(R,O)),!u.ray.intersectPlane(z,S))return;i>0&&("custom"===s||void 0===s)&&S.addScaledVector(j,i)}if(e.isReset||(c?"target"===t?k.copy(c.up).applyMatrix4(C.extractRotation(c.matrixWorld)).normalize():o.some(e=>!1===e)?("x"===n?(Q.set(0,0,1),!1===o[2]&&Q.set(0,1,0)):"y"===n?(Q.set(1,0,0),!1===o[0]&&Q.set(0,0,1)):(Q.set(0,1,0),!1===o[1]&&Q.set(1,0,0)),k.copy(Q).applyQuaternion(e.worldQuaternion0).normalize()):k.set(0,1,0):"custom"===s?k.set(0,1,0):k.copy(R)),e.isReset)N.copy(e.worldQuaternion0);else if(O.distanceTo(S)>a&&r&&c){if(e.data.snapDelay&&(e.delayFinished=!1,typeof window<"u"&&null!==e.timeoutId&&(window.clearTimeout(e.timeoutId),e.timeoutId=null)),e.wasOutside=!0,!e.data.resetAfterDistanceLimit)return;N.copy(e.worldQuaternion0),e.currentDampingFactor=e.resetDampingFactor}else{if(e.wasOutside&&(e.data.snapDelay&&typeof window<"u"&&(e.timeoutId=window.setTimeout(()=>{e.delayFinished=!0,e.paused=!1,this.updateSingleEvent(e)},1e3*e.data.snapDelay)),e.currentDampingFactor=e.data.dampingFactor,e.wasOutside=!1),!1===e.delayFinished)return;(function(e,t,n,i,s,a){let o=C.elements;q.subVectors(t,n),0===q.lengthSq()&&(q.z=1),q.normalize(),I.crossVectors(i,q),0===I.lengthSq()&&(1===Math.abs(i.z)?q.x+=1e-4:q.z+=1e-4,q.normalize(),I.crossVectors(i,q)),I.normalize(),B.crossVectors(q,I),"x"===s?1===a.z?[I,B,q]=[q,I,B]:(I.negate(),[I,q]=[q,I]):"y"===s?1===a.x?[I,B,q]=[B,q,I]:(I.negate(),[B,q]=[q,B]):1===a.x&&(I.negate(),[I,B]=[B,I]),o[0]=I.x,o[4]=B.x,o[8]=q.x,o[1]=I.y,o[5]=B.y,o[9]=q.y,o[2]=I.z,o[6]=B.z,o[10]=q.z})(0,S,O,k,n,Q),N.setFromRotationMatrix(C),P.setFromUnitVectors(Q.applyQuaternion(N),k),o.some(e=>!1===e)&&"target"!==t&&N.premultiply(P).normalize()}e.currentDampingFactor>1?(h.updateWorldMatrix(!0,!1),P.setFromRotationMatrix(d(h.matrixWorld)),P.slerp(N,1/e.currentDampingFactor),V(h,C.makeRotationFromQuaternion(P)),e.paused=8*(1-P.dot(N))<1e-6):(V(h,C.makeRotationFromQuaternion(N)),e.paused=!0),e.object?.dispatchEvent({type:"beginEvent",eventName:"LookAt"}),h.dispatchEvent(T),h.dispatchEvent(W)}},B=new m,I=new m,q=new m;i("Follow",({eventContext:e,eventManager:t})=>new b(e,t)),i("LookAt",({eventContext:e})=>new U(e)),u("tracking");
@@ -0,0 +1 @@
1
+ import{a as t}from"./runtime-chunk-EAXCCTR5.js";import{k as i}from"./runtime-chunk-YVNDW5TV.js";import"./runtime-chunk-T6CHRQ6N.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as e,b as n}from"./runtime-chunk-KGZNRID6.js";import"./runtime-chunk-R43XZP65.js";import"./runtime-chunk-5VJGAC3M.js";import"./runtime-chunk-O5NBGIBR.js";import"./runtime-chunk-23QOKH2J.js";import"./runtime-chunk-FTVQTRM7.js";import"./runtime-chunk-HER7UVU3.js";import"./runtime-chunk-J2I4VBHR.js";import"./runtime-chunk-ARTGMJ7O.js";import"./runtime-chunk-FDRTCOJ5.js";import"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as r,e as s}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as h}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import{Bc as o,Cc as m}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var a=class extends o{constructor(t,i,n,r,s){super(),this.data=t,this.page=i,this.animationControls=n,this.shared=r,this.condition=s,this.startOnceDelay=0,this.toggleIsForward=!1;let h=t.object,o=i.scene.find(t.object);o&&Array.isArray(o.identity)&&(h=o.identity[0]),this.data={...t,object:h};let m=this.animationControls.clipIdToAction[t.clipId+"/"+h];if(this.duration=m?.getClip()?.duration??1,this.data.crop2){let t=e(m?.getClip());this.leftFrameTime=this.data.crop2[0]/(t-1)*this.duration,this.rightFrameTime=this.data.crop2[1]/(t-1)*this.duration}else{let t=m?.getClip()?.tracks[0]?.times.length;t&&t>1?(this.leftFrameTime=this.data.crop[0]/t*this.duration,this.rightFrameTime=this.data.crop[1]/t*this.duration):(this.leftFrameTime=0,this.rightFrameTime=this.duration)}this.startOnceDelay=t.delay}get playing(){return this.threeAnimAction?.isRunning()??!1}play(t=!1){if(!1===s(this.shared,this.condition))return!1;window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{if(this.threeAnimAction=this.animationControls.play(this.data),!this.threeAnimAction)return;this.threeAnimAction.reset(),this.threeAnimAction.time=this.leftFrameTime,this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime;let i=this.data.object;Object.entries(this.animationControls.clipIdToAction).forEach(([e,n])=>{let r=e.split("/")[1];this.threeAnimAction!==n&&r===i&&(t?n.fadeOut(.2):n.stop())}),t&&this.threeAnimAction?.fadeIn(.2)},this.startOnceDelay)}pause(){this.threeAnimAction&&(this.threeAnimAction.paused=!0),window.clearTimeout(this.timeoutId),delete this.timeoutId}stop(){this.threeAnimAction?.fadeOut(.2)}seek(t){this.threeAnimAction=this.animationControls.play(this.data),this.threeAnimAction&&(this.threeAnimAction.paused=!0,this.threeAnimAction.time=m.clamp(this.threeAnimAction.time+1/60*t,this.leftFrameTime,this.rightFrameTime-16e-5),this.animationControls.needsUpdate=!0,this.animationControls.requestRender())}toggle(t,i=!1){if(!1===s(this.shared,this.condition))return!1;this.toggleIsForward=t??!this.toggleIsForward,this.threeAnimAction&&(this.threeAnimAction._loopCount=0),this.playing?this.threeAnimAction&&(this.threeAnimAction.timeScale=this.toggleIsForward?1:-1,this.toggleIsForward?(this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime):(this.threeAnimAction._clip.start=this.rightFrameTime,this.threeAnimAction._clip.duration=this.leftFrameTime)):this.timeoutId=window.setTimeout(()=>{if(this.threeAnimAction=this.animationControls.play(this.data),this.threeAnimAction){this.toggleIsForward?(this.threeAnimAction.time=this.leftFrameTime,this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime):(this.threeAnimAction.time=this.rightFrameTime,this.threeAnimAction._clip.start=this.rightFrameTime,this.threeAnimAction._clip.duration=this.leftFrameTime),this.threeAnimAction.paused=!1,this.threeAnimAction.timeScale=this.toggleIsForward?1:-1;let t=this.data.clipId.split("/")[1];Object.entries(this.animationControls.clipIdToAction).forEach(([e,n])=>{let r=e.split("/")[1];this.threeAnimAction!==n&&r===t&&n.isRunning()&&(i?n.fadeOut(.2):n.stop())}),i&&this.threeAnimAction?.fadeIn(.2)}},this.startOnceDelay)}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){let t=this.animationControls.clipIdToAction[this.data.clipId+"/"+this.data.object]?.getClip();t&&(t.duration=this.duration),this.pause()}};n(i),r("Transition",({eventType:i,data:e,page:n,shared:r,actionCondition:s})=>new t(i,e,n,r,s)),r("Animation",({data:t,page:i,eventManager:e,shared:n,actionCondition:r})=>new a(t,i,e.animationControls,n,r)),h("transitions");
@@ -0,0 +1 @@
1
+ import{a as e}from"./runtime-chunk-CVUJ3GMH.js";import{a as t,b as i,c as r,d as a,f as s,g as n,h,i as d,j as o,k as m,l as c,m as l,n as u}from"./runtime-chunk-T6CHRQ6N.js";import"./runtime-chunk-NTUTXO7Q.js";import"./runtime-chunk-FTVQTRM7.js";import{I as p,ea as f}from"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as v}from"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import{f as g,g as y}from"./runtime-chunk-Z5OH244S.js";import{a as w,f as O,j as P}from"./runtime-chunk-TZCHGFVF.js";import{E as j}from"./runtime-chunk-OW6T4XFV.js";import{Ae as b,Ba as x,Bd as R,Cc as S,Lc as T,Le as F,bd as H,ce as I,dd as D,ld as W}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";function B(e,t,i,r){return r?i:2048/Math.max(1,e,t)}var U=new b(-1,1,1,-1,0,1),M=new class extends D{constructor(){super(),this.setAttribute("position",new H([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new H([0,2,0,0,2,0],2))}},E=new I({defines:{},uniforms:{tDiffuse:new F(null)},vertexShader:"\n\tvarying vec2 vUv;\n\tvoid main() {\n\t\tvUv = uv;\n\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t}",fragmentShader:"\n\tuniform sampler2D tDiffuse;\n\tvarying vec2 vUv;\n\tvoid main() {\n\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\tgl_FragColor = texel;\n\t}"}),G=new class{constructor(e){this._mesh=new W(M,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,U)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}(E),z=null,k=null,C=t.identity(),_=class{constructor(t,i,r,s){var n;this.uuid=t,this.width=i,this.height=r,this.context=s,this.enabled=!0,this.isScreenSpace=!1,this.dpr=window.devicePixelRatio,this.isFrameDirty=!1,this.onRenderRequestedDownstream=()=>{this.isFrameDirty=!0,this.isScreenSpace||e(this),this.context.shared.requestRender()},this._innerApplySize=()=>{let e=this.width,t=this.height;this.renderer.dpr=B(e,t,this.dpr,this.isScreenSpace),this.renderer.setSize(e,t)},this.onFrameOverrideObjectEvent=e=>{if(void 0!==e.target?.uuid){let t=this.frameRoot?.find(e.target.uuid);t&&t.dispatchEvent({...e,target:t})}},this.scene2d=new l(S.generateUUID(),y.defaultData,{dpr:window.devicePixelRatio,shared:s.shared}),this.canvas=(null===z&&(z=document.createElement("canvas")),z),this.renderer=(n=this.canvas,null===k&&(k=new a(n)),k),this.promise=this.init(),this.renderTarget=new T(1,1,{type:x,stencilBuffer:!1,depthBuffer:!1}),s.shared.addUIBuffer(this.uuid,this.renderTarget),this.textureHolder=s.shared.uiBuffer(this.uuid)}get canvasTexture(){return this._canvasTexture||(this._canvasTexture=new R(this.canvas)),this._canvasTexture}async init(){await this.renderer.init()}render(e){if(this.isFrameDirty){if(this.isFrameDirty=!1,this._innerApplySize(),this.renderer.clear(),this.frameOverride?.draw(this.renderer),this.renderer.render(),this.canvasTexture.needsUpdate=!0,e.blitTextureToTarget)e.blitTextureToTarget(this.canvasTexture,this.renderTarget);else{E.uniforms.tDiffuse.value=this.canvasTexture;let t=e.getRenderTarget();e.setRenderTarget(this.renderTarget),e.clear(),G.render(e),e.setRenderTarget(t)}this.textureHolder?.setNeedsUpdate(!0)}}updateEntity2DByOp(e,t,i,r){this.scene2d.updateEntityByOp(e,t,i,r),this.applySize()}updateTreeByOp(e,t){this.scene2d.updateTreeByOp(e,t),this.applySize()}applyOverrides(e){if(this.frameOverride&&this.frameRoot){this.frameOverride.position=[0,0],this.frameOverride.rotation=0;let t=e?.width??this.width,i=e?.height??this.height;this.frameOverride.width=t,this.frameOverride.height=i,this.frameOverride.localMatrix=C,this.isScreenSpace&&(this.frameOverride.fill.color=j.from0to1([0,0,0,0])),this.frameOverride.data={...this.frameOverride.data,width:t,height:i},L({objectOverride:this.frameOverride,objectRoot:this.frameRoot,newParentWidth:this.frameOverride.width,newParentHeight:this.frameOverride.height,initialParentWidth:this.frameRoot.width,initialParentHeight:this.frameRoot.height}),this.frameOverride.updateWorldMatrix(!0,!1,!0)}}applySize(e,t=window.devicePixelRatio){let i=Math.max(1,e?.width??this.width),r=Math.max(1,e?.height??this.height);this.dpr=t,this.width=i,this.height=r,this._innerApplySize();let a=function(e,t,i,r){let a=B(e,t,i,r),s=Math.max(i,512/Math.min(e,t)),n=Math.min(s,a);return{width:Math.max(1,Math.ceil(e*n)),height:Math.max(1,Math.ceil(t*n))}}(i,r,t,this.isScreenSpace);this.renderTarget.setSize(a.width,a.height),this._canvasTexture?.dispose(),this._canvasTexture=void 0,this.applyOverrides(e),this.frameOverride?.requestRender()}applyFrame(e){let t=this.context.scene.find2D(e);if(t&&t instanceof o)return this.disposeFrameOverride(),this.frameRoot=t,this.frameOverride=t.clone({dpr:this.renderer.dpr,shared:this.context.shared}),this.scene2d.add(this.frameOverride),this.applySize(),this.frame?.addEventListener("render",this.onRenderRequestedDownstream),this.frameOverride.traverse(e=>{e.addEventListener("beginState",this.onFrameOverrideObjectEvent)}),this.frameOverride.traverse(e=>{e.addEventListener("completeState",this.onFrameOverrideObjectEvent)}),this.frame?.requestRender(),t}get frame(){return this.frameOverride}get frameId(){return this.frame?.uuid}find(e){return this.scene2d.find(e)}get texture(){return this.textureHolder?.getTexture(1001)}disposeFrameOverride(){this.frameOverride?.removeEventListener("render",this.onRenderRequestedDownstream),this.frameOverride?.traverse(e=>{e.removeEventListener("beginStateChange",this.onFrameOverrideObjectEvent)}),this.frameOverride?.traverse(e=>{e.removeEventListener("completeState",this.onFrameOverrideObjectEvent)}),this.frameOverride&&this.scene2d.remove(this.frameOverride)}};function L({objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s}){if(e instanceof o&&t instanceof o||e instanceof d&&t instanceof d)for(let n=0,h=e.children.length;n<h;n++){let h=e.children[n],d=t.children[n];h&&d&&h.uuid===d.uuid&&N({objectOverride:h,objectRoot:d,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s})}}function N({objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s}){let[n,h]=function(e){if(q(e))return[e.width,e.height];if(e instanceof m){let[t,i]=e.getHalfSize();return[2*t,2*i]}if(e instanceof d){let[t,i]=e.recursiveBBox.getHalfSize();return[2*t,2*i]}return[0,0]}(t),{width:o,height:l,position:p}=u({constraints:e.data,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s,objectInitialWidth:n,objectInitialHeight:h,objectInitialPosition:t.position});if(e.position=p,e.data={...e.data,position:p},e.states)for(let n in e.states)V({stateId:n,objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s});if(q(e)||e instanceof d)q(e)&&(e.width=o,e.height=l,e.data={...e.data,width:o,height:l}),L({objectOverride:e,objectRoot:t,newParentWidth:o,newParentHeight:l,initialParentWidth:n,initialParentHeight:h});else if(e instanceof m){let i=t,r=0!==n?o/n:1,a=0!==h?l/h:1;e.path=c(i.path,r,a),e.data={...e.data,path:e.path}}}function V({stateId:e,objectOverride:t,objectRoot:i,newParentWidth:r,newParentHeight:a,initialParentWidth:s,initialParentHeight:n}){let h=t.states?.[e],d=i.states?.[e];if(h&&d){let{width:i,height:o,position:m}=u({constraints:t.data,newParentWidth:r,newParentHeight:a,initialParentWidth:s,initialParentHeight:n,objectInitialWidth:g.isResizeable(d)?d.width:0,objectInitialHeight:g.isResizeable(d)?d.height:0,objectInitialPosition:d.position});Object.assign(t.states[e],{position:m}),g.isResizeable(h)&&Object.assign(t.states[e],{width:i,height:o})}}function q(e){return e instanceof n||e instanceof o||e instanceof s||e instanceof h}var A=class extends f{constructor(e,t,i){super(e,t,i),this.isUIObject=!0,this.uiCanvas=new _(e+"-canvas",t.geometry.width,t.geometry.height,i),this.uiCanvas.promise.then(()=>{this.applyFrame(this.dataPatched.geometry.frame,i.shared)})}updateByPatchedOpGeometry(e,t,i){super.updateByPatchedOpGeometry(e,t,i),0===e.type&&(void 0!==e.props.frame&&this.applyFrame(e.props.frame,i.shared),(void 0!==e.props.width||void 0!==e.props.height)&&this.applySize(e.props,i.shared))}applySize(e,t){let i=e?.width??this.dataPatched.geometry.width,r=e?.height??this.dataPatched.geometry.height;this.uiCanvas.applySize({width:i,height:r}),this.applyGeometryParametersFromFrame(t)}applyFrame(e,t){this.uiCanvas.applyFrame(e),this.applyGeometryParametersFromFrame(t),this.applyMaterialParametersFromFrame({shared:t})}applyGeometryParametersFromFrame(e){let t=this.frame;t&&(Object.assign(this.data,{geometry:Object.assign(this.data.geometry,{cornerRadius:t.cornerRadius,cornerType:0})}),Object.assign(this.dataPatched,{geometry:Object.assign(this.dataPatched.geometry,{cornerRadius:t.cornerRadius,cornerType:0})}),this.localGeometry?.dispose(),this.localGeometry=p(this.dataPatched.geometry,e,this.data.flatShading,this))}applyMaterialParametersFromFrame(e){let t=this.frame;if(t){let i=t.data.backgroundBlur;Object.assign(this.data.material.layers[0].data.texture,{image:this.uiCanvas.uuid}),Object.assign(this.data.material.layers[1].data,{roughness:i.radius,alpha:i.enabled?1:0}),Object.assign(this.dataPatched.material.layers[0].data.texture,{image:this.uiCanvas.uuid}),Object.assign(this.dataPatched.material.layers[1].data,{roughness:i.radius,alpha:i.enabled?1:0}),this.material.reset?.(this.dataPatched.material,e,!0)}}updateEntity2DByOp(e,t,i,r){this.uiCanvas.updateEntity2DByOp(e,t,i,r),e===this.frameId&&0===t.type&&(void 0!==t.props.cornerRadius?this.applyGeometryParametersFromFrame(r):v(t.path,["backgroundBlur"])&&this.applyMaterialParametersFromFrame({shared:r}))}get frame(){return this.uiCanvas.frame}get frameId(){return this.frame?.uuid}removeInteractionGeometry(e){super.removeInteractionGeometry(e),this.applySize({},e)}updateGeometryInteractions(e,t){super.updateGeometryInteractions(e,t),this.applySize({width:e.width,height:e.height},t);let i={...this.data.geometry,...e};this.localGeometry?.dispose(),this.localGeometry=p(i,t,this.data.flatShading,this)}};O("UIGeometry",(e,t,i)=>new A(e,t,i)),P({Scene2D:l,UICanvas:_,loadHanaUIRUNTIME:r,setHanaUIWasmUrl:i}),w("ui-2d");
@@ -0,0 +1 @@
1
+ import{Ma as a,Na as e,Oa as t,Pa as s,Qa as u,Ra as m,Sa as c}from"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";export{u as updateAllMaterials,c as updateDocumentSchema,m as updateLibSchema,e as updateMaterialSchema,t as updateObjectStateRec,s as updateObjectsSchema,a as updateTextValues};
@@ -0,0 +1 @@
1
+ Z`��nƄ41�Tw�T܄'�e�Ok��0���ޒ�. (���MoX�9�U���� h��A��W�b�%�
@@ -0,0 +1 @@
1
+ import{b as e}from"./runtime-chunk-TU4KDRKR.js";import{a,b as t}from"./runtime-chunk-DZNU62CT.js";import{a as i,b as s,e as r,f as n,g as d}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-Z5OH244S.js";import{a as o}from"./runtime-chunk-TZCHGFVF.js";import{Ha as h,Ia as l,v as c}from"./runtime-chunk-OW6T4XFV.js";import{Cc as m,Ec as p,Fc as u,Oc as y,Pc as V}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var b=new y,v=new u,f=new p,g=new u,T=new V,I=class extends a{constructor(a,t,i,s,r){super(a),this.sharedVariables=t,this.eventManager=i,this.needsMouse=s,this.needsRaycast=r,this.dynamicVars=[],this.variablesToWatch=[],this.prevMouseProperty=null,this.prevRaycastProperty=null,this.pauseTime=0,this.isOutOfFocus=!1,this.events=[],this.onFrame=a=>{let t=this.eventContext.sharedAssets;if(this.rafId=window.requestAnimationFrame(this.onFrame),this.isOutOfFocus)return;let i=new Date,s=[],r=[];for(let e=0;e<this.propertiesToWatch.length;e++){let{objectId:a,property:t,prevValue:i}=this.propertiesToWatch[e],s=this.eventContext.scene.find(a),n=c.propertyPaths[t];if("width"===n[0]||"height"===n[0]||"depth"===n[0])s=s.geometry.userData.parameters[n[0]];else if(("position"===n[0]||"rotation"===n[0]&&n.length>1)&&s.getPhysicsLocalMatrix?.(b))b.decompose(v,f,g),"position"===n[0]?s=n.length>1?v[n[1]]:v:(T.setFromQuaternion(f,s.rotation.order),s=T[n[1]]);else for(let e=0;e<n.length;e++)s=s[n[e]];null===i?this.propertiesToWatch[e].prevValue=s instanceof u?s.clone():s:(s instanceof u?!s.equals(i):i!==s)&&(r.push({objId:a,property:t}),s instanceof u?this.propertiesToWatch[e].prevValue.copy(s):this.propertiesToWatch[e].prevValue=s)}for(let e=0;e<this.variablesToWatch.length;e++){let{id:a,prevValue:i}=this.variablesToWatch[e],r=t.getVariable(a);r!==i&&(s.push(a),this.variablesToWatch[e].prevValue=r)}for(let r=0;r<this.dynamicVars.length;r++){let{id:n,expectedTime:d,last:o,data:c,timerSeconds:p,startValue:u}=this.dynamicVars[r],y=1e3;if("timer"!==c.dynamicVariableType&&"stopwatch"!==c.dynamicVariableType||"number3decimal"!==c.format?"counter"===c.dynamicVariableType?y=c.updateInterval:"random"===c.dynamicVariableType&&(y=c.isStatic?1/0:c.updateInterval):y=1,-1!==d){if("Stopped"!==t.getDynamicVariablePlayState(n)&&"Restarted"!==t.getDynamicVariablePlayState(n)||(this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime=a+y,"counter"===c.dynamicVariableType&&t.getVariable(n)!==u&&(t.updateVariable(n,u),this.eventManager.requestRender()),("timer"===c.dynamicVariableType||"stopwatch"===c.dynamicVariableType)&&this.dynamicVars[r].timerSeconds!==u&&(this.dynamicVars[r].timerSeconds=u,t.updateVariable(n,l.getFormattedTimerTime(u,c)),this.eventManager.requestRender()),"Restarted"===t.getDynamicVariablePlayState(n)&&t.setDynamicVariablePlayState(n,"Playing"),"Stopped"!==t.getDynamicVariablePlayState(n))){if("Paused"===t.getDynamicVariablePlayState(n)){void 0===this.dynamicVars[r].deltaToExpectedTime&&(this.dynamicVars[r].deltaToExpectedTime=Math.max(this.dynamicVars[r].expectedTime-a,0)),this.dynamicVars[r].last=a-(y-this.dynamicVars[r].deltaToExpectedTime),this.dynamicVars[r].expectedTime=a+this.dynamicVars[r].deltaToExpectedTime;continue}if(this.dynamicVars[r].deltaToExpectedTime=void 0,a>=d)if(this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime+=y,"random"===c.dynamicVariableType){let e=c.min+Math.random()*(c.max-c.min),a=c.decimals;e=Math.round(e*Math.pow(10,a))/Math.pow(10,a),t.updateVariable(n,e),s.push(n),this.eventManager.requestRender()}else if("counter"===c.dynamicVariableType){let e=t.getVariable(n),a=t.getDynamicVariableToggleIsForward(n)??!0,i=t.getVariable(n)+c.increment*(a?1:-1);c.hasEnd&&(i=c.increment>0?m.clamp(i,u,c.endValue):m.clamp(i,c.endValue,u),i===u&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?i===c.endValue&&(i=u):(i===u||i===c.endValue)&&t.setDynamicVariablePlayState(n,"Paused")),i!==e&&(s.push(n),t.updateVariable(n,i),this.eventManager.requestRender())}else if("time"===c.dynamicVariableType){let a=t.getVariable(n),r=e(i,c);if("object"==typeof a&&"textValue"in a&&"object"==typeof r&&"textValue"in r){if(Array.isArray(a.textValue)&&Array.isArray(r.textValue)){if(a.textValue.every((e,a)=>e===r.textValue[a]))continue}else if(a.textValue===r.textValue)continue}else if(a===r)continue;t.updateVariable(n,r),s.push(n),this.eventManager.requestRender()}else{let e=h.isTextValue(c.endValue)?w(c.endValue.textValue):c.endValue,i=t.getDynamicVariableToggleIsForward(n)??!0,d=p+(a-o)/1e3*("timer"===c.dynamicVariableType?-1:1)*(i?1:-1);d=Math.max(d,0),c.hasEnd&&(d="stopwatch"===c.dynamicVariableType?m.clamp(d,u,e):m.clamp(d,e,u),d===u&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1)&&(d=u):(Math.abs(d-u)<("number3decimal"===c.format?1e-4:.1)||Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1))&&t.setDynamicVariablePlayState(n,"Paused")),d!==p&&(s.push(n),this.dynamicVars[r].timerSeconds=d,t.updateVariable(n,l.getFormattedTimerTime(d,c)),this.eventManager.requestRender())}}}else this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime=a+y}let n=!1;t.mouseProperty!==this.prevMouseProperty&&(this.prevMouseProperty=t.mouseProperty,n=!0);let d=!1;t.raycastProperty!==this.prevRaycastProperty&&(this.prevRaycastProperty=t.raycastProperty,d=!0),this.events.forEach(e=>{(s.includes(e.data.variableId)||r.find(a=>a.objId===e.data.objectId&&a.property===e.data.property)||"mouseProperty"===e.data.variableId&&n||"raycastProperty"===e.data.variableId&&d)&&(e.dispatch(),this.eventManager.requestRender())})},this.onBlur=()=>{this.pause()},this.onFocus=()=>{this.resume()}}pause(){this.isOutOfFocus||(this.isOutOfFocus=!0,this.pauseTime=Date.now())}resume(){if(!this.isOutOfFocus)return;this.isOutOfFocus=!1;let e=Date.now()-this.pauseTime;for(let a=0;a<this.dynamicVars.length;a++)this.dynamicVars[a].last+=e,this.dynamicVars[a].expectedTime+=e}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"VariableChange"===e.data.type&&!e.data.disabled).forEach(a=>{this.events.push(new P(a.id,a.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.propertiesToWatch=this.events.filter(e=>"objectProperty"===e.data.variableId&&null!==e.data.objectId).map(e=>({objectId:e.data.objectId,property:e.data.property,prevValue:null}));let a=this.eventContext.sharedAssets;this.sharedVariables.forEach(({id:t,data:i})=>{if(!("dynamicVariableType"in i))return void(this.events.find(e=>e.data.variableId===t)&&this.variablesToWatch.push({id:t,prevValue:a.getVariable(t)}));let s;if("timer"===i.dynamicVariableType||"stopwatch"===i.dynamicVariableType){let e;if(h.isTextValue(i.value)&&Array.isArray(i.value.textValue)){let a=i.value.textValue;e=3===a.length?a[2]+60*a[1]+3600*a[0]:a[1]+60*a[0]}else e=i.value;s=e,this.dynamicVars.push({id:t,last:-1,expectedTime:-1,data:i,timerSeconds:e,startValue:s})}else"time"===i.dynamicVariableType&&a.updateVariable(t,e(new Date,i)),"counter"===i.dynamicVariableType&&(s=h.isTextValue(i.value)?w(i.value.textValue):i.value),this.dynamicVars.push({id:t,last:-1,expectedTime:-1,data:i,startValue:s})}),this.rafId=window.requestAnimationFrame(this.onFrame),window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus)}disconnect(){window.removeEventListener("blur",this.onBlur),window.removeEventListener("focus",this.onFocus),this.rafId&&(window.cancelAnimationFrame(this.rafId),this.rafId=void 0),this.events.forEach(e=>e.dispose())}},P=class{constructor(e,a,t,i,s,r){this.id=e,this.data=a,this.object=t,this.actions=n(a,a.actions,i,s,r,t)}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.TimelineAnimation.forEach(e=>e.dispatchConditional()),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())}dispose(){d(this.actions)}};function w(e){return 3===e.length?e[2]+60*e[1]+3600*e[0]:e[1]+60*e[0]}var x=class{constructor(e,a,t,i){this.data=e,this.page=a,this.shared=t,this.condition=i,this.evaluatedCondition=!1}checkConditions(){this.evaluatedCondition=r(this.shared,this.condition)}dispatch(){if(!1===this.evaluatedCondition)return!1;let e=this.shared.getVariable(this.data.variableId),a=i(this.data.expression,this.shared,h.typeOfVariable(e));void 0!==a&&this.shared.updateVariable(this.data.variableId,"string"==typeof a?{textValue:a}:a)}dispose(){}},D=class{constructor(e,a,t,i){this.data=e,this.page=a,this.shared=t,this.condition=i,this.timeoutId=null}dispatchInner(){if(!1===r(this.shared,this.condition))return!1;let e=this.shared.getDynamicVariablePlayState(this.data.variableId);if("PlayPause"===this.data.mode)void 0===this.shared.getDynamicVariableToggleIsForward(this.data.variableId)&&this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!0),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing"===e?"Paused":"Playing");else if("Play"===this.data.mode&&"Playing"!==e)void 0===this.shared.getDynamicVariableToggleIsForward(this.data.variableId)&&this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!0),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing");else if("Stop"===this.data.mode&&"Stopped"!==e)this.shared.setDynamicVariablePlayState(this.data.variableId,"Stopped");else if("Pause"===this.data.mode&&"Paused"!==e)this.shared.setDynamicVariablePlayState(this.data.variableId,"Paused");else if("Restart"===this.data.mode)this.shared.setDynamicVariablePlayState(this.data.variableId,"Restarted");else if("Toggle"===this.data.mode){let a=this.shared.getDynamicVariableToggleIsForward(this.data.variableId);"Playing"===e?this.shared.setDynamicVariableToggleIsForward(this.data.variableId,void 0!==a&&!a):(this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!a),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing"))}}dispatch(){let e=this.data.delay,a=this.shared.getDynamicVariablePlayState(this.data.variableId);"PlayPause"===this.data.mode&&"Playing"===a&&(e=this.data.pauseDelay),0!==e?(this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.timeoutId=null,this.dispatchInner()},e)):this.dispatchInner()}dispose(){this.timeoutId&&window.clearTimeout(this.timeoutId)}};t("VariableChange",({eventContext:e,sharedVariables:a,eventManager:t,needsMouse:i,needsRaycast:s})=>new I(e,a,t,i,s)),s("SetVariable",({data:e,page:a,shared:t,actionCondition:i})=>new x(e,a,t,i)),s("DynamicVariablePlay",({data:e,page:a,shared:t,actionCondition:i})=>new D(e,a,t,i)),o("variables");
@@ -0,0 +1 @@
1
+ import{ea as t}from"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{s as e}from"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as r,f as i}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var n=class extends t{get forceComputeSize(){return!0}get shape(){return this.geometry.userData.shape}updateEntityBoxSize(t,r){let i=this.geometry.getAttribute("position");void 0!==i?e(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,r):super.updateEntityBoxSize(t,r)}};i("VectorGeometry",(t,e,r)=>new n(t,e,r)),r("vector-shapes");
@@ -0,0 +1 @@
1
+ import{c as t}from"./runtime-chunk-FQNSP44B.js";import{b as i,e}from"./runtime-chunk-MM75L5X4.js";import{e as s}from"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-Z5OH244S.js";import{a}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var o=new Map,n=new Map,d=class{constructor(i,e,s){this.data=e,this.isPlayVideoAction=!0,this.delay=0,this.status="stopped";let{layerId:a,loop:d,volume:h,delay:l}=e;if(this.object=s,void 0===a)throw new Error("Missing property");let r=function(t,i){let e;if("material"in t){let s=t.material;e=Array.isArray(s)?t.material[0].layers.find(t=>t.uuid===i):t.material.layers.find(t=>t.uuid===i)}if(e)return e.color.texture.image.img instanceof HTMLVideoElement?e.color.texture.image.img:void 0}(s,a);r&&(this.videoElement=r,this.videoElement.loop=d===1/0,t&&(this.videoElement.autoplay=!0),void 0!==h&&(this.videoElement.volume=h)),void 0!==l&&(this.delay=l),n.has(s.uuid)?n.get(s.uuid).push(this):n.set(s.uuid,[this]),o.set(i,this),this.pause()}mute(){!this.videoElement||(this.videoElement.muted=!0)}unMute(){!this.videoElement||(this.videoElement.muted=!1)}play(t){if(!this.videoElement)return;let i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);t?(this.mute(),this.delay+=150):i?(this.mute(),window.setTimeout(()=>{this.unMute()},100)):this.unMute(),this.delayTimerId=window.setTimeout(()=>{if(!this.videoElement)return;let t=this.videoElement.play();void 0!==t&&t.then(t=>{}).catch(t=>{this.play()}),this.clearDelay()},this.delay),this.status="playing"}clearDelay(){this.delayTimerId&&(clearTimeout(this.delayTimerId),delete this.delayTimerId)}pause(){!this.videoElement||(this.videoElement.pause(),this.status="paused")}stop(){!this.videoElement||(this.videoElement.pause(),this.videoElement.currentTime=0,this.status="stopped",this.clearDelay())}seek(t){return new Promise(i=>{if(!this.videoElement)return i();let e=this.videoElement.duration;if(e>0){let i=t%e;this.videoElement.currentTime=i}this.videoElement.addEventListener("seeked",()=>i(),{once:!0})})}playByToggle(){"stop"===this.data.toggle?"playing"===this.status?this.stop():(this.stop(),this.play()):"pause"===this.data.toggle?"playing"===this.status?this.pause():this.play():(this.stop(),this.play())}dispose(){!this.videoElement||(this.stop(),this.videoElement.muted=!0)}},h=class{constructor(t){this.data=t,this.isPauseVideoAction=!0}dispatch(){this.data.playVideo?this.pauseVideo(this.data.playVideo):this.data.object?this.pauseAllVideosFromObject(this.data.object):this.pauseAllVideos()}pauseVideo(t){let i=o.get(t);!i||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i[this.data.interaction](),this.disposeDelay()},this.data.delay)):i[this.data.interaction]())}pauseAllVideosFromObject(t){let i=n.get(t);!i?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.forEach(t=>t[this.data.interaction]()),this.disposeDelay()},this.data.delay)):i.forEach(t=>t[this.data.interaction]()))}pauseAllVideos(){let t=[...n.values()];!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},l=class{constructor(t,i,e,s,a){if(this.data=i,this.shared=s,this.condition=a,"play"===i.interaction)this.interaction=new d(t,i,e);else{if("pause"!==i.interaction&&"stop"!==i.interaction)throw new Error("Missing property");this.interaction=new h(i)}}dispatchBasic(){if(!1===e(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.playByToggle():this.interaction.dispatch()}dispatchConditional(){if(!1===e(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.play():this.interaction.dispatch()}dispose(){this.interaction.dispose()}};i("Video",({id:t,data:i,object:e,shared:a,actionCondition:o})=>s(e)?null:new l(t,i,e,a,o)),a("video");
@@ -0,0 +1 @@
1
+ import{a as e}from"./runtime-chunk-YXATXASV.js";import"./runtime-chunk-OFPUAZKY.js";import{a as t}from"./runtime-chunk-EOV2DL2V.js";import"./runtime-chunk-Y3BMDVJ7.js";import{Bc as n,Db as r,Fc as a,Le as o,Oc as i,Tc as s,Vc as c,we as y}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";new y,new s,new Float32Array([255/256/256**3,255/256/65536,255/256/256,255/256]);var l=new Map([[0,null],[1,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x+y,1.0)*opacity+x*(1.0-opacity);}"],[2,"vec3 blend(const in vec3 x,const in vec3 y,const in float opacity){return y*opacity+x*(1.0-opacity);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){float a=min(y.a,opacity);return vec4(blend(x.rgb,y.rgb,a),max(x.a,a));}"],[3,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y)*0.5*opacity+x*(1.0-opacity);}"],[4,"float blend(const in float x,const in float y){return(y==0.0)?y:max(1.0-(1.0-x)/y,0.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[5,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[6,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x,y)*opacity+x*(1.0-opacity);}"],[7,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return abs(x-y)*opacity+x*(1.0-opacity);}"],[8,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y-2.0*x*y)*opacity+x*(1.0-opacity);}"],[9,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x,y)*opacity+x*(1.0-opacity);}"],[10,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return x*y*opacity+x*(1.0-opacity);}"],[11,"float blend(const in float x,const in float y){return(y>0.0)?min(x/y,1.0):1.0;}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[12,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-abs(1.0-x-y))*opacity+x*(1.0-opacity);}"],[13,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y*opacity+x*(1.0-opacity);}"],[14,"float blend(const in float x,const in float y){return(x<0.5)?(2.0*x*y):(1.0-2.0*(1.0-x)*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[15,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x*x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[16,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-(1.0-x)*(1.0-y))*opacity+x*(1.0-opacity);}"],[17,"float blend(const in float x,const in float y){return(y<0.5)?(2.0*x*y+x*x*(1.0-2.0*y)):(sqrt(x)*(2.0*y-1.0)+2.0*x*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[18,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x+y-1.0,0.0)*opacity+x*(1.0-opacity);}"]]),u=class extends n{constructor(e,t=1){super(),this.f=e,this.opacity=new o(t)}getOpacity(){return this.opacity.value}setOpacity(e){this.opacity.value=e}get blendFunction(){return this.f}set blendFunction(e){this.f=e,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(e){this.blendFunction=e}getShaderCode(){return l.get(this.blendFunction)}},d=class extends n{constructor(e,t,{attributes:n=0,blendFunction:r=16,defines:a=new Map,uniforms:o=new Map,extensions:i=null,vertexShader:s=null}={}){super(),this.name=e,this.renderer=null,this.attributes=n,this.fragmentShader=t,this.vertexShader=s,this.defines=a,this.uniforms=o,this.extensions=i,this.blendMode=new u(r),this.blendMode.addEventListener("change",e=>this.setChanged())}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(e,t=r){}update(e,t,n){}setSize(e,t){}initialize(e,t,n){}dispose(){for(let e of Object.keys(this)){let t=this[e];if(null!==t&&"object"==typeof t&&"function"==typeof t.dispose){if(t instanceof c||t===this.renderer)continue;this[e].dispose()}}}},f=(new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10]),new a,new i,new s,Math.PI,new a,new a,0),x=class extends d{constructor({blendFunction:e=13,technique:t=f,eskil:n=!1,offset:r=.5,darkness:a=.5}={}){super("VignetteEffect","uniform float offset;uniform float darkness;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){const vec2 center=vec2(0.5);vec3 color=inputColor.rgb;\n#if VIGNETTE_TECHNIQUE == 0\nfloat d=distance(uv,center);color*=smoothstep(0.8,offset*0.799,d*(darkness+offset));\n#else\nvec2 coord=(uv-center)*vec2(offset);color=mix(color,vec3(1.0-darkness),dot(coord,coord));\n#endif\noutputColor=vec4(color,inputColor.a);}",{blendFunction:e,defines:new Map([["VIGNETTE_TECHNIQUE",t.toFixed(0)]]),uniforms:new Map([["offset",new o(r)],["darkness",new o(a)]])})}get technique(){return Number(this.defines.get("VIGNETTE_TECHNIQUE"))}set technique(e){this.technique!==e&&(this.defines.set("VIGNETTE_TECHNIQUE",e.toFixed(0)),this.setChanged())}get eskil(){return 1===this.technique}set eskil(e){this.technique=e?1:f}getTechnique(){return this.technique}setTechnique(e){this.technique=e}get offset(){return this.uniforms.get("offset").value}set offset(e){this.uniforms.get("offset").value=e}getOffset(){return this.offset}setOffset(e){this.offset=e}get darkness(){return this.uniforms.get("darkness").value}set darkness(e){this.uniforms.get("darkness").value=e}getDarkness(){return this.darkness}setDarkness(e){this.darkness=e}};function w(e,t,n){return e+(t-e)*n}function h(e,t,n,r){let a=w(e,t,.75),o=w(n,r,.75);return w(a,o,.875)}new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array(2),new Float32Array(2),new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125]),new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4]),new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3]),new Map([[h(0,0,0,0),new Float32Array([0,0,0,0])],[h(0,0,0,1),new Float32Array([0,0,0,1])],[h(0,0,1,0),new Float32Array([0,0,1,0])],[h(0,0,1,1),new Float32Array([0,0,1,1])],[h(0,1,0,0),new Float32Array([0,1,0,0])],[h(0,1,0,1),new Float32Array([0,1,0,1])],[h(0,1,1,0),new Float32Array([0,1,1,0])],[h(0,1,1,1),new Float32Array([0,1,1,1])],[h(1,0,0,0),new Float32Array([1,0,0,0])],[h(1,0,0,1),new Float32Array([1,0,0,1])],[h(1,0,1,0),new Float32Array([1,0,1,0])],[h(1,0,1,1),new Float32Array([1,0,1,1])],[h(1,1,0,0),new Float32Array([1,1,0,0])],[h(1,1,0,1),new Float32Array([1,1,0,1])],[h(1,1,1,0),new Float32Array([1,1,1,0])],[h(1,1,1,1),new Float32Array([1,1,1,1])]]);var v=class extends e{constructor(){super(x)}get eskil(){return this.effect.eskil}set eskil(e){this.effect.eskil=e}get darkness(){return this.effect.uniforms.get("darkness").value}set darkness(e){this.effect.uniforms.get("darkness").value=e}get offset(){return this.effect.uniforms.get("offset").value}set offset(e){this.effect.uniforms.get("offset").value=e}};t("vignette",()=>new v);