@splinetool/runtime 2.0.56 → 2.0.58
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/runtime-aiAssistant-WCXMKTQK.js +1 -0
- package/build/runtime-aiAssistant-WCXMKTQK.js.br +0 -0
- package/build/runtime-aiAssistant-WCXMKTQK.js.gz +0 -0
- package/build/runtime-apiServices-DRMLTDTB.js +1 -0
- package/build/runtime-apiServices-DRMLTDTB.js.br +0 -0
- package/build/runtime-apiServices-DRMLTDTB.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-ZCXPOZ42.js → runtime-chunk-3HRPKWYC.js} +1 -1
- package/build/runtime-chunk-3HRPKWYC.js.br +0 -0
- package/build/runtime-chunk-3HRPKWYC.js.gz +0 -0
- package/build/{runtime-chunk-GZGT4PYG.js → runtime-chunk-4LWXYJJI.js} +1 -1
- package/build/runtime-chunk-4LWXYJJI.js.br +0 -0
- package/build/runtime-chunk-4LWXYJJI.js.gz +0 -0
- package/build/{runtime-chunk-LOW6EBCZ.js → runtime-chunk-5VIPGS7S.js} +1 -1
- package/build/runtime-chunk-5VIPGS7S.js.br +0 -0
- package/build/runtime-chunk-5VIPGS7S.js.gz +0 -0
- package/build/{runtime-chunk-2CHZO2W5.js → runtime-chunk-7EMBRCB2.js} +1 -1
- package/build/{runtime-chunk-2CHZO2W5.js.br → runtime-chunk-7EMBRCB2.js.br} +0 -0
- package/build/runtime-chunk-7EMBRCB2.js.gz +0 -0
- package/build/{runtime-chunk-DZH2WGOA.js → runtime-chunk-BFKK6Z5N.js} +1 -1
- package/build/runtime-chunk-BFKK6Z5N.js.br +0 -0
- package/build/runtime-chunk-BFKK6Z5N.js.gz +0 -0
- package/build/{runtime-chunk-XFZDG6DN.js → runtime-chunk-DK76Z2FM.js} +1 -1
- package/build/{runtime-chunk-XFZDG6DN.js.br → runtime-chunk-DK76Z2FM.js.br} +0 -0
- package/build/runtime-chunk-DK76Z2FM.js.gz +0 -0
- package/build/{runtime-chunk-MGEVP5II.js → runtime-chunk-GFRP5FH5.js} +1 -1
- package/build/runtime-chunk-GFRP5FH5.js.br +0 -0
- package/build/runtime-chunk-GFRP5FH5.js.gz +0 -0
- package/build/{runtime-chunk-HPN5XNUK.js → runtime-chunk-HZ43XLDT.js} +1 -1
- package/build/runtime-chunk-HZ43XLDT.js.br +0 -0
- package/build/runtime-chunk-HZ43XLDT.js.gz +0 -0
- package/build/{runtime-chunk-FFP72OEJ.js → runtime-chunk-I4FSGWFF.js} +1 -1
- package/build/runtime-chunk-I4FSGWFF.js.br +0 -0
- package/build/runtime-chunk-I4FSGWFF.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-QLM3QIP6.js → runtime-chunk-KXKVQHFO.js} +1 -1
- package/build/runtime-chunk-KXKVQHFO.js.br +0 -0
- package/build/runtime-chunk-KXKVQHFO.js.gz +0 -0
- package/build/{runtime-chunk-RTMFL6Q4.js → runtime-chunk-LUFVAH3F.js} +1 -1
- package/build/runtime-chunk-LUFVAH3F.js.br +0 -0
- package/build/runtime-chunk-LUFVAH3F.js.gz +0 -0
- package/build/{runtime-chunk-YLMIAIZH.js → runtime-chunk-O73B5QJT.js} +1 -1
- package/build/runtime-chunk-O73B5QJT.js.br +0 -0
- package/build/runtime-chunk-O73B5QJT.js.gz +0 -0
- package/build/{runtime-chunk-3OIL3Q24.js → runtime-chunk-OS4LV6BO.js} +1 -1
- package/build/runtime-chunk-OS4LV6BO.js.br +0 -0
- package/build/runtime-chunk-OS4LV6BO.js.gz +0 -0
- package/build/{runtime-chunk-26SZFQP3.js → runtime-chunk-PA324UGD.js} +1 -1
- package/build/runtime-chunk-PA324UGD.js.br +0 -0
- package/build/runtime-chunk-PA324UGD.js.gz +0 -0
- package/build/{runtime-chunk-ALSA2W5S.js → runtime-chunk-PBVQ3VUW.js} +1 -1
- package/build/runtime-chunk-PBVQ3VUW.js.br +0 -0
- package/build/runtime-chunk-PBVQ3VUW.js.gz +0 -0
- package/build/{runtime-chunk-ORWDYZND.js → runtime-chunk-PDISMNDI.js} +1 -1
- package/build/runtime-chunk-PDISMNDI.js.br +0 -0
- package/build/runtime-chunk-PDISMNDI.js.gz +0 -0
- package/build/{runtime-chunk-VKNEB4X7.js → runtime-chunk-QPKHZ6YN.js} +1 -1
- package/build/runtime-chunk-QPKHZ6YN.js.br +0 -0
- package/build/runtime-chunk-QPKHZ6YN.js.gz +0 -0
- package/build/{runtime-chunk-VXY47OT7.js → runtime-chunk-TDWKHTIN.js} +1 -1
- package/build/runtime-chunk-TDWKHTIN.js.br +0 -0
- package/build/runtime-chunk-TDWKHTIN.js.gz +0 -0
- package/build/{runtime-chunk-YHT6JEQZ.js → runtime-chunk-VDRE47BC.js} +1 -1
- package/build/runtime-chunk-VDRE47BC.js.br +0 -0
- package/build/runtime-chunk-VDRE47BC.js.gz +0 -0
- package/build/{runtime-chunk-SEHDL2ZM.js → runtime-chunk-WHV377XH.js} +1 -1
- package/build/runtime-chunk-WHV377XH.js.br +0 -0
- package/build/runtime-chunk-WHV377XH.js.gz +0 -0
- package/build/{runtime-chunk-P4O4NCVX.js → runtime-chunk-X4KN556E.js} +1 -1
- package/build/runtime-chunk-X4KN556E.js.br +0 -0
- package/build/runtime-chunk-X4KN556E.js.gz +0 -0
- package/build/{runtime-chunk-G4LZAKF6.js → runtime-chunk-X6YE3MR3.js} +1 -1
- package/build/runtime-chunk-X6YE3MR3.js.br +0 -0
- package/build/runtime-chunk-X6YE3MR3.js.gz +0 -0
- package/build/{runtime-chunk-GJ4SIUSN.js → runtime-chunk-Y5R3KJKE.js} +1 -1
- package/build/runtime-chunk-Y5R3KJKE.js.br +0 -0
- package/build/runtime-chunk-Y5R3KJKE.js.gz +0 -0
- package/build/{runtime-chunk-YAQ5OUSE.js → runtime-chunk-YV5RWBNH.js} +1 -1
- package/build/runtime-chunk-YV5RWBNH.js.br +0 -0
- package/build/runtime-chunk-YV5RWBNH.js.gz +0 -0
- package/build/{runtime-chunk-77TCMGS6.js → runtime-chunk-ZYGHETOO.js} +1 -1
- package/build/runtime-chunk-ZYGHETOO.js.br +0 -0
- package/build/runtime-chunk-ZYGHETOO.js.gz +0 -0
- package/build/{runtime-classicRuntime-HF6JGD42.js → runtime-classicRuntime-AQCKPN52.js} +1 -1
- package/build/runtime-classicRuntime-AQCKPN52.js.br +0 -0
- package/build/runtime-classicRuntime-AQCKPN52.js.gz +0 -0
- package/build/runtime-cloners-KHJXRYCK.js +1 -0
- package/build/runtime-cloners-KHJXRYCK.js.br +0 -0
- package/build/runtime-cloners-KHJXRYCK.js.gz +0 -0
- package/build/{runtime-components-BZG3HUWK.js → runtime-components-MUO6LBVN.js} +1 -1
- package/build/runtime-components-MUO6LBVN.js.br +0 -0
- package/build/runtime-components-MUO6LBVN.js.gz +0 -0
- package/build/runtime-conditional-3OCYMAD5.js +1 -0
- package/build/runtime-conditional-3OCYMAD5.js.br +0 -0
- package/build/runtime-conditional-3OCYMAD5.js.gz +0 -0
- package/build/runtime-createDestroy-GTGYQDWL.js +1 -0
- package/build/runtime-createDestroy-GTGYQDWL.js.br +0 -0
- package/build/runtime-createDestroy-GTGYQDWL.js.gz +0 -0
- package/build/{runtime-dragDrop-P223F7A6.js → runtime-dragDrop-MMHJVOHZ.js} +1 -1
- package/build/runtime-dragDrop-MMHJVOHZ.js.br +0 -0
- package/build/runtime-dragDrop-MMHJVOHZ.js.gz +0 -0
- package/build/{runtime-gameControls-W6TFYJSZ.js → runtime-gameControls-OQOMZRDF.js} +1 -1
- package/build/runtime-gameControls-OQOMZRDF.js.br +0 -0
- package/build/runtime-gameControls-OQOMZRDF.js.gz +0 -0
- package/build/runtime-hair-4LR5XTGB.js +1 -0
- package/build/runtime-hair-4LR5XTGB.js.br +3 -0
- package/build/runtime-hair-4LR5XTGB.js.gz +0 -0
- package/build/{runtime-mergeStaticGeometries-E7H7BAQP.js → runtime-mergeStaticGeometries-AV7WMLT3.js} +1 -1
- package/build/runtime-mergeStaticGeometries-AV7WMLT3.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-AV7WMLT3.js.gz +0 -0
- package/build/{runtime-miscActions-3N2L2JO5.js → runtime-miscActions-3EA37NQ5.js} +1 -1
- package/build/runtime-miscActions-3EA37NQ5.js.br +0 -0
- package/build/runtime-miscActions-3EA37NQ5.js.gz +0 -0
- package/build/{runtime-mouseHover-VHSSPZCA.js → runtime-mouseHover-HCT3WZKC.js} +1 -1
- package/build/runtime-mouseHover-HCT3WZKC.js.br +0 -0
- package/build/runtime-mouseHover-HCT3WZKC.js.gz +0 -0
- package/build/{runtime-particles-OMJPGMKO.js → runtime-particles-6NWEC3SF.js} +1 -1
- package/build/runtime-particles-6NWEC3SF.js.br +0 -0
- package/build/runtime-particles-6NWEC3SF.js.gz +0 -0
- package/build/{runtime-paths-EG7R5LJG.js → runtime-paths-UUUWQPQS.js} +1 -1
- package/build/runtime-paths-UUUWQPQS.js.br +0 -0
- package/build/runtime-paths-UUUWQPQS.js.gz +0 -0
- package/build/{runtime-resize-F4VBNDBX.js → runtime-resize-LB7UOY4X.js} +1 -1
- package/build/runtime-resize-LB7UOY4X.js.br +0 -0
- package/build/runtime-resize-LB7UOY4X.js.gz +0 -0
- package/build/{runtime-sceneTransition-K7CREMJ2.js → runtime-sceneTransition-FFKFTM7K.js} +1 -1
- package/build/runtime-sceneTransition-FFKFTM7K.js.br +0 -0
- package/build/runtime-sceneTransition-FFKFTM7K.js.gz +0 -0
- package/build/{runtime-scroll-IW2U762E.js → runtime-scroll-NW4S44WQ.js} +1 -1
- package/build/runtime-scroll-NW4S44WQ.js.br +0 -0
- package/build/runtime-scroll-NW4S44WQ.js.gz +0 -0
- package/build/runtime-shapeBlends-CAHV35ZN.js +1 -0
- package/build/runtime-shapeBlends-CAHV35ZN.js.br +0 -0
- package/build/runtime-shapeBlends-CAHV35ZN.js.gz +0 -0
- package/build/{runtime-text-EIMDOA2Q.js → runtime-text-GPL5LAYC.js} +1 -1
- package/build/runtime-text-GPL5LAYC.js.br +0 -0
- package/build/runtime-text-GPL5LAYC.js.gz +0 -0
- package/build/{runtime-textInputs-RKFW53PO.js → runtime-textInputs-FTIDEUTF.js} +1 -1
- package/build/runtime-textInputs-FTIDEUTF.js.br +0 -0
- package/build/runtime-textInputs-FTIDEUTF.js.gz +0 -0
- package/build/{runtime-timeline-OT6L7TMX.js → runtime-timeline-5OJFL2TW.js} +1 -1
- package/build/runtime-timeline-5OJFL2TW.js.br +0 -0
- package/build/runtime-timeline-5OJFL2TW.js.gz +0 -0
- package/build/{runtime-tracking-XFEB36TB.js → runtime-tracking-YCHKI2BN.js} +1 -1
- package/build/runtime-tracking-YCHKI2BN.js.br +0 -0
- package/build/runtime-tracking-YCHKI2BN.js.gz +0 -0
- package/build/runtime-transitions-BXIGJN76.js +1 -0
- package/build/runtime-transitions-BXIGJN76.js.br +0 -0
- package/build/runtime-transitions-BXIGJN76.js.gz +0 -0
- package/build/{runtime-ui2d-SM2GYYXL.js → runtime-ui2d-L3WS4V5Y.js} +1 -1
- package/build/runtime-ui2d-L3WS4V5Y.js.br +0 -0
- package/build/runtime-ui2d-L3WS4V5Y.js.gz +0 -0
- package/build/{runtime-variables-IRTA2G43.js → runtime-variables-QPWCA6SV.js} +1 -1
- package/build/runtime-variables-QPWCA6SV.js.br +0 -0
- package/build/runtime-variables-QPWCA6SV.js.gz +0 -0
- package/build/{runtime-vectorShapes-H7ZJ4ST2.js → runtime-vectorShapes-KUDSNZXR.js} +1 -1
- package/build/runtime-vectorShapes-KUDSNZXR.js.br +0 -0
- package/build/runtime-vectorShapes-KUDSNZXR.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-YFAQHL27.js → runtime-webgpu-EWCWGNT6.js} +1 -1
- package/build/runtime-webgpu-EWCWGNT6.js.br +0 -0
- package/build/runtime-webgpu-EWCWGNT6.js.gz +0 -0
- package/build/runtime.cjs +320 -320
- 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 +0 -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 +0 -1
- 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-26SZFQP3.js.br +0 -0
- package/build/runtime-chunk-26SZFQP3.js.gz +0 -0
- package/build/runtime-chunk-2CHZO2W5.js.gz +0 -0
- package/build/runtime-chunk-3OIL3Q24.js.br +0 -0
- package/build/runtime-chunk-3OIL3Q24.js.gz +0 -0
- package/build/runtime-chunk-77TCMGS6.js.br +0 -0
- package/build/runtime-chunk-77TCMGS6.js.gz +0 -0
- package/build/runtime-chunk-ALSA2W5S.js.br +0 -0
- package/build/runtime-chunk-ALSA2W5S.js.gz +0 -0
- package/build/runtime-chunk-DZH2WGOA.js.br +0 -0
- package/build/runtime-chunk-DZH2WGOA.js.gz +0 -0
- package/build/runtime-chunk-FFP72OEJ.js.br +0 -0
- package/build/runtime-chunk-FFP72OEJ.js.gz +0 -0
- package/build/runtime-chunk-G4LZAKF6.js.br +0 -0
- package/build/runtime-chunk-G4LZAKF6.js.gz +0 -0
- package/build/runtime-chunk-GJ4SIUSN.js.br +0 -0
- package/build/runtime-chunk-GJ4SIUSN.js.gz +0 -0
- package/build/runtime-chunk-GZGT4PYG.js.br +0 -0
- package/build/runtime-chunk-GZGT4PYG.js.gz +0 -0
- package/build/runtime-chunk-HPN5XNUK.js.br +0 -0
- package/build/runtime-chunk-HPN5XNUK.js.gz +0 -0
- package/build/runtime-chunk-LOW6EBCZ.js.br +0 -0
- package/build/runtime-chunk-LOW6EBCZ.js.gz +0 -0
- package/build/runtime-chunk-MGEVP5II.js.br +0 -0
- package/build/runtime-chunk-MGEVP5II.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-ORWDYZND.js.br +0 -0
- package/build/runtime-chunk-ORWDYZND.js.gz +0 -0
- package/build/runtime-chunk-P4O4NCVX.js.br +0 -0
- package/build/runtime-chunk-P4O4NCVX.js.gz +0 -0
- package/build/runtime-chunk-QLM3QIP6.js.br +0 -0
- package/build/runtime-chunk-QLM3QIP6.js.gz +0 -0
- package/build/runtime-chunk-RTMFL6Q4.js.br +0 -0
- package/build/runtime-chunk-RTMFL6Q4.js.gz +0 -0
- package/build/runtime-chunk-SEHDL2ZM.js.br +0 -0
- package/build/runtime-chunk-SEHDL2ZM.js.gz +0 -0
- package/build/runtime-chunk-VKNEB4X7.js.br +0 -0
- package/build/runtime-chunk-VKNEB4X7.js.gz +0 -0
- package/build/runtime-chunk-VXY47OT7.js.br +0 -0
- package/build/runtime-chunk-VXY47OT7.js.gz +0 -0
- package/build/runtime-chunk-XFZDG6DN.js.gz +0 -0
- package/build/runtime-chunk-YAQ5OUSE.js.br +0 -0
- package/build/runtime-chunk-YAQ5OUSE.js.gz +0 -0
- package/build/runtime-chunk-YHT6JEQZ.js.br +0 -0
- package/build/runtime-chunk-YHT6JEQZ.js.gz +0 -0
- package/build/runtime-chunk-YLMIAIZH.js.br +0 -0
- package/build/runtime-chunk-YLMIAIZH.js.gz +0 -0
- package/build/runtime-chunk-ZCXPOZ42.js.br +0 -0
- package/build/runtime-chunk-ZCXPOZ42.js.gz +0 -0
- package/build/runtime-classicRuntime-HF6JGD42.js.br +0 -0
- package/build/runtime-classicRuntime-HF6JGD42.js.gz +0 -0
- package/build/runtime-cloners-ZX2OB4LS.js +0 -1
- package/build/runtime-cloners-ZX2OB4LS.js.br +0 -0
- package/build/runtime-cloners-ZX2OB4LS.js.gz +0 -0
- package/build/runtime-components-BZG3HUWK.js.br +0 -0
- package/build/runtime-components-BZG3HUWK.js.gz +0 -0
- package/build/runtime-conditional-P3ULJSG2.js +0 -1
- package/build/runtime-conditional-P3ULJSG2.js.br +0 -0
- package/build/runtime-conditional-P3ULJSG2.js.gz +0 -0
- package/build/runtime-createDestroy-VXBWFVTS.js +0 -1
- package/build/runtime-createDestroy-VXBWFVTS.js.br +0 -0
- package/build/runtime-createDestroy-VXBWFVTS.js.gz +0 -0
- package/build/runtime-dragDrop-P223F7A6.js.br +0 -0
- package/build/runtime-dragDrop-P223F7A6.js.gz +0 -0
- package/build/runtime-gameControls-W6TFYJSZ.js.br +0 -0
- package/build/runtime-gameControls-W6TFYJSZ.js.gz +0 -0
- package/build/runtime-hair-G5CXUVFF.js +0 -1
- package/build/runtime-hair-G5CXUVFF.js.br +0 -1
- package/build/runtime-hair-G5CXUVFF.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-E7H7BAQP.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-E7H7BAQP.js.gz +0 -0
- package/build/runtime-miscActions-3N2L2JO5.js.br +0 -0
- package/build/runtime-miscActions-3N2L2JO5.js.gz +0 -0
- package/build/runtime-mouseHover-VHSSPZCA.js.br +0 -0
- package/build/runtime-mouseHover-VHSSPZCA.js.gz +0 -0
- package/build/runtime-particles-OMJPGMKO.js.br +0 -0
- package/build/runtime-particles-OMJPGMKO.js.gz +0 -0
- package/build/runtime-paths-EG7R5LJG.js.br +0 -0
- package/build/runtime-paths-EG7R5LJG.js.gz +0 -0
- package/build/runtime-resize-F4VBNDBX.js.br +0 -0
- package/build/runtime-resize-F4VBNDBX.js.gz +0 -0
- package/build/runtime-sceneTransition-K7CREMJ2.js.br +0 -0
- package/build/runtime-sceneTransition-K7CREMJ2.js.gz +0 -0
- package/build/runtime-scroll-IW2U762E.js.br +0 -0
- package/build/runtime-scroll-IW2U762E.js.gz +0 -0
- package/build/runtime-shapeBlends-22EDWNRF.js +0 -1
- package/build/runtime-shapeBlends-22EDWNRF.js.br +0 -2
- package/build/runtime-shapeBlends-22EDWNRF.js.gz +0 -0
- package/build/runtime-text-EIMDOA2Q.js.br +0 -0
- package/build/runtime-text-EIMDOA2Q.js.gz +0 -0
- package/build/runtime-textInputs-RKFW53PO.js.br +0 -0
- package/build/runtime-textInputs-RKFW53PO.js.gz +0 -0
- package/build/runtime-timeline-OT6L7TMX.js.br +0 -0
- package/build/runtime-timeline-OT6L7TMX.js.gz +0 -0
- package/build/runtime-tracking-XFEB36TB.js.br +0 -0
- package/build/runtime-tracking-XFEB36TB.js.gz +0 -0
- package/build/runtime-transitions-NAGXJIZB.js +0 -1
- package/build/runtime-transitions-NAGXJIZB.js.br +0 -0
- package/build/runtime-transitions-NAGXJIZB.js.gz +0 -0
- package/build/runtime-ui2d-SM2GYYXL.js.br +0 -0
- package/build/runtime-ui2d-SM2GYYXL.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-H7ZJ4ST2.js.br +0 -0
- package/build/runtime-vectorShapes-H7ZJ4ST2.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-YFAQHL27.js.br +0 -0
- package/build/runtime-webgpu-YFAQHL27.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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{c as i}from"./runtime-chunk-4YV3EXSU.js";import{f as a}from"./runtime-chunk-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.shouldReinit()||(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.shouldReinit()||(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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{a as r}from"./runtime-chunk-4YV3EXSU.js";import{b as i,e as n,f as o}from"./runtime-chunk-M6FFVLT6.js";import{a}from"./runtime-chunk-RTLL6WIB.js";import"./runtime-chunk-EFBUAWKV.js";import{a as h}from"./runtime-chunk-TZCHGFVF.js";import{Fa as c,Ga as d,n as u}from"./runtime-chunk-K3UQCG3P.js";import"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var l=class extends t{constructor(e,t){super(e),this.eventManager=t,this.userAPIs={},this.events=[],this.onSuccess=({userAPIId:e})=>{this.events.forEach(t=>{t.data.userAPIId===e&&t.dispatchSuccess()})},this.onError=({userAPIId:e})=>{this.events.forEach(t=>{t.data.userAPIId===e&&t.dispatchError()})},this.userAPIs=e.sharedAssets.getUserAPIs()}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"API"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new p(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),Object.entries(this.userAPIs).forEach(([e,t])=>{t.on("success",this.onSuccess),t.on("error",this.onError),t.autostart&&t.callUserAPI(this.eventContext.sharedAssets)})}disconnect(){Object.entries(this.userAPIs).forEach(([e,t])=>{t.off("success",this.onSuccess),t.off("error",this.onError)})}},p=class{constructor(e,t,s,r,i,n){this.id=e,this.data=t,this.object=s,this.successActions=o(t,t.successActions,r,i,n,s),this.errorActions=o(t,t.errorActions,r,i,n,s)}dispatchSuccess(){this.dispatchActions(this.successActions)}dispatchError(){this.dispatchActions(this.errorActions)}dispatchActions(e){e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{!e.shouldReinit()||(e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init())}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}},f=class extends t{constructor(e,t){super(e),this.eventManager=t,this.userWebhooks={},this.events=[],this.onMessage=({userWebhookId:e})=>{this.events.forEach(t=>{t.data.userWebhookId===e&&t.dispatch()})},this.userWebhooks=e.sharedAssets.getUserWebhooks()}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"WEBHOOK"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new m(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),Object.entries(this.userWebhooks).forEach(([e,t])=>{t.connect(),t.on("message",this.onMessage)})}disconnect(){Object.entries(this.userWebhooks).forEach(([e,t])=>{t.off("message",this.onMessage),t.disconnect()})}},m=class{constructor(e,t,s,r,i,n){this.id=e,this.data=t,this.object=s,this.actions=o(t,t.actions,r,i,n,s)}dispatch(){let e=this.actions;e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{!e.shouldReinit()||(e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init())}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}},v=class{constructor(e,t,s,r){this.data=e,this.page=t,this.shared=s,this.condition=r}dispatch(){if(!1===n(this.shared,this.condition))return!1;if(this.data.userAPIId){let e=this.shared.getUserAPI(this.data.userAPIId);e&&"callUserAPI"in e&&e.callUserAPI(this.shared)}}dispose(){}},E=class{constructor(t,s,r){this.id=t,this.userAPI=s,this.result=void 0,this.error="null",this.isPrefetched=!1,this.isLoading=!1,this.isLoaded=!1,this.prefetchPromise=new Promise(e=>e()),this.emitter=e(),this._innerCallUserAPI=async e=>{this.emitter.emit("start",{userAPIId:this.id}),this.isLoading=!0,this.isLoading=!1;try{this.result=await async function(e,t,s=new AbortController){let r,i,n=e.url,o=e.proxy?.enabled??!1;if("OpenAI"===e.integration?.type){let s=b(""===e.integration.prompt?[]:JSON.parse(e.integration.prompt),t),r=""===e.integration.behavior?[]:b(JSON.parse(e.integration.behavior),t);i=`{\n\t\t"model": "${e.integration.model}",\n\t\t"messages": [${e.integration.useBehavior?`\n\t\t{\n\t\t\t"role": "system",\n\t\t\t"content": "${r}"\n\t\t},`:""}\n\t\t{\n\t\t\t"role": "user",\n\t\t\t"content": "${s}"\n\t\t}\n\t\t]\n\t}`}if(o){let s;n=`https://apis.spline.design/file/${e.proxy.fileId}/external-api/request?uuidexternalapi=${e.proxy.proxyId}`,void 0!==i?s=i:"POST"===e.method&&e.body&&(s=b(JSON.parse(e.body),t)),void 0!==s&&(n+=`&data=${encodeURIComponent(s.replace(/(\r\n|\n|\r|\t)/gm,""))}`)}else"OpenAI"===e.integration?.type?r=i:"POST"===e.method&&e.body&&(r=b(JSON.parse(e.body),t));let a=await fetch(n,{method:o?"GET":e.method,headers:o?void 0:g(e),signal:s.signal,body:r});if(!a.ok)throw new Error("status:"+a.status+"_:_"+a.statusText);if("OpenAI"===e.integration?.type){let e=await a.json();return o&&(e=e.response),{content:e.choices[0].message.content}}{let e=await a.json();return o&&(e=e.response),e}}(this.userAPI,e),this.error="null",this.emitter.emit("success",{userAPIId:this.id})}catch(e){let t=e.message?.split("_:_")?.[0]?.replace("status:","")??"null";this.error=t,this.result=null,this.emitter.emit("error",{userAPIId:this.id})}this.isLoading=!1,this.isPrefetched=!0,this.isLoaded=!0},this._debouncedCallUserAPI=this._makeDebouncedCallUserAPI(),this._debouncedPrefetch=a(this.prefetch,1e3,{trailing:!0}),"OpenAI"===s?.integration?.type?this.result={content:""}:"GET"===s.method&&""!==s.url&&(this.prefetchPromise=this.prefetch(r))}_makeDebouncedCallUserAPI(){return void 0!==this.userAPI.debounce&&this.userAPI.debounce>0?a(this._innerCallUserAPI,this.userAPI.debounce,{leading:!0,trailing:!0}):this._innerCallUserAPI}async prefetch(e){await this.callUserAPI(e)}async callUserAPI(e){await this._debouncedCallUserAPI(e)}update(e,t,s=!0){this.userAPI=e,this._debouncedCallUserAPI=this._makeDebouncedCallUserAPI(),""!==this.userAPI.url&&"GET"===this.userAPI.method&&s&&this._debouncedPrefetch(t)}retrieveValue(e){if(this.result)try{return u.zoom(this.result,e)}catch(e){console.error(e)}}retrieveZoomedKeyValues(e){if(this.result){let s=e&&e.length?u.zoom(this.result,e):this.result;if("object"==typeof(t=s)&&null!==t)return Object.entries(s);if(function(e){return Array.isArray(e)}(s))return s.map((e,t)=>[t.toString(),e]);throw function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null===e}(s)?new Error("This path points to a value, use retrieveValue() instead. "+e?.join(".")):new Error("Path error"+e?.join("."))}var t}dispose(){}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}get autostart(){return this.userAPI.autoStart}};function g(e){let t=new Headers;return e.headers.forEach(e=>{""!==e.data.key&&t.append(e.data.key,e.data.value)}),t}var A=(e,t)=>{if("string"==typeof e){let s=t.getVariable(e);if(s)return A(s,t)}return d.isBoolean(e)?d.getDisplayedValue(e).toLowerCase():d.getDisplayedValue(e)},b=(e,t)=>e.map((e,s)=>{if("text"in e)return e.text;if("type"in e){if("paragraph"===e.type)return(s>0?"\n":"")+b(e.children,t);if("variable"===e.type){let s=t.getVariable(e.variableId);if(void 0!==s)return A(s,t)}}return""}).join(""),I=1e3,P=512*I,y=class{constructor(t,s){this.id=t,this.userWebhook=s,this.result=void 0,this._connected=!1,this.emitter=e(),this.reconnectWaitFor=I,this._onError=e=>{this.eventSource?.removeEventListener("message",this._onMessage),this.eventSource?.removeEventListener("error",this._onError),this.eventSource?.removeEventListener("open",this._onConnected),this._scheduleReconnect()},this._onConnected=e=>{clearTimeout(this.scheduledReconnectHandle),this.reconnectWaitFor=I,this._connected=!0},this._onDisconnected=()=>{clearTimeout(this.scheduledReconnectHandle),this.reconnectWaitFor=I,this._connected=!1},this._onMessage=e=>{let t,s=e.data;try{t=JSON.parse(s)}catch(e){console.error("Error parsing webhook message",e)}if(t){let e=!1;this.userWebhook.parametersSchemas.forEach(({data:s})=>{void 0!==t[s.name]&&function(e,t){let s=typeof e;return!!(("string"===t||"number"===t)&&s===t||"boolean"===t&&("true"===e||"false"===e||!0===e||!1===e)||"image"===t&&"string"===s&&e.startsWith("http"))}(t[s.name],s.type)&&(void 0===this.result&&(this.result={}),this.result[s.name]=t[s.name],e=!0)}),e&&this.emitter.emit("message",{userWebhookId:this.id})}}}connect(){clearTimeout(this.scheduledReconnectHandle),this.userWebhook.url&&(this.eventSource=new EventSource("https://hooks.spline.design/events?hashFile="+this.userWebhook.url),this.eventSource.addEventListener("message",this._onMessage),this.eventSource.addEventListener("error",this._onError),this.eventSource.addEventListener("open",this._onConnected))}disconnect(){this.eventSource?.removeEventListener("message",this._onMessage),this.eventSource?.removeEventListener("error",this._onError),this.eventSource?.removeEventListener("open",this._onConnected),this.eventSource?.close(),this._onDisconnected(),clearTimeout(this.scheduledReconnectHandle)}_scheduleReconnect(){this.reconnectWaitFor*=2,this.reconnectWaitFor>P&&(this.reconnectWaitFor=P),clearTimeout(this.scheduledReconnectHandle),this.scheduledReconnectHandle=setTimeout(()=>{this.scheduledReconnectHandle=void 0,this.connect()},this.reconnectWaitFor)}update(e){this.userWebhook=e}dispose(){this._connected&&this.disconnect()}get connected(){return this._connected}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}getParametersKeys(){return this.userWebhook.parametersSchemas.map(e=>e.data.name)}getParameterValue(e){if(this.getParametersKeys().includes(e)){if(this.result)return this.result?.[e];for(let t of this.userWebhook.parametersSchemas)if(t.data.name===e)return c.defaultParameterValueByType(t.data.type)}}};s("API",({eventContext:e,eventManager:t})=>new l(e,t)),s("WEBHOOK",({eventContext:e,eventManager:t})=>new f(e,t)),i("UserAPI",({data:e,page:t,shared:s,actionCondition:r})=>new v(e,t,s,r)),r({createUserAPI:(e,t,s)=>new E(e,t,s),createUserWebhook:(e,t)=>new y(e,t)}),h("api-services");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./runtime-chunk-NSD7DU3P.js";import{b as i,e as a}from"./runtime-chunk-M6FFVLT6.js";import"./runtime-chunk-
|
|
1
|
+
import{c as t}from"./runtime-chunk-NSD7DU3P.js";import{b as i,e as a}from"./runtime-chunk-M6FFVLT6.js";import"./runtime-chunk-EFBUAWKV.js";import{a as s}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-K3UQCG3P.js";import"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var e=new Map,o=new Map,d=class{constructor(i,a,s,d){this.data=a,this.isPlayAudioAction=!0;let{audio:n,volume:r,delay:h,loop:u}=a;if(!n)throw new Error("Missing property");try{let i="string"==typeof n?d.getAudio(n).src:n.data;this.audioPlayer=new t({src:i,volume:r,delay:h,loop:u})}catch{console.warn(`Could not create an audio player for this object: "${s.name}" and this audio: "${n}"`)}o.has(s.uuid)?o.get(s.uuid).push(this):o.set(s.uuid,[this]),e.set(i,this)}playByToggle(){"stop"===this.data.toggle?"playing"===this.audioPlayer?.status?this.audioPlayer.stop():(this.audioPlayer?.stop(),this.audioPlayer?.play()):"pause"===this.data.toggle?"playing"===this.audioPlayer?.status?this.audioPlayer?.pause():this.audioPlayer?.play():(this.audioPlayer?.stop(),this.audioPlayer?.play())}dispose(){this.audioPlayer?.stop()}},n=class{constructor(t){this.data=t,this.isPauseAudioAction=!0}dispatch(){this.data.playAudio?this.pauseAudio(this.data.playAudio):this.data.object?this.pauseAllAudiosFromObject(this.data.object):this.pauseAllAudios()}pauseAudio(t){let i=e.get(t);!i||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.audioPlayer?.[this.data.interaction](),this.disposeDelay()},this.data.delay)):i.audioPlayer?.[this.data.interaction]())}pauseAllAudiosFromObject(t){let i=o.get(t);!i?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.forEach(t=>t.audioPlayer?.[this.data.interaction]()),this.disposeDelay()},this.data.delay)):i.forEach(t=>t.audioPlayer?.[this.data.interaction]()))}pauseAllAudios(){let t=[...o.values()];!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(t=>{t.forEach(t=>{t.audioPlayer?.[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):t.forEach(t=>{t.forEach(t=>{t.audioPlayer?.[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},r=class{constructor(t,i,a,s,e){if(this.data=i,this.shared=s,this.condition=e,"play"===i.interaction)this.interaction=new d(t,i,a,s);else{if("pause"!==i.interaction&&"stop"!==i.interaction)throw new Error("Missing property");this.interaction=new n(i)}}dispatchBasic(){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.playByToggle():this.interaction.dispatch()}dispatchConditional(){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.audioPlayer?.play():this.interaction.dispatch()}dispatchGameControl(t){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d&&("start"===t?this.interaction.audioPlayer?.play():this.interaction.audioPlayer?.stop())}dispose(){this.interaction.dispose()}};i("Audio",({id:t,data:i,object:a,shared:s,actionCondition:e})=>new r(t,i,a,s,e)),s("audio");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./runtime-chunk-
|
|
1
|
+
import{a as t}from"./runtime-chunk-DK76Z2FM.js";import{d as e}from"./runtime-chunk-Y5R3KJKE.js";import{Sc as s}from"./runtime-chunk-BVVSZMXD.js";var r=class extends(e(s,t)){constructor(t,e){super(),this.super_Entity(t,e),this.objectHelper.update(),"Empty"===this.data.type&&(this.objectHelper.visible=!1)}updateState(t,e){this.updateState_Entity(t,e),"buffer"in t&&1===Object.keys(t).length&&e.scene.reloadSplats()}};export{r as a};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,ia as t}from"./runtime-chunk-
|
|
1
|
+
import{h as e,ia as t}from"./runtime-chunk-QPKHZ6YN.js";import{Cc as r,Fc as a,Zc as o,bd as n}from"./runtime-chunk-BVVSZMXD.js";function i(r){if(Array.isArray(r.material)){for(let e of r.material)if(0===e.getLayersOfType("outline").length)return}else if(!e(r.material)||0===r.material.getLayersOfType("outline").length)return;r instanceof t&&r.is2DAndNoDepth?function(e){if(e.geometry.attributes.extrudeNormals||!e.geometry.attributes.position)return;let t=e.geometry.attributes.position.array,r=new Float32Array(t.length),o=new a;for(let e=0;e<t.length;e+=3)o.set(t[e],t[e+1],t[e+2]).normalize(),r[e]=o.x,r[e+1]=o.y,r[e+2]=o.z;e.geometry.setAttribute("extrudeNormal",new n(r,3))}(r):function(e){if(e.geometry.attributes.extrudeNormal||!e.geometry.attributes.position||!e.geometry.attributes.normal)return;let t=new Map,r=e.geometry.attributes,o=r.position.array,i=r.normal.array,l=new Float32Array(o.length);for(let e=0;e<o.length;e+=3){let r=`${o[e]}_${o[e+1]}_${o[e+2]}`,n=new a(i[e],i[e+1],i[e+2]);t.has(r)?t.get(r)?.normals.push(n):t.set(r,{normals:[n],result:new a})}t.forEach((e,t)=>{for(let t of e.normals)e.result.add(t);e.result.divideScalar(e.normals.length)});for(let e=0;e<o.length;e+=3){let r=`${o[e]}_${o[e+1]}_${o[e+2]}`,a=t.get(r)?.result;a&&(l[e]=a.x,l[e+1]=a.y,l[e+2]=a.z)}e.geometry.setAttribute("extrudeNormal",new n(l,3))}(r)}function l(e){return Math.min(2047,Math.max(1,Math.round(2048*e)))/2048}function s(e){if(!e.geometry.attributes.position)return;let t=e.geometry.attributes,a=t.position.array,n=t.randomColor;if(void 0!==n&&3*n.count===a.length)return;let i=new Float32Array(a.length),s=parseInt(e.uuid.replace(/\D/g,"")),u=[l(r.seededRandom(s)),l(r.seededRandom(s+1e4)),l(r.seededRandom(s+2e4))];for(let e=0;e<a.length;e++)i[e]=u[e%3];e.geometry.setAttribute("randomColor",new o(i,3))}export{i as a,s as b};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ia as t}from"./runtime-chunk-
|
|
1
|
+
import{ia as t}from"./runtime-chunk-QPKHZ6YN.js";import{Fc as e,Oc as r,jd as i}from"./runtime-chunk-BVVSZMXD.js";var s=new e,n=new r,a=new i,h=class extends t{constructor(t,e,r){super(t,e,r),this.data=e}get textGeometry(){return this.geometry}get charWidths(){return this.textGeometry.charWidths}get charCoords(){return this.textGeometry.charCoords}get wrappedText(){return this.textGeometry.wrappedText}get font(){return this.textGeometry.font}get initialOffsetY(){let t=this.dataPatched;return this.font?.getLineInitialOffsetY(this.lineHeight,this.wrappedText.length,"number"==typeof t.geometry.height?t.geometry.height:1,this.fontScale,t.geometry.verticalAlign)??0}get fontScale(){let t=this.dataPatched;return this.font?t.geometry.fontSize/this.font.unitsPerEm:1}get AD(){return Math.abs(this.ascender-this.descender)}get ascender(){return(this.font?.ascender??1)*this.fontScale}get descender(){return(this.font?.descender??1)*this.fontScale}get lineHeight(){let t=this.dataPatched;return t.geometry.fontSize*t.geometry.lineHeight}raycast(t,e){let{matrixWorld:r}=this;if(!isNaN(t.ray.origin.x)&&0!==this.scale.x&&0!==this.scale.y&&0!==this.scale.z&&(n.copy(r).invert(),a.copy(t.ray).applyMatrix4(n),a.intersectBox(this.singleBBox,s))){let i=s.applyMatrix4(r),n=t.ray.origin.distanceTo(i);e.push({distance:n,point:i.clone(),object:this})}}};export{h as a};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as t}from"./runtime-chunk-RTLL6WIB.js";import{h as e}from"./runtime-chunk-2PT2WH66.js";import{c as i}from"./runtime-chunk-TZCHGFVF.js";import{Aa as r,Ba as s,C as a,Da as n,J as o,i as l,j as h,k as p,n as d}from"./runtime-chunk-K3UQCG3P.js";import{$c as c,Cc as u,Ec as m,Fc as f,Kd as y,Oc as g,Pc as v,Pd as x,Rc as S,Re as w,Xc as M,bd as b,cd as B,dd as P,kd as E,ld as A}from"./runtime-chunk-BVVSZMXD.js";var C={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function D(t,e){let i=[];if(e.length!==t.length)return null;{let r=0;for(;r<t.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}function O(t,e){let i=[];if(!(e.length<=t.length))return null;{let r=0;for(;r<e.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}var V=new f,W=new f,_=new g,R=[new f(-1,1,1),new f(-1,-1,1),new f(1,-1,1),new f(1,1,1),new f(-1,1,-1),new f(-1,-1,-1),new f(1,-1,-1),new f(1,1,-1)],T=[[0,3],[1,2],[5,6],[4,7],[0,1],[3,2],[7,6],[4,5],[0,4],[1,5],[2,6],[3,7]],U=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],L=(t,e,i)=>{t.updateEntityBoxSize(V,W),_.copy(e).multiply(t.matrixWorld),0===W.x&&0===W.y&&0===W.z?i.push(new f(V.x,V.y,V.z).applyMatrix4(_)):R.forEach(t=>{i.push(t.clone().multiply(W).add(V).applyMatrix4(_))})},z=class extends M{constructor(){super(...arguments),this.matrix=new g,this.vertices=[],this.faces=[],this.edges=[],this.centerEdges=[]}copy(t){return super.copy(t),this.matrix.copy(t.matrix),this.vertices=t.vertices.map(t=>t.clone()),this.faces=t.faces.map(t=>t.clone()),this.edges=t.edges.map(t=>t.clone()),this.centerEdges=t.centerEdges.map(t=>t.clone()),this}setFromObjectSize(t,e=!1){t.updateWorldMatrix(!1,e),this.makeEmpty(),this.matrix.copy(t.matrixWorld);let i=(new g).copy(t.matrixWorld).invert();return this.expandByObjectSize(t,i,e)}expandByObjectSize(t,e,i=!1){let r=[];if(!0===i){let i=[];t.traverseEntity(t=>{if(t.visible||t.cloner&&t.data.visible){if(!("geometry"in t))return _.copy(e).multiply(t.matrixWorld),void i.push((new f).applyMatrix4(_));L(t,e,r)}}),0===r.length&&r.push(...i)}else L(t,e,r);return this.setFromPoints(r)}getCenter(t){return(t=super.getCenter(t)).applyMatrix4(this.matrix),t}getPositionToCenter(t){return(t=super.getCenter(t)).applyMatrix4(_.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(W).multiplyScalar(.5),this.getCenter(V),_.copy(this.matrix).setPosition(V),this.vertices=R.map(t=>t.clone().multiply(W).applyMatrix4(_))}computeEdges(){this.vertices.length>0&&this.computeVertices(),this.edges=T.map(([t,e])=>new w(this.vertices[t],this.vertices[e])),this.centerEdges=this.edges.map(t=>t.getCenter(new f))}computeFaces(){this.vertices.length>0&&this.computeVertices(),this.faces=U.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},I=new f,F=new f,N=new f,j=new f,k=new f,q=new f,G=new g,H=1e-12,X=.01;function Z(t){let e=t.elements;I.set(e[0],e[1],e[2]),F.set(e[4],e[5],e[6]),N.set(e[8],e[9],e[10])}function K(){let t=Math.max(I.lengthSq(),F.lengthSq(),N.lengthSq());I.lengthSq()>H*t?j.copy(I).normalize():j.set(1,0,0),k.crossVectors(N,j),k.lengthSq()<=H*t&&(k.copy(F).addScaledVector(j,-F.dot(j)),k.lengthSq()<=H*t&&function(t,e){t.set(1,0,0).cross(e),t.lengthSq()<=H&&t.set(0,1,0).cross(e),t.normalize()}(k,j)),k.normalize(),q.crossVectors(j,k)}function Q(t){return Z(t),K(),G.makeBasis(j,k,q)}var $,J=new g;($||($={})).is=function(t){return t&&t.__isSPEObject};var Y=t=>class extends t{constructor(){super(...arguments),this.previousModelViewMatrix=new g,this.copyPreviousMatrix=!0,this.hiddenMatrix=new g,this.pivotMatrix=new g,this.matrixWorldRigid=new g,this.shearScale=new g,this.shearScaleInv=new g}get __isSPEObject(){return!0}getPhysicsLocalMatrix(t){return!!this.rigidBody?.isDynamic()&&(t.copy(this.matrixWorld),this.hasNonUniformScale&&t.multiply(this.shearScaleInv),this.parent&&t.premultiply(J.copy(this.parent.matrixWorld).invert()),t.premultiply(J.copy(this.hiddenMatrix).invert()),t.multiply(J.copy(this.pivotMatrix).invert()),!0)}isDescendantOf(t){t instanceof S&&(t=t.uuid);let e=this;for(;e.parent;){if(e.parent.uuid===t)return!0;e=e.parent}return!1}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.multiplyMatrices(this.hiddenMatrix,this.matrix):(this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.hiddenMatrix),this.matrixWorld.multiplyMatrices(this.matrixWorld,this.matrix)),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.multiplyMatrices(this.hiddenMatrix,this.matrix):(this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.hiddenMatrix),this.matrixWorld.multiplyMatrices(this.matrixWorld,this.matrix)),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}traverseChildren(t,e=0){for(let i of this.children)$.is(i)&&i.traverseObject(t,e+1)}traverseObject(t,e=0){if(!0!==t(this,e))for(let i of this.children)$.is(i)&&i.traverseObject(t,e+1)}updateMatrixWorldRigid(){this.hasNonUniformScale=function(t,e,i){return Z(t),K(),e.makeBasis(j,k,q),i.set(j.dot(I),j.dot(F),j.dot(N),0,k.dot(I),k.dot(F),k.dot(N),0,q.dot(I),q.dot(F),q.dot(N),0,0,0,0,1),function(){let t=I.length(),e=F.length(),i=N.length(),r=Math.max(t,e,i);if(r-t>X||r-e>X||r-i>X)return!0;let s=X*r*r;return Math.abs(I.dot(F))>s||Math.abs(I.dot(N))>s||Math.abs(F.dot(N))>s}()}(this.matrixWorld,this.matrixWorldRigid,this.shearScale),this.matrixWorldRigid.copyPosition(this.matrixWorld),this.shearScaleInv.copy(this.shearScale).invert()}attach(t,e){this.updateWorldMatrix(!0,!1);let i=(new g).copy(this.matrixWorld).invert();return null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),i.multiply(t.parent.matrixWorld)),"hiddenMatrix"in t&&t.hiddenMatrix instanceof g?t.hiddenMatrix.premultiply(i):t.applyMatrix4(i),t.updateWorldMatrix(!1,!1),this.add(t),void 0!==e&&(this.children.pop(),this.children.splice(e,0,t)),this}copy(t,e=!1){return super.copy(t,e),this.hasNonUniformScale=t.hasNonUniformScale,this}onAfterRender(t,e,i,r,s,a){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}},tt=class extends x{constructor(){super()}getPoints(t=12){let e,i=[],r=this.getCurveLengths(),s=r[r.length-1]/r.length;for(let a=0,n=this.curves;a<n.length;a++){let o=n[a],l=0===a?r[a]:r[a]-r[a-1],h=Math.ceil(t*l/s),p=o.getPoints(h);for(let t=0;t<p.length;t++){let r=p[t];e&&e.equals(r)||(i.push(r),e=r)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}},et=.001,it=new f,rt=new f,st=new f,at=new f,nt=new f,ot=new f,lt=new f,ht=new f,pt=new f;function dt(t,e,i){return it.subVectors(e,t),rt.subVectors(e,i),it.cross(rt).length()<=et}var ct=new WeakMap;function ut(t){let e=ct.get(t.points);if(void 0!==e&&e.isClosed===t.isClosed)return e.curve;let i=function(t){let e=t.points,i=[e[0]],r=[new f(...e[0].data.position)];st.copy(r[0]);for(let t=0;t<e.length-1;t++)it.fromArray(e[t].data.position),rt.fromArray(e[t+1].data.position),nt.subVectors(it,st),lt.subVectors(it,rt),nt.cross(lt).length()>et&&(i.push(e[t]),r.push((new f).copy(it)),st.copy(it));let s=e[e.length-1];i.push(s),r.push(new f(...s.data.position));let a=t.isClosed,n=i.length-(a?0:1),o=i.length,l=[],h=[];for(let t=0;t<o;t++){let e=i[t].data;l.push(new f(...e.controlPrevious.position)),h.push(new f(...e.controlNext.position))}let p=[];for(let t=0;t<n;t++){let e=t===o-1?0:t+1;p.push(dt(r[t],h[t],r[e])&&dt(r[t],l[e],r[e]))}let d=[];for(let t=0;t<o;t++){let e=i[t].data,s=r[t],n={position:s,prevDir:void 0,nextDir:void 0,controlPrevious:l[t],controlNext:h[t],tan:void 0,baseRoundness:e.roundness,removedLength:0};if(d.push(n),0===e.roundness||!a&&(0===t||t===o-1))continue;let c=a&&0==t?o-1:t-1,u=a&&t==o-1?0:t+1,m=(new f).subVectors(r[c],s).normalize(),y=(new f).subVectors(r[u],s).normalize();n.prevDir=m,n.nextDir=y;let g=p[a&&0===t?o-1:t-1],v=p[t];if(g&&v){at.addVectors(m,y).normalize();let t=st.crossVectors(at,m).length()/m.dot(at);n.tan=t,n.removedLength=e.roundness/t}}for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e];if(0!==i.removedLength||0!==r.removedLength){let t=i.position.distanceTo(r.position);i.removedLength=Math.min(i.removedLength,t/2),r.removedLength=Math.min(r.removedLength,t/2)}}let c=new Array(2*o).fill(null);for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e],s=null;if(p[t]){let t=i.position.clone(),e=r.position.clone();(0!==i.removedLength||0!==r.removedLength)&&(i.nextDir&&t.add(st.copy(i.nextDir).setLength(i.removedLength)),r.prevDir&&e.add(st.copy(r.prevDir).setLength(r.removedLength))),t.distanceTo(e)>et&&(s=new y(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(r.position)>et&&(s=new y(i.position,i.controlNext,r.controlPrevious,r.position));c[2*t+1]=s}for(let t=0;t<o;t++){let e=d[t];if(0===e.removedLength)continue;let i=e.position,r=e.prevDir.clone().multiplyScalar(e.removedLength).add(i),s=e.nextDir.clone().multiplyScalar(e.removedLength).add(i),a=e.tan*e.removedLength;at.addVectors(e.prevDir,e.nextDir).normalize(),nt.copy(r).lerp(s,.5);let n=r.distanceTo(s)/2;pt.copy(at).multiplyScalar(Math.sqrt(Math.pow(a,2)-Math.pow(n,2))).add(nt),ot.copy(at).multiplyScalar(-a).add(pt);let o=i.distanceTo(ot)/i.distanceTo(nt);lt.copy(e.prevDir).multiplyScalar(o*i.distanceTo(r)).add(i),ht.copy(lt).lerp(ot,2);let l=r.clone().lerp(lt,4/3),h=s.clone().lerp(ht,4/3);c[2*t]=new y(r,l,h,s)}let u=new tt;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return ct.set(t.points,{isClosed:t.isClosed,curve:i}),i}var mt,ft=new g,yt=new m,gt=new m,vt=new v,xt=new f,St=new f(0,1,0);(mt||(mt={})).is=function(t){return t&&t.__isEntity};var wt=t=>mt.is(t),Mt={type:"completeState",isfromEntity:!0},bt=["x","y","z"],Bt=new f,Pt=new f(1,1,1),Et=new m,At=new v,Ct=new g,Dt=c=>class extends(Y(c)){constructor(){super(...arguments),this.raycastLock=!1,this.scaleLock=!1,this.disposed=!1,this.stateSelection=null,this.destroyedInAction=!1,this.instances=[],this.prevState=null,this.currentState=null,this.currentAnimationAction=null,this.reversibleToState=null,this.transitionState={settled:!0,state:null},this.currentTransitionEvent=null,this.previousAction=null,this._singleBBox=new z,this._recursiveBBox=new z,this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0,this._needApplyPathSnapping=!0,this.attachedPaths=new Set}get __isEntity(){return!0}entityChildren(t){let e=this.children[t];if(mt.is(e))return e}entityChildrenCount(){let t=this.children.length;for(;t--;)if(mt.is(this.children[t]))return t+1;return 0}get isConcreteEntity(){return"string"==typeof this.identity}get isVirtualEntity(){return"string"!=typeof this.identity}get isInstanceRoot(){return this.isConcreteEntity&&"Instance"===this.data.type}nearestInstanceSelfOrParent(){let t=this;for(;"Instance"!==t.data.type;){let e=t.parent;if(!mt.is(e))return;t=e}return t}forInstancesRec(t){this.instances.forEach(e=>{e.disposed||t(e),e.forInstancesRec(t)})}super_Entity(t,e){"string"==typeof t&&(this.uuid=t),this.identity=t,this.data=e,this.matrixAutoUpdate=!1,this.dataPatched=this.data}changeSelectedState(t,e,i=!1){if(0!==this.data.states.length||i){for(let t of this.data.states)n.toOps(this.data,t.data).forEach(t=>{let i=h.replaceProps(t,this.data);this.dataPatched=this.data,this.updateByPatchedOp(i,this.data,e)});if(null!==t){let i=this.data.states.data(t);i&&(this.dataPatched=n.patch(this.data,i),n.toOps(this.data,i).forEach(t=>{this.updateByPatchedOp(t,this.dataPatched,e)}))}i&&this.updateTransformState(this.dataPatched,e),this.stateSelection=t,this.updatePathSnapping(this.dataPatched.pathSnapping)}}get singleBBox(){return this.singleBBoxNeedsUpdate&&(this.singleBBoxNeedsUpdate=!1,this._singleBBox.setFromObjectSize(this,!1),this._singleBBox.computeVertices(),this._singleBBox.computeEdges(),this._singleBBox.computeFaces()),this._singleBBox}get recursiveBBox(){return this.recursiveBBoxNeedsUpdate&&(this.recursiveBBoxNeedsUpdate=!1,this._recursiveBBox.setFromObjectSize(this,!0),this._recursiveBBox.computeVertices(),this._recursiveBBox.computeEdges(),this._recursiveBBox.computeFaces()),this._recursiveBBox}updateEntityBoxSize(t,e){t.setScalar(0),e.setScalar(0)}resetBBoxNeedsUpdateSelf(){this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0}resetBBoxNeedsUpdate(){this.resetBBoxNeedsUpdateSelf(),this.traverseAncestors(t=>{wt(t)&&t.resetBBoxNeedsUpdateSelf()}),this.traverseEntity(t=>{t.resetBBoxNeedsUpdateSelf()})}find(t){let e;return this.traverseEntity(i=>{i.uuid===t&&(e=i)}),e}traverseSortNextHelper(){let t=this.parent;if(t){let e=t.children,i=e.indexOf(this)+1;if(mt.is(e[i]))return e[i];if(mt.is(t))return t.traverseSortNextHelper()}}sortNext(){let t=this.children;return this.children.length>0&&mt.is(this.children[0])?t[0]:this.traverseSortNextHelper()}goUp(t){let e=this;for(;t>0&&null!==e;)e=e.parent,t-=1;return e}hasAnccestorOrSelf(t){return this===t||this.hasAnccestor(t)}hasAnccestor(t){let e=this.parent;for(;e;){if(t===e)return!0;e=e.parent}return!1}countToAccestor(t){let e=0,i=this;for(;i!==t;){if(null===i)return-1;i=i.parent,e+=1}return e}forEachEntity(t){for(let e of this.children)wt(e)&&t(e)}traverseEntityAncestors(t){this.traverseAncestors(e=>{mt.is(e)&&t(e)})}traverseConcreteEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)wt(i)&&i.isConcreteEntity&&i.traverseEntity(t,e+1)}traverseEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)wt(i)&&i.traverseEntity(t,e+1)}traverseVisibleEntity(t){t(this);for(let e of this.children)wt(e)&&e.visible&&e.traverseVisibleEntity(t)}updateMatrix(){super.updateMatrix(),this.cloner&&this.cloner.onObjUpdateMatrix(),this.dispatchEvent({type:"updateMatrix"})}updateMatrixWorld(t){super.updateMatrixWorld(t),this.dispatchEvent({type:"updateMatrixWorld"})}copy(t,e=!1){return super.copy(t,e),this.dataPatched=t.dataPatched,this.raycastLock=t.raycastLock,this.scaleLock=t.scaleLock,this.hiddenMatrix.copy(t.hiddenMatrix),this}hasEntityChild(){return this.children.some(t=>wt(t))}isAncestorOf(t){if(this.uuid===t)return!1;let e=!1;return this.traverseEntity(i=>{i.uuid===t&&(e=!0)}),e}toObjectTransformState(e=[]){this.updateWorldMatrix(!0,!1);let i={position:this.position.toArray(),rotation:[this.rotation.x*u.RAD2DEG,this.rotation.y*u.RAD2DEG,this.rotation.z*u.RAD2DEG],scale:this.scale.toArray(),hiddenMatrix:this.hiddenMatrix.toArray(),pivot:[0,0,0],pivotRotation:[0,0,0]};return t(i,e)}getTransformValues(t,e,i){return e[t].map((e,r)=>i?.shared.getVariable(e,[this.uuid,t,bt[r]])??e)}updateTransformState(t,e){let i=!1;if(t.position&&(this.position.fromArray(this.getTransformValues("position",t,e)),i=!0),t.rotation&&(Bt.fromArray(this.getTransformValues("rotation",t,e)).multiplyScalar(u.DEG2RAD),this.rotation.setFromVector3(Bt),i=!0),t.scale&&(this.scale.fromArray(this.getTransformValues("scale",t,e)),i=!0),void 0!==t.hiddenMatrix&&(i=!0,this.hiddenMatrix.fromArray(t.hiddenMatrix??a.identity)),void 0!==t.pivot||void 0!==t.pivotRotation)if(i=!0,void 0!==t.pivot&&void 0!==t.pivotRotation)this.pivotMatrix.compose(Bt.fromArray(t.pivot).negate(),Et.setFromEuler(At.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),Pt);else if(void 0!==t.pivot)this.pivotMatrix.setPosition(-t.pivot[0],-t.pivot[1],-t.pivot[2]);else if(void 0!==t.pivotRotation){let e=Bt.setFromMatrixPosition(this.pivotMatrix);Et.setFromEuler(At.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),this.pivotMatrix.compose(e,Et,Pt)}return i&&(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)})),t.position&&t.rotation&&t.scale&&void 0!==t.hiddenMatrix&&this.updateWorldMatrix(!1,!0),i}onVariableUpdate(t=!1){t?this.resetBBoxNeedsUpdate():(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)}),this.requestRender())}dispose(){this.disposed=!0,this.cloner&&(this.cloner.dispose(),this.cloner=void 0)}disposeChildrenRecursively(){for(let t of this.children)mt.is(t)&&t.disposeRecursively()}disposeRecursively(){this.dispose(),this.children.forEach(t=>{mt.is(t)&&t.disposeRecursively()})}toState(e=[]){let i={name:this.name,visible:this.visible,raycastLock:this.raycastLock,...this.toObjectTransformState(e)};return t(i,e)}updateByObjUpdateOp(t,e){void 0!==t&&this.updateByOp({type:0,props:t,path:[]},{...this.data,...t},e,!1)}updateByOp(t,e,i,a){let o=this.data;this.data=e;let h=t,c=O(t.path,["states","*"]);if(null!==c){if(0===t.type){let[e]=c;if(this?.stateSelection===e){let e={...t.props};if(delete e.name,Object.values(t.props).some(t=>void 0===t)){let i=this.data;if(void 0!==i){let r=d.zoom(i,t.path.slice(2));if(r)for(let i in t.props)void 0===t.props[i]&&i in r&&(e[i]=r[i])}}h={...t,props:e,path:t.path.slice(2)}}}}else if(0===t.type){let e=this.stateSelection?this.data.states.data(this.stateSelection):void 0;if(void 0!==e){if(void 0!==t.props.name&&e.name){let{name:t,...i}=e;e=i}if(void 0!==t.props.material&&"material"in e){let{material:t,...i}=e;e=i}let i=d.removeOverridden(t.path,t.props,e);h={...t,props:i}}}if(this.updateByPatchedOpBase(h,n.patch(this.data,this.stateSelection?this.data.states.data(this.stateSelection):void 0),i),O(t.path,["overrides"])){let s=[],a=[...t.path];for(s.push(a[1]),a.splice(0,2);a.length>0&&"descendants"===a[0];)s.push(a[1]),a.splice(0,2);if(void 0===s[s.length-1]){if(0===t.type)for(let e of Object.keys(t.props)){s[s.length-1]=e;let r=i.scene.findInstance([this.uuid,...s]);r&&(r.overrideData=t.props[e],r.updateState(l.apply(r.component.data,r.overrideData),i))}}else{let n=i.scene.findInstance([this.uuid,...s]);if(n){let o=d.zoom(n.component.data,a);if(0===(t={...t,path:a}).type){let e=t.props;if(o)for(let[i,r]of Object.entries(t.props))void 0===r&&(e===t.props&&(e={...t.props}),e[i]=o[i]);t={...t,props:e}}n.overrideData=r.resolve(e.overrides,s),n.updateByOp(t,p.applySimple(n.data,t),i,!1)}}}else if(this.instances.length>0){let r;if(0===t.path.length&&0===t.type){let e;for(let i of s.rootOverrideProps)i in t.props&&(void 0===e&&(e={}),e[i]=t.props[i]);e&&(r={...t,props:e})}else for(let e of s.rootOverrideProps)if(O(t.path,[e])){r=t;break}void 0!==r&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=l.filterOp(t.overrideData,r);e&&t.updateByOp(e,p.applySimple(t.data,e),i,!0)}}),this.instances.forEach(r=>{if(!r.isInstanceRoot){let s=l.filterOp(r.overrideData,t);if(s){let a;a=o===r.data&&t===s?e:p.applySimple(r.data,s),r.updateByOp(s,a,i,!0)}}})}}updateByPatchedOpBase(t,e,i){if(this.dataPatched=e,0===t.path.length&&0===t.type)void 0!==t.props.type&&!o.is(t.props.type)&&C.changeEntityProptotype(this,e,i);else if(1===t.path.length&&"geometry"===t.path[0]&&0===t.type&&"type"in t.props){C.changeEntityProptotype(this,e,i);for(let t of this.children)mt.is(t)&&t.updateVisible(i.scene)}this.updateByPatchedOp(t,e,i)}updateByPatchedOp(t,e,i){if(0===t.path.length&&0===t.type?this.updateState(t.props,i):0===t.type&&("resolutionLevel"in t.props||"useChildrenColors"in t.props)&&this.updateState(e,i),"morphTargetInfluences"===t.path[0]&&0===t.type){let r=e.morphTargetInfluences.get(t.path[1])?.data.name;r&&this.updateMorphInfluences(r,i.shared.getVariable(t.props.value,[this.uuid,"morphTargetInfluences",r]))}if(null!==O(t.path,["pathSnapping"])&&this.updatePathSnapping(e.pathSnapping),null!==O(t.path,["cloner"])){let r=p.drop(t,1);0===r.path.length&&0===r.type&&!0===r.props.disabled?this.setFromClonerState(null,i):this.cloner?this.cloner.updateState(e.cloner,i):(this.setFromClonerState(e.cloner,i),this.expandCloner(i)),this.updateVisible(i.scene)}}updatePathSnapping(t=this.dataPatched.pathSnapping){this._updatedPathSnapping=t,this._needApplyPathSnapping=!0}get updatedPathSnapping(){return this._updatedPathSnapping}applyPathSnapping(t){if(!1===this._needApplyPathSnapping)return;let e=this._updatedPathSnapping?.pathId??this.dataPatched.pathSnapping.pathId,i=this._updatedPathSnapping?.slide??this.dataPatched.pathSnapping.slide??0,r=this._updatedPathSnapping?.offset??this.dataPatched.pathSnapping.offset??0,s=this._updatedPathSnapping?.orientation??this.dataPatched.pathSnapping.orientation;if(null===e)return;let a=t.find(e);if(!a)return;this._needApplyPathSnapping=!1;let n=a.data;if(n.geometry.path.points.length<=1)return;let o=ut(n.geometry.path),l=function(t){let e=t%1;return e<0?e+1:0===e&&t>0?1:e}(i+r),h=null;try{h=o.curves.length?o.getPointAt(l):null}catch(t){}if(null===h)return;a.updateMatrixWorld();let p=this.parent?Ct.multiplyMatrices(this.parent.matrixWorld,this.hiddenMatrix):Ct.copy(this.hiddenMatrix),d=function(t,e,i,r){yt.setFromRotationMatrix(ft.extractRotation(r));let s=t.clone().applyMatrix4(ft.copy(r).invert().multiply(i));if(null===e)gt.setFromRotationMatrix(ft.extractRotation(i));else{let t=e.clone().applyMatrix4(ft.extractRotation(i));gt.setFromRotationMatrix(ft.lookAt(xt.set(0,0,0),t,St))}return{position:s,rotation:(new f).setFromEuler(vt.setFromQuaternion(yt.invert().multiply(gt))).multiplyScalar(u.RAD2DEG)}}(h,"tangential"===s?o.getTangentAt(l):null,a.matrixWorld,p);this.updateTransformState({position:d.position.toArray(),rotation:d.rotation.toArray()}),this.traverseEntity(t=>{t._cameraType&&t.dispatchEvent(Mt)})}updateVisible(t){if(this.visible=this.dataPatched.visible&&(!this.dataPatched.cloner||(this.dataPatched.cloner.disabled??!1)||!0!==this.dataPatched.cloner?.hideBase),!t)return;let e=!1;this.traverseEntity(t=>{if("Splat"===t.data.type)return e=!0,!0}),e&&t.reloadSplats()}updateState_Entity(t,e){void 0!==t.name&&(this.name=t.name),void 0!==t.raycastLock&&(this.raycastLock=t.raycastLock),void 0!==t.visible&&(this.updateVisible(e?.scene),this.resetBBoxNeedsUpdate()),e&&"cloner"in t&&void 0!==t.cloner&&(this.setFromClonerState(t.cloner,e),this.updateVisible(e.scene)),this.updateTransformState(t,e)}get attachedSurfaceCloners(){return this.children.filter(t=>e(t)&&"toObject"===t.parameters.type)}setFromClonerState(t,e){if(!this.disposed)if(null===t||t.disabled)this.cloner&&this.cloner.dispose(),this.cloner=void 0;else if(void 0===this.cloner){if(null===C.Cloner)return void i("cloners","a cloner");this.cloner=new C.Cloner(this,t),e.scene.addPendingExpandCloner(this)}else this.cloner.updateState(t,e)}expandCloner(t){!this.disposed&&this.cloner&&this.cloner.expandClones(t)}invalidateClonerTransform(t){this.cloner&&this.cloner.invalidateTransform(t)}requestRender(){this.dispatchEvent({type:"requestRender"})}},Ot=class{static create(t){return this.build(this.normalizeInputs(t))}static normalizeInputs(t,e){let i=Object.assign({},e?.parameters??{width:100,revolutions:2,segments:40,pathRadius:10,pathType:0,pathSegments:30,cornerRadius:30,cornerSegments:4},t.parameters),r=Math.abs(i.width),s=Math.abs(i.height??r),a=Math.abs(i.depth??r),n=Math.abs(Math.min(r,a))/2;return{parameters:Object.assign(i,{width:r,height:s,depth:a,radius:n,segments:Math.round(i.segments),pathSegments:Math.round(i.pathSegments),cornerSegments:Math.round(i.cornerSegments)})}}static build(t){let{width:e,height:i,depth:r,radius:s,revolutions:a,segments:n,pathRadius:o,pathType:l,pathSegments:h,cornerRadius:p,cornerSegments:d}=t.parameters,c=new Tt(!1,e,i,r,s,a,n,o,l,h,p,d);return Object.assign(c,{userData:{...t,type:"HelixGeometry"}})}},Vt=new c([0,0,0],1);function Wt(t){return"TorusGeometry"===t.type&&360===t.arc}var _t,Rt,Tt=class extends P{constructor(t=!0,e=1,i=1,r=1,s=1,a=1,n=1,o=1,l=1,h=1,p=1,d=1){if(super(),0===a)return;let c=t&&1===a;c&&(d=0),p>100&&(p=100),0===p&&(d=0);let u,m,y,g,v,x,S,w,M=()=>new f,B=new f,P=M(),E=M(),A=M(),C=M(),D=M(),O=M(),V=M(),W=M(),_=M(),R=M(),T=M(),U=i-2*o+.001,L=U/a,z=Math.ceil(n*a),I=z+1,F=U/z,N=-U/2,j=h+1,k=2*Math.PI/h,q=Math.PI/2/d,G=Math.min((1-p/100)*o,o-.01),H=o-G,X=0,Z=2*d+2,K=j*Z/2,Q=K+j*I,$=Math.max(0,j*(I+Z)),[J,Y,tt]=[3,3,2].map(t=>Array($*t).fill(0)),et=[],it=s-o;function rt(e,i){let r=Math.PI/2;x=i*F,w=2*Math.PI*(x%L)/L+r,x+=N,S=Math.sin(w)*it,v=Math.cos(w)*it,t?e.set(v,S,x):e.set(v,x,S)}rt(B,-1e-10),rt(P,0),C.copy(B),rt(B,1);let st=B.distanceTo(P),at=c?0:H+G,nt=st*z+2*at,ot=G,lt=nt-at;for(let e=0;e<=z;e++){rt(E,e),T.subVectors(E,C).normalize(),C.copy(E),_.copy(E).setComponent(+t+1,0).normalize(),R.crossVectors(T,_).normalize();let i=0===e,r=e===z,s=i?3*Math.PI/2:q,a=i?ot:lt,n=i?j:Q,l=i?0:$-j,p=T.clone().multiplyScalar(i?-H:H).add(E),u=T.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<j;t++){let m=t*k;if(D.addVectors(B.copy(_).multiplyScalar(o*Math.cos(m)),P.copy(R).multiplyScalar(o*Math.sin(m))),O.copy(D).normalize(),i||r){c||(X=l+t,[0,1,2].forEach(t=>{J[3*X+t]=p.getComponent(t),Y[3*X+t]=u.getComponent(t)}),tt[2*X]=+r,tt[2*X+1]=t/h),P.copy(O).multiplyScalar(G),A.addVectors(E,P);for(let e=0;e<d;e++){let r=e*q+s;V.addVectors(B.copy(T).multiplyScalar(H*Math.sin(r)),P.copy(O).multiplyScalar(H*Math.cos(r))),W.copy(V).normalize(),P.addVectors(A,V),V.normalize(),X=n+e*j+t,[0,1,2].forEach(t=>{J[3*X+t]=P.getComponent(t),Y[3*X+t]=W.getComponent(t)});let o=+i+Math.sin(r);tt[2*X]=(a+H*o)/nt,tt[2*X+1]=t/h}}P.addVectors(E,D),X=K+e*j+t,[0,1,2].forEach(t=>{J[3*X+t]=P.getComponent(t),Y[3*X+t]=O.getComponent(t)}),tt[2*X]=(at+e*st)/nt,tt[2*X+1]=t/h}}let ht=I+2*d+2,[pt,dt]=[+c,ht-1];for(let t=pt;t<=dt-1;t++){let e=c&&t===dt-1;for(let i=0;i<j-1;i++)u=t*j+i,m=u+1,y=(e?i:u)+j,g=(e?i+1:m)+j,0===t?et.push(m,g,y):t===ht-2?et.push(u,m,y):et.push(u,m,y,m,g,y)}this.setIndex(et),this.setAttribute("position",new b(J,3)),this.setAttribute("normal",new b(Y,3)),this.setAttribute("uv",new b(tt,2))}getClosedTorusIndicesForBooleanOrSubdiv(){let t,e,i,r,s=this.userData.parameters,a=Math.ceil(s.tubularSegments),n=s.radialSegments,o=n+1,l=[];for(let s=1;s<a;s++)for(let a=0;a<n;a++)t=s*o+a,e=t+1,i=t+o,r=e+o,l.push(t,e,i,e,r,i);for(let s=0;s<n;s++)t=a*o+s,e=t+1,i=s+o,r=s+1+o,l.push(t,e,i,e,r,i);return Vt.array=new Uint32Array(l),Vt.count=l.length,Vt}},Ut=new Map,Lt=0;function zt(t){return Rt||(Rt=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.56/build",i=import("./boolean.js"),[r,s]=await Promise.all([i,fetch(`${e}/boolean.wasm`).then(t=>t.arrayBuffer())]);await r.default({module_or_path:s}),_t=r}())}function It(){if(void 0===_t)throw new Error("boolean-wasm is not loaded");return _t}function Ft(t){let e=Ut.get(t);if(void 0===e)throw new Error("Unknown csg mesh set handle "+t);return e}function Nt(t){return Ut.set(++Lt,t),Lt}var jt={0:0,1:1,2:2};function kt(t,e,i){if(void 0===_t)return-1;let{positions:r,indices:s,normals:a}=function(t,e){if(e&&void 0!==t.userData.positions){let e=t.userData,i=[];for(let t=0,r=0;t<e.verticesPerFace.length;t++){let s=e.verticesPerFace[t];for(let t=1;t<s-1;t++)i.push(e.indices[r],e.indices[r+t],e.indices[r+t+1]);r+=s}return{positions:e.positions instanceof Float32Array?e.positions:new Float32Array(e.positions),indices:new Uint32Array(i)}}let i;i=Wt(t.userData.parameters)?t.getClosedTorusIndicesForBooleanOrSubdiv():t.getIndex();let r,s=t.getAttribute("position");if(null===i){r=new Uint32Array(s.count);for(let t=0;t<r.length;t++)r[t]=t}else r=i.array instanceof Uint32Array?i.array:new Uint32Array(i.array);let a=t.getAttribute("normal"),n=void 0!==a&&3===a.itemSize&&a.count===s.count&&a.array instanceof Float32Array&&!0!==a.isInterleavedBufferAttribute?a.array:void 0;return{positions:s.array,indices:r,normals:n}}(t,e);return Nt(new _t.CsgMesh(r,s,a))}function qt(t,e){let i=It(),r=jt[e];if(void 0===r)throw new Error("Unknown boolean operation "+e);let s=t.map(Ft);if(1===s.length)return i.clone_mesh(s[0]);let a,n=[];if(2===e&&s.length>2){let t=s[0];for(let e=1;e<s.length-1;e++)t=i.boolean_mesh(t,s[e],0),n.push(t);a=i.boolean_mesh(s[s.length-1],t,2)}else if(2===e)a=i.boolean_mesh(s[1],s[0],2);else{let t=s[s.length-1];for(let e=0;e<s.length-1&&(t=i.boolean_mesh(t,s[e],r),n.push(t),0!==t.tri_count());e++);a=t,n.pop()}for(let t of n)t.free();return a}function Gt(t,e,i,r){let s=It(),a=qt(t,e),n=s.mesh_render_data(a,Math.max(r,0));if(i.setAttribute("position",new b(n.positions(),3)),i.setAttribute("normal",new b(n.normals(),3)),n.free(),null===i.boundingSphere&&(i.boundingSphere=new B),0===a.tri_count())i.boundingSphere.center.set(0,0,0),i.boundingSphere.radius=0,i.userData.parameters={width:0,height:0,depth:0};else{let t=a.bounds();i.boundingSphere.center.set(t[0],t[1],t[2]),i.boundingSphere.radius=(t[3]**2+t[4]**2+t[5]**2)**.5,i.userData.parameters={width:2*t[3],height:2*t[4],depth:2*t[5]}}return Nt(a)}function Ht(t,e){let i=It(),r=qt(t,e),s=i.mesh_topological_data(r),a=s.positions(),n=s.indices();return s.free(),r.free(),{positions:a,indices:n,verticesPerFace:new Uint8Array(n.length/3).fill(3)}}function Xt(t,e){Ft(t).transform(new Float32Array(e.elements))}function Zt(t){let e=Ut.get(t);void 0!==e&&(e.free(),Ut.delete(t))}function Kt(t,e){return Nt(It().instanced_union(Ft(t),e))}function Qt(t){return null!==t&&"booleanOp"in t}var $t=class extends(Dt(A)){constructor(){super(...arguments),this.booleanMeshSetAddress=-1,this.booleanWasTransformed=!1,this.booleanMatrixInvOld=new g}updateVisible(t){super.updateVisible(t),this.visible=!Qt(this.parent)&&this.visible,Qt(this.parent)&&this.parent.invalidateDownstreamBooleanData()}onClonerLayoutUpdated(){Qt(this.parent)&&this.invalidateDownstreamBooleanData()}freeBooleanPointer(){-1!==this.booleanMeshSetAddress&&(Zt(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}invalidateDownstreamBooleanData(t=!1){return t?this.booleanWasTransformed=!0:this.freeBooleanPointer(),Qt(this.parent)?this.parent.invalidateDownstreamBooleanData():this}invalidateUpstreamBooleanData(){this.freeBooleanPointer();for(let t of this.children)t instanceof $t&&(t.freeBooleanPointer(),Qt(t)&&t.invalidateUpstreamBooleanData())}updateTransformState(t,e){let i=super.updateTransformState(t,e);return i&&Qt(this.parent)&&this.invalidateDownstreamBooleanData(!0),i}onVariableUpdate(t=!1){super.onVariableUpdate(t),Qt(this.parent)&&this.invalidateDownstreamBooleanData(!0)}},Jt=new M;function Yt(t,e=0,i=t.count,r,s){let a=1/0,n=1/0,o=1/0,l=-1/0,h=-1/0,p=-1/0;for(let r=e;r<i;r++){let e=t.getX(r),i=t.getY(r),s=t.getZ(r);e<a&&(a=e),i<n&&(n=i),s<o&&(o=s),e>l&&(l=e),i>h&&(h=i),s>p&&(p=s)}Jt.min.set(a,n,o),Jt.max.set(l,h,p),Jt.getCenter(r),Jt.getSize(s).multiplyScalar(.5)}var te=new P,ee=new E,ie=class extends $t{constructor(t,e){super(te,ee),this.super_Entity(t,e)}updateState(t,e){this.updateState_Entity(t,e)}raycast(t,e){super.raycast(t,e)}updateEntityBoxSize(t,e){let i=this.geometry.getAttribute("position");void 0!==i?Yt(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,e):super.updateEntityBoxSize(t,e)}};export{D as a,O as b,C as c,Q as d,$ as e,Y as f,ut as g,mt as h,wt as i,Dt as j,Ot as k,Wt as l,Tt as m,zt as n,kt as o,Gt as p,Ht as q,Xt as r,Zt as s,Kt as t,Yt as u,ie as v};
|
|
1
|
+
import{f as t}from"./runtime-chunk-RTLL6WIB.js";import{h as e}from"./runtime-chunk-2PT2WH66.js";import{c as i}from"./runtime-chunk-TZCHGFVF.js";import{Aa as r,Ba as s,C as a,Da as n,J as o,i as l,j as h,k as p,n as d}from"./runtime-chunk-K3UQCG3P.js";import{$c as c,Cc as u,Ec as m,Fc as f,Kd as y,Oc as g,Pc as v,Pd as x,Rc as S,Re as w,Xc as M,bd as b,cd as B,dd as P,kd as E,ld as A}from"./runtime-chunk-BVVSZMXD.js";var C={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function D(t,e){let i=[];if(e.length!==t.length)return null;{let r=0;for(;r<t.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}function O(t,e){let i=[];if(!(e.length<=t.length))return null;{let r=0;for(;r<e.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}var V=new f,W=new f,_=new g,R=[new f(-1,1,1),new f(-1,-1,1),new f(1,-1,1),new f(1,1,1),new f(-1,1,-1),new f(-1,-1,-1),new f(1,-1,-1),new f(1,1,-1)],T=[[0,3],[1,2],[5,6],[4,7],[0,1],[3,2],[7,6],[4,5],[0,4],[1,5],[2,6],[3,7]],U=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],L=(t,e,i)=>{t.updateEntityBoxSize(V,W),_.copy(e).multiply(t.matrixWorld),0===W.x&&0===W.y&&0===W.z?i.push(new f(V.x,V.y,V.z).applyMatrix4(_)):R.forEach(t=>{i.push(t.clone().multiply(W).add(V).applyMatrix4(_))})},z=class extends M{constructor(){super(...arguments),this.matrix=new g,this.vertices=[],this.faces=[],this.edges=[],this.centerEdges=[]}copy(t){return super.copy(t),this.matrix.copy(t.matrix),this.vertices=t.vertices.map(t=>t.clone()),this.faces=t.faces.map(t=>t.clone()),this.edges=t.edges.map(t=>t.clone()),this.centerEdges=t.centerEdges.map(t=>t.clone()),this}setFromObjectSize(t,e=!1){t.updateWorldMatrix(!1,e),this.makeEmpty(),this.matrix.copy(t.matrixWorld);let i=(new g).copy(t.matrixWorld).invert();return this.expandByObjectSize(t,i,e)}expandByObjectSize(t,e,i=!1){let r=[];if(!0===i){let i=[];t.traverseEntity(t=>{if(t.visible||t.cloner&&t.data.visible){if(!("geometry"in t))return _.copy(e).multiply(t.matrixWorld),void i.push((new f).applyMatrix4(_));L(t,e,r)}}),0===r.length&&r.push(...i)}else L(t,e,r);return this.setFromPoints(r)}getCenter(t){return(t=super.getCenter(t)).applyMatrix4(this.matrix),t}getPositionToCenter(t){return(t=super.getCenter(t)).applyMatrix4(_.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(W).multiplyScalar(.5),this.getCenter(V),_.copy(this.matrix).setPosition(V),this.vertices=R.map(t=>t.clone().multiply(W).applyMatrix4(_))}computeEdges(){this.vertices.length>0&&this.computeVertices(),this.edges=T.map(([t,e])=>new w(this.vertices[t],this.vertices[e])),this.centerEdges=this.edges.map(t=>t.getCenter(new f))}computeFaces(){this.vertices.length>0&&this.computeVertices(),this.faces=U.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},I=new f,F=new f,N=new f,j=new f,k=new f,q=new f,G=new g,H=1e-12,X=.01;function Z(t){let e=t.elements;I.set(e[0],e[1],e[2]),F.set(e[4],e[5],e[6]),N.set(e[8],e[9],e[10])}function K(){let t=Math.max(I.lengthSq(),F.lengthSq(),N.lengthSq());I.lengthSq()>H*t?j.copy(I).normalize():j.set(1,0,0),k.crossVectors(N,j),k.lengthSq()<=H*t&&(k.copy(F).addScaledVector(j,-F.dot(j)),k.lengthSq()<=H*t&&function(t,e){t.set(1,0,0).cross(e),t.lengthSq()<=H&&t.set(0,1,0).cross(e),t.normalize()}(k,j)),k.normalize(),q.crossVectors(j,k)}function Q(t){return Z(t),K(),G.makeBasis(j,k,q)}var $,J=new g;($||($={})).is=function(t){return t&&t.__isSPEObject};var Y=t=>class extends t{constructor(){super(...arguments),this.previousModelViewMatrix=new g,this.copyPreviousMatrix=!0,this.hiddenMatrix=new g,this.pivotMatrix=new g,this.matrixWorldRigid=new g,this.shearScale=new g,this.shearScaleInv=new g}get __isSPEObject(){return!0}getPhysicsLocalMatrix(t){return!!this.rigidBody?.isDynamic()&&(t.copy(this.matrixWorld),this.hasNonUniformScale&&t.multiply(this.shearScaleInv),this.parent&&t.premultiply(J.copy(this.parent.matrixWorld).invert()),t.premultiply(J.copy(this.hiddenMatrix).invert()),t.multiply(J.copy(this.pivotMatrix).invert()),!0)}isDescendantOf(t){t instanceof S&&(t=t.uuid);let e=this;for(;e.parent;){if(e.parent.uuid===t)return!0;e=e.parent}return!1}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.multiplyMatrices(this.hiddenMatrix,this.matrix):(this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.hiddenMatrix),this.matrixWorld.multiplyMatrices(this.matrixWorld,this.matrix)),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.multiplyMatrices(this.hiddenMatrix,this.matrix):(this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.hiddenMatrix),this.matrixWorld.multiplyMatrices(this.matrixWorld,this.matrix)),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}traverseChildren(t,e=0){for(let i of this.children)$.is(i)&&i.traverseObject(t,e+1)}traverseObject(t,e=0){if(!0!==t(this,e))for(let i of this.children)$.is(i)&&i.traverseObject(t,e+1)}updateMatrixWorldRigid(){this.hasNonUniformScale=function(t,e,i){return Z(t),K(),e.makeBasis(j,k,q),i.set(j.dot(I),j.dot(F),j.dot(N),0,k.dot(I),k.dot(F),k.dot(N),0,q.dot(I),q.dot(F),q.dot(N),0,0,0,0,1),function(){let t=I.length(),e=F.length(),i=N.length(),r=Math.max(t,e,i);if(r-t>X||r-e>X||r-i>X)return!0;let s=X*r*r;return Math.abs(I.dot(F))>s||Math.abs(I.dot(N))>s||Math.abs(F.dot(N))>s}()}(this.matrixWorld,this.matrixWorldRigid,this.shearScale),this.matrixWorldRigid.copyPosition(this.matrixWorld),this.shearScaleInv.copy(this.shearScale).invert()}attach(t,e){this.updateWorldMatrix(!0,!1);let i=(new g).copy(this.matrixWorld).invert();return null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),i.multiply(t.parent.matrixWorld)),"hiddenMatrix"in t&&t.hiddenMatrix instanceof g?t.hiddenMatrix.premultiply(i):t.applyMatrix4(i),t.updateWorldMatrix(!1,!1),this.add(t),void 0!==e&&(this.children.pop(),this.children.splice(e,0,t)),this}copy(t,e=!1){return super.copy(t,e),this.hasNonUniformScale=t.hasNonUniformScale,this}onAfterRender(t,e,i,r,s,a){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}},tt=class extends x{constructor(){super()}getPoints(t=12){let e,i=[],r=this.getCurveLengths(),s=r[r.length-1]/r.length;for(let a=0,n=this.curves;a<n.length;a++){let o=n[a],l=0===a?r[a]:r[a]-r[a-1],h=Math.ceil(t*l/s),p=o.getPoints(h);for(let t=0;t<p.length;t++){let r=p[t];e&&e.equals(r)||(i.push(r),e=r)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}},et=.001,it=new f,rt=new f,st=new f,at=new f,nt=new f,ot=new f,lt=new f,ht=new f,pt=new f;function dt(t,e,i){return it.subVectors(e,t),rt.subVectors(e,i),it.cross(rt).length()<=et}var ct=new WeakMap;function ut(t){let e=ct.get(t.points);if(void 0!==e&&e.isClosed===t.isClosed)return e.curve;let i=function(t){let e=t.points,i=[e[0]],r=[new f(...e[0].data.position)];st.copy(r[0]);for(let t=0;t<e.length-1;t++)it.fromArray(e[t].data.position),rt.fromArray(e[t+1].data.position),nt.subVectors(it,st),lt.subVectors(it,rt),nt.cross(lt).length()>et&&(i.push(e[t]),r.push((new f).copy(it)),st.copy(it));let s=e[e.length-1];i.push(s),r.push(new f(...s.data.position));let a=t.isClosed,n=i.length-(a?0:1),o=i.length,l=[],h=[];for(let t=0;t<o;t++){let e=i[t].data;l.push(new f(...e.controlPrevious.position)),h.push(new f(...e.controlNext.position))}let p=[];for(let t=0;t<n;t++){let e=t===o-1?0:t+1;p.push(dt(r[t],h[t],r[e])&&dt(r[t],l[e],r[e]))}let d=[];for(let t=0;t<o;t++){let e=i[t].data,s=r[t],n={position:s,prevDir:void 0,nextDir:void 0,controlPrevious:l[t],controlNext:h[t],tan:void 0,baseRoundness:e.roundness,removedLength:0};if(d.push(n),0===e.roundness||!a&&(0===t||t===o-1))continue;let c=a&&0==t?o-1:t-1,u=a&&t==o-1?0:t+1,m=(new f).subVectors(r[c],s).normalize(),y=(new f).subVectors(r[u],s).normalize();n.prevDir=m,n.nextDir=y;let g=p[a&&0===t?o-1:t-1],v=p[t];if(g&&v){at.addVectors(m,y).normalize();let t=st.crossVectors(at,m).length()/m.dot(at);n.tan=t,n.removedLength=e.roundness/t}}for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e];if(0!==i.removedLength||0!==r.removedLength){let t=i.position.distanceTo(r.position);i.removedLength=Math.min(i.removedLength,t/2),r.removedLength=Math.min(r.removedLength,t/2)}}let c=new Array(2*o).fill(null);for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e],s=null;if(p[t]){let t=i.position.clone(),e=r.position.clone();(0!==i.removedLength||0!==r.removedLength)&&(i.nextDir&&t.add(st.copy(i.nextDir).setLength(i.removedLength)),r.prevDir&&e.add(st.copy(r.prevDir).setLength(r.removedLength))),t.distanceTo(e)>et&&(s=new y(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(r.position)>et&&(s=new y(i.position,i.controlNext,r.controlPrevious,r.position));c[2*t+1]=s}for(let t=0;t<o;t++){let e=d[t];if(0===e.removedLength)continue;let i=e.position,r=e.prevDir.clone().multiplyScalar(e.removedLength).add(i),s=e.nextDir.clone().multiplyScalar(e.removedLength).add(i),a=e.tan*e.removedLength;at.addVectors(e.prevDir,e.nextDir).normalize(),nt.copy(r).lerp(s,.5);let n=r.distanceTo(s)/2;pt.copy(at).multiplyScalar(Math.sqrt(Math.pow(a,2)-Math.pow(n,2))).add(nt),ot.copy(at).multiplyScalar(-a).add(pt);let o=i.distanceTo(ot)/i.distanceTo(nt);lt.copy(e.prevDir).multiplyScalar(o*i.distanceTo(r)).add(i),ht.copy(lt).lerp(ot,2);let l=r.clone().lerp(lt,4/3),h=s.clone().lerp(ht,4/3);c[2*t]=new y(r,l,h,s)}let u=new tt;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return ct.set(t.points,{isClosed:t.isClosed,curve:i}),i}var mt,ft=new g,yt=new m,gt=new m,vt=new v,xt=new f,St=new f(0,1,0);(mt||(mt={})).is=function(t){return t&&t.__isEntity};var wt=t=>mt.is(t),Mt={type:"completeState",isfromEntity:!0},bt=["x","y","z"],Bt=new f,Pt=new f(1,1,1),Et=new m,At=new v,Ct=new g,Dt=c=>class extends(Y(c)){constructor(){super(...arguments),this.raycastLock=!1,this.scaleLock=!1,this.disposed=!1,this.stateSelection=null,this.destroyedInAction=!1,this.instances=[],this.prevState=null,this.currentState=null,this.currentAnimationAction=null,this.reversibleToState=null,this.transitionState={settled:!0,state:null},this.currentTransitionEvent=null,this.previousAction=null,this._singleBBox=new z,this._recursiveBBox=new z,this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0,this._needApplyPathSnapping=!0,this.attachedPaths=new Set}get __isEntity(){return!0}entityChildren(t){let e=this.children[t];if(mt.is(e))return e}entityChildrenCount(){let t=this.children.length;for(;t--;)if(mt.is(this.children[t]))return t+1;return 0}get isConcreteEntity(){return"string"==typeof this.identity}get isVirtualEntity(){return"string"!=typeof this.identity}get isInstanceRoot(){return this.isConcreteEntity&&"Instance"===this.data.type}nearestInstanceSelfOrParent(){let t=this;for(;"Instance"!==t.data.type;){let e=t.parent;if(!mt.is(e))return;t=e}return t}forInstancesRec(t){this.instances.forEach(e=>{e.disposed||t(e),e.forInstancesRec(t)})}super_Entity(t,e){"string"==typeof t&&(this.uuid=t),this.identity=t,this.data=e,this.matrixAutoUpdate=!1,this.dataPatched=this.data}changeSelectedState(t,e,i=!1){if(0!==this.data.states.length||i){for(let t of this.data.states)n.toOps(this.data,t.data).forEach(t=>{let i=h.replaceProps(t,this.data);this.dataPatched=this.data,this.updateByPatchedOp(i,this.data,e)});if(null!==t){let i=this.data.states.data(t);i&&(this.dataPatched=n.patch(this.data,i),n.toOps(this.data,i).forEach(t=>{this.updateByPatchedOp(t,this.dataPatched,e)}))}i&&this.updateTransformState(this.dataPatched,e),this.stateSelection=t,this.updatePathSnapping(this.dataPatched.pathSnapping)}}get singleBBox(){return this.singleBBoxNeedsUpdate&&(this.singleBBoxNeedsUpdate=!1,this._singleBBox.setFromObjectSize(this,!1),this._singleBBox.computeVertices(),this._singleBBox.computeEdges(),this._singleBBox.computeFaces()),this._singleBBox}get recursiveBBox(){return this.recursiveBBoxNeedsUpdate&&(this.recursiveBBoxNeedsUpdate=!1,this._recursiveBBox.setFromObjectSize(this,!0),this._recursiveBBox.computeVertices(),this._recursiveBBox.computeEdges(),this._recursiveBBox.computeFaces()),this._recursiveBBox}updateEntityBoxSize(t,e){t.setScalar(0),e.setScalar(0)}resetBBoxNeedsUpdateSelf(){this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0}resetBBoxNeedsUpdate(){this.resetBBoxNeedsUpdateSelf(),this.traverseAncestors(t=>{wt(t)&&t.resetBBoxNeedsUpdateSelf()}),this.traverseEntity(t=>{t.resetBBoxNeedsUpdateSelf()})}find(t){let e;return this.traverseEntity(i=>{i.uuid===t&&(e=i)}),e}traverseSortNextHelper(){let t=this.parent;if(t){let e=t.children,i=e.indexOf(this)+1;if(mt.is(e[i]))return e[i];if(mt.is(t))return t.traverseSortNextHelper()}}sortNext(){let t=this.children;return this.children.length>0&&mt.is(this.children[0])?t[0]:this.traverseSortNextHelper()}goUp(t){let e=this;for(;t>0&&null!==e;)e=e.parent,t-=1;return e}hasAnccestorOrSelf(t){return this===t||this.hasAnccestor(t)}hasAnccestor(t){let e=this.parent;for(;e;){if(t===e)return!0;e=e.parent}return!1}countToAccestor(t){let e=0,i=this;for(;i!==t;){if(null===i)return-1;i=i.parent,e+=1}return e}forEachEntity(t){for(let e of this.children)wt(e)&&t(e)}traverseEntityAncestors(t){this.traverseAncestors(e=>{mt.is(e)&&t(e)})}traverseConcreteEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)wt(i)&&i.isConcreteEntity&&i.traverseEntity(t,e+1)}traverseEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)wt(i)&&i.traverseEntity(t,e+1)}traverseVisibleEntity(t){t(this);for(let e of this.children)wt(e)&&e.visible&&e.traverseVisibleEntity(t)}updateMatrix(){super.updateMatrix(),this.cloner&&this.cloner.onObjUpdateMatrix(),this.dispatchEvent({type:"updateMatrix"})}updateMatrixWorld(t){super.updateMatrixWorld(t),this.dispatchEvent({type:"updateMatrixWorld"})}copy(t,e=!1){return super.copy(t,e),this.dataPatched=t.dataPatched,this.raycastLock=t.raycastLock,this.scaleLock=t.scaleLock,this.hiddenMatrix.copy(t.hiddenMatrix),this}hasEntityChild(){return this.children.some(t=>wt(t))}isAncestorOf(t){if(this.uuid===t)return!1;let e=!1;return this.traverseEntity(i=>{i.uuid===t&&(e=!0)}),e}toObjectTransformState(e=[]){this.updateWorldMatrix(!0,!1);let i={position:this.position.toArray(),rotation:[this.rotation.x*u.RAD2DEG,this.rotation.y*u.RAD2DEG,this.rotation.z*u.RAD2DEG],scale:this.scale.toArray(),hiddenMatrix:this.hiddenMatrix.toArray(),pivot:[0,0,0],pivotRotation:[0,0,0]};return t(i,e)}getTransformValues(t,e,i){return e[t].map((e,r)=>i?.shared.getVariable(e,[this.uuid,t,bt[r]])??e)}updateTransformState(t,e){let i=!1;if(t.position&&(this.position.fromArray(this.getTransformValues("position",t,e)),i=!0),t.rotation&&(Bt.fromArray(this.getTransformValues("rotation",t,e)).multiplyScalar(u.DEG2RAD),this.rotation.setFromVector3(Bt),i=!0),t.scale&&(this.scale.fromArray(this.getTransformValues("scale",t,e)),i=!0),void 0!==t.hiddenMatrix&&(i=!0,this.hiddenMatrix.fromArray(t.hiddenMatrix??a.identity)),void 0!==t.pivot||void 0!==t.pivotRotation)if(i=!0,void 0!==t.pivot&&void 0!==t.pivotRotation)this.pivotMatrix.compose(Bt.fromArray(t.pivot).negate(),Et.setFromEuler(At.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),Pt);else if(void 0!==t.pivot)this.pivotMatrix.setPosition(-t.pivot[0],-t.pivot[1],-t.pivot[2]);else if(void 0!==t.pivotRotation){let e=Bt.setFromMatrixPosition(this.pivotMatrix);Et.setFromEuler(At.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),this.pivotMatrix.compose(e,Et,Pt)}return i&&(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)})),t.position&&t.rotation&&t.scale&&void 0!==t.hiddenMatrix&&this.updateWorldMatrix(!1,!0),i}onVariableUpdate(t=!1){t?this.resetBBoxNeedsUpdate():(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)}),this.requestRender())}dispose(){this.disposed=!0,this.cloner&&(this.cloner.dispose(),this.cloner=void 0)}disposeChildrenRecursively(){for(let t of this.children)mt.is(t)&&t.disposeRecursively()}disposeRecursively(){this.dispose(),this.children.forEach(t=>{mt.is(t)&&t.disposeRecursively()})}toState(e=[]){let i={name:this.name,visible:this.visible,raycastLock:this.raycastLock,...this.toObjectTransformState(e)};return t(i,e)}updateByObjUpdateOp(t,e){void 0!==t&&this.updateByOp({type:0,props:t,path:[]},{...this.data,...t},e,!1)}updateByOp(t,e,i,a){let o=this.data;this.data=e;let h=t,c=O(t.path,["states","*"]);if(null!==c){if(0===t.type){let[e]=c;if(this?.stateSelection===e){let e={...t.props};if(delete e.name,Object.values(t.props).some(t=>void 0===t)){let i=this.data;if(void 0!==i){let r=d.zoom(i,t.path.slice(2));if(r)for(let i in t.props)void 0===t.props[i]&&i in r&&(e[i]=r[i])}}h={...t,props:e,path:t.path.slice(2)}}}}else if(0===t.type){let e=this.stateSelection?this.data.states.data(this.stateSelection):void 0;if(void 0!==e){if(void 0!==t.props.name&&e.name){let{name:t,...i}=e;e=i}if(void 0!==t.props.material&&"material"in e){let{material:t,...i}=e;e=i}let i=d.removeOverridden(t.path,t.props,e);h={...t,props:i}}}if(this.updateByPatchedOpBase(h,n.patch(this.data,this.stateSelection?this.data.states.data(this.stateSelection):void 0),i),O(t.path,["overrides"])){let s=[],a=[...t.path];for(s.push(a[1]),a.splice(0,2);a.length>0&&"descendants"===a[0];)s.push(a[1]),a.splice(0,2);if(void 0===s[s.length-1]){if(0===t.type)for(let e of Object.keys(t.props)){s[s.length-1]=e;let r=i.scene.findInstance([this.uuid,...s]);r&&(r.overrideData=t.props[e],r.updateState(l.apply(r.component.data,r.overrideData),i))}}else{let n=i.scene.findInstance([this.uuid,...s]);if(n){let o=d.zoom(n.component.data,a);if(0===(t={...t,path:a}).type){let e=t.props;if(o)for(let[i,r]of Object.entries(t.props))void 0===r&&(e===t.props&&(e={...t.props}),e[i]=o[i]);t={...t,props:e}}n.overrideData=r.resolve(e.overrides,s),n.updateByOp(t,p.applySimple(n.data,t),i,!1)}}}else if(this.instances.length>0){let r;if(0===t.path.length&&0===t.type){let e;for(let i of s.rootOverrideProps)i in t.props&&(void 0===e&&(e={}),e[i]=t.props[i]);e&&(r={...t,props:e})}else for(let e of s.rootOverrideProps)if(O(t.path,[e])){r=t;break}void 0!==r&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=l.filterOp(t.overrideData,r);e&&t.updateByOp(e,p.applySimple(t.data,e),i,!0)}}),this.instances.forEach(r=>{if(!r.isInstanceRoot){let s=l.filterOp(r.overrideData,t);if(s){let a;a=o===r.data&&t===s?e:p.applySimple(r.data,s),r.updateByOp(s,a,i,!0)}}})}}updateByPatchedOpBase(t,e,i){if(this.dataPatched=e,0===t.path.length&&0===t.type)void 0!==t.props.type&&!o.is(t.props.type)&&C.changeEntityProptotype(this,e,i);else if(1===t.path.length&&"geometry"===t.path[0]&&0===t.type&&"type"in t.props){C.changeEntityProptotype(this,e,i);for(let t of this.children)mt.is(t)&&t.updateVisible(i.scene)}this.updateByPatchedOp(t,e,i)}updateByPatchedOp(t,e,i){if(0===t.path.length&&0===t.type?this.updateState(t.props,i):0===t.type&&("resolutionLevel"in t.props||"useChildrenColors"in t.props)&&this.updateState(e,i),"morphTargetInfluences"===t.path[0]&&0===t.type){let r=e.morphTargetInfluences.get(t.path[1])?.data.name;r&&this.updateMorphInfluences(r,i.shared.getVariable(t.props.value,[this.uuid,"morphTargetInfluences",r]))}if(null!==O(t.path,["pathSnapping"])&&this.updatePathSnapping(e.pathSnapping),null!==O(t.path,["cloner"])){let r=p.drop(t,1);0===r.path.length&&0===r.type&&!0===r.props.disabled?this.setFromClonerState(null,i):this.cloner?this.cloner.updateState(e.cloner,i):(this.setFromClonerState(e.cloner,i),this.expandCloner(i)),this.updateVisible(i.scene)}}updatePathSnapping(t=this.dataPatched.pathSnapping){this._updatedPathSnapping=t,this._needApplyPathSnapping=!0}get updatedPathSnapping(){return this._updatedPathSnapping}applyPathSnapping(t){if(!1===this._needApplyPathSnapping)return;let e=this._updatedPathSnapping?.pathId??this.dataPatched.pathSnapping.pathId,i=this._updatedPathSnapping?.slide??this.dataPatched.pathSnapping.slide??0,r=this._updatedPathSnapping?.offset??this.dataPatched.pathSnapping.offset??0,s=this._updatedPathSnapping?.orientation??this.dataPatched.pathSnapping.orientation;if(null===e)return;let a=t.find(e);if(!a)return;this._needApplyPathSnapping=!1;let n=a.data;if(n.geometry.path.points.length<=1)return;let o=ut(n.geometry.path),l=function(t){let e=t%1;return e<0?e+1:0===e&&t>0?1:e}(i+r),h=null;try{h=o.curves.length?o.getPointAt(l):null}catch(t){}if(null===h)return;a.updateMatrixWorld();let p=this.parent?Ct.multiplyMatrices(this.parent.matrixWorld,this.hiddenMatrix):Ct.copy(this.hiddenMatrix),d=function(t,e,i,r){yt.setFromRotationMatrix(ft.extractRotation(r));let s=t.clone().applyMatrix4(ft.copy(r).invert().multiply(i));if(null===e)gt.setFromRotationMatrix(ft.extractRotation(i));else{let t=e.clone().applyMatrix4(ft.extractRotation(i));gt.setFromRotationMatrix(ft.lookAt(xt.set(0,0,0),t,St))}return{position:s,rotation:(new f).setFromEuler(vt.setFromQuaternion(yt.invert().multiply(gt))).multiplyScalar(u.RAD2DEG)}}(h,"tangential"===s?o.getTangentAt(l):null,a.matrixWorld,p);this.updateTransformState({position:d.position.toArray(),rotation:d.rotation.toArray()}),this.traverseEntity(t=>{t._cameraType&&t.dispatchEvent(Mt)})}updateVisible(t){if(this.visible=this.dataPatched.visible&&(!this.dataPatched.cloner||(this.dataPatched.cloner.disabled??!1)||!0!==this.dataPatched.cloner?.hideBase),!t)return;let e=!1;this.traverseEntity(t=>{if("Splat"===t.data.type)return e=!0,!0}),e&&t.reloadSplats()}updateState_Entity(t,e){void 0!==t.name&&(this.name=t.name),void 0!==t.raycastLock&&(this.raycastLock=t.raycastLock),void 0!==t.visible&&(this.updateVisible(e?.scene),this.resetBBoxNeedsUpdate()),e&&"cloner"in t&&void 0!==t.cloner&&(this.setFromClonerState(t.cloner,e),this.updateVisible(e.scene)),this.updateTransformState(t,e)}get attachedSurfaceCloners(){return this.children.filter(t=>e(t)&&"toObject"===t.parameters.type)}setFromClonerState(t,e){if(!this.disposed)if(null===t||t.disabled)this.cloner&&this.cloner.dispose(),this.cloner=void 0;else if(void 0===this.cloner){if(null===C.Cloner)return void i("cloners","a cloner");this.cloner=new C.Cloner(this,t),e.scene.addPendingExpandCloner(this)}else this.cloner.updateState(t,e)}expandCloner(t){!this.disposed&&this.cloner&&this.cloner.expandClones(t)}invalidateClonerTransform(t){this.cloner&&this.cloner.invalidateTransform(t)}requestRender(){this.dispatchEvent({type:"requestRender"})}},Ot=class{static create(t){return this.build(this.normalizeInputs(t))}static normalizeInputs(t,e){let i=Object.assign({},e?.parameters??{width:100,revolutions:2,segments:40,pathRadius:10,pathType:0,pathSegments:30,cornerRadius:30,cornerSegments:4},t.parameters),r=Math.abs(i.width),s=Math.abs(i.height??r),a=Math.abs(i.depth??r),n=Math.abs(Math.min(r,a))/2;return{parameters:Object.assign(i,{width:r,height:s,depth:a,radius:n,segments:Math.round(i.segments),pathSegments:Math.round(i.pathSegments),cornerSegments:Math.round(i.cornerSegments)})}}static build(t){let{width:e,height:i,depth:r,radius:s,revolutions:a,segments:n,pathRadius:o,pathType:l,pathSegments:h,cornerRadius:p,cornerSegments:d}=t.parameters,c=new Tt(!1,e,i,r,s,a,n,o,l,h,p,d);return Object.assign(c,{userData:{...t,type:"HelixGeometry"}})}},Vt=new c([0,0,0],1);function Wt(t){return"TorusGeometry"===t.type&&360===t.arc}var _t,Rt,Tt=class extends P{constructor(t=!0,e=1,i=1,r=1,s=1,a=1,n=1,o=1,l=1,h=1,p=1,d=1){if(super(),0===a)return;let c=t&&1===a;c&&(d=0),p>100&&(p=100),0===p&&(d=0);let u,m,y,g,v,x,S,w,M=()=>new f,B=new f,P=M(),E=M(),A=M(),C=M(),D=M(),O=M(),V=M(),W=M(),_=M(),R=M(),T=M(),U=i-2*o+.001,L=U/a,z=Math.ceil(n*a),I=z+1,F=U/z,N=-U/2,j=h+1,k=2*Math.PI/h,q=Math.PI/2/d,G=Math.min((1-p/100)*o,o-.01),H=o-G,X=0,Z=2*d+2,K=j*Z/2,Q=K+j*I,$=Math.max(0,j*(I+Z)),[J,Y,tt]=[3,3,2].map(t=>Array($*t).fill(0)),et=[],it=s-o;function rt(e,i){let r=Math.PI/2;x=i*F,w=2*Math.PI*(x%L)/L+r,x+=N,S=Math.sin(w)*it,v=Math.cos(w)*it,t?e.set(v,S,x):e.set(v,x,S)}rt(B,-1e-10),rt(P,0),C.copy(B),rt(B,1);let st=B.distanceTo(P),at=c?0:H+G,nt=st*z+2*at,ot=G,lt=nt-at;for(let e=0;e<=z;e++){rt(E,e),T.subVectors(E,C).normalize(),C.copy(E),_.copy(E).setComponent(+t+1,0).normalize(),R.crossVectors(T,_).normalize();let i=0===e,r=e===z,s=i?3*Math.PI/2:q,a=i?ot:lt,n=i?j:Q,l=i?0:$-j,p=T.clone().multiplyScalar(i?-H:H).add(E),u=T.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<j;t++){let m=t*k;if(D.addVectors(B.copy(_).multiplyScalar(o*Math.cos(m)),P.copy(R).multiplyScalar(o*Math.sin(m))),O.copy(D).normalize(),i||r){c||(X=l+t,[0,1,2].forEach(t=>{J[3*X+t]=p.getComponent(t),Y[3*X+t]=u.getComponent(t)}),tt[2*X]=+r,tt[2*X+1]=t/h),P.copy(O).multiplyScalar(G),A.addVectors(E,P);for(let e=0;e<d;e++){let r=e*q+s;V.addVectors(B.copy(T).multiplyScalar(H*Math.sin(r)),P.copy(O).multiplyScalar(H*Math.cos(r))),W.copy(V).normalize(),P.addVectors(A,V),V.normalize(),X=n+e*j+t,[0,1,2].forEach(t=>{J[3*X+t]=P.getComponent(t),Y[3*X+t]=W.getComponent(t)});let o=+i+Math.sin(r);tt[2*X]=(a+H*o)/nt,tt[2*X+1]=t/h}}P.addVectors(E,D),X=K+e*j+t,[0,1,2].forEach(t=>{J[3*X+t]=P.getComponent(t),Y[3*X+t]=O.getComponent(t)}),tt[2*X]=(at+e*st)/nt,tt[2*X+1]=t/h}}let ht=I+2*d+2,[pt,dt]=[+c,ht-1];for(let t=pt;t<=dt-1;t++){let e=c&&t===dt-1;for(let i=0;i<j-1;i++)u=t*j+i,m=u+1,y=(e?i:u)+j,g=(e?i+1:m)+j,0===t?et.push(m,g,y):t===ht-2?et.push(u,m,y):et.push(u,m,y,m,g,y)}this.setIndex(et),this.setAttribute("position",new b(J,3)),this.setAttribute("normal",new b(Y,3)),this.setAttribute("uv",new b(tt,2))}getClosedTorusIndicesForBooleanOrSubdiv(){let t,e,i,r,s=this.userData.parameters,a=Math.ceil(s.tubularSegments),n=s.radialSegments,o=n+1,l=[];for(let s=1;s<a;s++)for(let a=0;a<n;a++)t=s*o+a,e=t+1,i=t+o,r=e+o,l.push(t,e,i,e,r,i);for(let s=0;s<n;s++)t=a*o+s,e=t+1,i=s+o,r=s+1+o,l.push(t,e,i,e,r,i);return Vt.array=new Uint32Array(l),Vt.count=l.length,Vt}},Ut=new Map,Lt=0;function zt(t){return Rt||(Rt=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.58/build",i=import("./boolean.js"),[r,s]=await Promise.all([i,fetch(`${e}/boolean.wasm`).then(t=>t.arrayBuffer())]);await r.default({module_or_path:s}),_t=r}())}function It(){if(void 0===_t)throw new Error("boolean-wasm is not loaded");return _t}function Ft(t){let e=Ut.get(t);if(void 0===e)throw new Error("Unknown csg mesh set handle "+t);return e}function Nt(t){return Ut.set(++Lt,t),Lt}var jt={0:0,1:1,2:2};function kt(t,e,i){if(void 0===_t)return-1;let{positions:r,indices:s,normals:a}=function(t,e){if(e&&void 0!==t.userData.positions){let e=t.userData,i=[];for(let t=0,r=0;t<e.verticesPerFace.length;t++){let s=e.verticesPerFace[t];for(let t=1;t<s-1;t++)i.push(e.indices[r],e.indices[r+t],e.indices[r+t+1]);r+=s}return{positions:e.positions instanceof Float32Array?e.positions:new Float32Array(e.positions),indices:new Uint32Array(i)}}let i;i=Wt(t.userData.parameters)?t.getClosedTorusIndicesForBooleanOrSubdiv():t.getIndex();let r,s=t.getAttribute("position");if(null===i){r=new Uint32Array(s.count);for(let t=0;t<r.length;t++)r[t]=t}else r=i.array instanceof Uint32Array?i.array:new Uint32Array(i.array);let a=t.getAttribute("normal"),n=void 0!==a&&3===a.itemSize&&a.count===s.count&&a.array instanceof Float32Array&&!0!==a.isInterleavedBufferAttribute?a.array:void 0;return{positions:s.array,indices:r,normals:n}}(t,e);return Nt(new _t.CsgMesh(r,s,a))}function qt(t,e){let i=It(),r=jt[e];if(void 0===r)throw new Error("Unknown boolean operation "+e);let s=t.map(Ft);if(1===s.length)return i.clone_mesh(s[0]);let a,n=[];if(2===e&&s.length>2){let t=s[0];for(let e=1;e<s.length-1;e++)t=i.boolean_mesh(t,s[e],0),n.push(t);a=i.boolean_mesh(s[s.length-1],t,2)}else if(2===e)a=i.boolean_mesh(s[1],s[0],2);else{let t=s[s.length-1];for(let e=0;e<s.length-1&&(t=i.boolean_mesh(t,s[e],r),n.push(t),0!==t.tri_count());e++);a=t,n.pop()}for(let t of n)t.free();return a}function Gt(t,e,i,r){let s=It(),a=qt(t,e),n=s.mesh_render_data(a,Math.max(r,0));if(i.setAttribute("position",new b(n.positions(),3)),i.setAttribute("normal",new b(n.normals(),3)),n.free(),null===i.boundingSphere&&(i.boundingSphere=new B),0===a.tri_count())i.boundingSphere.center.set(0,0,0),i.boundingSphere.radius=0,i.userData.parameters={width:0,height:0,depth:0};else{let t=a.bounds();i.boundingSphere.center.set(t[0],t[1],t[2]),i.boundingSphere.radius=(t[3]**2+t[4]**2+t[5]**2)**.5,i.userData.parameters={width:2*t[3],height:2*t[4],depth:2*t[5]}}return Nt(a)}function Ht(t,e){let i=It(),r=qt(t,e),s=i.mesh_topological_data(r),a=s.positions(),n=s.indices();return s.free(),r.free(),{positions:a,indices:n,verticesPerFace:new Uint8Array(n.length/3).fill(3)}}function Xt(t,e){Ft(t).transform(new Float32Array(e.elements))}function Zt(t){let e=Ut.get(t);void 0!==e&&(e.free(),Ut.delete(t))}function Kt(t,e){return Nt(It().instanced_union(Ft(t),e))}function Qt(t){return null!==t&&"booleanOp"in t}var $t=class extends(Dt(A)){constructor(){super(...arguments),this.booleanMeshSetAddress=-1,this.booleanWasTransformed=!1,this.booleanMatrixInvOld=new g}updateVisible(t){super.updateVisible(t),this.visible=!Qt(this.parent)&&this.visible,Qt(this.parent)&&this.parent.invalidateDownstreamBooleanData()}onClonerLayoutUpdated(){Qt(this.parent)&&this.invalidateDownstreamBooleanData()}freeBooleanPointer(){-1!==this.booleanMeshSetAddress&&(Zt(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}invalidateDownstreamBooleanData(t=!1){return t?this.booleanWasTransformed=!0:this.freeBooleanPointer(),Qt(this.parent)?this.parent.invalidateDownstreamBooleanData():this}invalidateUpstreamBooleanData(){this.freeBooleanPointer();for(let t of this.children)t instanceof $t&&(t.freeBooleanPointer(),Qt(t)&&t.invalidateUpstreamBooleanData())}updateTransformState(t,e){let i=super.updateTransformState(t,e);return i&&Qt(this.parent)&&this.invalidateDownstreamBooleanData(!0),i}onVariableUpdate(t=!1){super.onVariableUpdate(t),Qt(this.parent)&&this.invalidateDownstreamBooleanData(!0)}},Jt=new M;function Yt(t,e=0,i=t.count,r,s){let a=1/0,n=1/0,o=1/0,l=-1/0,h=-1/0,p=-1/0;for(let r=e;r<i;r++){let e=t.getX(r),i=t.getY(r),s=t.getZ(r);e<a&&(a=e),i<n&&(n=i),s<o&&(o=s),e>l&&(l=e),i>h&&(h=i),s>p&&(p=s)}Jt.min.set(a,n,o),Jt.max.set(l,h,p),Jt.getCenter(r),Jt.getSize(s).multiplyScalar(.5)}var te=new P,ee=new E,ie=class extends $t{constructor(t,e){super(te,ee),this.super_Entity(t,e)}updateState(t,e){this.updateState_Entity(t,e)}raycast(t,e){super.raycast(t,e)}updateEntityBoxSize(t,e){let i=this.geometry.getAttribute("position");void 0!==i?Yt(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,e):super.updateEntityBoxSize(t,e)}};export{D as a,O as b,C as c,Q as d,$ as e,Y as f,ut as g,mt as h,wt as i,Dt as j,Ot as k,Wt as l,Tt as m,zt as n,kt as o,Gt as p,Ht as q,Xt as r,Zt as s,Kt as t,Yt as u,ie as v};
|
|
Binary file
|
|
Binary file
|