@splinetool/runtime 2.0.5 → 2.0.7
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/hana-ui.js +44 -40
- package/build/hana-ui.js.br +0 -0
- package/build/hana-ui.js.gz +0 -0
- package/build/hana-ui.wasm +0 -0
- package/build/hana-ui.wasm.br +0 -0
- package/build/hana-ui.wasm.gz +0 -0
- package/build/opentype.js +1 -1
- package/build/opentype.js.br +0 -0
- package/build/opentype.js.gz +0 -0
- package/build/{runtime-aiAssistant-RMA2DMFU.js → runtime-aiAssistant-KCI2YU3F.js} +1 -1
- package/build/runtime-aiAssistant-KCI2YU3F.js.br +0 -0
- package/build/runtime-aiAssistant-KCI2YU3F.js.gz +0 -0
- package/build/{runtime-apiServices-KA4FEP5Y.js → runtime-apiServices-EYRJ5E55.js} +1 -1
- package/build/runtime-apiServices-EYRJ5E55.js.br +0 -0
- package/build/runtime-apiServices-EYRJ5E55.js.gz +0 -0
- package/build/{runtime-audio-BQSRM3W2.js → runtime-audio-TEHDPDRZ.js} +1 -1
- package/build/runtime-audio-TEHDPDRZ.js.br +4 -0
- package/build/runtime-audio-TEHDPDRZ.js.gz +0 -0
- package/build/{runtime-chunk-6WHNEYAL.js → runtime-chunk-3LIYAJXD.js} +1 -1
- package/build/runtime-chunk-3LIYAJXD.js.br +0 -0
- package/build/runtime-chunk-3LIYAJXD.js.gz +0 -0
- package/build/{runtime-chunk-QPB2TL3G.js → runtime-chunk-4DM3XFSJ.js} +1 -1
- package/build/runtime-chunk-4DM3XFSJ.js.br +0 -0
- package/build/runtime-chunk-4DM3XFSJ.js.gz +0 -0
- package/build/{runtime-chunk-MBBODDV7.js → runtime-chunk-5H2Z5KYI.js} +1 -1
- package/build/runtime-chunk-5H2Z5KYI.js.br +0 -0
- package/build/{runtime-chunk-MBBODDV7.js.gz → runtime-chunk-5H2Z5KYI.js.gz} +0 -0
- package/build/{runtime-chunk-P2QJHRIH.js → runtime-chunk-5P3HUPT4.js} +1 -1
- package/build/runtime-chunk-5P3HUPT4.js.br +0 -0
- package/build/runtime-chunk-5P3HUPT4.js.gz +0 -0
- package/build/{runtime-chunk-243VQV5T.js → runtime-chunk-72GELULA.js} +1 -1
- package/build/runtime-chunk-72GELULA.js.br +0 -0
- package/build/runtime-chunk-72GELULA.js.gz +0 -0
- package/build/{runtime-chunk-EGI7ABC6.js → runtime-chunk-BHBI2VFL.js} +1 -1
- package/build/runtime-chunk-BHBI2VFL.js.br +0 -0
- package/build/runtime-chunk-BHBI2VFL.js.gz +0 -0
- package/build/{runtime-chunk-IK4H7UNI.js → runtime-chunk-BR3T7PBD.js} +1 -1
- package/build/runtime-chunk-BR3T7PBD.js.br +0 -0
- package/build/runtime-chunk-BR3T7PBD.js.gz +0 -0
- package/build/{runtime-chunk-PLJ25O2X.js → runtime-chunk-DCPBSRSM.js} +1 -1
- package/build/runtime-chunk-DCPBSRSM.js.br +0 -0
- package/build/runtime-chunk-DCPBSRSM.js.gz +0 -0
- package/build/{runtime-chunk-U6S2BBR7.js → runtime-chunk-E3ZOKGVW.js} +1 -1
- package/build/runtime-chunk-E3ZOKGVW.js.br +0 -0
- package/build/runtime-chunk-E3ZOKGVW.js.gz +0 -0
- package/build/{runtime-chunk-NIDXMSZY.js → runtime-chunk-EKVJUEYP.js} +1 -1
- package/build/runtime-chunk-EKVJUEYP.js.br +0 -0
- package/build/runtime-chunk-EKVJUEYP.js.gz +0 -0
- package/build/{runtime-chunk-QVC5UDJO.js → runtime-chunk-EPHVY3XO.js} +1 -1
- package/build/runtime-chunk-EPHVY3XO.js.br +0 -0
- package/build/runtime-chunk-EPHVY3XO.js.gz +0 -0
- package/build/{runtime-chunk-IGBRWWDI.js → runtime-chunk-H7J7NLSC.js} +1 -1
- package/build/runtime-chunk-H7J7NLSC.js.br +0 -0
- package/build/runtime-chunk-H7J7NLSC.js.gz +0 -0
- package/build/{runtime-chunk-OTAMLWBD.js → runtime-chunk-HDFBDUFX.js} +1 -1
- package/build/runtime-chunk-HDFBDUFX.js.br +0 -0
- package/build/runtime-chunk-HDFBDUFX.js.gz +0 -0
- package/build/{runtime-chunk-DSGSWXCQ.js → runtime-chunk-ITMHVNES.js} +1 -1
- package/build/runtime-chunk-ITMHVNES.js.br +0 -0
- package/build/runtime-chunk-ITMHVNES.js.gz +0 -0
- package/build/{runtime-chunk-YWT6AWL4.js → runtime-chunk-JVRISZP3.js} +1 -1
- package/build/runtime-chunk-JVRISZP3.js.br +0 -0
- package/build/runtime-chunk-JVRISZP3.js.gz +0 -0
- package/build/{runtime-chunk-LALFWESO.js → runtime-chunk-LX7POLY3.js} +1 -1
- package/build/runtime-chunk-LX7POLY3.js.br +0 -0
- package/build/runtime-chunk-LX7POLY3.js.gz +0 -0
- package/build/{runtime-chunk-USXMESRF.js → runtime-chunk-M3ZKF7PK.js} +1 -1
- package/build/runtime-chunk-M3ZKF7PK.js.br +0 -0
- package/build/runtime-chunk-M3ZKF7PK.js.gz +0 -0
- package/build/{runtime-chunk-PRQYD4EW.js → runtime-chunk-NPNRGCX3.js} +1 -1
- package/build/runtime-chunk-NPNRGCX3.js.br +0 -0
- package/build/runtime-chunk-NPNRGCX3.js.gz +0 -0
- package/build/{runtime-chunk-DZOSSY2K.js → runtime-chunk-O37H7LZI.js} +1 -1
- package/build/runtime-chunk-O37H7LZI.js.br +0 -0
- package/build/runtime-chunk-O37H7LZI.js.gz +0 -0
- package/build/{runtime-chunk-SXDO5LXF.js → runtime-chunk-O5TGJH3R.js} +1 -1
- package/build/runtime-chunk-O5TGJH3R.js.br +0 -0
- package/build/runtime-chunk-O5TGJH3R.js.gz +0 -0
- package/build/{runtime-chunk-DNWPGXEC.js → runtime-chunk-PEOLFGBX.js} +1 -1
- package/build/runtime-chunk-PEOLFGBX.js.br +0 -0
- package/build/runtime-chunk-PEOLFGBX.js.gz +0 -0
- package/build/{runtime-chunk-F7OUYIT6.js → runtime-chunk-QPWV26TX.js} +1 -1
- package/build/runtime-chunk-QPWV26TX.js.br +0 -0
- package/build/runtime-chunk-QPWV26TX.js.gz +0 -0
- package/build/runtime-chunk-RDQUMMBI.js +1 -0
- package/build/runtime-chunk-RDQUMMBI.js.br +0 -0
- package/build/runtime-chunk-RDQUMMBI.js.gz +0 -0
- package/build/{runtime-chunk-V3U2TPGQ.js → runtime-chunk-SBMXYV5Q.js} +1 -1
- package/build/runtime-chunk-SBMXYV5Q.js.br +0 -0
- package/build/runtime-chunk-SBMXYV5Q.js.gz +0 -0
- package/build/{runtime-chunk-RSPDUS6G.js → runtime-chunk-TONK22EB.js} +1 -1
- package/build/runtime-chunk-TONK22EB.js.br +0 -0
- package/build/runtime-chunk-TONK22EB.js.gz +0 -0
- package/build/{runtime-chunk-5XUI4Z6R.js → runtime-chunk-U4QOT2PX.js} +1 -1
- package/build/runtime-chunk-U4QOT2PX.js.br +0 -0
- package/build/runtime-chunk-U4QOT2PX.js.gz +0 -0
- package/build/{runtime-chunk-J4FFQBNR.js → runtime-chunk-UYADWI5Q.js} +1 -1
- package/build/runtime-chunk-UYADWI5Q.js.br +0 -0
- package/build/runtime-chunk-UYADWI5Q.js.gz +0 -0
- package/build/runtime-chunk-VPEJ5BFD.js +1 -0
- package/build/runtime-chunk-VPEJ5BFD.js.br +0 -0
- package/build/runtime-chunk-VPEJ5BFD.js.gz +0 -0
- package/build/{runtime-chunk-2657LZHS.js → runtime-chunk-WZWD2YIG.js} +1 -1
- package/build/runtime-chunk-WZWD2YIG.js.br +0 -0
- package/build/runtime-chunk-WZWD2YIG.js.gz +0 -0
- package/build/{runtime-chunk-CDZQF4NV.js → runtime-chunk-XL37JGAH.js} +1 -1
- package/build/runtime-chunk-XL37JGAH.js.br +0 -0
- package/build/runtime-chunk-XL37JGAH.js.gz +0 -0
- package/build/{runtime-chunk-Y365A3K5.js → runtime-chunk-XYRJFDFM.js} +1 -1
- package/build/runtime-chunk-XYRJFDFM.js.br +0 -0
- package/build/runtime-chunk-XYRJFDFM.js.gz +0 -0
- package/build/{runtime-classicRuntime-BD2WFYXF.js → runtime-classicRuntime-T2PZUVVV.js} +1 -1
- package/build/runtime-classicRuntime-T2PZUVVV.js.br +0 -0
- package/build/runtime-classicRuntime-T2PZUVVV.js.gz +0 -0
- package/build/runtime-cloners-TRZ7JQLO.js +1 -0
- package/build/runtime-cloners-TRZ7JQLO.js.br +0 -0
- package/build/runtime-cloners-TRZ7JQLO.js.gz +0 -0
- package/build/{runtime-components-RLXFVT5A.js → runtime-components-VZOXPM65.js} +1 -1
- package/build/runtime-components-VZOXPM65.js.br +0 -0
- package/build/runtime-components-VZOXPM65.js.gz +0 -0
- package/build/{runtime-conditional-DCOFCW5I.js → runtime-conditional-HGOAXTBF.js} +1 -1
- package/build/{runtime-conditional-DCOFCW5I.js.br → runtime-conditional-HGOAXTBF.js.br} +0 -0
- package/build/runtime-conditional-HGOAXTBF.js.gz +0 -0
- package/build/{runtime-createDestroy-4PG4ZWLI.js → runtime-createDestroy-AXHU4HXJ.js} +1 -1
- package/build/runtime-createDestroy-AXHU4HXJ.js.br +0 -0
- package/build/runtime-createDestroy-AXHU4HXJ.js.gz +0 -0
- package/build/{runtime-dragDrop-CTXPZ6OW.js → runtime-dragDrop-CKSSHBJ2.js} +1 -1
- package/build/runtime-dragDrop-CKSSHBJ2.js.br +0 -0
- package/build/runtime-dragDrop-CKSSHBJ2.js.gz +0 -0
- package/build/{runtime-fxBloom-IGFV4KJD.js → runtime-fxBloom-KENIJKIM.js} +1 -1
- package/build/runtime-fxBloom-KENIJKIM.js.br +0 -0
- package/build/runtime-fxBloom-KENIJKIM.js.gz +0 -0
- package/build/runtime-fxDepthOfField-XNWQKT4G.js +1 -0
- package/build/runtime-fxDepthOfField-XNWQKT4G.js.br +0 -0
- package/build/runtime-fxDepthOfField-XNWQKT4G.js.gz +0 -0
- package/build/{runtime-gameControls-LUALVLF5.js → runtime-gameControls-Y42GYPNR.js} +1 -1
- package/build/runtime-gameControls-Y42GYPNR.js.br +0 -0
- package/build/runtime-gameControls-Y42GYPNR.js.gz +0 -0
- package/build/runtime-hair-FXERW4BM.js +1 -0
- package/build/runtime-hair-FXERW4BM.js.br +2 -0
- package/build/runtime-hair-FXERW4BM.js.gz +0 -0
- package/build/{runtime-mergeStaticGeometries-QDKIDV27.js → runtime-mergeStaticGeometries-7CWREJDS.js} +1 -1
- package/build/runtime-mergeStaticGeometries-7CWREJDS.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-7CWREJDS.js.gz +0 -0
- package/build/{runtime-miscActions-FCQTXDEH.js → runtime-miscActions-UBT3FDIC.js} +1 -1
- package/build/runtime-miscActions-UBT3FDIC.js.br +0 -0
- package/build/runtime-miscActions-UBT3FDIC.js.gz +0 -0
- package/build/{runtime-mouseHover-GP5TEPLG.js → runtime-mouseHover-GDKHMRYT.js} +1 -1
- package/build/runtime-mouseHover-GDKHMRYT.js.br +0 -0
- package/build/runtime-mouseHover-GDKHMRYT.js.gz +0 -0
- package/build/{runtime-particles-VMYZZSAL.js → runtime-particles-H6ZGTDQ3.js} +1 -1
- package/build/runtime-particles-H6ZGTDQ3.js.br +0 -0
- package/build/runtime-particles-H6ZGTDQ3.js.gz +0 -0
- package/build/{runtime-paths-TGU7JOOY.js → runtime-paths-HN53AEBL.js} +1 -1
- package/build/runtime-paths-HN53AEBL.js.br +0 -0
- package/build/runtime-paths-HN53AEBL.js.gz +0 -0
- package/build/{runtime-resize-O3Y2XS2Q.js → runtime-resize-TUVUJVJY.js} +1 -1
- package/build/runtime-resize-TUVUJVJY.js.br +0 -0
- package/build/runtime-resize-TUVUJVJY.js.gz +0 -0
- package/build/{runtime-sceneTransition-4DDTFDJN.js → runtime-sceneTransition-DTM34VVE.js} +1 -1
- package/build/runtime-sceneTransition-DTM34VVE.js.br +0 -0
- package/build/runtime-sceneTransition-DTM34VVE.js.gz +0 -0
- package/build/{runtime-scroll-ET44H7JC.js → runtime-scroll-AFN3LCAC.js} +1 -1
- package/build/runtime-scroll-AFN3LCAC.js.br +0 -0
- package/build/runtime-scroll-AFN3LCAC.js.gz +0 -0
- package/build/runtime-shapeBlends-DOVFXT5Z.js +1 -0
- package/build/runtime-shapeBlends-DOVFXT5Z.js.br +0 -0
- package/build/runtime-shapeBlends-DOVFXT5Z.js.gz +0 -0
- package/build/runtime-text-HV7E4TSW.js +1 -0
- package/build/runtime-text-HV7E4TSW.js.br +0 -0
- package/build/runtime-text-HV7E4TSW.js.gz +0 -0
- package/build/{runtime-textInputs-E72WPYQU.js → runtime-textInputs-77LAXHNH.js} +1 -1
- package/build/runtime-textInputs-77LAXHNH.js.br +0 -0
- package/build/runtime-textInputs-77LAXHNH.js.gz +0 -0
- package/build/{runtime-timeline-2VAMFUOE.js → runtime-timeline-GUSMJD46.js} +1 -1
- package/build/runtime-timeline-GUSMJD46.js.br +0 -0
- package/build/runtime-timeline-GUSMJD46.js.gz +0 -0
- package/build/{runtime-tracking-E72XXGER.js → runtime-tracking-XZCI3RKR.js} +1 -1
- package/build/runtime-tracking-XZCI3RKR.js.br +0 -0
- package/build/runtime-tracking-XZCI3RKR.js.gz +0 -0
- package/build/{runtime-transitions-JOHZRI2L.js → runtime-transitions-SBVQ7DIZ.js} +1 -1
- package/build/runtime-transitions-SBVQ7DIZ.js.br +0 -0
- package/build/runtime-transitions-SBVQ7DIZ.js.gz +0 -0
- package/build/runtime-ui2d-KEK4JA3H.js +1 -0
- package/build/runtime-ui2d-KEK4JA3H.js.br +0 -0
- package/build/runtime-ui2d-KEK4JA3H.js.gz +0 -0
- package/build/{runtime-updater-3ELP7WMM.js → runtime-updater-GOXAMNAK.js} +1 -1
- package/build/runtime-updater-GOXAMNAK.js.br +5 -0
- package/build/runtime-updater-GOXAMNAK.js.gz +0 -0
- package/build/{runtime-variables-Q6Q2JCGI.js → runtime-variables-36KLHNE5.js} +1 -1
- package/build/runtime-variables-36KLHNE5.js.br +0 -0
- package/build/runtime-variables-36KLHNE5.js.gz +0 -0
- package/build/{runtime-vectorShapes-FKC6EQWI.js → runtime-vectorShapes-U7BI3CMD.js} +1 -1
- package/build/runtime-vectorShapes-U7BI3CMD.js.br +0 -0
- package/build/runtime-vectorShapes-U7BI3CMD.js.gz +0 -0
- package/build/{runtime-video-DUDXGADJ.js → runtime-video-XIULR4BY.js} +1 -1
- package/build/runtime-video-XIULR4BY.js.br +0 -0
- package/build/runtime-video-XIULR4BY.js.gz +0 -0
- package/build/runtime-webgpu-3QIPQDJ4.js +1 -0
- package/build/runtime-webgpu-3QIPQDJ4.js.br +0 -0
- package/build/runtime-webgpu-3QIPQDJ4.js.gz +0 -0
- package/build/runtime.cjs +323 -323
- 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 +2 -1
- package/build/runtime-aiAssistant-RMA2DMFU.js.br +0 -0
- package/build/runtime-aiAssistant-RMA2DMFU.js.gz +0 -0
- package/build/runtime-apiServices-KA4FEP5Y.js.br +0 -0
- package/build/runtime-apiServices-KA4FEP5Y.js.gz +0 -0
- package/build/runtime-audio-BQSRM3W2.js.br +0 -0
- package/build/runtime-audio-BQSRM3W2.js.gz +0 -0
- package/build/runtime-chunk-243VQV5T.js.br +0 -0
- package/build/runtime-chunk-243VQV5T.js.gz +0 -0
- package/build/runtime-chunk-2657LZHS.js.br +0 -0
- package/build/runtime-chunk-2657LZHS.js.gz +0 -0
- package/build/runtime-chunk-5XUI4Z6R.js.br +0 -0
- package/build/runtime-chunk-5XUI4Z6R.js.gz +0 -0
- package/build/runtime-chunk-6WHNEYAL.js.br +0 -0
- package/build/runtime-chunk-6WHNEYAL.js.gz +0 -0
- package/build/runtime-chunk-CDZQF4NV.js.br +0 -0
- package/build/runtime-chunk-CDZQF4NV.js.gz +0 -0
- package/build/runtime-chunk-DNWPGXEC.js.br +0 -0
- package/build/runtime-chunk-DNWPGXEC.js.gz +0 -0
- package/build/runtime-chunk-DSGSWXCQ.js.br +0 -0
- package/build/runtime-chunk-DSGSWXCQ.js.gz +0 -0
- package/build/runtime-chunk-DZOSSY2K.js.br +0 -0
- package/build/runtime-chunk-DZOSSY2K.js.gz +0 -0
- package/build/runtime-chunk-EGI7ABC6.js.br +0 -0
- package/build/runtime-chunk-EGI7ABC6.js.gz +0 -0
- package/build/runtime-chunk-F7OUYIT6.js.br +0 -0
- package/build/runtime-chunk-F7OUYIT6.js.gz +0 -0
- package/build/runtime-chunk-IGBRWWDI.js.br +0 -0
- package/build/runtime-chunk-IGBRWWDI.js.gz +0 -0
- package/build/runtime-chunk-IK4H7UNI.js.br +0 -0
- package/build/runtime-chunk-IK4H7UNI.js.gz +0 -0
- package/build/runtime-chunk-J4FFQBNR.js.br +0 -0
- package/build/runtime-chunk-J4FFQBNR.js.gz +0 -0
- package/build/runtime-chunk-LALFWESO.js.br +0 -0
- package/build/runtime-chunk-LALFWESO.js.gz +0 -0
- package/build/runtime-chunk-MBBODDV7.js.br +0 -0
- package/build/runtime-chunk-NIDXMSZY.js.br +0 -0
- package/build/runtime-chunk-NIDXMSZY.js.gz +0 -0
- package/build/runtime-chunk-OTAMLWBD.js.br +0 -0
- package/build/runtime-chunk-OTAMLWBD.js.gz +0 -0
- package/build/runtime-chunk-OW6T4XFV.js +0 -1
- package/build/runtime-chunk-OW6T4XFV.js.br +0 -0
- package/build/runtime-chunk-OW6T4XFV.js.gz +0 -0
- package/build/runtime-chunk-P2QJHRIH.js.br +0 -0
- package/build/runtime-chunk-P2QJHRIH.js.gz +0 -0
- package/build/runtime-chunk-PLJ25O2X.js.br +0 -0
- package/build/runtime-chunk-PLJ25O2X.js.gz +0 -0
- package/build/runtime-chunk-PRQYD4EW.js.br +0 -0
- package/build/runtime-chunk-PRQYD4EW.js.gz +0 -0
- package/build/runtime-chunk-QPB2TL3G.js.br +0 -0
- package/build/runtime-chunk-QPB2TL3G.js.gz +0 -0
- package/build/runtime-chunk-QVC5UDJO.js.br +0 -0
- package/build/runtime-chunk-QVC5UDJO.js.gz +0 -0
- package/build/runtime-chunk-RSPDUS6G.js.br +0 -0
- package/build/runtime-chunk-RSPDUS6G.js.gz +0 -0
- package/build/runtime-chunk-RWL6KR5S.js +0 -1
- package/build/runtime-chunk-RWL6KR5S.js.br +0 -0
- package/build/runtime-chunk-RWL6KR5S.js.gz +0 -0
- package/build/runtime-chunk-SXDO5LXF.js.br +0 -0
- package/build/runtime-chunk-SXDO5LXF.js.gz +0 -0
- package/build/runtime-chunk-U6S2BBR7.js.br +0 -0
- package/build/runtime-chunk-U6S2BBR7.js.gz +0 -0
- package/build/runtime-chunk-USXMESRF.js.br +0 -0
- package/build/runtime-chunk-USXMESRF.js.gz +0 -0
- package/build/runtime-chunk-V3U2TPGQ.js.br +0 -0
- package/build/runtime-chunk-V3U2TPGQ.js.gz +0 -0
- package/build/runtime-chunk-Y365A3K5.js.br +0 -0
- package/build/runtime-chunk-Y365A3K5.js.gz +0 -0
- package/build/runtime-chunk-YWT6AWL4.js.br +0 -0
- package/build/runtime-chunk-YWT6AWL4.js.gz +0 -0
- package/build/runtime-classicRuntime-BD2WFYXF.js.br +0 -0
- package/build/runtime-classicRuntime-BD2WFYXF.js.gz +0 -0
- package/build/runtime-cloners-ST66KGZH.js +0 -1
- package/build/runtime-cloners-ST66KGZH.js.br +0 -1
- package/build/runtime-cloners-ST66KGZH.js.gz +0 -0
- package/build/runtime-components-RLXFVT5A.js.br +0 -0
- package/build/runtime-components-RLXFVT5A.js.gz +0 -0
- package/build/runtime-conditional-DCOFCW5I.js.gz +0 -0
- package/build/runtime-createDestroy-4PG4ZWLI.js.br +0 -0
- package/build/runtime-createDestroy-4PG4ZWLI.js.gz +0 -0
- package/build/runtime-dragDrop-CTXPZ6OW.js.br +0 -0
- package/build/runtime-dragDrop-CTXPZ6OW.js.gz +0 -0
- package/build/runtime-fxBloom-IGFV4KJD.js.br +0 -0
- package/build/runtime-fxBloom-IGFV4KJD.js.gz +0 -0
- package/build/runtime-fxDepthOfField-WX7WD3K4.js +0 -1
- package/build/runtime-fxDepthOfField-WX7WD3K4.js.br +0 -0
- package/build/runtime-fxDepthOfField-WX7WD3K4.js.gz +0 -0
- package/build/runtime-gameControls-LUALVLF5.js.br +0 -0
- package/build/runtime-gameControls-LUALVLF5.js.gz +0 -0
- package/build/runtime-hair-JNRT3G3X.js +0 -1
- package/build/runtime-hair-JNRT3G3X.js.br +0 -1
- package/build/runtime-hair-JNRT3G3X.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-QDKIDV27.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-QDKIDV27.js.gz +0 -0
- package/build/runtime-miscActions-FCQTXDEH.js.br +0 -0
- package/build/runtime-miscActions-FCQTXDEH.js.gz +0 -0
- package/build/runtime-mouseHover-GP5TEPLG.js.br +0 -0
- package/build/runtime-mouseHover-GP5TEPLG.js.gz +0 -0
- package/build/runtime-particles-VMYZZSAL.js.br +0 -0
- package/build/runtime-particles-VMYZZSAL.js.gz +0 -0
- package/build/runtime-paths-TGU7JOOY.js.br +0 -0
- package/build/runtime-paths-TGU7JOOY.js.gz +0 -0
- package/build/runtime-resize-O3Y2XS2Q.js.br +0 -0
- package/build/runtime-resize-O3Y2XS2Q.js.gz +0 -0
- package/build/runtime-sceneTransition-4DDTFDJN.js.br +0 -0
- package/build/runtime-sceneTransition-4DDTFDJN.js.gz +0 -0
- package/build/runtime-scroll-ET44H7JC.js.br +0 -0
- package/build/runtime-scroll-ET44H7JC.js.gz +0 -0
- package/build/runtime-shapeBlends-3FCSH6PN.js +0 -1
- package/build/runtime-shapeBlends-3FCSH6PN.js.br +0 -2
- package/build/runtime-shapeBlends-3FCSH6PN.js.gz +0 -0
- package/build/runtime-text-UQIUL5X6.js +0 -1
- package/build/runtime-text-UQIUL5X6.js.br +0 -0
- package/build/runtime-text-UQIUL5X6.js.gz +0 -0
- package/build/runtime-textInputs-E72WPYQU.js.br +0 -0
- package/build/runtime-textInputs-E72WPYQU.js.gz +0 -0
- package/build/runtime-timeline-2VAMFUOE.js.br +0 -0
- package/build/runtime-timeline-2VAMFUOE.js.gz +0 -0
- package/build/runtime-tracking-E72XXGER.js.br +0 -0
- package/build/runtime-tracking-E72XXGER.js.gz +0 -0
- package/build/runtime-transitions-JOHZRI2L.js.br +0 -0
- package/build/runtime-transitions-JOHZRI2L.js.gz +0 -0
- package/build/runtime-ui2d-PJKKRE32.js +0 -1
- package/build/runtime-ui2d-PJKKRE32.js.br +0 -0
- package/build/runtime-ui2d-PJKKRE32.js.gz +0 -0
- package/build/runtime-updater-3ELP7WMM.js.br +0 -1
- package/build/runtime-updater-3ELP7WMM.js.gz +0 -0
- package/build/runtime-variables-Q6Q2JCGI.js.br +0 -0
- package/build/runtime-variables-Q6Q2JCGI.js.gz +0 -0
- package/build/runtime-vectorShapes-FKC6EQWI.js.br +0 -0
- package/build/runtime-vectorShapes-FKC6EQWI.js.gz +0 -0
- package/build/runtime-video-DUDXGADJ.js.br +0 -0
- package/build/runtime-video-DUDXGADJ.js.gz +0 -0
- package/build/runtime-webgpu-TBHSGHNI.js +0 -1
- package/build/runtime-webgpu-TBHSGHNI.js.br +0 -0
- package/build/runtime-webgpu-TBHSGHNI.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./runtime-chunk-E3ZOKGVW.js";import"./runtime-chunk-72GELULA.js";import"./runtime-chunk-QPWV26TX.js";import"./runtime-chunk-3LIYAJXD.js";import"./runtime-chunk-LX7POLY3.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{c as m}from"./runtime-chunk-DCPBSRSM.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-U4QOT2PX.js";import{a as n}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-VPEJ5BFD.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";m.Cloner=r,n("cloners");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./runtime-chunk-
|
|
1
|
+
import{a as e}from"./runtime-chunk-ITMHVNES.js";import{a as t}from"./runtime-chunk-O37H7LZI.js";import{d as n}from"./runtime-chunk-XL37JGAH.js";import{ea as i}from"./runtime-chunk-LX7POLY3.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{c as s,h as o}from"./runtime-chunk-DCPBSRSM.js";import"./runtime-chunk-2PT2WH66.js";import{d as r,f as a}from"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-U4QOT2PX.js";import{a as p,d}from"./runtime-chunk-TZCHGFVF.js";import{Ba as l,Ca as c,Ja as h,K as u,i as m,j as f,wa as y}from"./runtime-chunk-VPEJ5BFD.js";import{Oc as v,Sc as g,od as j}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var k=class extends(n(g,t)){constructor(e,t,n){super(),this.isComponentObject=!0,"Instance"===t.type&&"string"==typeof e&&(t=this.transformAssignData(t,n)),this.super_Entity(e,t),this.objectHelper.update()}get isComponentRoot(){return"Component"===this.data.type&&"string"==typeof this.identity}get isInstanceRoot(){return"Instance"===this.data.type&&"string"==typeof this.identity}transformAssignData(e,t){let n=h.getComponentData({scene:t.scene.data,shared:t.shared.data},e.component);if(n){let t,i;for(let s of c.rootOverrideProps)void 0===e[s]?(void 0===t&&(t={...e}),t[s]=n.data[s]):(void 0===i&&(i={}),i[s]=e[s],void 0===t&&(t={...e}),t[s]=f.apply(n.data[s],e[s]));return this.overrideData=i,t}return{...y.defaultData,...e,...a(y.defaultData,c.rootOverrideProps)}}updateByOp(e,t,n,i){let s;if(this.isInstanceRoot&&!i)if(t=this.transformAssignData(t,n),0===e.type&&0===e.path.length&&this.component)for(let t of c.rootOverrideProps)t in e.props&&void 0===e.props[t]&&(void 0===s&&(s={...e,props:{...e.props}}),s.props[t]=this.component.data[t]);else if(0===e.type&&e.path.length>0&&c.rootOverrideProps.includes(e.path[0])){let n=e.path[0];void 0===s&&(s={...e,path:[],props:{[n]:t[n]}})}super.updateByOp(s??e,t,n,i)}updateState(e,t){this.updateState_Entity(e,t)}expandInstanceChildren(t){let n=this.data;if(void 0===this.component){let s=t.scene.find(n.component)??null,r=!1;if(s!==this.oldComponent){if(this.oldComponent){let n=0;for(let i of this.children){if(!o.is(i))break;t.scene.disposeAndUnregisterEntityRecursivelyIfNotReregistered(i),e(i),n+=1}this.children.splice(0,n)}r=!0}if(s){let e={};b(t,[this.uuid],n.overrides,this,s,s,0,r,e);for(let n of this.children)if(o.is(n)){let s=n.data;"Empty"===s.type&&s.animations&&n.traverseEntity(n=>{let s=n.dataPatched;if(n instanceof i&&s.bones&&s.boneInverses){let i=n.dataPatched;if(i.bones&&i.boneInverses){let s=i.bones.map(n=>t.scene.find(e[n])),o=i.boneInverses.map(e=>(new v).fromArray(e)),r=new j(s,o);n.bind(r,n.bindMatrix)}}else n.matrixAutoUpdate=!0})}}this.oldComponent=this.component}}};function I(e,t,n,i){return e.component===t&&r(e.identity,i)?e.overrideData===n?2:1:0}function b(e,t,n,i,r,a,p,d,c){if(p>50)return!1;if(i.component!==r){if(i.component){let e=i.component.instances.indexOf(i);e>=0&&i.component.instances.splice(e,1)}r.instances.find(e=>e===i)||r.instances.push(i),i.component=r}r instanceof k&&r.isInstanceRoot&&r.expandInstanceChildren(e);let h=0;for(let y of r.children)if(o.is(y)){let r=[...t,..."string"==typeof y.identity?[y.identity]:y.identity],v=l.resolve(n,r,1);null!=v&&!(v instanceof m)&&(Object.setPrototypeOf(v,m.prototype),console.error("wrong prototype"));let g,j=null;if(!d){let t=i.children[h];if(j=o.is(t)?t:null,null!==j){let e=I(j,y,v,r);g=e>=1?j.stateSelection:void 0,2!==e&&(j=null)}if(null===j&&(j=e.scene.findInstance(r)??null,null!==j)){let t=I(j,y,v,r);if(g=t>=1?j.stateSelection:void 0,2!==t)j=null;else{let t=j.parent.children.indexOf(j);j.parent.children.splice(t,1),i.children.splice(h,0,j),j.parent===i?t<=h&&console.error("not possible"):(j.parent=i,j.matrixWorldNeedsUpdate=!0,j.resetBBoxNeedsUpdate(),j.updateVisible(),e.pendingDeletes.delete(j))}}}if(null===j){let t=v?f.apply(y.data,v):y.data;u.is(t.type)&&(t={...t,type:"Empty"}),j=s.createEntity(r,t,e),j.overrideData=v,i.add(j),i.children.splice(i.children.length-1,1),i.children.splice(h,0,j),j.updateState(j.data,e),g&&j.changeSelectedState(g,e),e.scene.registerInstanceAndSetUuid(j)}j.isBone&&(c[j.identity[j.identity.length-1]]=j.uuid),h+=1,b(e,t,n,j,y,a,p+1,d,c)}if(!d){let t=h;for(;;){let t=i.children[h];if(!o.is(t))break;e.pendingDeletes.add(t),h+=1}i.children.splice(t,h-t)}return!0}var D=(e,t,n)=>new k(e,t,n);d("Component",D),d("Instance",D),p("components");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,b as i}from"./runtime-chunk-DZNU62CT.js";import{f as a,g as s}from"./runtime-chunk-
|
|
1
|
+
import{a as t,b as i}from"./runtime-chunk-DZNU62CT.js";import{f as a,g as s}from"./runtime-chunk-EPHVY3XO.js";import{e as o}from"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-U4QOT2PX.js";import{a as n}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-VPEJ5BFD.js";import{Ec as e,Fc as c,Oc as r,Pc as h}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var d=new c,p=new c,f=(new r,new c,new e,new c,new h,class{constructor(t,i,s,o,n){this.actionsIn=a(t,t.inActions,s,o,n,i),this.actionsOut=a(t,t.outActions,s,o,n,i)}disconnect(){s(this.actionsIn),s(this.actionsOut)}}),l=class extends f{constructor(t,i,a,s,o,n){super(i,a,s,o,n),this.id=t,this.data=i,this.object=a,this.stage="out",this.objects=[],this.onUpdateMatrixWorld=()=>{for(let t of this.objects)if(!t.visible)return;let t=d.setFromMatrixPosition(this.objects[0].matrixWorld),i=p.setFromMatrixPosition(this.objects[1].matrixWorld),a=t.distanceTo(i)<=this.distance?"in":"out";if(this.stage!==a){this.stage=a;let t="in"===a?this.actionsIn:this.actionsOut;t.Audio.forEach(t=>t.dispatchConditional()),t.Particles.forEach(t=>t.dispatchConditional()),t.Video.forEach(t=>t.dispatchConditional()),t.Link.forEach(t=>t.dispatch()),t.Create.forEach(t=>t.dispatch()),t.Destroy.forEach(t=>t.dispatch()),t.Reset.forEach(t=>t.dispatch()),t.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this),t.init()}),t.Transition.forEach(t=>t.play()),t.Animation.forEach(t=>t.play()),t.TimelineAnimation.forEach(t=>t.play()),t.SwitchCamera.forEach(t=>t.play()),t.SceneTransition.forEach(t=>t.dispatch()),t.SetVariable.forEach(t=>t.checkConditions()),t.SetVariable.forEach(t=>t.dispatch()),t.DynamicVariablePlay.forEach(t=>t.dispatch()),t.ClearLocalStorage.forEach(t=>t.dispatch()),t.UserAPI.forEach(t=>t.dispatch())}};let{distance:e,fromObject:c,toObject:r}=i.condition;this.distance=e;for(let t of[c,r]){if(!t)throw new Error("Missing property");let i=s.find(t);if(!i)throw new Error("Missing property");this.objects.push(i)}}connect(){window.setTimeout(()=>{this.objects.forEach(t=>{t.addEventListener("updateMatrixWorld",this.onUpdateMatrixWorld),t.addEventListener("updateMatrix",this.onUpdateMatrixWorld)}),this.onUpdateMatrixWorld()},0)}disconnect(){super.disconnect(),this.stage="out",this.objects.forEach(t=>{t.removeEventListener("updateMatrixWorld",this.onUpdateMatrixWorld),t.removeEventListener("updateMatrix",this.onUpdateMatrixWorld)})}},E=class extends f{constructor(t,i,a,s,o,n){super(i,a,s,o,n),this.id=t,this.data=i,this.object=a,this.onBegin=({target:t,state:i})=>{this.toState!==i&&(this.actionsOut.Audio.forEach(t=>t.dispatchConditional()),this.actionsOut.Particles.forEach(t=>t.dispatchConditional()),this.actionsOut.Video.forEach(t=>t.dispatchConditional()),this.actionsOut.Link.forEach(t=>t.dispatch()),this.actionsOut.Create.forEach(t=>t.dispatch()),this.actionsOut.Destroy.forEach(t=>t.dispatch()),this.actionsOut.Reset.forEach(t=>t.dispatch()),this.actionsIn.Transition.forEach(t=>t.pause()),this.object.currentTransitionEvent=this,this.actionsOut.Transition.forEach(t=>t.play()),this.actionsOut.Animation.forEach(t=>t.play()),this.actionsOut.TimelineAnimation.forEach(t=>t.play()),this.actionsIn.SwitchCamera.forEach(t=>t.pause()),this.actionsOut.SwitchCamera.forEach(t=>t.play()),this.actionsOut.SceneTransition.forEach(t=>t.dispatch()),this.actionsOut.SetVariable.forEach(t=>t.checkConditions()),this.actionsOut.SetVariable.forEach(t=>t.dispatch()),this.actionsOut.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actionsOut.ClearLocalStorage.forEach(t=>t.dispatch()),this.actionsOut.UserAPI.forEach(t=>t.dispatch()))},this.onComplete=({target:t,state:i})=>{this.toState===i&&(this.actionsIn.Audio.forEach(t=>t.dispatchConditional()),this.actionsIn.Particles.forEach(t=>t.dispatchConditional()),this.actionsIn.Video.forEach(t=>t.dispatchConditional()),this.actionsIn.Link.forEach(t=>t.dispatch()),this.actionsIn.Create.forEach(t=>t.dispatch()),this.actionsIn.Destroy.forEach(t=>t.dispatch()),this.actionsIn.Reset.forEach(t=>t.dispatch()),this.actionsOut.Transition.forEach(t=>t.pause()),this.actionsOut.Transition.forEach(t=>t.pause()),this.object.currentTransitionEvent=this,this.actionsIn.Transition.forEach(t=>t.play()),this.actionsIn.Animation.forEach(t=>t.play()),this.actionsIn.TimelineAnimation.forEach(t=>t.play()),this.actionsOut.SwitchCamera.forEach(t=>t.pause()),this.actionsIn.SwitchCamera.forEach(t=>t.play()),this.actionsIn.SceneTransition.forEach(t=>t.dispatch()),this.actionsIn.SetVariable.forEach(t=>t.checkConditions()),this.actionsIn.SetVariable.forEach(t=>t.dispatch()),this.actionsIn.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actionsOut.ClearLocalStorage.forEach(t=>t.dispatch()),this.actionsOut.UserAPI.forEach(t=>t.dispatch()))};let{condition:e}=i;if(!e.object)throw new Error("Missing property");let c=s.find(e.object)??s.scene.find2D(e.object);if(!c)throw new Error("Missing property");if(this.toObject=c,e.state&&!this.toObject.states?.[e.state])throw new Error("Missing property");this.toState=e.state}connect(){o(this.actionsOut).forEach(t=>{this.actionsOut[t]?.length&&this.toObject.addEventListener("beginState",this.onBegin)}),o(this.actionsIn).forEach(t=>{this.actionsIn[t]?.length&&this.toObject.addEventListener("completeState",this.onComplete)})}disconnect(){super.disconnect(),o(this.actionsOut).forEach(t=>{this.actionsIn[t]?.length&&this.toObject.removeEventListener("beginState",this.onBegin)}),o(this.actionsIn).forEach(t=>{this.actionsIn[t]?.length&&this.toObject.removeEventListener("completeState",this.onComplete)})}},u=class extends t{constructor(t,i){super(t),this.eventManager=i,this.eventsPerConditions={Comparison:[],Distance:[],State:[]},this.hasVideoAction=!1}connect(){super.connect();let{page:t,sharedAssets:i}=this.eventContext;t.traverseEntity(a=>{if(a.data?.events.length)for(let{id:s,data:o}of a.data.events)if(!o.disabled&&"Conditional"===o.type)try{let n;"Comparison"===o.condition.type||("Distance"===o.condition.type?n=new l(s,o,a,t,i,this.eventManager):"State"===o.condition.type&&(n=new E(s,o,a,t,i,this.eventManager))),n&&(this.eventsPerConditions[o.condition.type].push(n),(n.actionsIn.Video.length||n.actionsOut.Video.length)&&(this.hasVideoAction=!0))}catch(t){}}),Object.values(this.eventsPerConditions).forEach(t=>t.forEach(t=>t.connect()))}disconnect(){super.disconnect(),Object.values(this.eventsPerConditions).forEach(t=>t.forEach(t=>t.disconnect()))}};i("Conditional",({eventContext:t,eventManager:i})=>new u(t,i)),n("conditional");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./runtime-chunk-
|
|
1
|
+
import{a as e}from"./runtime-chunk-E3ZOKGVW.js";import"./runtime-chunk-72GELULA.js";import"./runtime-chunk-QPWV26TX.js";import"./runtime-chunk-3LIYAJXD.js";import{$ as t}from"./runtime-chunk-LX7POLY3.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as i,e as a}from"./runtime-chunk-EPHVY3XO.js";import"./runtime-chunk-DCPBSRSM.js";import"./runtime-chunk-2PT2WH66.js";import{b as o}from"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-U4QOT2PX.js";import{a as r}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-VPEJ5BFD.js";import{Cc as s,Ec as d,Fc as n}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var l=(()=>{let e,t,i,a,o=!1;function r(i){!e&&!h()&&(t?.sharedGameControlGlobals.createdObjects.length??0)>0&&(e=requestAnimationFrame(s)),i&&(t=i,a=i.requestRender,!o&&typeof document<"u"&&(document.addEventListener("visibilitychange",d),o=!0))}function s(o){if(!t||!a)return e=void 0,void(i=void 0);let r=i?o-i:0,d=t.sharedGameControlGlobals.createdObjects,n=t.sharedGameControlGlobals.nCreatedPerAction,l=d.length,h=0;for(;h<l;){let e=d[h];void 0===e.userData.createdTime&&(e.userData.createdTime=o),void 0===e.userData.lifetime&&void 0===e.userData.quantity||e.userData.lifetime&&o-e.userData.createdTime<e.userData.lifetime||e.userData.quantity&&n[e.userData.actionId]<=e.userData.quantity?(e.userData.velocity&&(e.position.addScaledVector(e.userData.velocity,r/1e3),e.updateMatrix(),a()),h++):(n[e.userData.actionId]>e.userData.quantity&&n[e.userData.actionId]--,d.splice(h,1),e.removeFromParent(),t.sharedGameControlGlobals.rapierWorld&&e.rigidBody?(t.sharedGameControlGlobals.colliderToEntity.delete(e.rigidBody.collider(0).handle),t.sharedGameControlGlobals.rapierWorld.removeRigidBody(e.rigidBody)):(e.bvhGeometry=void 0,t.sharedGameControlGlobals.entitiesWithTransformAnim=t.sharedGameControlGlobals.entitiesWithTransformAnim.filter(e=>void 0!==e.bvhGeometry)),l--,a())}e=h>0?requestAnimationFrame(s):void 0,i=h>0?o:void 0}function d(){h()?e&&(cancelAnimationFrame(e),e=void 0,i=void 0):r()}return{play:r,dispose:function(){e&&(cancelAnimationFrame(e),e=void 0),o&&typeof document<"u"&&(document.removeEventListener("visibilitychange",d),o=!1),t=void 0,a=void 0,i=void 0}}})();function h(){return!!document&&document.hidden}var c=new d,u=new n,m=new n,y=class{constructor(i,r,d,h,y){this.data=i,this.page=r,this.controlsManager=d,this.shared=h,this.condition=y,this.intervalId=null,this.timeoutIdQueue=[],this.uniqueId=s.generateUUID(),this.dispatch=()=>{if(!1===a(this.shared,this.condition))return!1;this.data.delay?this.timeoutIdQueue.push(window.setTimeout(this.dispatchInner,1e3*this.data.delay)):this.dispatchInner()},this.dispatchFromStart=()=>{if(!1===a(this.shared,this.condition))return!1;this.timeoutIdQueue.push(window.setTimeout(this.dispatchInner,1e3*this.data.delay))},this.dispatchThrottled=o(this.dispatch,1e3/this.data.creationSpeed),this.dispatchStart=()=>{null===this.intervalId&&(this.intervalId=window.setInterval(this.dispatch,1e3/this.data.creationSpeed))},this.dispatchStop=()=>{null!==this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null)},this.dispatchInner=()=>{this.timeoutIdQueue.shift();let e=new t(this.object);if(e.playModeVisible=!0,e.expand(),"world"!==this.data.coordinateSystem){let t=this.data.coordinateSystem,i=this.page.scene.find(t);i&&(i.updateMatrixWorldRigid(),e.hiddenMatrix.copy(i.matrixWorldRigid))}e.scale.copy(this.object.scale),e.position.fromArray(this.data.position.map(e=>"number"==typeof e?e:0)),e.rotation.fromArray(this.data.rotation.map(e=>"number"==typeof e?e:0)),e.updateMatrix(),this.page.add(e);let i=this.controlsManager.sharedGameControlGlobals;i.createdObjects.push(e),void 0===i.nCreatedPerAction[this.uniqueId]?i.nCreatedPerAction[this.uniqueId]=1:i.nCreatedPerAction[this.uniqueId]++,e.updateWorldMatrix(!0,!0),e.traverseObject(this.traverseObjectCB),l.play(),this.controlsManager.requestRender()},this.traverseObjectCB=i=>{let a;if(i.hasNonUniformScale&&i.updateMatrixWorldRigid(),this.controlsManager.sharedGameControlGlobals.rapierWorld){if(i instanceof e){if(!i.objectForSample)return!0===i.object.dataPatched.physics.fusedBody&&"dynamic"===i.object.dataPatched.physics.rigidBody||void 0;if(i.objectForSample.dataPatched.physics.fusedBody)return;a=i.object}else if(i instanceof t)a=i.object;else if(a=i,a.dataPatched.cloner?.hideBase)return!0}else{if(i instanceof e)return;a=i instanceof t?i.object:i}"Time"===this.data.destroy?i.userData.lifetime=1e3*this.data.lifetime:"Quantity"===this.data.destroy&&(i.userData.quantity=this.data.destroyAfterQuantity,i.userData.actionId=this.uniqueId);let o=(new n).fromArray(this.data.velocity.map(e=>"number"==typeof e?e:0)),r=a.dataPatched;if(!("visibility"===r.physics.enabled?!r.visible:!r.physics.enabled)&&(this.controlsManager.sharedGameControlGlobals.rapierWorld?(this.controlsManager.addRigidBody(i,a,{fromCreate:!0,dynamic:this.data.dynamic}),"Collision"===this.data.destroy&&(i.rigidBody?.collider(0).setActiveEvents(1),i.userData.hasCollisionDestroy=!0),i.matrixWorld.decompose(u,c,m),o.applyQuaternion(c),this.data.velocity.some(e=>0!==e)&&this.data.dynamic&&i.rigidBody?.setLinvel(o.divideScalar(this.controlsManager.pixelsPerMeter),!0)):("geometry"in i.object&&this.controlsManager.addBoundsTree(i),this.data.velocity.some(e=>0!==e)&&this.data.dynamic&&(i.userData.velocity=o)),!0===a.dataPatched.physics?.fusedBody))return!0};let p=this.page.scene.find(this.data.object);if(!p)throw new Error("Missing Property");if(this.object=p,"world"!==this.data.coordinateSystem&&!this.page.scene.find(this.data.coordinateSystem))throw new Error("Missing Property");l.play(d)}dispose(){null!==this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null),this.timeoutIdQueue.forEach(e=>window.clearTimeout(e)),this.timeoutIdQueue=[],this.dispatchThrottled.cancel(),this.page.remove(...this.controlsManager.sharedGameControlGlobals.createdObjects),this.controlsManager.sharedGameControlGlobals.createdObjects=[],l.dispose()}},p=class{constructor(e,t,i,a,o){this.data=e,this.page=t,this.controlsManager=i,this.shared=a,this.condition=o,this.timeoutIdQueue=[],this.dispatchInner=()=>{this.objects.forEach(this.destroyCallback)},this.destroyCallback=e=>{this.timeoutIdQueue.shift();let t=this.page.scene.find(e);if(void 0===t)return;let i=this.controlsManager.sharedGameControlGlobals.rapierWorld,a=!i||t.dataPatched.physics?.fusedBody;if(t.cloner){for(let e of t.cloner.children)a?(e.playModeVisible=!1,e.rigidBody&&"positioned"===t.dataPatched.physics?.rigidBody&&(this.controlsManager.sharedGameControlGlobals.colliderToEntity.delete(e.rigidBody.collider(0).handle),i.removeRigidBody(e.rigidBody),e.rigidBody=void 0),e.bvhGeometry&&(e.bvhGeometry=void 0)):void 0===this.clone||this.clone===e?(e.playModeVisible=!1,e.rigidBody&&(this.controlsManager.sharedGameControlGlobals.colliderToEntity.delete(e.rigidBody.collider(0).handle),i.removeRigidBody(e.rigidBody),e.rigidBody=void 0)):void 0===e.playModeVisible&&(e.playModeVisible=!0);t.cloner.syncInstanceMatrices(),(a||void 0===this.clone||!1===this.clone)&&(t.visible=!1,t.rigidBody&&(this.controlsManager.sharedGameControlGlobals.colliderToEntity.delete(t.rigidBody.collider(0).handle),i.removeRigidBody(t.rigidBody),t.rigidBody=void 0),t.bvhGeometry&&(t.bvhGeometry=void 0))}else t.rigidBody&&(this.controlsManager.sharedGameControlGlobals.colliderToEntity.delete(t.rigidBody.collider(0).handle),i.removeRigidBody(t.rigidBody),t.rigidBody=void 0),t.bvhGeometry&&(t.bvhGeometry=void 0),t.visible=!1;this.controlsManager.sharedGameControlGlobals.entitiesWithTransformAnim=void 0===i?this.controlsManager.sharedGameControlGlobals.entitiesWithTransformAnim.filter(e=>void 0!==e.bvhGeometry):this.controlsManager.sharedGameControlGlobals.entitiesWithTransformAnim.filter(e=>void 0!==e.rigidBody),t.destroyedInAction=!0,this.controlsManager.requestRender()},this.objects=[...e.objects]}dispatch(e){if(!1===a(this.shared,this.condition))return!1;this.clone=e,this.data.delay?this.timeoutIdQueue.push(window.setTimeout(this.dispatchInner,1e3*this.data.delay)):this.dispatchInner()}dispatchFromStart(){if(!1===a(this.shared,this.condition))return!1;this.timeoutIdQueue.push(window.setTimeout(this.dispatchInner,1e3*this.data.delay))}dispose(){this.timeoutIdQueue.forEach(e=>window.clearTimeout(e))}};i("Create",({data:e,page:t,eventManager:i,shared:a,actionCondition:o})=>new y(e,t,i.controlsManager,a,o)),i("Destroy",({data:e,page:t,eventManager:i,shared:a,actionCondition:o})=>new p(e,t,i.controlsManager,a,o)),r("create-destroy");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./runtime-chunk-RSPDUS6G.js";import{f as e}from"./runtime-chunk-DNWPGXEC.js";import{a,b as i}from"./runtime-chunk-DZNU62CT.js";import{a as r}from"./runtime-chunk-VAVYZ35B.js";import"./runtime-chunk-FQNSP44B.js";import"./runtime-chunk-2657LZHS.js";import"./runtime-chunk-6WHNEYAL.js";import"./runtime-chunk-DZOSSY2K.js";import"./runtime-chunk-CDZQF4NV.js";import"./runtime-chunk-LALFWESO.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as o,g as n}from"./runtime-chunk-QVC5UDJO.js";import{h as s,v as c}from"./runtime-chunk-PLJ25O2X.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as h}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import{Ec as d,Fc as p,Gc as l,Oc as v,rd as u}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var m=new p,g=new p,E=new p,D=new u,f=new p,y=new p,b=new p,x=new d,C=new v,j=new l,M=new p,P=new p,w=.2;function S(t,e){!e||(e[0]<e[1]&&(t.x=Math.min(Math.max(t.x,e[0]),e[1])),e[2]<e[3]&&(t.y=Math.min(Math.max(t.y,e[2]),e[3])),e[4]<e[5]&&(t.z=Math.min(Math.max(t.z,e[4]),e[5])))}var T=function(){let t=new v;return(a,i,r)=>{let o=a.obj;t.copy(o.hiddenMatrix),null!==o.parent&&t.premultiply(o.parent.matrixWorld),t.invert(),o.position.copy(i),"global"===a.reference&&S(o.position,a.limits),o.position.applyMatrix4(t),"parent"===a.reference?S(o.position,a.limits):"local"===a.reference&&(x.copy(a.quat0).invert(),o.position.sub(a.position0),o.position.applyQuaternion(x),S(o.position,a.limits),x.invert(),o.position.applyQuaternion(x),o.position.add(a.position0)),t.multiply(r??o.matrixWorld).decompose(f,o.quaternion,y),o.updateMatrix(),o.hasNonUniformScale&&(o.updateMatrixWorld(),o.updateMatrixWorldRigid()),o instanceof c&&e(o.parent)&&o.invalidateDownstreamBooleanData(!0)}}(),I=class{constructor(t,e,a,i,r,n,s){this.object=t,this.id=e,this.data=a,this.dropDestIds=[],this.activeIdx=null,this.wasDragEventTriggered=!1,this.resetDampingFactor=0===this.data.resetSpeed?1:8/this.data.resetSpeed+1,this.snapDampingFactor=0===this.data.snapSpeed?1:8/this.data.snapSpeed+1,this.actionsDrag=o(a,a.dragDropActions.drag,i,r,n,this.object),this.actionsDrop=o(a,a.dragDropActions.drop,i,r,n,this.object);let c=[];this.data.objects.forEach(t=>{let e=i.find(t);!e||!1!==e.data.visible&&(c.push(e),s[e.uuid]&&s[e.uuid].forEach(t=>{let e=i.find(t);!e||!1!==e.data.visible&&c.push(e)}))}),this.data.dropDestinations.forEach(t=>{let e=i.find(t);!e||!1!==e.data.visible&&(this.dropDestIds.push(e.uuid),s[e.uuid]&&s[e.uuid].forEach(t=>{let e=i.find(t);!e||!1!==e.data.visible&&this.dropDestIds.push(e.uuid)}))}),this.dragItems=c.map(t=>("locked"===this.data.planeMode&&(t.userData.lockedPlane=!0),t.userData.worldPosition0=(new p).setFromMatrixPosition(t.matrixWorld),{obj:t,fromPosition:(new p).setFromMatrixPosition(t.matrixWorld),pointStart:new p,pointEnd:new p,paused:!0,currentDampingFactor:this.data.dampingFactor,reset:!1,position0:(new p).copy(t.position),quat0:(new d).copy(t.quaternion),snapped:!1,orientationMatrix:new v,limits:this.data.limits,reference:this.data.referenceFrame}))}get activeDragItem(){return null!==this.activeIdx?this.dragItems[this.activeIdx]:null}dispose(){n(this.actionsDrag),n(this.actionsDrop),this.dragItems.forEach(t=>{t.fromPosition.copy(t.obj.userData.worldPosition0),t.pointStart.copy(t.fromPosition),t.pointEnd.copy(t.pointStart),t.obj.recursiveBBoxNeedsUpdate=!0,t.obj.userData.lockedPlane=void 0,t.obj.position.copy(t.position0),t.obj.quaternion.copy(t.quat0),t.obj.updateMatrix()})}},F=class extends a{constructor(e,a){super(e),this.eventManager=a,this.events=[],this.lastDropDestination=null,this.dragTimeout=null,this.lastCursorRaycastTime=0,this.trailingCursorTimer=null,this.trailingCursorEvent=null,this.onPointerDown=t=>{if(r.length>1)return;this.eventContext.updateRaycaster(t);let{raycaster:e,page:a}=this.eventContext,i=a.raycastWithClones(e);if(this.lastDropDestination=null,0!==i.length){for(let t of this.events){let e=0;for(let{obj:a,pointEnd:r,pointStart:o}of t.dragItems){if(a===i[0].object||a===i[0].object.object||s.is(a)&&a.isAncestorOf(i[0].object.uuid)){if(t.activeIdx=e,t.activeDragItem.reset=!1,t.activeDragItem.currentDampingFactor=t.data.dampingFactor,t.activeDragItem.snapped=!1,"hand"===t.data.cursor&&this.setCursor("grabbing"),this.eventManager.controlsManager.usePhysics){t.activeDragItem.obj.rigidBody&&(t.activeDragItem.obj.rigidBody.setBodyType(2,!0),this.eventManager.controlsManager.sharedGameControlGlobals.kinematicBodyToEntity.set(t.activeDragItem.obj.rigidBody.handle,t.activeDragItem.obj));let e=t.activeDragItem.obj;a.hasNonUniformScale&&a.updateMatrixWorldRigid(),(e.hasNonUniformScale?e.matrixWorldRigid:e.matrixWorld).decompose(f,x,y),void 0===e.prevQ?(e.prevQ=x.clone(),e.prevT=f.clone()):(e.prevQ.copy(x),e.prevT.copy(f)),this.eventManager.controlsManager.sharedGameControlGlobals.entitiesWithTransformAnim.push(t.activeDragItem.obj)}return this.calcPlaneIntersectPos(a,o,t.data.plane,t.data.referenceFrame),r.copy(o),(this.eventManager.controlsManager.usePhysics&&"dynamic"===a.data.physics?.rigidBody||!1===t.data.drop||!1===t.data.resetOnSnapFail)&&t.activeDragItem.fromPosition.setFromMatrixPosition(t.activeDragItem.obj.matrixWorld),this.activeEvent=t,void(this.eventManager.controlsManager.orbitControls&&(this.eventManager.controlsManager.orbitControls.enabled=!1))}e++}}this.activeEvent=null}else this.activeEvent=null},this.runTrailingCursorUpdate=()=>{this.trailingCursorTimer=null;let t=this.trailingCursorEvent;this.trailingCursorEvent=null,null!==t&&0===r.length&&(this.eventContext.updateRaycaster(t),this.lastCursorRaycastTime=performance.now(),this.updateCursorFromRaycast())},this.onPointerMove=e=>{if(r.length>1)return;this.eventContext.updateRaycaster(e);let{raycaster:a,page:i}=this.eventContext;if(0===r.length){if(!this.events.some(t=>"hand"===t.data.cursor||"move"===t.data.cursor))return;let t=performance.now();return t-this.lastCursorRaycastTime<16?(this.trailingCursorEvent=e,void(null===this.trailingCursorTimer&&(this.trailingCursorTimer=window.setTimeout(this.runTrailingCursorUpdate,32)))):(this.trailingCursorEvent=null,this.lastCursorRaycastTime=t,void this.updateCursorFromRaycast())}if(this.activeEvent&&this.activeEvent.activeDragItem){let e,r=this.activeEvent.activeDragItem;if(r.snapped=!1,this.activeEvent.data.drop&&(e=i.raycastWithClones(a).filter(e=>r.obj!==e.object&&!r.obj.isAncestorOf(e.object.uuid)&&!(e.object instanceof t)&&("all"===this.activeEvent.data.dropOn||this.activeEvent.dropDestIds.some(t=>t===e.object.uuid||i.scene.find(t).isAncestorOf(e.object.uuid))))[0]),e){let t=b.copy(e.face.normal).applyMatrix3(j.getNormalMatrix(e.object.matrixWorld));if("center"===this.activeEvent.data.snapTo)r.fromPosition.setFromMatrixPosition(e.object.matrixWorld);else if("surface"===this.activeEvent.data.snapTo){if(r.fromPosition.copy(e.point),"bbox"===this.activeEvent.data.snapSurfaceMode){f.copy(t).applyMatrix3(j.setFromMatrix4(r.obj.matrixWorld).transpose());let e=r.obj;f.x>w?y.x=-e.recursiveBBox.min.x:f.x<-w&&(y.x=-e.recursiveBBox.max.x),f.y>w?y.y=-e.recursiveBBox.min.y:f.y<-w&&(y.y=-e.recursiveBBox.max.y),f.z>w?y.z=-e.recursiveBBox.min.z:f.z<-w&&(y.z=-e.recursiveBBox.max.z),y.applyMatrix3(j.invert())}else y.copy(t).multiplyScalar(this.activeEvent.data.snapSurfaceOffset);r.fromPosition.add(y)}this.activeEvent.data.autoOrient&&(f.set(0,1,0).cross(t),f.length()<1e-4&&f.set(-1,0,0).cross(t),y.crossVectors(b,f),r.orientationMatrix.makeBasis(f,y,t)),r.pointStart.copy(r.fromPosition),r.pointEnd.copy(r.pointStart),r.currentDampingFactor=this.activeEvent.snapDampingFactor,r.snapped=!0,this.lastDropDestination!==e.object&&(this.lastDropDestination=e.object,this.activeEvent.actionsDrop.Transition.forEach(t=>{t.play()}),this.activeEvent.actionsDrop.Animation.forEach(t=>{t.play()}),this.activeEvent.actionsDrop.Audio.forEach(t=>{t.dispatchGameControl("start")}),this.activeEvent.actionsDrop.Particles.forEach(t=>{t.dispatchGameControl("start")}),this.activeEvent.actionsDrop.Create.forEach(t=>{t.dispatchThrottled()}))}else r.orientationMatrix.makeRotationFromQuaternion(r.quat0),this.lastDropDestination=null,r.currentDampingFactor=this.activeEvent.data.dampingFactor,this.calcPlaneIntersectPos(r.obj,r.pointEnd,this.activeEvent.data.plane,this.activeEvent.data.referenceFrame),this.activeEvent.actionsDrop.Transition.forEach(t=>{t.stop(),null!==t.object.currentState&&t.object.changeSelectedState(null,{scene:this.eventContext.page.scene,shared:this.eventContext.sharedAssets})}),this.activeEvent.actionsDrop.Animation.forEach(t=>{t.stop()}),this.activeEvent.actionsDrop.Audio.forEach(t=>{t.dispatchGameControl("stop")}),this.activeEvent.actionsDrop.Particles.forEach(t=>{t.dispatchGameControl("stop")});this.activeEvent.actionsDrag.Create.forEach(t=>{t.dispatchThrottled()}),this.activeEvent.actionsDrag.SetVariable.forEach(t=>t.checkConditions()),this.activeEvent.actionsDrag.SetVariable.forEach(t=>t.dispatch()),this.activeEvent.actionsDrag.DynamicVariablePlay.forEach(t=>t.dispatch()),this.activeEvent.actionsDrag.ClearLocalStorage.forEach(t=>t.dispatch()),this.activeEvent.actionsDrag.UserAPI.forEach(t=>t.dispatch()),!1===this.activeEvent.wasDragEventTriggered&&(this.activeEvent.wasDragEventTriggered=!0,this.activeEvent.actionsDrag.Transition.forEach(t=>{t.play()}),this.activeEvent.actionsDrag.Animation.forEach(t=>{t.play()}),this.activeEvent.actionsDrag.Audio.forEach(t=>{t.dispatchGameControl("start")}),this.activeEvent.actionsDrag.Particles.forEach(t=>{t.dispatchGameControl("start")})),this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>{!this.activeEvent||(this.activeEvent.wasDragEventTriggered=!1,this.activeEvent.actionsDrag.Audio.forEach(t=>{t.dispatchGameControl("stop")}),this.activeEvent.actionsDrag.Particles.forEach(t=>{t.dispatchGameControl("stop")}),this.activeEvent.actionsDrag.Transition.forEach(t=>{t.stop(),null!==t.object.currentState&&t.object.changeSelectedState(null,{scene:this.eventContext.page.scene,shared:this.eventContext.sharedAssets})}),this.activeEvent.actionsDrag.Animation.forEach(t=>{t.stop()}))},500),this.updateDragItem(r),r.obj.dispatchEvent({type:"requestRender"})}},this.onPointerUp=t=>{if(this.activeEvent&&this.activeEvent.activeDragItem){"hand"===this.activeEvent.data.cursor&&this.setCursor("grab");let t="dynamic"===this.activeEvent.activeDragItem.obj.data.physics?.rigidBody;!1===this.activeEvent.activeDragItem.snapped&&this.activeEvent.data.drop&&this.activeEvent.data.resetOnSnapFail&&(!1===this.eventManager.controlsManager.usePhysics||!t)&&(this.activeEvent.activeDragItem.reset=this.activeEvent.data.resetOnSnapFail,this.activeEvent.activeDragItem.paused=!1,this.activeEvent.activeDragItem.currentDampingFactor=this.activeEvent.resetDampingFactor),this.eventManager.controlsManager.usePhysics&&t&&(this.eventManager.controlsManager.sharedGameControlGlobals.entitiesWithTransformAnim.pop(),this.eventManager.controlsManager.sharedGameControlGlobals.kinematicBodyToEntity.delete(this.activeEvent.activeDragItem.obj.rigidBody.handle),this.activeEvent.activeDragItem.obj.rigidBody.setBodyType(0,!0),this.activeEvent.activeDragItem.paused=!0),!0===this.activeEvent.wasDragEventTriggered&&(this.activeEvent.wasDragEventTriggered=!1,this.activeEvent.actionsDrag.Transition.forEach(t=>{t.stop(),null!==t.object.currentState&&t.object.changeSelectedState(null,{scene:this.eventContext.page.scene,shared:this.eventContext.sharedAssets})}),this.activeEvent.actionsDrag.Animation.forEach(t=>{t.stop()}),this.activeEvent.actionsDrag.Audio.forEach(t=>{t.dispatchGameControl("stop")}),this.activeEvent.actionsDrag.Particles.forEach(t=>{t.dispatchGameControl("stop")}),this.activeEvent.actionsDrop.SetVariable.forEach(t=>t.checkConditions()),this.activeEvent.actionsDrop.SetVariable.forEach(t=>t.dispatch()),this.activeEvent.actionsDrop.DynamicVariablePlay.forEach(t=>t.dispatch()),this.activeEvent.actionsDrop.ClearLocalStorage.forEach(t=>t.dispatch()),this.activeEvent.actionsDrop.UserAPI.forEach(t=>t.dispatch())),this.eventManager.controlsManager.orbitControls&&(this.eventManager.controlsManager.orbitControls.enabled=!0)}}}connect(){let t={};if(this.eventContext.page.traverseEntity(e=>{e.component&&(t[e.component.uuid]?t[e.component.uuid].push(e.uuid):t[e.component.uuid]=[e.uuid])}),this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(t=>"DragDrop"===t.data.type&&!t.data.disabled).forEach(a=>{this.events.push(new I(e,a.id,a.data,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager,t))})}),!this.events.length)return;this.domEventsNeeded.clear(),this.domEventsNeeded.add("pointerdown");let e=this.eventContext.domElement;e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerup",this.onPointerUp),this.domEventsNeeded.add("pointermove")}disconnect(){if(!this.events.length)return;this.domEventsNeeded.clear();let t=this.eventContext.domElement;t.removeEventListener("pointerdown",this.onPointerDown),t.removeEventListener("pointermove",this.onPointerMove),t.removeEventListener("pointerup",this.onPointerUp),null!==this.trailingCursorTimer&&(clearTimeout(this.trailingCursorTimer),this.trailingCursorTimer=null),this.trailingCursorEvent=null,this.events.forEach(t=>t.dispose())}setCursor(t){this.eventContext.domElement.style.cursor=t}onAnimationFrameDamping(){for(let t of this.events)for(let e of t.dragItems)e.paused||this.updateDragItem(e,!0)}calcPlaneIntersectPos(t,e,a,i){let{getCamera:r,raycaster:o}=this.eventContext;r().getWorldDirection(g),g.negate();let n=x.identity();switch("parent"===i?C.multiplyMatrices(t.parent.matrixWorld,t.hiddenMatrix).decompose(f,n,y):"local"===i&&t.matrixWorld.decompose(f,n,y),a){case"x":f.set(1,0,0).applyQuaternion(n),M.copy(g).cross(f),P.copy(f).cross(M);break;case"y":f.set(0,1,0).applyQuaternion(n),M.copy(g).cross(f),P.copy(f).cross(M);break;case"z":f.set(0,0,1).applyQuaternion(n),M.copy(g).cross(f),P.copy(f).cross(M);break;case"xy":P.set(0,0,1).applyQuaternion(n);break;case"yz":P.set(1,0,0).applyQuaternion(n);break;case"xz":P.set(0,1,0).applyQuaternion(n);break;case"adaptive":g.angleTo(y.set(0,1,0))>Math.PI/6?(f.crossVectors(y.set(0,1,0),g),P.crossVectors(f,y)):P.set(0,1,0);break;default:P.copy(g)}E.setFromMatrixPosition(t.matrixWorld);let s=t.userData.lockedPlane?t.userData.worldPosition0:E;if(D.setFromNormalAndCoplanarPoint(P,s),o.ray.intersectPlane(D,e)&&("x"===a||"y"===a||"z"===a)){let t=y.subVectors(e,s).dot(f);e.copy(s).addScaledVector(f,t)}}updateDragItem(t,e=!1){E.setFromMatrixPosition(t.obj.matrixWorld),"current"===t.reset?m.subVectors(t.fromPosition,E).divideScalar(t.currentDampingFactor):"original"===t.reset?(m.subVectors(t.obj.userData.worldPosition0,E).divideScalar(t.currentDampingFactor),t.fromPosition.copy(t.obj.userData.worldPosition0),t.pointStart.copy(t.fromPosition),t.pointEnd.copy(t.pointStart)):m.subVectors(t.pointEnd,t.pointStart).add(t.fromPosition).sub(E).divideScalar(t.currentDampingFactor),t.paused=!(t.currentDampingFactor>1)||m.length()<.01,(this.activeEvent&&1===this.activeEvent.data.dampingFactor||e)&&T(t,m.add(E),this.activeEvent?.data.drop&&this.activeEvent?.data.autoOrient?t.orientationMatrix:null),t.obj.dispatchEvent({type:"beginEvent",eventName:"DragDrop"}),this.eventManager.requestRender()}updateCursorFromRaycast(){let{raycaster:t,page:e}=this.eventContext,a=e.raycastWithClones(t),i=!1;for(let t of this.events){for(let{obj:e}of t.dragItems)if(e===a[0]?.object||e===a[0]?.object?.object||s.is(e)&&e.isAncestorOf(a[0]?.object.uuid)){switch(i=!0,t.data.cursor){case"hand":this.setCursor("grab");break;case"move":this.setCursor("move")}break}if(i)break}i||this.setCursor("default")}};i("DragDrop",({eventContext:t,eventManager:e})=>new F(t,e)),h("dragdrop");
|
|
1
|
+
import{a as t}from"./runtime-chunk-TONK22EB.js";import{f as e}from"./runtime-chunk-PEOLFGBX.js";import{a,b as i}from"./runtime-chunk-DZNU62CT.js";import{a as r}from"./runtime-chunk-VAVYZ35B.js";import"./runtime-chunk-FQNSP44B.js";import"./runtime-chunk-WZWD2YIG.js";import"./runtime-chunk-3LIYAJXD.js";import"./runtime-chunk-O37H7LZI.js";import"./runtime-chunk-XL37JGAH.js";import"./runtime-chunk-LX7POLY3.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as o,g as n}from"./runtime-chunk-EPHVY3XO.js";import{h as s,v as c}from"./runtime-chunk-DCPBSRSM.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-U4QOT2PX.js";import{a as h}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-VPEJ5BFD.js";import{Ec as d,Fc as p,Gc as l,Oc as v,rd as u}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var m=new p,g=new p,E=new p,f=new u,D=new p,y=new p,b=new p,x=new d,C=new v,j=new l,M=new p,P=new p,w=.2;function T(t,e){!e||(e[0]<e[1]&&(t.x=Math.min(Math.max(t.x,e[0]),e[1])),e[2]<e[3]&&(t.y=Math.min(Math.max(t.y,e[2]),e[3])),e[4]<e[5]&&(t.z=Math.min(Math.max(t.z,e[4]),e[5])))}var I=function(){let t=new v;return(a,i,r)=>{let o=a.obj;t.copy(o.hiddenMatrix),null!==o.parent&&t.premultiply(o.parent.matrixWorld),t.invert(),o.position.copy(i),"global"===a.reference&&T(o.position,a.limits),o.position.applyMatrix4(t),"parent"===a.reference?T(o.position,a.limits):"local"===a.reference&&(x.copy(a.quat0).invert(),o.position.sub(a.position0),o.position.applyQuaternion(x),T(o.position,a.limits),x.invert(),o.position.applyQuaternion(x),o.position.add(a.position0)),t.multiply(r??o.matrixWorld).decompose(D,o.quaternion,y),o.updateMatrix(),o.hasNonUniformScale&&(o.updateMatrixWorld(),o.updateMatrixWorldRigid()),o instanceof c&&e(o.parent)&&o.invalidateDownstreamBooleanData(!0)}}(),S=class{constructor(t,e,a,i,r,n,s){this.object=t,this.id=e,this.data=a,this.dropDestIds=[],this.activeIdx=null,this.wasDragEventTriggered=!1,this.resetDampingFactor=0===this.data.resetSpeed?1:8/this.data.resetSpeed+1,this.snapDampingFactor=0===this.data.snapSpeed?1:8/this.data.snapSpeed+1,this.actionsDrag=o(a,a.dragDropActions.drag,i,r,n,this.object),this.actionsDrop=o(a,a.dragDropActions.drop,i,r,n,this.object);let c=[];this.data.objects.forEach(t=>{let e=i.find(t);!e||!1!==e.data.visible&&(c.push(e),s[e.uuid]&&s[e.uuid].forEach(t=>{let e=i.find(t);!e||!1!==e.data.visible&&c.push(e)}))}),this.data.dropDestinations.forEach(t=>{let e=i.find(t);!e||!1!==e.data.visible&&(this.dropDestIds.push(e.uuid),s[e.uuid]&&s[e.uuid].forEach(t=>{let e=i.find(t);!e||!1!==e.data.visible&&this.dropDestIds.push(e.uuid)}))}),this.dragItems=c.map(t=>("locked"===this.data.planeMode&&(t.userData.lockedPlane=!0),t.userData.worldPosition0=(new p).setFromMatrixPosition(t.matrixWorld),{obj:t,fromPosition:(new p).setFromMatrixPosition(t.matrixWorld),pointStart:new p,pointEnd:new p,paused:!0,currentDampingFactor:this.data.dampingFactor,reset:!1,position0:(new p).copy(t.position),quat0:(new d).copy(t.quaternion),snapped:!1,orientationMatrix:new v,limits:this.data.limits,reference:this.data.referenceFrame}))}get activeDragItem(){return null!==this.activeIdx?this.dragItems[this.activeIdx]:null}dispose(){n(this.actionsDrag),n(this.actionsDrop),this.dragItems.forEach(t=>{t.fromPosition.copy(t.obj.userData.worldPosition0),t.pointStart.copy(t.fromPosition),t.pointEnd.copy(t.pointStart),t.obj.recursiveBBoxNeedsUpdate=!0,t.obj.userData.lockedPlane=void 0,t.obj.position.copy(t.position0),t.obj.quaternion.copy(t.quat0),t.obj.updateMatrix()})}},F=class extends a{constructor(e,a){super(e),this.eventManager=a,this.events=[],this.lastDropDestination=null,this.dragTimeout=null,this.lastCursorRaycastTime=0,this.trailingCursorTimer=null,this.trailingCursorEvent=null,this.onPointerDown=t=>{if(r.length>1)return;this.eventContext.updateRaycaster(t);let{raycaster:e,page:a}=this.eventContext,i=a.raycastWithClones(e);if(this.lastDropDestination=null,0!==i.length){for(let t of this.events){let e=0;for(let{obj:a,pointEnd:r,pointStart:o}of t.dragItems){if(a===i[0].object||a===i[0].object.object||s.is(a)&&a.isAncestorOf(i[0].object.uuid)){if(t.activeIdx=e,t.activeDragItem.reset=!1,t.activeDragItem.currentDampingFactor=t.data.dampingFactor,t.activeDragItem.snapped=!1,"hand"===t.data.cursor&&this.setCursor("grabbing"),this.eventManager.controlsManager.usePhysics){t.activeDragItem.obj.rigidBody&&(t.activeDragItem.obj.rigidBody.setBodyType(2,!0),this.eventManager.controlsManager.sharedGameControlGlobals.kinematicBodyToEntity.set(t.activeDragItem.obj.rigidBody.handle,t.activeDragItem.obj));let e=t.activeDragItem.obj;a.hasNonUniformScale&&a.updateMatrixWorldRigid(),(e.hasNonUniformScale?e.matrixWorldRigid:e.matrixWorld).decompose(D,x,y),void 0===e.prevQ?(e.prevQ=x.clone(),e.prevT=D.clone()):(e.prevQ.copy(x),e.prevT.copy(D)),this.eventManager.controlsManager.sharedGameControlGlobals.entitiesWithTransformAnim.push(t.activeDragItem.obj)}return this.calcPlaneIntersectPos(a,o,t.data.plane,t.data.referenceFrame),r.copy(o),(this.eventManager.controlsManager.usePhysics&&"dynamic"===a.data.physics?.rigidBody||!1===t.data.drop||!1===t.data.resetOnSnapFail)&&t.activeDragItem.fromPosition.setFromMatrixPosition(t.activeDragItem.obj.matrixWorld),this.activeEvent=t,void(this.eventManager.controlsManager.orbitControls&&(this.eventManager.controlsManager.orbitControls.enabled=!1))}e++}}this.activeEvent=null}else this.activeEvent=null},this.runTrailingCursorUpdate=()=>{this.trailingCursorTimer=null;let t=this.trailingCursorEvent;this.trailingCursorEvent=null,null!==t&&0===r.length&&(this.eventContext.updateRaycaster(t),this.lastCursorRaycastTime=performance.now(),this.updateCursorFromRaycast())},this.onPointerMove=e=>{if(r.length>1)return;this.eventContext.updateRaycaster(e);let{raycaster:a,page:i}=this.eventContext;if(0===r.length){if(!this.events.some(t=>"hand"===t.data.cursor||"move"===t.data.cursor))return;let t=performance.now();return t-this.lastCursorRaycastTime<16?(this.trailingCursorEvent=e,void(null===this.trailingCursorTimer&&(this.trailingCursorTimer=window.setTimeout(this.runTrailingCursorUpdate,32)))):(this.trailingCursorEvent=null,this.lastCursorRaycastTime=t,void this.updateCursorFromRaycast())}if(this.activeEvent&&this.activeEvent.activeDragItem){let e,r=this.activeEvent.activeDragItem;if(r.snapped=!1,this.activeEvent.data.drop&&(e=i.raycastWithClones(a).filter(e=>r.obj!==e.object&&!r.obj.isAncestorOf(e.object.uuid)&&!(e.object instanceof t)&&("all"===this.activeEvent.data.dropOn||this.activeEvent.dropDestIds.some(t=>t===e.object.uuid||i.scene.find(t).isAncestorOf(e.object.uuid))))[0]),e){let t=b.copy(e.face.normal).applyMatrix3(j.getNormalMatrix(e.object.matrixWorld));if("center"===this.activeEvent.data.snapTo)r.fromPosition.setFromMatrixPosition(e.object.matrixWorld);else if("surface"===this.activeEvent.data.snapTo){if(r.fromPosition.copy(e.point),"bbox"===this.activeEvent.data.snapSurfaceMode){D.copy(t).applyMatrix3(j.setFromMatrix4(r.obj.matrixWorld).transpose());let e=r.obj;D.x>w?y.x=-e.recursiveBBox.min.x:D.x<-w&&(y.x=-e.recursiveBBox.max.x),D.y>w?y.y=-e.recursiveBBox.min.y:D.y<-w&&(y.y=-e.recursiveBBox.max.y),D.z>w?y.z=-e.recursiveBBox.min.z:D.z<-w&&(y.z=-e.recursiveBBox.max.z),y.applyMatrix3(j.invert())}else y.copy(t).multiplyScalar(this.activeEvent.data.snapSurfaceOffset);r.fromPosition.add(y)}this.activeEvent.data.autoOrient&&(D.set(0,1,0).cross(t),D.length()<1e-4&&D.set(-1,0,0).cross(t),y.crossVectors(b,D),r.orientationMatrix.makeBasis(D,y,t)),r.pointStart.copy(r.fromPosition),r.pointEnd.copy(r.pointStart),r.currentDampingFactor=this.activeEvent.snapDampingFactor,r.snapped=!0,this.lastDropDestination!==e.object&&(this.lastDropDestination=e.object,this.activeEvent.actionsDrop.Transition.forEach(t=>{t.play()}),this.activeEvent.actionsDrop.Animation.forEach(t=>{t.play()}),this.activeEvent.actionsDrop.Audio.forEach(t=>{t.dispatchGameControl("start")}),this.activeEvent.actionsDrop.Particles.forEach(t=>{t.dispatchGameControl("start")}),this.activeEvent.actionsDrop.Create.forEach(t=>{t.dispatchThrottled()}))}else r.orientationMatrix.makeRotationFromQuaternion(r.quat0),this.lastDropDestination=null,r.currentDampingFactor=this.activeEvent.data.dampingFactor,this.calcPlaneIntersectPos(r.obj,r.pointEnd,this.activeEvent.data.plane,this.activeEvent.data.referenceFrame),this.activeEvent.actionsDrop.Transition.forEach(t=>{t.stop(),null!==t.object.currentState&&t.object.changeSelectedState(null,{scene:this.eventContext.page.scene,shared:this.eventContext.sharedAssets})}),this.activeEvent.actionsDrop.Animation.forEach(t=>{t.stop()}),this.activeEvent.actionsDrop.Audio.forEach(t=>{t.dispatchGameControl("stop")}),this.activeEvent.actionsDrop.Particles.forEach(t=>{t.dispatchGameControl("stop")});this.activeEvent.actionsDrag.Create.forEach(t=>{t.dispatchThrottled()}),this.activeEvent.actionsDrag.SetVariable.forEach(t=>t.checkConditions()),this.activeEvent.actionsDrag.SetVariable.forEach(t=>t.dispatch()),this.activeEvent.actionsDrag.DynamicVariablePlay.forEach(t=>t.dispatch()),this.activeEvent.actionsDrag.ClearLocalStorage.forEach(t=>t.dispatch()),this.activeEvent.actionsDrag.UserAPI.forEach(t=>t.dispatch()),!1===this.activeEvent.wasDragEventTriggered&&(this.activeEvent.wasDragEventTriggered=!0,this.activeEvent.actionsDrag.Transition.forEach(t=>{t.play()}),this.activeEvent.actionsDrag.Animation.forEach(t=>{t.play()}),this.activeEvent.actionsDrag.Audio.forEach(t=>{t.dispatchGameControl("start")}),this.activeEvent.actionsDrag.Particles.forEach(t=>{t.dispatchGameControl("start")})),this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>{!this.activeEvent||(this.activeEvent.wasDragEventTriggered=!1,this.activeEvent.actionsDrag.Audio.forEach(t=>{t.dispatchGameControl("stop")}),this.activeEvent.actionsDrag.Particles.forEach(t=>{t.dispatchGameControl("stop")}),this.activeEvent.actionsDrag.Transition.forEach(t=>{t.stop(),null!==t.object.currentState&&t.object.changeSelectedState(null,{scene:this.eventContext.page.scene,shared:this.eventContext.sharedAssets})}),this.activeEvent.actionsDrag.Animation.forEach(t=>{t.stop()}))},500),this.updateDragItem(r),r.obj.dispatchEvent({type:"requestRender"})}},this.onPointerUp=t=>{if(this.activeEvent&&this.activeEvent.activeDragItem){"hand"===this.activeEvent.data.cursor&&this.setCursor("grab");let t="dynamic"===this.activeEvent.activeDragItem.obj.data.physics?.rigidBody;!1===this.activeEvent.activeDragItem.snapped&&this.activeEvent.data.drop&&this.activeEvent.data.resetOnSnapFail&&(!1===this.eventManager.controlsManager.usePhysics||!t)&&(this.activeEvent.activeDragItem.reset=this.activeEvent.data.resetOnSnapFail,this.activeEvent.activeDragItem.paused=!1,this.activeEvent.activeDragItem.currentDampingFactor=this.activeEvent.resetDampingFactor),this.eventManager.controlsManager.usePhysics&&t&&(this.eventManager.controlsManager.sharedGameControlGlobals.entitiesWithTransformAnim.pop(),this.eventManager.controlsManager.sharedGameControlGlobals.kinematicBodyToEntity.delete(this.activeEvent.activeDragItem.obj.rigidBody.handle),this.activeEvent.activeDragItem.obj.rigidBody.setBodyType(0,!0),this.activeEvent.activeDragItem.paused=!0),!0===this.activeEvent.wasDragEventTriggered&&(this.activeEvent.wasDragEventTriggered=!1,this.activeEvent.actionsDrag.Transition.forEach(t=>{t.stop(),null!==t.object.currentState&&t.object.changeSelectedState(null,{scene:this.eventContext.page.scene,shared:this.eventContext.sharedAssets})}),this.activeEvent.actionsDrag.Animation.forEach(t=>{t.stop()}),this.activeEvent.actionsDrag.Audio.forEach(t=>{t.dispatchGameControl("stop")}),this.activeEvent.actionsDrag.Particles.forEach(t=>{t.dispatchGameControl("stop")}),this.activeEvent.actionsDrop.SetVariable.forEach(t=>t.checkConditions()),this.activeEvent.actionsDrop.SetVariable.forEach(t=>t.dispatch()),this.activeEvent.actionsDrop.DynamicVariablePlay.forEach(t=>t.dispatch()),this.activeEvent.actionsDrop.ClearLocalStorage.forEach(t=>t.dispatch()),this.activeEvent.actionsDrop.UserAPI.forEach(t=>t.dispatch())),this.eventManager.controlsManager.orbitControls&&(this.eventManager.controlsManager.orbitControls.enabled=!0)}}}connect(){let t={};if(this.eventContext.page.traverseEntity(e=>{e.component&&(t[e.component.uuid]?t[e.component.uuid].push(e.uuid):t[e.component.uuid]=[e.uuid])}),this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(t=>"DragDrop"===t.data.type&&!t.data.disabled).forEach(a=>{this.events.push(new S(e,a.id,a.data,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager,t))})}),!this.events.length)return;this.domEventsNeeded.clear(),this.domEventsNeeded.add("pointerdown");let e=this.eventContext.domElement;e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerup",this.onPointerUp),this.domEventsNeeded.add("pointermove")}disconnect(){if(!this.events.length)return;this.domEventsNeeded.clear();let t=this.eventContext.domElement;t.removeEventListener("pointerdown",this.onPointerDown),t.removeEventListener("pointermove",this.onPointerMove),t.removeEventListener("pointerup",this.onPointerUp),null!==this.trailingCursorTimer&&(clearTimeout(this.trailingCursorTimer),this.trailingCursorTimer=null),this.trailingCursorEvent=null,this.events.forEach(t=>t.dispose())}setCursor(t){this.eventContext.domElement.style.cursor=t}onAnimationFrameDamping(){for(let t of this.events)for(let e of t.dragItems)e.paused||this.updateDragItem(e,!0)}calcPlaneIntersectPos(t,e,a,i){let{getCamera:r,raycaster:o}=this.eventContext;r().getWorldDirection(g),g.negate();let n=x.identity();switch("parent"===i?C.multiplyMatrices(t.parent.matrixWorld,t.hiddenMatrix).decompose(D,n,y):"local"===i&&t.matrixWorld.decompose(D,n,y),a){case"x":D.set(1,0,0).applyQuaternion(n),M.copy(g).cross(D),P.copy(D).cross(M);break;case"y":D.set(0,1,0).applyQuaternion(n),M.copy(g).cross(D),P.copy(D).cross(M);break;case"z":D.set(0,0,1).applyQuaternion(n),M.copy(g).cross(D),P.copy(D).cross(M);break;case"xy":P.set(0,0,1).applyQuaternion(n);break;case"yz":P.set(1,0,0).applyQuaternion(n);break;case"xz":P.set(0,1,0).applyQuaternion(n);break;case"adaptive":g.angleTo(y.set(0,1,0))>Math.PI/6?(D.crossVectors(y.set(0,1,0),g),P.crossVectors(D,y)):P.set(0,1,0);break;default:P.copy(g)}E.setFromMatrixPosition(t.matrixWorld);let s=t.userData.lockedPlane?t.userData.worldPosition0:E;if(f.setFromNormalAndCoplanarPoint(P,s),o.ray.intersectPlane(f,e)&&("x"===a||"y"===a||"z"===a)){let t=y.subVectors(e,s).dot(D);e.copy(s).addScaledVector(D,t)}}updateDragItem(t,e=!1){E.setFromMatrixPosition(t.obj.matrixWorld),"current"===t.reset?m.subVectors(t.fromPosition,E).divideScalar(t.currentDampingFactor):"original"===t.reset?(m.subVectors(t.obj.userData.worldPosition0,E).divideScalar(t.currentDampingFactor),t.fromPosition.copy(t.obj.userData.worldPosition0),t.pointStart.copy(t.fromPosition),t.pointEnd.copy(t.pointStart)):m.subVectors(t.pointEnd,t.pointStart).add(t.fromPosition).sub(E).divideScalar(t.currentDampingFactor),t.paused=!(t.currentDampingFactor>1)||m.length()<.01,(this.activeEvent&&1===this.activeEvent.data.dampingFactor||e)&&I(t,m.add(E),this.activeEvent?.data.drop&&this.activeEvent?.data.autoOrient?t.orientationMatrix:null),t.obj.dispatchEvent({type:"beginEvent",eventName:"DragDrop"}),this.eventManager.requestRender()}updateCursorFromRaycast(){let{raycaster:t,page:e}=this.eventContext,a=e.raycastWithClones(t),i=!1;for(let t of this.events){for(let{obj:e}of t.dragItems)if(e===a[0]?.object||e===a[0]?.object?.object||s.is(e)&&e.isAncestorOf(a[0]?.object.uuid)){switch(i=!0,t.data.cursor){case"hand":this.setCursor("grab");break;case"move":this.setCursor("move")}break}if(i)break}i||this.setCursor("default")}};i("DragDrop",({eventContext:t,eventManager:e})=>new F(t,e)),h("dragdrop");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as t}from"./runtime-chunk-
|
|
1
|
+
import{e as t}from"./runtime-chunk-M3ZKF7PK.js";import{Dc as e,Gc as s,Hc as i,I as r,Ic as a,b as h,c as l,ic as o,sc as n,ua as m,v as u,za as _}from"./runtime-chunk-5H2Z5KYI.js";import{d as p}from"./runtime-chunk-EOV2DL2V.js";import{Dc as d,Kc as c,m as g,qa as B}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var S=new u,f=new d,T=[[0,0],[0,1,1],[0,1,1,2],[0,1,2,2,3],[0,1,2,3,4,4,5],[0,1,2,3,4,5,7,8,9,10]],x=[.2126729,.7151522,.072175],M=class extends h{constructor(t,e){super("vec4"),this._width=0,this._height=0,this._materials=[],this._input=t,this._opts=e,this._rtL=this._makeRT(1,1,"SplineBloom.L"),this._rtA=this._makeRT(1,1,"SplineBloom.A"),this._rtB=this._makeRT(1,1,"SplineBloom.B"),this._outputTexNode=n(this._rtL.texture),this._buildMaterials()}static get type(){return"SplineBloomNode"}_makeRT(e,s,i){let r=new c(e,s,{minFilter:B,magFilter:B,depthBuffer:!1});return t()&&(r.texture.internalFormat="rgba8unorm-srgb"),r.texture.name=i,r}_buildMaterials(){for(let t of this._materials)t.dispose();this._materials=[];let t=(t,e)=>{let s=new l;return s.name=t,s.colorNode=e,s.depthTest=!1,s.depthWrite=!1,s.blending=g,s.needsUpdate=!0,s},h=this._opts.luminanceThreshold,u=Math.max(this._opts.luminanceSmoothing,1e-4),p=this._input,d=r(()=>{let t=p.sample(e()),s=o(_(h),_(h+u),m(t.rgb,i(x[0],x[1],x[2])));return a(t.rgb.mul(s),s)});this._materials.push(t("SplineBloom.luminance",d()));let c=T[this._opts.kernelSize]??T[3],B=1/Math.max(1,this._width),S=1/Math.max(1,this._height),f=this._passSequence(c.length);for(let i=0;i<c.length;i++){let a=B*(c[i]+.5)*this._opts.blurScale,h=S*(c[i]+.5)*this._opts.blurScale,l=n(f[i].from.texture),o=r(()=>{let t=e();return l.sample(t.add(s(-a,h))).add(l.sample(t.add(s(a,h)))).add(l.sample(t.add(s(a,-h)))).add(l.sample(t.add(s(-a,-h)))).mul(.25)});this._materials.push(t(`SplineBloom.blur${i}`,o()))}}_passSequence(t){let e=[],s=this._rtL;for(let i=0;i<t-1;i++){let t=1&i?this._rtB:this._rtA;e.push({from:s,to:t}),s=t}return e.push({from:s,to:this._rtL}),e}renderBloom(t){t.getDrawingBufferSize(f);let e=Math.max(1,Math.round(.5*f.x)),s=Math.max(1,Math.round(.5*f.y));(e!==this._width||s!==this._height)&&(this._width=e,this._height=s,this._rtL.dispose(),this._rtA.dispose(),this._rtB.dispose(),this._rtL=this._makeRT(e,s,"SplineBloom.L"),this._rtA=this._makeRT(e,s,"SplineBloom.A"),this._rtB=this._makeRT(e,s,"SplineBloom.B"),this._outputTexNode.value=this._rtL.texture,this._buildMaterials());let i=T[this._opts.kernelSize]??T[3],r=this._passSequence(i.length),a=t.getRenderTarget(),h=t.getMRT();t.setMRT(null),t.setRenderTarget(this._rtL),S.material=this._materials[0],S.name="SplineBloom.luminance",S.render(t);for(let e=0;e<r.length;e++)t.setRenderTarget(r[e].to),S.material=this._materials[e+1],S.name=`SplineBloom.blur${e}`,S.render(t);t.setRenderTarget(a),t.setMRT(h)}setup(){return this._outputTexNode}dispose(){for(let t of this._materials)t.dispose();this._materials=[],this._rtL.dispose(),this._rtA.dispose(),this._rtB.dispose()}};p("bloom",function(t,e){return new M(t,e)});
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ac as e,Bc as t,Cb as r,Dc as s,Fb as i,Gc as a,Hc as o,I as l,Ic as u,K as h,Rb as n,Sb as d,a as _,b as p,c as m,eb as c,gb as T,hb as C,ic as N,la as R,mc as b,sb as x,sc as g,v as f,w as B,za as M,zc as S}from"./runtime-chunk-5H2Z5KYI.js";import{d as v}from"./runtime-chunk-EOV2DL2V.js";import{Ba as F,Dc as w,Kc as z,Ma as D}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var y,G,O=new f,A=class extends p{static get type(){return"GaussianBlurNode"}constructor(e,t=null,r=4,s={}){super("vec4"),this.textureNode=e,this.directionNode=t,this.sigma=r,this._invSize=S(new w),this._passDirection=S(new w),this._horizontalRT=new z(1,1,{depthBuffer:!1}),this._horizontalRT.texture.name="GaussianBlurNode.horizontal",this._verticalRT=new z(1,1,{depthBuffer:!1}),this._verticalRT.texture.name="GaussianBlurNode.vertical",this._textureNode=i(this,this._verticalRT.texture),this._textureNode.uvNode=e.uvNode,this._material=null,this.updateBeforeType=_.FRAME,this.resolutionScale=s.resolutionScale||1,this.premultipliedAlpha=s.premultipliedAlpha||!1,this.isGaussianBlurNode=!0}setSize(e,t){e=Math.max(Math.round(e*this.resolutionScale),1),t=Math.max(Math.round(t*this.resolutionScale),1),this._invSize.value.set(1/e,1/t),this._horizontalRT.setSize(e,t),this._verticalRT.setSize(e,t)}updateBefore(e){let{renderer:t}=e;y=B.resetRendererState(t,y);let r=this.textureNode,s=r.value,i=r.value;O.material=this._material,this.setSize(s.image.width,s.image.height);let a=s.type;this._horizontalRT.texture.type=a,this._verticalRT.texture.type=a,t.setRenderTarget(this._horizontalRT),this._passDirection.value.set(1,0),O.name="Gaussian Blur [ Horizontal Pass ]",O.render(t),r.value=this._horizontalRT.texture,t.setRenderTarget(this._verticalRT),this._passDirection.value.set(0,1),O.name="Gaussian Blur [ Vertical Pass ]",O.render(t),r.value=i,B.restoreRendererState(t,y)}getTextureNode(){return this._textureNode}setup(e){let r,i,o=this.textureNode,h=s(),d=a(this.directionNode||1);this.premultipliedAlpha?(r=e=>n(o.sample(e)),i=e=>t(e)):(r=e=>o.sample(e),i=e=>e);let _=l(()=>{let e=3+2*this.sigma,t=this._getCoefficients(e),s=this._invSize,o=d.mul(this._passDirection),l=u(r(h).mul(t[0])).toVar();for(let i=1;i<e;i++){let e=M(i),u=M(t[i]),n=a(o.mul(s.mul(e))).toVar(),d=r(h.add(n)),_=r(h.sub(n));l.addAssign(d.add(_).mul(u))}return i(l)}),p=this._material||(this._material=new m);return p.fragmentNode=_().context(e.getSharedContext()),p.name="Gaussian_blur",p.needsUpdate=!0,e.getNodeProperties(this).textureNode=o,this._textureNode}dispose(){this._horizontalRT.dispose(),this._verticalRT.dispose(),null!==this._material&&this._material.dispose()}_getCoefficients(e){let t=[],r=e/3;for(let s=0;s<e;s++)t.push(.39894*Math.exp(-.5*s*s/(r*r))/r);return t}get resolution(){return console.warn('THREE.GaussianBlurNode: The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.'),new w(this.resolutionScale,this.resolutionScale)}set resolution(e){console.warn('THREE.GaussianBlurNode: The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.'),this.resolutionScale=e.x}},V=new f,k=class extends p{static get type(){return"DepthOfFieldNode"}constructor(e,t,r,s,i){super("vec4"),this.textureNode=e,this.viewZNode=t,this.focusDistanceNode=r,this.focalLengthNode=s,this.bokehScaleNode=i,this._invSize=S(new w),this._CoCRT=new z(1,1,{depthBuffer:!1,type:F,format:D,count:2}),this._CoCRT.textures[0].name="DepthOfField.NearField",this._CoCRT.textures[1].name="DepthOfField.FarField",this._CoCBlurredRT=new z(1,1,{depthBuffer:!1,type:F,format:D}),this._CoCBlurredRT.texture.name="DepthOfField.NearFieldBlurred",this._blur64RT=new z(1,1,{depthBuffer:!1,type:F}),this._blur64RT.texture.name="DepthOfField.Blur64",this._blur16NearRT=new z(1,1,{depthBuffer:!1,type:F}),this._blur16NearRT.texture.name="DepthOfField.Blur16Near",this._blur16FarRT=new z(1,1,{depthBuffer:!1,type:F}),this._blur16FarRT.texture.name="DepthOfField.Blur16Far",this._compositeRT=new z(1,1,{depthBuffer:!1,type:F}),this._compositeRT.texture.name="DepthOfField.Composite",this._CoCMaterial=new m,this._CoCBlurredMaterial=new m,this._blur64Material=new m,this._blur16Material=new m,this._compositeMaterial=new m,this._textureNode=g(this._compositeRT.texture),this._CoCTextureNode=g(this._CoCRT.texture),this._blur64TextureNode=g(this._blur64RT.texture),this._blur16NearTextureNode=g(this._blur16NearRT.texture),this._blur16FarTextureNode=g(this._blur16FarRT.texture),this.updateBeforeType=_.FRAME}setSize(e,t){this._invSize.value.set(1/e,1/t),this._CoCRT.setSize(e,t),this._compositeRT.setSize(e,t);let r=Math.round(e/2),s=Math.round(t/2);this._CoCBlurredRT.setSize(r,s),this._blur64RT.setSize(r,s),this._blur16NearRT.setSize(r,s),this._blur16FarRT.setSize(r,s)}getTextureNode(){return this._textureNode}updateBefore(e){let{renderer:t}=e,r=this.textureNode.value;this.setSize(r.image.width,r.image.height),G=B.resetRendererState(t,G),t.setClearColor(0,0),V.material=this._CoCMaterial,t.setRenderTarget(this._CoCRT),V.name="DoF [ CoC ]",V.render(t),this._CoCTextureNode.value=this._CoCRT.textures[0],V.material=this._CoCBlurredMaterial,t.setRenderTarget(this._CoCBlurredRT),V.name="DoF [ CoC Blur ]",V.render(t),this._CoCTextureNode.value=this._CoCBlurredRT.texture,V.material=this._blur64Material,t.setRenderTarget(this._blur64RT),V.name="DoF [ Blur64 Near ]",V.render(t),V.material=this._blur16Material,t.setRenderTarget(this._blur16NearRT),V.name="DoF [ Blur16 Near ]",V.render(t),this._CoCTextureNode.value=this._CoCRT.textures[1],V.material=this._blur64Material,t.setRenderTarget(this._blur64RT),V.name="DoF [ Blur64 Far ]",V.render(t),V.material=this._blur16Material,t.setRenderTarget(this._blur16FarRT),V.name="DoF [ Blur16 Far ]",V.render(t),V.material=this._compositeMaterial,t.setRenderTarget(this._compositeRT),V.name="DoF [ Composite ]",V.render(t),B.restoreRendererState(t,G)}setup(t){let i=this._generateKernels(),a=d("float"),n=d("float"),_=r(a,n),p=l(()=>{let e=this.viewZNode.negate().sub(this.focusDistanceNode),t=N(0,this.focalLengthNode,e.abs());return a.assign(b(e,0).mul(t)),n.assign(b(0,e).mul(t)),M(0)});this._CoCMaterial.colorNode=p().context(t.getSharedContext()),this._CoCMaterial.outputNode=_,this._CoCMaterial.needsUpdate=!0,this._CoCBlurredMaterial.colorNode=((e,t,r,s={})=>new A(R(e),t,r,s))(this._CoCTextureNode,1,2),this._CoCBlurredMaterial.needsUpdate=!0;let m=e(i.points64),x=l(()=>{let e=o(),t=s(),r=this._CoCTextureNode.sample(t).r,i=this._invSize.mul(this.bokehScaleNode).mul(r);return h(64,({i:r})=>{let s=t.add(i.mul(m.element(r))),a=this.textureNode.sample(s);e.addAssign(a.rgb)}),e.divAssign(64),u(e,r)});this._blur64Material.fragmentNode=x().context(t.getSharedContext()),this._blur64Material.needsUpdate=!0;let g=e(i.points16),f=l(()=>{let e=s(),t=this._blur64TextureNode.sample(e).toVar(),r=t.rgb,i=t.a,a=this._invSize.mul(this.bokehScaleNode).mul(i);return h(16,({i:t})=>{let s=e.add(a.mul(g.element(t))),i=this._blur64TextureNode.sample(s);r.assign(c(i.rgb,r))}),u(r,i)});this._blur16Material.fragmentNode=f().context(t.getSharedContext()),this._blur16Material.needsUpdate=!0;let B=l(()=>{let e=s(),t=this._blur16NearTextureNode.sample(e),r=this._blur16FarTextureNode.sample(e),i=this.textureNode.sample(e),a=T(t.a,.5).mul(2),o=T(r.a,.5).mul(2),l=u(0,0,0,1).toVar();return l.rgb=C(i.rgb,r.rgb,o),l.rgb=C(l.rgb,t.rgb,a),l});return this._compositeMaterial.fragmentNode=B().context(t.getSharedContext()),this._compositeMaterial.needsUpdate=!0,this._textureNode}_generateKernels(){let e=[],t=[],r=0,s=0;for(let i=0;i<80;i++){let a=2.39996323*i,o=Math.sqrt(i)/Math.sqrt(80),l=new w(o*Math.cos(a),o*Math.sin(a));i%5==0?(t[s]=l,s++):(e[r]=l,r++)}return{points16:t,points64:e}}dispose(){this._CoCRT.dispose(),this._CoCBlurredRT.dispose(),this._blur64RT.dispose(),this._blur16NearRT.dispose(),this._blur16FarRT.dispose(),this._compositeRT.dispose(),this._CoCMaterial.dispose(),this._CoCBlurredMaterial.dispose(),this._blur64Material.dispose(),this._blur16Material.dispose(),this._compositeMaterial.dispose()}};v("depthOfField",(e,t,r=1,s=1,i=1)=>new k(R(e),x(t),x(r),x(s),x(i)));
|
|
Binary file
|
|
Binary file
|