@splinetool/runtime 2.0.55 → 2.0.57
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.
- package/build/bevel.js +314 -0
- package/build/bevel.js.br +0 -0
- package/build/bevel.js.gz +0 -0
- package/build/bevel.wasm +0 -0
- package/build/bevel.wasm.br +0 -0
- package/build/bevel.wasm.gz +0 -0
- package/build/hana-ui.js +33 -33
- package/build/hana-ui.js.br +0 -0
- package/build/hana-ui.js.gz +0 -0
- package/build/hana-ui.wasm +0 -0
- package/build/hana-ui.wasm.br +0 -0
- package/build/hana-ui.wasm.gz +0 -0
- package/build/{runtime-aiAssistant-QYI2OEAT.js → runtime-aiAssistant-CXQ5KRFS.js} +1 -1
- package/build/runtime-aiAssistant-CXQ5KRFS.js.br +0 -0
- package/build/runtime-aiAssistant-CXQ5KRFS.js.gz +0 -0
- package/build/{runtime-apiServices-NYOQMQZG.js → runtime-apiServices-FBQPIC7E.js} +1 -1
- package/build/runtime-apiServices-FBQPIC7E.js.br +0 -0
- package/build/runtime-apiServices-FBQPIC7E.js.gz +0 -0
- package/build/{runtime-audio-43VUDXSF.js → runtime-audio-7LXSIVLU.js} +1 -1
- package/build/runtime-audio-7LXSIVLU.js.br +0 -0
- package/build/runtime-audio-7LXSIVLU.js.gz +0 -0
- package/build/{runtime-chunk-NWHMFWZP.js → runtime-chunk-2NXWM6BD.js} +1 -1
- package/build/runtime-chunk-2NXWM6BD.js.br +0 -0
- package/build/runtime-chunk-2NXWM6BD.js.gz +0 -0
- package/build/{runtime-chunk-32TB3WEI.js → runtime-chunk-4EV5RMLQ.js} +1 -1
- package/build/runtime-chunk-4EV5RMLQ.js.br +0 -0
- package/build/runtime-chunk-4EV5RMLQ.js.gz +0 -0
- package/build/{runtime-chunk-IQ2SSVQ2.js → runtime-chunk-AFOG3EOO.js} +1 -1
- package/build/runtime-chunk-AFOG3EOO.js.br +0 -0
- package/build/runtime-chunk-AFOG3EOO.js.gz +0 -0
- package/build/{runtime-chunk-3S3C3OR3.js → runtime-chunk-AN2P4EN2.js} +1 -1
- package/build/runtime-chunk-AN2P4EN2.js.br +0 -0
- package/build/runtime-chunk-AN2P4EN2.js.gz +0 -0
- package/build/{runtime-chunk-JMQM3OK2.js → runtime-chunk-AOZCO4VY.js} +1 -1
- package/build/runtime-chunk-AOZCO4VY.js.br +0 -0
- package/build/runtime-chunk-AOZCO4VY.js.gz +0 -0
- package/build/{runtime-chunk-EKQV4UAL.js → runtime-chunk-B3QJDINU.js} +1 -1
- package/build/runtime-chunk-B3QJDINU.js.br +0 -0
- package/build/runtime-chunk-B3QJDINU.js.gz +0 -0
- package/build/{runtime-chunk-LSTSCWNH.js → runtime-chunk-BSEG6CWM.js} +1 -1
- package/build/runtime-chunk-BSEG6CWM.js.br +0 -0
- package/build/runtime-chunk-BSEG6CWM.js.gz +0 -0
- package/build/{runtime-chunk-GKWZMHHQ.js → runtime-chunk-EG55REW7.js} +1 -1
- package/build/runtime-chunk-EG55REW7.js.br +0 -0
- package/build/runtime-chunk-EG55REW7.js.gz +0 -0
- package/build/{runtime-chunk-SEHIWJXU.js → runtime-chunk-H3LGDNH2.js} +1 -1
- package/build/runtime-chunk-H3LGDNH2.js.br +0 -0
- package/build/runtime-chunk-H3LGDNH2.js.gz +0 -0
- package/build/runtime-chunk-H6NICSNO.js +1 -0
- package/build/runtime-chunk-H6NICSNO.js.br +0 -0
- package/build/runtime-chunk-H6NICSNO.js.gz +0 -0
- package/build/runtime-chunk-JXO7S6TH.js +1 -0
- package/build/runtime-chunk-JXO7S6TH.js.br +0 -0
- package/build/runtime-chunk-JXO7S6TH.js.gz +0 -0
- package/build/{runtime-chunk-6IUNMMMZ.js → runtime-chunk-KPQ22F5X.js} +1 -1
- package/build/runtime-chunk-KPQ22F5X.js.br +0 -0
- package/build/runtime-chunk-KPQ22F5X.js.gz +0 -0
- package/build/{runtime-chunk-EGVK6X4Y.js → runtime-chunk-LHMA4VIW.js} +1 -1
- package/build/runtime-chunk-LHMA4VIW.js.br +0 -0
- package/build/runtime-chunk-LHMA4VIW.js.gz +0 -0
- package/build/{runtime-chunk-5BIVRW5J.js → runtime-chunk-LM22QQY6.js} +1 -1
- package/build/{runtime-chunk-5BIVRW5J.js.br → runtime-chunk-LM22QQY6.js.br} +0 -0
- package/build/{runtime-chunk-5BIVRW5J.js.gz → runtime-chunk-LM22QQY6.js.gz} +0 -0
- package/build/{runtime-chunk-WMC34BBW.js → runtime-chunk-M3YLEACQ.js} +1 -1
- package/build/runtime-chunk-M3YLEACQ.js.br +0 -0
- package/build/runtime-chunk-M3YLEACQ.js.gz +0 -0
- package/build/{runtime-chunk-N3HGRYKV.js → runtime-chunk-NAUVESCV.js} +1 -1
- package/build/runtime-chunk-NAUVESCV.js.br +0 -0
- package/build/runtime-chunk-NAUVESCV.js.gz +0 -0
- package/build/{runtime-chunk-4LCOTWXH.js → runtime-chunk-Q7QYJUJN.js} +1 -1
- package/build/runtime-chunk-Q7QYJUJN.js.br +0 -0
- package/build/runtime-chunk-Q7QYJUJN.js.gz +0 -0
- package/build/{runtime-chunk-ZVHVXPOQ.js → runtime-chunk-RG2CIIUE.js} +1 -1
- package/build/runtime-chunk-RG2CIIUE.js.br +0 -0
- package/build/runtime-chunk-RG2CIIUE.js.gz +0 -0
- package/build/{runtime-chunk-UOWLNWXK.js → runtime-chunk-RLETXMN4.js} +1 -1
- package/build/runtime-chunk-RLETXMN4.js.br +0 -0
- package/build/runtime-chunk-RLETXMN4.js.gz +0 -0
- package/build/{runtime-chunk-K5K3WBU4.js → runtime-chunk-RW4RXPZP.js} +1 -1
- package/build/runtime-chunk-RW4RXPZP.js.br +0 -0
- package/build/runtime-chunk-RW4RXPZP.js.gz +0 -0
- package/build/{runtime-chunk-YDLPCWOV.js → runtime-chunk-SKEKGUY2.js} +1 -1
- package/build/runtime-chunk-SKEKGUY2.js.br +0 -0
- package/build/runtime-chunk-SKEKGUY2.js.gz +0 -0
- package/build/{runtime-chunk-QZSMEKZK.js → runtime-chunk-TICMTK6A.js} +1 -1
- package/build/runtime-chunk-TICMTK6A.js.br +0 -0
- package/build/runtime-chunk-TICMTK6A.js.gz +0 -0
- package/build/runtime-chunk-UM2WZDTE.js +1 -0
- package/build/runtime-chunk-UM2WZDTE.js.br +0 -0
- package/build/runtime-chunk-UM2WZDTE.js.gz +0 -0
- package/build/{runtime-chunk-7WCRQRVJ.js → runtime-chunk-WN7LYJQL.js} +1 -1
- package/build/runtime-chunk-WN7LYJQL.js.br +0 -0
- package/build/runtime-chunk-WN7LYJQL.js.gz +0 -0
- package/build/{runtime-chunk-BDYGMQDY.js → runtime-chunk-YO4ORKMI.js} +1 -1
- package/build/runtime-chunk-YO4ORKMI.js.br +2 -0
- package/build/runtime-chunk-YO4ORKMI.js.gz +0 -0
- package/build/{runtime-chunk-XOQHXVVZ.js → runtime-chunk-Z34P77VA.js} +1 -1
- package/build/runtime-chunk-Z34P77VA.js.br +0 -0
- package/build/runtime-chunk-Z34P77VA.js.gz +0 -0
- package/build/runtime-classicRuntime-BCBRZA5I.js +1 -0
- package/build/runtime-classicRuntime-BCBRZA5I.js.br +0 -0
- package/build/runtime-classicRuntime-BCBRZA5I.js.gz +0 -0
- package/build/runtime-cloners-KXUZRBVK.js +1 -0
- package/build/runtime-cloners-KXUZRBVK.js.br +0 -0
- package/build/runtime-cloners-KXUZRBVK.js.gz +0 -0
- package/build/{runtime-components-SP4557S4.js → runtime-components-TK5ZDPOW.js} +1 -1
- package/build/runtime-components-TK5ZDPOW.js.br +0 -0
- package/build/runtime-components-TK5ZDPOW.js.gz +0 -0
- package/build/{runtime-conditional-P3ULJSG2.js → runtime-conditional-2NJAHUCV.js} +1 -1
- package/build/runtime-conditional-2NJAHUCV.js.br +0 -0
- package/build/runtime-conditional-2NJAHUCV.js.gz +0 -0
- package/build/{runtime-createDestroy-RXVMOEMY.js → runtime-createDestroy-RIK2EVWW.js} +1 -1
- package/build/runtime-createDestroy-RIK2EVWW.js.br +0 -0
- package/build/runtime-createDestroy-RIK2EVWW.js.gz +0 -0
- package/build/{runtime-dragDrop-UVMNHHBK.js → runtime-dragDrop-2WAB3OJG.js} +1 -1
- package/build/runtime-dragDrop-2WAB3OJG.js.br +0 -0
- package/build/runtime-dragDrop-2WAB3OJG.js.gz +0 -0
- package/build/{runtime-gameControls-4UDJ56H7.js → runtime-gameControls-LKJXJWLV.js} +1 -1
- package/build/runtime-gameControls-LKJXJWLV.js.br +0 -0
- package/build/runtime-gameControls-LKJXJWLV.js.gz +0 -0
- package/build/runtime-hair-JE6BT5XS.js +1 -0
- package/build/runtime-hair-JE6BT5XS.js.br +1 -0
- package/build/runtime-hair-JE6BT5XS.js.gz +0 -0
- package/build/{runtime-mergeStaticGeometries-WWRCDCSG.js → runtime-mergeStaticGeometries-ZZ2NVTAF.js} +1 -1
- package/build/runtime-mergeStaticGeometries-ZZ2NVTAF.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-ZZ2NVTAF.js.gz +0 -0
- package/build/{runtime-miscActions-2GQLURB6.js → runtime-miscActions-X6WCJQS6.js} +1 -1
- package/build/runtime-miscActions-X6WCJQS6.js.br +0 -0
- package/build/runtime-miscActions-X6WCJQS6.js.gz +0 -0
- package/build/{runtime-mouseHover-IQB5BXWV.js → runtime-mouseHover-AHV7O72A.js} +1 -1
- package/build/runtime-mouseHover-AHV7O72A.js.br +0 -0
- package/build/runtime-mouseHover-AHV7O72A.js.gz +0 -0
- package/build/{runtime-particles-PBWDRHMN.js → runtime-particles-IU74DFIR.js} +1 -1
- package/build/runtime-particles-IU74DFIR.js.br +0 -0
- package/build/runtime-particles-IU74DFIR.js.gz +0 -0
- package/build/runtime-paths-TJ3NTELX.js +1 -0
- package/build/runtime-paths-TJ3NTELX.js.br +0 -0
- package/build/runtime-paths-TJ3NTELX.js.gz +0 -0
- package/build/{runtime-resize-3F3ZSTR5.js → runtime-resize-ZO5VPIUJ.js} +1 -1
- package/build/runtime-resize-ZO5VPIUJ.js.br +0 -0
- package/build/runtime-resize-ZO5VPIUJ.js.gz +0 -0
- package/build/{runtime-sceneTransition-ZWT2B6HK.js → runtime-sceneTransition-5BOIXMYH.js} +1 -1
- package/build/runtime-sceneTransition-5BOIXMYH.js.br +0 -0
- package/build/runtime-sceneTransition-5BOIXMYH.js.gz +0 -0
- package/build/{runtime-scroll-XPPG3K3B.js → runtime-scroll-4GFGYBMX.js} +1 -1
- package/build/runtime-scroll-4GFGYBMX.js.br +0 -0
- package/build/runtime-scroll-4GFGYBMX.js.gz +0 -0
- package/build/runtime-shapeBlends-UNMTEEFX.js +1 -0
- package/build/runtime-shapeBlends-UNMTEEFX.js.br +3 -0
- package/build/runtime-shapeBlends-UNMTEEFX.js.gz +0 -0
- package/build/{runtime-text-LFJHKA7L.js → runtime-text-ZN4A7F2B.js} +1 -1
- package/build/runtime-text-ZN4A7F2B.js.br +0 -0
- package/build/runtime-text-ZN4A7F2B.js.gz +0 -0
- package/build/{runtime-textInputs-JNBPRFUX.js → runtime-textInputs-FBXBOXZH.js} +1 -1
- package/build/runtime-textInputs-FBXBOXZH.js.br +0 -0
- package/build/runtime-textInputs-FBXBOXZH.js.gz +0 -0
- package/build/runtime-timeline-673KGMVE.js +1 -0
- package/build/runtime-timeline-673KGMVE.js.br +0 -0
- package/build/runtime-timeline-673KGMVE.js.gz +0 -0
- package/build/{runtime-tracking-GE3OUJ2G.js → runtime-tracking-JL3BT5LY.js} +1 -1
- package/build/runtime-tracking-JL3BT5LY.js.br +0 -0
- package/build/runtime-tracking-JL3BT5LY.js.gz +0 -0
- package/build/runtime-transitions-M2EOAAH2.js +1 -0
- package/build/runtime-transitions-M2EOAAH2.js.br +0 -0
- package/build/runtime-transitions-M2EOAAH2.js.gz +0 -0
- package/build/{runtime-ui2d-FJ4CNEFM.js → runtime-ui2d-4CMFBZI7.js} +1 -1
- package/build/runtime-ui2d-4CMFBZI7.js.br +0 -0
- package/build/runtime-ui2d-4CMFBZI7.js.gz +0 -0
- package/build/{runtime-variables-IRTA2G43.js → runtime-variables-ZSNAR2ME.js} +1 -1
- package/build/runtime-variables-ZSNAR2ME.js.br +0 -0
- package/build/runtime-variables-ZSNAR2ME.js.gz +0 -0
- package/build/{runtime-vectorShapes-F34JMFR5.js → runtime-vectorShapes-BIA3SW6I.js} +1 -1
- package/build/runtime-vectorShapes-BIA3SW6I.js.br +0 -0
- package/build/runtime-vectorShapes-BIA3SW6I.js.gz +0 -0
- package/build/{runtime-video-3ET4F26V.js → runtime-video-BFI3XXUJ.js} +1 -1
- package/build/runtime-video-BFI3XXUJ.js.br +0 -0
- package/build/runtime-video-BFI3XXUJ.js.gz +0 -0
- package/build/runtime-webgpu-EUBP2RQZ.js +1 -0
- package/build/runtime-webgpu-EUBP2RQZ.js.br +0 -0
- package/build/runtime-webgpu-EUBP2RQZ.js.gz +0 -0
- package/build/runtime.cjs +463 -454
- package/build/runtime.js +1 -1
- package/build/runtime.js.br +0 -0
- package/build/runtime.js.gz +0 -0
- package/build/runtime.standalone.js +1 -1
- package/build/runtime.standalone.js.br +0 -0
- package/build/runtime.standalone.js.gz +0 -0
- package/build/runtime.standalone.webgl.js +1 -1
- package/build/runtime.standalone.webgl.js.br +0 -0
- package/build/runtime.standalone.webgl.js.gz +0 -0
- package/build/runtime.standalone.webgpu.js +1 -1
- package/build/runtime.standalone.webgpu.js.br +0 -0
- package/build/runtime.standalone.webgpu.js.gz +0 -0
- package/build/runtime.standalone.webgpu.micro.js +1 -1
- package/build/runtime.standalone.webgpu.micro.js.br +0 -0
- package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
- package/build/runtime.standalone.webgpu.min.js +1 -1
- package/build/runtime.standalone.webgpu.min.js.br +0 -0
- package/build/runtime.standalone.webgpu.min.js.gz +0 -0
- package/package.json +1 -1
- package/build/runtime-aiAssistant-QYI2OEAT.js.br +0 -0
- package/build/runtime-aiAssistant-QYI2OEAT.js.gz +0 -0
- package/build/runtime-apiServices-NYOQMQZG.js.br +0 -0
- package/build/runtime-apiServices-NYOQMQZG.js.gz +0 -0
- package/build/runtime-audio-43VUDXSF.js.br +0 -0
- package/build/runtime-audio-43VUDXSF.js.gz +0 -0
- package/build/runtime-chunk-32TB3WEI.js.br +0 -0
- package/build/runtime-chunk-32TB3WEI.js.gz +0 -0
- package/build/runtime-chunk-3S3C3OR3.js.br +0 -0
- package/build/runtime-chunk-3S3C3OR3.js.gz +0 -0
- package/build/runtime-chunk-4LCOTWXH.js.br +0 -0
- package/build/runtime-chunk-4LCOTWXH.js.gz +0 -0
- package/build/runtime-chunk-6IUNMMMZ.js.br +0 -0
- package/build/runtime-chunk-6IUNMMMZ.js.gz +0 -0
- package/build/runtime-chunk-7WCRQRVJ.js.br +0 -0
- package/build/runtime-chunk-7WCRQRVJ.js.gz +0 -0
- package/build/runtime-chunk-BDYGMQDY.js.br +0 -1
- package/build/runtime-chunk-BDYGMQDY.js.gz +0 -0
- package/build/runtime-chunk-EGVK6X4Y.js.br +0 -0
- package/build/runtime-chunk-EGVK6X4Y.js.gz +0 -0
- package/build/runtime-chunk-EKQV4UAL.js.br +0 -0
- package/build/runtime-chunk-EKQV4UAL.js.gz +0 -0
- package/build/runtime-chunk-GKWZMHHQ.js.br +0 -0
- package/build/runtime-chunk-GKWZMHHQ.js.gz +0 -0
- package/build/runtime-chunk-IQ2SSVQ2.js.br +0 -0
- package/build/runtime-chunk-IQ2SSVQ2.js.gz +0 -0
- package/build/runtime-chunk-JMQM3OK2.js.br +0 -0
- package/build/runtime-chunk-JMQM3OK2.js.gz +0 -0
- package/build/runtime-chunk-JQ6QWUYF.js +0 -1
- package/build/runtime-chunk-JQ6QWUYF.js.br +0 -0
- package/build/runtime-chunk-JQ6QWUYF.js.gz +0 -0
- package/build/runtime-chunk-K5K3WBU4.js.br +0 -0
- package/build/runtime-chunk-K5K3WBU4.js.gz +0 -0
- package/build/runtime-chunk-LSTSCWNH.js.br +0 -0
- package/build/runtime-chunk-LSTSCWNH.js.gz +0 -0
- package/build/runtime-chunk-N3HGRYKV.js.br +0 -0
- package/build/runtime-chunk-N3HGRYKV.js.gz +0 -0
- package/build/runtime-chunk-NLZXZNT5.js +0 -1
- package/build/runtime-chunk-NLZXZNT5.js.br +0 -0
- package/build/runtime-chunk-NLZXZNT5.js.gz +0 -0
- package/build/runtime-chunk-NWHMFWZP.js.br +0 -0
- package/build/runtime-chunk-NWHMFWZP.js.gz +0 -0
- package/build/runtime-chunk-QZSMEKZK.js.br +0 -0
- package/build/runtime-chunk-QZSMEKZK.js.gz +0 -0
- package/build/runtime-chunk-SEHIWJXU.js.br +0 -0
- package/build/runtime-chunk-SEHIWJXU.js.gz +0 -0
- package/build/runtime-chunk-TNKUPXKL.js +0 -1
- package/build/runtime-chunk-TNKUPXKL.js.br +0 -0
- package/build/runtime-chunk-TNKUPXKL.js.gz +0 -0
- package/build/runtime-chunk-UOWLNWXK.js.br +0 -0
- package/build/runtime-chunk-UOWLNWXK.js.gz +0 -0
- package/build/runtime-chunk-WMC34BBW.js.br +0 -0
- package/build/runtime-chunk-WMC34BBW.js.gz +0 -0
- package/build/runtime-chunk-XOQHXVVZ.js.br +0 -0
- package/build/runtime-chunk-XOQHXVVZ.js.gz +0 -0
- package/build/runtime-chunk-YDLPCWOV.js.br +0 -0
- package/build/runtime-chunk-YDLPCWOV.js.gz +0 -0
- package/build/runtime-chunk-ZVHVXPOQ.js.br +0 -0
- package/build/runtime-chunk-ZVHVXPOQ.js.gz +0 -0
- package/build/runtime-classicRuntime-7CF5S54Q.js +0 -1
- package/build/runtime-classicRuntime-7CF5S54Q.js.br +0 -0
- package/build/runtime-classicRuntime-7CF5S54Q.js.gz +0 -0
- package/build/runtime-cloners-IA5NPLKP.js +0 -1
- package/build/runtime-cloners-IA5NPLKP.js.br +0 -1
- package/build/runtime-cloners-IA5NPLKP.js.gz +0 -0
- package/build/runtime-components-SP4557S4.js.br +0 -0
- package/build/runtime-components-SP4557S4.js.gz +0 -0
- package/build/runtime-conditional-P3ULJSG2.js.br +0 -0
- package/build/runtime-conditional-P3ULJSG2.js.gz +0 -0
- package/build/runtime-createDestroy-RXVMOEMY.js.br +0 -0
- package/build/runtime-createDestroy-RXVMOEMY.js.gz +0 -0
- package/build/runtime-dragDrop-UVMNHHBK.js.br +0 -0
- package/build/runtime-dragDrop-UVMNHHBK.js.gz +0 -0
- package/build/runtime-gameControls-4UDJ56H7.js.br +0 -0
- package/build/runtime-gameControls-4UDJ56H7.js.gz +0 -0
- package/build/runtime-hair-PXEZ3VET.js +0 -1
- package/build/runtime-hair-PXEZ3VET.js.br +0 -2
- package/build/runtime-hair-PXEZ3VET.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-WWRCDCSG.js.br +0 -5
- package/build/runtime-mergeStaticGeometries-WWRCDCSG.js.gz +0 -0
- package/build/runtime-miscActions-2GQLURB6.js.br +0 -0
- package/build/runtime-miscActions-2GQLURB6.js.gz +0 -0
- package/build/runtime-mouseHover-IQB5BXWV.js.br +0 -0
- package/build/runtime-mouseHover-IQB5BXWV.js.gz +0 -0
- package/build/runtime-particles-PBWDRHMN.js.br +0 -0
- package/build/runtime-particles-PBWDRHMN.js.gz +0 -0
- package/build/runtime-paths-4Y7RNNOC.js +0 -1
- package/build/runtime-paths-4Y7RNNOC.js.br +0 -0
- package/build/runtime-paths-4Y7RNNOC.js.gz +0 -0
- package/build/runtime-resize-3F3ZSTR5.js.br +0 -0
- package/build/runtime-resize-3F3ZSTR5.js.gz +0 -0
- package/build/runtime-sceneTransition-ZWT2B6HK.js.br +0 -0
- package/build/runtime-sceneTransition-ZWT2B6HK.js.gz +0 -0
- package/build/runtime-scroll-XPPG3K3B.js.br +0 -0
- package/build/runtime-scroll-XPPG3K3B.js.gz +0 -0
- package/build/runtime-shapeBlends-XV42E6V3.js +0 -1
- package/build/runtime-shapeBlends-XV42E6V3.js.br +0 -0
- package/build/runtime-shapeBlends-XV42E6V3.js.gz +0 -0
- package/build/runtime-text-LFJHKA7L.js.br +0 -0
- package/build/runtime-text-LFJHKA7L.js.gz +0 -0
- package/build/runtime-textInputs-JNBPRFUX.js.br +0 -0
- package/build/runtime-textInputs-JNBPRFUX.js.gz +0 -0
- package/build/runtime-timeline-5YUCVT7L.js +0 -1
- package/build/runtime-timeline-5YUCVT7L.js.br +0 -0
- package/build/runtime-timeline-5YUCVT7L.js.gz +0 -0
- package/build/runtime-tracking-GE3OUJ2G.js.br +0 -0
- package/build/runtime-tracking-GE3OUJ2G.js.gz +0 -0
- package/build/runtime-transitions-DRCW6GJC.js +0 -1
- package/build/runtime-transitions-DRCW6GJC.js.br +0 -0
- package/build/runtime-transitions-DRCW6GJC.js.gz +0 -0
- package/build/runtime-ui2d-FJ4CNEFM.js.br +0 -0
- package/build/runtime-ui2d-FJ4CNEFM.js.gz +0 -0
- package/build/runtime-variables-IRTA2G43.js.br +0 -0
- package/build/runtime-variables-IRTA2G43.js.gz +0 -0
- package/build/runtime-vectorShapes-F34JMFR5.js.br +0 -0
- package/build/runtime-vectorShapes-F34JMFR5.js.gz +0 -0
- package/build/runtime-video-3ET4F26V.js.br +0 -0
- package/build/runtime-video-3ET4F26V.js.gz +0 -0
- package/build/runtime-webgpu-DDM7K6ES.js +0 -1
- package/build/runtime-webgpu-DDM7K6ES.js.br +0 -0
- package/build/runtime-webgpu-DDM7K6ES.js.gz +0 -0
- /package/build/{runtime-chunk-C5BW2BYH.js → runtime-chunk-EFBUAWKV.js} +0 -0
- /package/build/{runtime-chunk-C5BW2BYH.js.br → runtime-chunk-EFBUAWKV.js.br} +0 -0
- /package/build/{runtime-chunk-C5BW2BYH.js.gz → runtime-chunk-EFBUAWKV.js.gz} +0 -0
package/build/bevel.js
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/* @ts-self-types="./bevel_wasm.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* One assembled end cap. Accessors copy into fresh JS-owned arrays.
|
|
5
|
+
*
|
|
6
|
+
* Read once and held for as long as the shape and bevel hold still; the
|
|
7
|
+
* consumer places it with its own matrices. The boundary ring meets a wall the
|
|
8
|
+
* consumer builds from the same outline: its vertices sit at exactly the input
|
|
9
|
+
* points as f32, and carry the wall's own in-plane normal wherever the bevel
|
|
10
|
+
* meets it within the crease angle.
|
|
11
|
+
*/
|
|
12
|
+
export class ExtrudedCap {
|
|
13
|
+
static __wrap(ptr) {
|
|
14
|
+
const obj = Object.create(ExtrudedCap.prototype);
|
|
15
|
+
obj.__wbg_ptr = ptr;
|
|
16
|
+
ExtrudedCapFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
17
|
+
return obj;
|
|
18
|
+
}
|
|
19
|
+
__destroy_into_raw() {
|
|
20
|
+
const ptr = this.__wbg_ptr;
|
|
21
|
+
this.__wbg_ptr = 0;
|
|
22
|
+
ExtrudedCapFinalization.unregister(this);
|
|
23
|
+
return ptr;
|
|
24
|
+
}
|
|
25
|
+
free() {
|
|
26
|
+
const ptr = this.__destroy_into_raw();
|
|
27
|
+
wasm.__wbg_extrudedcap_free(ptr, 0);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Windings agree with the normals. A mirroring placement reverses them;
|
|
31
|
+
* the caller reverses the windings it draws with.
|
|
32
|
+
* @returns {Uint32Array}
|
|
33
|
+
*/
|
|
34
|
+
indices() {
|
|
35
|
+
const ret = wasm.extrudedcap_indices(this.__wbg_ptr);
|
|
36
|
+
var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
|
37
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
38
|
+
return v1;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @returns {Float32Array}
|
|
42
|
+
*/
|
|
43
|
+
normals() {
|
|
44
|
+
const ret = wasm.extrudedcap_normals(this.__wbg_ptr);
|
|
45
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
46
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
47
|
+
return v1;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* xyz per vertex, z spanning `[depth − bevel, depth]`.
|
|
51
|
+
* @returns {Float32Array}
|
|
52
|
+
*/
|
|
53
|
+
positions() {
|
|
54
|
+
const ret = wasm.extrudedcap_positions(this.__wbg_ptr);
|
|
55
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
56
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
57
|
+
return v1;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Planar over the outline's own xy, normalised to its bounding box.
|
|
61
|
+
* @returns {Float32Array}
|
|
62
|
+
*/
|
|
63
|
+
uvs() {
|
|
64
|
+
const ret = wasm.extrudedcap_uvs(this.__wbg_ptr);
|
|
65
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
66
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
67
|
+
return v1;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @returns {number}
|
|
71
|
+
*/
|
|
72
|
+
vertex_count() {
|
|
73
|
+
const ret = wasm.extrudedcap_vertex_count(this.__wbg_ptr);
|
|
74
|
+
return ret >>> 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (Symbol.dispose) ExtrudedCap.prototype[Symbol.dispose] = ExtrudedCap.prototype.free;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* A caller-supplied 4x4, column-major, as three's `Matrix4.elements` is.
|
|
81
|
+
*
|
|
82
|
+
* Assemble ONE end cap from pre-flattened rings: the shape's face and the
|
|
83
|
+
* bevel that turns off it.
|
|
84
|
+
*
|
|
85
|
+
* No wall — that is the caller's, since along a path it is a swept curve.
|
|
86
|
+
* Depth is still needed: it is what the bevel is clamped against, and where
|
|
87
|
+
* the face sits.
|
|
88
|
+
*
|
|
89
|
+
* The straight skeleton is built here and dropped here. It is the expensive
|
|
90
|
+
* half and it depends on nothing but the outline, so holding one across calls
|
|
91
|
+
* looks attractive — but nothing animates the bevel, which is the only
|
|
92
|
+
* parameter a held skeleton would save re-solving. Width and height DO
|
|
93
|
+
* animate, and they change the outline, so a held skeleton would be thrown
|
|
94
|
+
* away on those frames anyway. What does animate is DEPTH, and that costs no
|
|
95
|
+
* assembly at all: the caller holds the cap's arrays and translates them.
|
|
96
|
+
* @param {Float64Array} ring_points
|
|
97
|
+
* @param {Uint32Array} ring_ends
|
|
98
|
+
* @param {number} depth
|
|
99
|
+
* @param {number} bevel_size
|
|
100
|
+
* @param {number} bevel_type
|
|
101
|
+
* @param {number} bevel_segments
|
|
102
|
+
* @param {number} bevel_flat_round
|
|
103
|
+
* @param {number} crease_angle_deg
|
|
104
|
+
* @returns {ExtrudedCap}
|
|
105
|
+
*/
|
|
106
|
+
export function assemble_cap(ring_points, ring_ends, depth, bevel_size, bevel_type, bevel_segments, bevel_flat_round, crease_angle_deg) {
|
|
107
|
+
const ptr0 = passArrayF64ToWasm0(ring_points, wasm.__wbindgen_malloc);
|
|
108
|
+
const len0 = WASM_VECTOR_LEN;
|
|
109
|
+
const ptr1 = passArray32ToWasm0(ring_ends, wasm.__wbindgen_malloc);
|
|
110
|
+
const len1 = WASM_VECTOR_LEN;
|
|
111
|
+
const ret = wasm.assemble_cap(ptr0, len0, ptr1, len1, depth, bevel_size, bevel_type, bevel_segments, bevel_flat_round, crease_angle_deg);
|
|
112
|
+
return ExtrudedCap.__wrap(ret);
|
|
113
|
+
}
|
|
114
|
+
function __wbg_get_imports() {
|
|
115
|
+
const import0 = {
|
|
116
|
+
__proto__: null,
|
|
117
|
+
__wbg___wbindgen_throw_5d9e815e6fdf150f: function(arg0, arg1) {
|
|
118
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
119
|
+
},
|
|
120
|
+
__wbindgen_init_externref_table: function() {
|
|
121
|
+
const table = wasm.__wbindgen_externrefs;
|
|
122
|
+
const offset = table.grow(4);
|
|
123
|
+
table.set(0, undefined);
|
|
124
|
+
table.set(offset + 0, undefined);
|
|
125
|
+
table.set(offset + 1, null);
|
|
126
|
+
table.set(offset + 2, true);
|
|
127
|
+
table.set(offset + 3, false);
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
return {
|
|
131
|
+
__proto__: null,
|
|
132
|
+
"./bevel_wasm_bg.js": import0,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const ExtrudedCapFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
137
|
+
? { register: () => {}, unregister: () => {} }
|
|
138
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_extrudedcap_free(ptr, 1));
|
|
139
|
+
|
|
140
|
+
function getArrayF32FromWasm0(ptr, len) {
|
|
141
|
+
ptr = ptr >>> 0;
|
|
142
|
+
return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
146
|
+
ptr = ptr >>> 0;
|
|
147
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
let cachedFloat32ArrayMemory0 = null;
|
|
151
|
+
function getFloat32ArrayMemory0() {
|
|
152
|
+
if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
|
|
153
|
+
cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
|
|
154
|
+
}
|
|
155
|
+
return cachedFloat32ArrayMemory0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
159
|
+
function getFloat64ArrayMemory0() {
|
|
160
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
161
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
162
|
+
}
|
|
163
|
+
return cachedFloat64ArrayMemory0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function getStringFromWasm0(ptr, len) {
|
|
167
|
+
return decodeText(ptr >>> 0, len);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
let cachedUint32ArrayMemory0 = null;
|
|
171
|
+
function getUint32ArrayMemory0() {
|
|
172
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
173
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
174
|
+
}
|
|
175
|
+
return cachedUint32ArrayMemory0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
let cachedUint8ArrayMemory0 = null;
|
|
179
|
+
function getUint8ArrayMemory0() {
|
|
180
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
181
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
182
|
+
}
|
|
183
|
+
return cachedUint8ArrayMemory0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
187
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
188
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
189
|
+
WASM_VECTOR_LEN = arg.length;
|
|
190
|
+
return ptr;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function passArrayF64ToWasm0(arg, malloc) {
|
|
194
|
+
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
195
|
+
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
196
|
+
WASM_VECTOR_LEN = arg.length;
|
|
197
|
+
return ptr;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
201
|
+
cachedTextDecoder.decode();
|
|
202
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
203
|
+
let numBytesDecoded = 0;
|
|
204
|
+
function decodeText(ptr, len) {
|
|
205
|
+
numBytesDecoded += len;
|
|
206
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
207
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
208
|
+
cachedTextDecoder.decode();
|
|
209
|
+
numBytesDecoded = len;
|
|
210
|
+
}
|
|
211
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
let WASM_VECTOR_LEN = 0;
|
|
215
|
+
|
|
216
|
+
let wasmModule, wasmInstance, wasm;
|
|
217
|
+
function __wbg_finalize_init(instance, module) {
|
|
218
|
+
wasmInstance = instance;
|
|
219
|
+
wasm = instance.exports;
|
|
220
|
+
wasmModule = module;
|
|
221
|
+
cachedFloat32ArrayMemory0 = null;
|
|
222
|
+
cachedFloat64ArrayMemory0 = null;
|
|
223
|
+
cachedUint32ArrayMemory0 = null;
|
|
224
|
+
cachedUint8ArrayMemory0 = null;
|
|
225
|
+
wasm.__wbindgen_start();
|
|
226
|
+
return wasm;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
async function __wbg_load(module, imports) {
|
|
230
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
231
|
+
if (!module.ok) {
|
|
232
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
236
|
+
try {
|
|
237
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
238
|
+
} catch (e) {
|
|
239
|
+
const validResponse = expectedResponseType(module.type);
|
|
240
|
+
|
|
241
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
242
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
243
|
+
|
|
244
|
+
} else { throw e; }
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const bytes = await module.arrayBuffer();
|
|
249
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
250
|
+
} else {
|
|
251
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
252
|
+
|
|
253
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
254
|
+
return { instance, module };
|
|
255
|
+
} else {
|
|
256
|
+
return instance;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function expectedResponseType(type) {
|
|
261
|
+
switch (type) {
|
|
262
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
263
|
+
}
|
|
264
|
+
return false;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function initSync(module) {
|
|
269
|
+
if (wasm !== undefined) return wasm;
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
if (module !== undefined) {
|
|
273
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
274
|
+
({module} = module)
|
|
275
|
+
} else {
|
|
276
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const imports = __wbg_get_imports();
|
|
281
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
282
|
+
module = new WebAssembly.Module(module);
|
|
283
|
+
}
|
|
284
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
285
|
+
return __wbg_finalize_init(instance, module);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
async function __wbg_init(module_or_path) {
|
|
289
|
+
if (wasm !== undefined) return wasm;
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
if (module_or_path !== undefined) {
|
|
293
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
294
|
+
({module_or_path} = module_or_path)
|
|
295
|
+
} else {
|
|
296
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if (module_or_path === undefined) {
|
|
301
|
+
module_or_path = new URL('bevel.wasm', import.meta.url);
|
|
302
|
+
}
|
|
303
|
+
const imports = __wbg_get_imports();
|
|
304
|
+
|
|
305
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
306
|
+
module_or_path = fetch(module_or_path);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
310
|
+
|
|
311
|
+
return __wbg_finalize_init(instance, module);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export { initSync, __wbg_init as default };
|
|
Binary file
|
|
Binary file
|
package/build/bevel.wasm
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/build/hana-ui.js
CHANGED
|
@@ -2485,7 +2485,7 @@ function __wbg_get_imports() {
|
|
|
2485
2485
|
const a = state0.a;
|
|
2486
2486
|
state0.a = 0;
|
|
2487
2487
|
try {
|
|
2488
|
-
return
|
|
2488
|
+
return __wasm_bindgen_func_elem_14151(a, state0.b, arg0, arg1);
|
|
2489
2489
|
} finally {
|
|
2490
2490
|
state0.a = a;
|
|
2491
2491
|
}
|
|
@@ -2531,7 +2531,7 @@ function __wbg_get_imports() {
|
|
|
2531
2531
|
const a = state0.a;
|
|
2532
2532
|
state0.a = 0;
|
|
2533
2533
|
try {
|
|
2534
|
-
return
|
|
2534
|
+
return __wasm_bindgen_func_elem_14151(a, state0.b, arg0, arg1);
|
|
2535
2535
|
} finally {
|
|
2536
2536
|
state0.a = a;
|
|
2537
2537
|
}
|
|
@@ -3646,48 +3646,48 @@ function __wbg_get_imports() {
|
|
|
3646
3646
|
getObject(arg0).writeTexture(getObject(arg1), getArrayU8FromWasm0(arg2, arg3), getObject(arg4), getObject(arg5));
|
|
3647
3647
|
}, arguments); },
|
|
3648
3648
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
3649
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
3650
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3649
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1041, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3650
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_14149);
|
|
3651
3651
|
return addHeapObject(ret);
|
|
3652
3652
|
},
|
|
3653
3653
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
3654
3654
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 34, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3655
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3655
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_5126);
|
|
3656
3656
|
return addHeapObject(ret);
|
|
3657
3657
|
},
|
|
3658
3658
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
3659
3659
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUComputePipeline")], shim_idx: 929, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3660
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3660
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11147);
|
|
3661
3661
|
return addHeapObject(ret);
|
|
3662
3662
|
},
|
|
3663
3663
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
3664
3664
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 929, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3665
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3665
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11147_3);
|
|
3666
3666
|
return addHeapObject(ret);
|
|
3667
3667
|
},
|
|
3668
3668
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
3669
3669
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 930, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3670
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3670
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11148);
|
|
3671
3671
|
return addHeapObject(ret);
|
|
3672
3672
|
},
|
|
3673
3673
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
3674
3674
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPURenderPipeline")], shim_idx: 929, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3675
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3675
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11147_5);
|
|
3676
3676
|
return addHeapObject(ret);
|
|
3677
3677
|
},
|
|
3678
3678
|
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
3679
3679
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 929, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3680
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3680
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11147_6);
|
|
3681
3681
|
return addHeapObject(ret);
|
|
3682
3682
|
},
|
|
3683
3683
|
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
3684
3684
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 929, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3685
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3685
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11147_7);
|
|
3686
3686
|
return addHeapObject(ret);
|
|
3687
3687
|
},
|
|
3688
3688
|
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
3689
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
3690
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3689
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1024, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3690
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12512);
|
|
3691
3691
|
return addHeapObject(ret);
|
|
3692
3692
|
},
|
|
3693
3693
|
__wbindgen_cast_000000000000000a: function(arg0) {
|
|
@@ -3761,22 +3761,22 @@ function __wbg_get_imports() {
|
|
|
3761
3761
|
};
|
|
3762
3762
|
}
|
|
3763
3763
|
|
|
3764
|
-
function
|
|
3765
|
-
wasm.
|
|
3764
|
+
function __wasm_bindgen_func_elem_12512(arg0, arg1) {
|
|
3765
|
+
wasm.__wasm_bindgen_func_elem_12512(arg0, arg1);
|
|
3766
3766
|
}
|
|
3767
3767
|
|
|
3768
|
-
function
|
|
3769
|
-
wasm.
|
|
3768
|
+
function __wasm_bindgen_func_elem_5126(arg0, arg1, arg2) {
|
|
3769
|
+
wasm.__wasm_bindgen_func_elem_5126(arg0, arg1, addHeapObject(arg2));
|
|
3770
3770
|
}
|
|
3771
3771
|
|
|
3772
|
-
function
|
|
3773
|
-
wasm.
|
|
3772
|
+
function __wasm_bindgen_func_elem_11148(arg0, arg1, arg2) {
|
|
3773
|
+
wasm.__wasm_bindgen_func_elem_11148(arg0, arg1, addHeapObject(arg2));
|
|
3774
3774
|
}
|
|
3775
3775
|
|
|
3776
|
-
function
|
|
3776
|
+
function __wasm_bindgen_func_elem_14149(arg0, arg1, arg2) {
|
|
3777
3777
|
try {
|
|
3778
3778
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3779
|
-
wasm.
|
|
3779
|
+
wasm.__wasm_bindgen_func_elem_14149(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3780
3780
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3781
3781
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3782
3782
|
if (r1) {
|
|
@@ -3787,10 +3787,10 @@ function __wasm_bindgen_func_elem_14195(arg0, arg1, arg2) {
|
|
|
3787
3787
|
}
|
|
3788
3788
|
}
|
|
3789
3789
|
|
|
3790
|
-
function
|
|
3790
|
+
function __wasm_bindgen_func_elem_11147(arg0, arg1, arg2) {
|
|
3791
3791
|
try {
|
|
3792
3792
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3793
|
-
wasm.
|
|
3793
|
+
wasm.__wasm_bindgen_func_elem_11147(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3794
3794
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3795
3795
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3796
3796
|
if (r1) {
|
|
@@ -3801,10 +3801,10 @@ function __wasm_bindgen_func_elem_11150(arg0, arg1, arg2) {
|
|
|
3801
3801
|
}
|
|
3802
3802
|
}
|
|
3803
3803
|
|
|
3804
|
-
function
|
|
3804
|
+
function __wasm_bindgen_func_elem_11147_3(arg0, arg1, arg2) {
|
|
3805
3805
|
try {
|
|
3806
3806
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3807
|
-
wasm.
|
|
3807
|
+
wasm.__wasm_bindgen_func_elem_11147_3(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3808
3808
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3809
3809
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3810
3810
|
if (r1) {
|
|
@@ -3815,10 +3815,10 @@ function __wasm_bindgen_func_elem_11150_3(arg0, arg1, arg2) {
|
|
|
3815
3815
|
}
|
|
3816
3816
|
}
|
|
3817
3817
|
|
|
3818
|
-
function
|
|
3818
|
+
function __wasm_bindgen_func_elem_11147_5(arg0, arg1, arg2) {
|
|
3819
3819
|
try {
|
|
3820
3820
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3821
|
-
wasm.
|
|
3821
|
+
wasm.__wasm_bindgen_func_elem_11147_5(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3822
3822
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3823
3823
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3824
3824
|
if (r1) {
|
|
@@ -3829,10 +3829,10 @@ function __wasm_bindgen_func_elem_11150_5(arg0, arg1, arg2) {
|
|
|
3829
3829
|
}
|
|
3830
3830
|
}
|
|
3831
3831
|
|
|
3832
|
-
function
|
|
3832
|
+
function __wasm_bindgen_func_elem_11147_6(arg0, arg1, arg2) {
|
|
3833
3833
|
try {
|
|
3834
3834
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3835
|
-
wasm.
|
|
3835
|
+
wasm.__wasm_bindgen_func_elem_11147_6(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3836
3836
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3837
3837
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3838
3838
|
if (r1) {
|
|
@@ -3843,10 +3843,10 @@ function __wasm_bindgen_func_elem_11150_6(arg0, arg1, arg2) {
|
|
|
3843
3843
|
}
|
|
3844
3844
|
}
|
|
3845
3845
|
|
|
3846
|
-
function
|
|
3846
|
+
function __wasm_bindgen_func_elem_11147_7(arg0, arg1, arg2) {
|
|
3847
3847
|
try {
|
|
3848
3848
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3849
|
-
wasm.
|
|
3849
|
+
wasm.__wasm_bindgen_func_elem_11147_7(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3850
3850
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3851
3851
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3852
3852
|
if (r1) {
|
|
@@ -3857,8 +3857,8 @@ function __wasm_bindgen_func_elem_11150_7(arg0, arg1, arg2) {
|
|
|
3857
3857
|
}
|
|
3858
3858
|
}
|
|
3859
3859
|
|
|
3860
|
-
function
|
|
3861
|
-
wasm.
|
|
3860
|
+
function __wasm_bindgen_func_elem_14151(arg0, arg1, arg2, arg3) {
|
|
3861
|
+
wasm.__wasm_bindgen_func_elem_14151(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
3862
3862
|
}
|
|
3863
3863
|
|
|
3864
3864
|
|
package/build/hana-ui.js.br
CHANGED
|
Binary file
|
package/build/hana-ui.js.gz
CHANGED
|
Binary file
|
package/build/hana-ui.wasm
CHANGED
|
Binary file
|
package/build/hana-ui.wasm.br
CHANGED
|
Binary file
|
package/build/hana-ui.wasm.gz
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{c as i}from"./runtime-chunk-4YV3EXSU.js";import{f as a}from"./runtime-chunk-M6FFVLT6.js";import"./runtime-chunk-C5BW2BYH.js";import{a as n}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-K3UQCG3P.js";import"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var r=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onVoice=({value:e,frequencies:t})=>{this.events.forEach(e=>{e.dispatch()})}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantListener"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new o(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("voice",this.onVoice))}disconnect(){this.openAIRealtime?.off("voice",this.onVoice)}},o=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}dispatch(){this.dispatchActions(this.actions)}dispatchActions(e){e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}},c=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onTriggerEvent=({description:e,direction:t})=>{let s=this.events.find(t=>t.data.description===e);s&&("backward"===t?s.dispatchReverse():s.dispatch())}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantTrigger"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new h(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("trigger_event",this.onTriggerEvent))}disconnect(){this.openAIRealtime?.off("trigger_event",this.onTriggerEvent)}},h=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}dispatch(){let e=this.actions;e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}dispatchReverse(){let e=this.actions;e.Transition.forEach(e=>e.reverseFromCurrent()),e.Particles.forEach(e=>e.reverseFromCurrent()),e.Animation.forEach(e=>e.reverseFromCurrent()),e.SwitchCamera.forEach(e=>e.reverseFromCurrent()),e.Create.forEach(e=>e.dispatchStop())}},l=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,s,i)=>String(t+t+s+s+i+i));let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},d=[4186.01,4434.92,4698.63,4978.03,5274.04,5587.65,5919.91,6271.93,6644.88,7040,7458.62,7902.13],p=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],u=[],f=[];for(let e=1;e<=8;e++)for(let t=0;t<d.length;t++){let s=d[t];u.push(s/Math.pow(2,8-e)),f.push(p[t]+e)}var v=[32,2e3],m=u.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),y=f.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),g=class{static getFrequencies(e,t,s,i="frequency",a=-100,n=-30){s||(s=new Float32Array(e.frequencyBinCount),e.getFloatFrequencyData(s));let r,o,c,h=t/2,l=1/s.length*h;if("music"===i||"voice"===i){let e="voice"===i?m:u,t=Array(e.length).fill(a);for(let i=0;i<s.length;i++){let a=i*l,n=s[i];for(let s=e.length-1;s>=0;s--)if(a>e[s]){t[s]=Math.max(t[s],n);break}}r=t,o="voice"===i?m:u,c="voice"===i?y:f}else r=Array.from(s),o=r.map((e,t)=>l*t),c=o.map(e=>`${e.toFixed(2)} Hz`);let d=r.map(e=>Math.max(0,Math.min((e-a)/(n-a),1)));return{values:new Float32Array(d),frequencies:o,labels:c}}},E=class{constructor(e){this.value=0,this.frequencies=new Float32Array(0);let t=new AudioContext;this.source=t.createMediaStreamSource(e),this.analyser=t.createAnalyser(),this.source.connect(this.analyser),this.analyser.fftSize=8192,this.analyser.smoothingTimeConstant=.1}getFrequencies(e=-100,t=-30){if(!this.analyser)throw new Error("Not connected, please call .connect() first");return g.getFrequencies(this.analyser,44100,void 0,"voice",e,t)}update(){let e=this.getFrequencies(),t=e.values.reduce((e,t)=>e+t,0)/e.values.length;this.value=t,this.frequencies=e.values}disconnect(){this.source.disconnect(),this.analyser.disconnect()}},b=class{constructor(e){this.callbacks=e,this.rafId=0,this.isOpen=!1,this.onMessage=e=>{this.callbacks.onMessage(e.data)},this.onOpen=()=>{this.isOpen=!0,this.callbacks.onOpen()},this.animate=()=>{this.rafId=requestAnimationFrame(this.animate),this.isOpen&&this.analyser&&(this.analyser.update(),this.callbacks.onVoice(this.analyser.value,this.analyser.frequencies))}}async connect(e){let t=await async function(e){try{return(await(await fetch("https://relayserver.spline.design/session?uuidfile="+e)).json()).token}catch(e){console.error("Token generation error:",e)}}(e);this.pc=new RTCPeerConnection,this.audioElement=document.createElement("audio"),this.audioElement.autoplay=!0,this.pc.ontrack=e=>{let t=e.streams[0];this.audioElement.srcObject=t,this.analyser=new E(t)};let s=await navigator.mediaDevices.getUserMedia({audio:!0});this.pc.addTrack(s.getTracks()[0]),this.dc=this.pc.createDataChannel("oai-events"),this.dc.addEventListener("message",this.onMessage),this.dc.addEventListener("open",this.onOpen);let i=await this.pc.createOffer();await this.pc.setLocalDescription(i);let a={type:"answer",sdp:await(await fetch("https://api.openai.com/v1/realtime/calls?model=gpt-realtime",{method:"POST",body:i.sdp,headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/sdp"}})).text()};await this.pc.setRemoteDescription(a),this.animate()}send(e){return!!this.dc&&(this.dc.send(e),!0)}disconnect(){cancelAnimationFrame(this.rafId),this.analyser?.disconnect(),this.isOpen=!1,this.dc?.removeEventListener("message",this.onMessage),this.dc?.removeEventListener("open",this.onOpen),this.dc?.close(),this.pc?.getSenders().forEach(e=>{e.track&&e.track.stop()}),this.pc?.close(),this.pc=void 0}};var w=class{constructor(t,s,i){this.data=t,this.id=s,this.shared=i,this.emitter=e(),this.voice=0,this.frequencies=new Float32Array([0]),this.events=[],this.isConnected=!1,this.isToolsAdded=!1,this.tools=[],this.onServerEvent=e=>{let t=JSON.parse(e);if(this.appendEvent(t),"session.created"===t.type&&this.onSessionCreated(),"response.done"===t.type&&t.response?.output)for(let e of t.response.output)if("function_call"===e.type)for(let[t,s]of this.tools)e.name===t.name&&(s(JSON.parse(e.arguments)),setTimeout(()=>{this.sendClientEvent({type:"response.create",response:{instructions:"notice the user about what you just did"}})}))},this.onSessionCreated=()=>{this.isToolsAdded||this.registerTools()},this.onOpen=()=>{this.events=[],this.isConnected=!0,this.sendClientEvent({type:"response.create",response:{instructions:"Say hi"}})}}update(e){this.data=e}setColorByName(e,t){let s=this.shared.getColorByName(e);if(s){let{id:e}=s,{r:i,g:a,b:n}=l(t)??{r:0,g:0,b:0};this.shared.updateColor(e,{r:i/255,g:a/255,b:n/255})}}async connect(){if(this.isConnected||this.session||this.hosted)return;let e={onMessage:this.onServerEvent,onOpen:this.onOpen,onVoice:(e,t)=>{this.voice=e,this.frequencies=t,this.emitter.emit("voice",{value:e,frequencies:t})}};this.hosted=function(e,t,s){if(!function(){try{return!0===window.__SPLINE_PLAY_VOICE_HOST__&&window.parent!==window}catch{return!1}}())return null;let i=!1,a=e=>{window.parent.postMessage({__splinePlayFrame:!0,...e},"*")},n=t=>{if(t.source!==window.parent)return;let a=t.data;!a||!0!==a.__splinePlayFrameHost||a.id!==e||("voice-open"===a.type?(i=!0,s.onOpen()):"voice-message"===a.type&&"string"==typeof a.data?s.onMessage(a.data):"voice-level"===a.type&&"number"==typeof a.value?s.onVoice(a.value,a.frequencies instanceof Float32Array?a.frequencies:new Float32Array(0)):"voice-error"===a.type&&console.error("Voice assistant host error:",a.message))};return window.addEventListener("message",n),a({type:"voice-connect",id:e,hash:t}),{send:t=>!!i&&(a({type:"voice-send",id:e,message:t}),!0),disconnect:()=>{i=!1,window.removeEventListener("message",n),a({type:"voice-disconnect",id:e})}}}(this.id,this.data.integration.hash,e),!this.hosted&&(this.session=new b(e),await this.session.connect(this.data.integration.hash))}appendEvent(e){this.events=[e,...this.events]}sendClientEvent(e){e.event_id=e.event_id||crypto.randomUUID();let t=JSON.stringify(e);(this.hosted?this.hosted.send(t):this.session?.send(t))?this.appendEvent(e):console.error("Failed to send message - no data channel available",e)}registerTools(){this.isToolsAdded=!0,this.registerTool({type:"function",name:"set_personality_color",description:"returns a color based on the voice personality of the ai assistant. This should be called by the voice assistant each time it is asks to speak differently. If a color cannot be associated to the personality, the color should be a neutral color.",parameters:{type:"object",properties:{color:{type:"string",description:"css hex color string, reflecting the personality"},personality:{type:"string",description:"the personality of the voice assistant"}},required:["color","personality"]}},({color:e})=>{this.setColorByName("Voice Assistant Color",e)});let e=this.shared.getVariablesNames().join(", ");this.registerTool({type:"function",name:"set_variable",description:"Sets a Spline variable value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the variable that needs to be set. Here's a list of available variables: ${e}. It the variable does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"The new value for this variable, should always be a string even for number and boolean variables, assume that the value will be cast to the proper type afterwards."}},required:["name","value","type"]}},({name:e,value:t})=>{let s=this.shared.getVariableByName(e);if(s){let e,i=this.shared.getVariable(s.id);e="number"==typeof i?parseFloat(t):"boolean"==typeof i?"true"===t.toLowerCase():{textValue:t},this.shared.updateVariable(s.id,e)}});let t=this.shared.getColorNames().join(", ");this.registerTool({type:"function",name:"set_color",description:"Sets a Spline color asset value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the color asset that needs to be set. Here's a list of available color assets: ${t}. It the color asset does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"css hex color string"}},required:["name","value"]}},({name:e,value:t})=>{this.setColorByName(e,t)});let s=this.shared.scene,i=[];s.traverseEntity(e=>{e.data.events.forEach(e=>{if("AIAssistantTrigger"===e.data.type){let{description:t}=e.data;i.push(t)}})}),this.registerTool({type:"function",name:"trigger_event",description:"Trigger an event by name, here are the available events, please match what the user is asking for to one of these if it applies, otherwise don't call the function and warn the user.",parameters:{type:"object",properties:{description:{type:"string",description:`The name of the event that needs to be triggered. Here's a list of available events: ${JSON.stringify(i)}.`},direction:{type:"string",description:"default is forward, but can be forward or backward. Always set to forward unless the user ask to reverse or cancel the event, then set to backward."}},required:["description","direction"]}},({description:e,direction:t})=>{this.emitter.emit("trigger_event",{description:e,direction:t})}),this.sendClientEvent({type:"session.update",session:{type:"realtime",tools:this.tools.map(([e])=>e)}})}registerTool(e,t){this.tools.push([e,t])}disconnect(){this.voice=0,this.isConnected=!1,this.isToolsAdded=!1,this.session?.disconnect(),this.session=void 0,this.hosted?.disconnect(),this.hosted=null}computeAnalysisForListenerEvent(e){if("range"===e.analysis){let t=this.frequencies.slice(...e.analysisRange);return t.reduce((e,t)=>e+t,0)/t.length}return"single"===e.analysis?this.frequencies[e.analysisSingle]:this.voice}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}};s("AIAssistantListener",({eventContext:e,eventManager:t})=>new r(e,t)),s("AIAssistantTrigger",({eventContext:e,eventManager:t})=>new c(e,t)),i((e,t,s)=>new w(e,t,s)),n("ai-assistant");
|
|
1
|
+
import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{c as i}from"./runtime-chunk-4YV3EXSU.js";import{f as a}from"./runtime-chunk-M6FFVLT6.js";import"./runtime-chunk-EFBUAWKV.js";import{a as n}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-K3UQCG3P.js";import"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var r=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onVoice=({value:e,frequencies:t})=>{this.events.forEach(e=>{e.dispatch()})}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantListener"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new o(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("voice",this.onVoice))}disconnect(){this.openAIRealtime?.off("voice",this.onVoice)}},o=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}dispatch(){this.dispatchActions(this.actions)}dispatchActions(e){e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}},c=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onTriggerEvent=({description:e,direction:t})=>{let s=this.events.find(t=>t.data.description===e);s&&("backward"===t?s.dispatchReverse():s.dispatch())}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantTrigger"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new h(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("trigger_event",this.onTriggerEvent))}disconnect(){this.openAIRealtime?.off("trigger_event",this.onTriggerEvent)}},h=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}dispatch(){let e=this.actions;e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}dispatchReverse(){let e=this.actions;e.Transition.forEach(e=>e.reverseFromCurrent()),e.Particles.forEach(e=>e.reverseFromCurrent()),e.Animation.forEach(e=>e.reverseFromCurrent()),e.SwitchCamera.forEach(e=>e.reverseFromCurrent()),e.Create.forEach(e=>e.dispatchStop())}},l=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,s,i)=>String(t+t+s+s+i+i));let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},d=[4186.01,4434.92,4698.63,4978.03,5274.04,5587.65,5919.91,6271.93,6644.88,7040,7458.62,7902.13],p=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],u=[],f=[];for(let e=1;e<=8;e++)for(let t=0;t<d.length;t++){let s=d[t];u.push(s/Math.pow(2,8-e)),f.push(p[t]+e)}var v=[32,2e3],m=u.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),y=f.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),g=class{static getFrequencies(e,t,s,i="frequency",a=-100,n=-30){s||(s=new Float32Array(e.frequencyBinCount),e.getFloatFrequencyData(s));let r,o,c,h=t/2,l=1/s.length*h;if("music"===i||"voice"===i){let e="voice"===i?m:u,t=Array(e.length).fill(a);for(let i=0;i<s.length;i++){let a=i*l,n=s[i];for(let s=e.length-1;s>=0;s--)if(a>e[s]){t[s]=Math.max(t[s],n);break}}r=t,o="voice"===i?m:u,c="voice"===i?y:f}else r=Array.from(s),o=r.map((e,t)=>l*t),c=o.map(e=>`${e.toFixed(2)} Hz`);let d=r.map(e=>Math.max(0,Math.min((e-a)/(n-a),1)));return{values:new Float32Array(d),frequencies:o,labels:c}}},E=class{constructor(e){this.value=0,this.frequencies=new Float32Array(0);let t=new AudioContext;this.source=t.createMediaStreamSource(e),this.analyser=t.createAnalyser(),this.source.connect(this.analyser),this.analyser.fftSize=8192,this.analyser.smoothingTimeConstant=.1}getFrequencies(e=-100,t=-30){if(!this.analyser)throw new Error("Not connected, please call .connect() first");return g.getFrequencies(this.analyser,44100,void 0,"voice",e,t)}update(){let e=this.getFrequencies(),t=e.values.reduce((e,t)=>e+t,0)/e.values.length;this.value=t,this.frequencies=e.values}disconnect(){this.source.disconnect(),this.analyser.disconnect()}},b=class{constructor(e){this.callbacks=e,this.rafId=0,this.isOpen=!1,this.onMessage=e=>{this.callbacks.onMessage(e.data)},this.onOpen=()=>{this.isOpen=!0,this.callbacks.onOpen()},this.animate=()=>{this.rafId=requestAnimationFrame(this.animate),this.isOpen&&this.analyser&&(this.analyser.update(),this.callbacks.onVoice(this.analyser.value,this.analyser.frequencies))}}async connect(e){let t=await async function(e){try{return(await(await fetch("https://relayserver.spline.design/session?uuidfile="+e)).json()).token}catch(e){console.error("Token generation error:",e)}}(e);this.pc=new RTCPeerConnection,this.audioElement=document.createElement("audio"),this.audioElement.autoplay=!0,this.pc.ontrack=e=>{let t=e.streams[0];this.audioElement.srcObject=t,this.analyser=new E(t)};let s=await navigator.mediaDevices.getUserMedia({audio:!0});this.pc.addTrack(s.getTracks()[0]),this.dc=this.pc.createDataChannel("oai-events"),this.dc.addEventListener("message",this.onMessage),this.dc.addEventListener("open",this.onOpen);let i=await this.pc.createOffer();await this.pc.setLocalDescription(i);let a={type:"answer",sdp:await(await fetch("https://api.openai.com/v1/realtime/calls?model=gpt-realtime",{method:"POST",body:i.sdp,headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/sdp"}})).text()};await this.pc.setRemoteDescription(a),this.animate()}send(e){return!!this.dc&&(this.dc.send(e),!0)}disconnect(){cancelAnimationFrame(this.rafId),this.analyser?.disconnect(),this.isOpen=!1,this.dc?.removeEventListener("message",this.onMessage),this.dc?.removeEventListener("open",this.onOpen),this.dc?.close(),this.pc?.getSenders().forEach(e=>{e.track&&e.track.stop()}),this.pc?.close(),this.pc=void 0}};var w=class{constructor(t,s,i){this.data=t,this.id=s,this.shared=i,this.emitter=e(),this.voice=0,this.frequencies=new Float32Array([0]),this.events=[],this.isConnected=!1,this.isToolsAdded=!1,this.tools=[],this.onServerEvent=e=>{let t=JSON.parse(e);if(this.appendEvent(t),"session.created"===t.type&&this.onSessionCreated(),"response.done"===t.type&&t.response?.output)for(let e of t.response.output)if("function_call"===e.type)for(let[t,s]of this.tools)e.name===t.name&&(s(JSON.parse(e.arguments)),setTimeout(()=>{this.sendClientEvent({type:"response.create",response:{instructions:"notice the user about what you just did"}})}))},this.onSessionCreated=()=>{this.isToolsAdded||this.registerTools()},this.onOpen=()=>{this.events=[],this.isConnected=!0,this.sendClientEvent({type:"response.create",response:{instructions:"Say hi"}})}}update(e){this.data=e}setColorByName(e,t){let s=this.shared.getColorByName(e);if(s){let{id:e}=s,{r:i,g:a,b:n}=l(t)??{r:0,g:0,b:0};this.shared.updateColor(e,{r:i/255,g:a/255,b:n/255})}}async connect(){if(this.isConnected||this.session||this.hosted)return;let e={onMessage:this.onServerEvent,onOpen:this.onOpen,onVoice:(e,t)=>{this.voice=e,this.frequencies=t,this.emitter.emit("voice",{value:e,frequencies:t})}};this.hosted=function(e,t,s){if(!function(){try{return!0===window.__SPLINE_PLAY_VOICE_HOST__&&window.parent!==window}catch{return!1}}())return null;let i=!1,a=e=>{window.parent.postMessage({__splinePlayFrame:!0,...e},"*")},n=t=>{if(t.source!==window.parent)return;let a=t.data;!a||!0!==a.__splinePlayFrameHost||a.id!==e||("voice-open"===a.type?(i=!0,s.onOpen()):"voice-message"===a.type&&"string"==typeof a.data?s.onMessage(a.data):"voice-level"===a.type&&"number"==typeof a.value?s.onVoice(a.value,a.frequencies instanceof Float32Array?a.frequencies:new Float32Array(0)):"voice-error"===a.type&&console.error("Voice assistant host error:",a.message))};return window.addEventListener("message",n),a({type:"voice-connect",id:e,hash:t}),{send:t=>!!i&&(a({type:"voice-send",id:e,message:t}),!0),disconnect:()=>{i=!1,window.removeEventListener("message",n),a({type:"voice-disconnect",id:e})}}}(this.id,this.data.integration.hash,e),!this.hosted&&(this.session=new b(e),await this.session.connect(this.data.integration.hash))}appendEvent(e){this.events=[e,...this.events]}sendClientEvent(e){e.event_id=e.event_id||crypto.randomUUID();let t=JSON.stringify(e);(this.hosted?this.hosted.send(t):this.session?.send(t))?this.appendEvent(e):console.error("Failed to send message - no data channel available",e)}registerTools(){this.isToolsAdded=!0,this.registerTool({type:"function",name:"set_personality_color",description:"returns a color based on the voice personality of the ai assistant. This should be called by the voice assistant each time it is asks to speak differently. If a color cannot be associated to the personality, the color should be a neutral color.",parameters:{type:"object",properties:{color:{type:"string",description:"css hex color string, reflecting the personality"},personality:{type:"string",description:"the personality of the voice assistant"}},required:["color","personality"]}},({color:e})=>{this.setColorByName("Voice Assistant Color",e)});let e=this.shared.getVariablesNames().join(", ");this.registerTool({type:"function",name:"set_variable",description:"Sets a Spline variable value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the variable that needs to be set. Here's a list of available variables: ${e}. It the variable does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"The new value for this variable, should always be a string even for number and boolean variables, assume that the value will be cast to the proper type afterwards."}},required:["name","value","type"]}},({name:e,value:t})=>{let s=this.shared.getVariableByName(e);if(s){let e,i=this.shared.getVariable(s.id);e="number"==typeof i?parseFloat(t):"boolean"==typeof i?"true"===t.toLowerCase():{textValue:t},this.shared.updateVariable(s.id,e)}});let t=this.shared.getColorNames().join(", ");this.registerTool({type:"function",name:"set_color",description:"Sets a Spline color asset value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the color asset that needs to be set. Here's a list of available color assets: ${t}. It the color asset does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"css hex color string"}},required:["name","value"]}},({name:e,value:t})=>{this.setColorByName(e,t)});let s=this.shared.scene,i=[];s.traverseEntity(e=>{e.data.events.forEach(e=>{if("AIAssistantTrigger"===e.data.type){let{description:t}=e.data;i.push(t)}})}),this.registerTool({type:"function",name:"trigger_event",description:"Trigger an event by name, here are the available events, please match what the user is asking for to one of these if it applies, otherwise don't call the function and warn the user.",parameters:{type:"object",properties:{description:{type:"string",description:`The name of the event that needs to be triggered. Here's a list of available events: ${JSON.stringify(i)}.`},direction:{type:"string",description:"default is forward, but can be forward or backward. Always set to forward unless the user ask to reverse or cancel the event, then set to backward."}},required:["description","direction"]}},({description:e,direction:t})=>{this.emitter.emit("trigger_event",{description:e,direction:t})}),this.sendClientEvent({type:"session.update",session:{type:"realtime",tools:this.tools.map(([e])=>e)}})}registerTool(e,t){this.tools.push([e,t])}disconnect(){this.voice=0,this.isConnected=!1,this.isToolsAdded=!1,this.session?.disconnect(),this.session=void 0,this.hosted?.disconnect(),this.hosted=null}computeAnalysisForListenerEvent(e){if("range"===e.analysis){let t=this.frequencies.slice(...e.analysisRange);return t.reduce((e,t)=>e+t,0)/t.length}return"single"===e.analysis?this.frequencies[e.analysisSingle]:this.voice}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}};s("AIAssistantListener",({eventContext:e,eventManager:t})=>new r(e,t)),s("AIAssistantTrigger",({eventContext:e,eventManager:t})=>new c(e,t)),i((e,t,s)=>new w(e,t,s)),n("ai-assistant");
|
|
Binary file
|
|
Binary file
|