@splinetool/runtime 1.12.98 → 2.0.2
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/README.md +195 -22
- package/build/boolean.js +406 -2
- package/build/boolean.js.br +0 -0
- package/build/boolean.js.gz +0 -0
- package/build/boolean.wasm +0 -0
- package/build/boolean.wasm.br +0 -0
- package/build/boolean.wasm.gz +0 -0
- package/build/gaussian-splat-compression.js.br +0 -0
- package/build/gaussian-splat-compression.js.gz +0 -0
- package/build/hana-ui.js +4299 -0
- 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/howler.js.br +0 -0
- package/build/howler.js.gz +0 -0
- package/build/navmesh.js.br +0 -0
- package/build/navmesh.js.gz +0 -0
- package/build/navmesh.wasm +0 -0
- package/build/navmesh.wasm.br +0 -0
- package/build/navmesh.wasm.gz +0 -0
- package/build/opentype.js.br +0 -0
- package/build/opentype.js.gz +0 -0
- package/build/physics.js +1 -1
- package/build/physics.js.br +0 -0
- package/build/physics.js.gz +0 -0
- package/build/physics.wasm +0 -0
- package/build/physics.wasm.br +0 -0
- package/build/physics.wasm.gz +0 -0
- package/build/process.js +2 -2
- package/build/process.js.br +0 -0
- package/build/process.js.gz +0 -0
- package/build/process.wasm +0 -0
- package/build/process.wasm.br +0 -0
- package/build/process.wasm.gz +0 -0
- package/build/runtime-DRACOLoader-TQHJ6SJB.js +1 -0
- package/build/runtime-DRACOLoader-TQHJ6SJB.js.br +0 -0
- package/build/runtime-DRACOLoader-TQHJ6SJB.js.gz +0 -0
- package/build/runtime-Perfs-KMJFDYHU.js +1 -0
- package/build/runtime-Perfs-KMJFDYHU.js.br +0 -0
- package/build/runtime-Perfs-KMJFDYHU.js.gz +0 -0
- package/build/runtime-aiAssistant-XJVJ7TQB.js +1 -0
- package/build/runtime-aiAssistant-XJVJ7TQB.js.br +0 -0
- package/build/runtime-aiAssistant-XJVJ7TQB.js.gz +0 -0
- package/build/runtime-apiServices-KAO5SQJZ.js +1 -0
- package/build/runtime-apiServices-KAO5SQJZ.js.br +0 -0
- package/build/runtime-apiServices-KAO5SQJZ.js.gz +0 -0
- package/build/runtime-audio-Y3GYW4YQ.js +1 -0
- package/build/runtime-audio-Y3GYW4YQ.js.br +0 -0
- package/build/runtime-audio-Y3GYW4YQ.js.gz +0 -0
- package/build/runtime-bloom-XRHHZNNT.js +1 -0
- package/build/runtime-bloom-XRHHZNNT.js.br +0 -0
- package/build/runtime-bloom-XRHHZNNT.js.gz +0 -0
- package/build/runtime-brightnessContrast-RHV6X2Z4.js +1 -0
- package/build/runtime-brightnessContrast-RHV6X2Z4.js.br +0 -0
- package/build/runtime-brightnessContrast-RHV6X2Z4.js.gz +0 -0
- package/build/runtime-chromaticAberration-LSGAMQAK.js +1 -0
- package/build/runtime-chromaticAberration-LSGAMQAK.js.br +0 -0
- package/build/runtime-chromaticAberration-LSGAMQAK.js.gz +0 -0
- package/build/runtime-chunk-2SYZJBYJ.js +1 -0
- package/build/runtime-chunk-2SYZJBYJ.js.br +0 -0
- package/build/runtime-chunk-2SYZJBYJ.js.gz +0 -0
- package/build/runtime-chunk-2Y73BLCY.js +1 -0
- package/build/runtime-chunk-2Y73BLCY.js.br +0 -0
- package/build/runtime-chunk-2Y73BLCY.js.gz +0 -0
- package/build/runtime-chunk-4KZXQGUQ.js +1 -0
- package/build/runtime-chunk-4KZXQGUQ.js.br +0 -0
- package/build/runtime-chunk-4KZXQGUQ.js.gz +0 -0
- package/build/runtime-chunk-4YV3EXSU.js +1 -0
- package/build/runtime-chunk-4YV3EXSU.js.br +0 -0
- package/build/runtime-chunk-4YV3EXSU.js.gz +0 -0
- package/build/runtime-chunk-A2LYIKKC.js +1 -0
- package/build/runtime-chunk-A2LYIKKC.js.br +0 -0
- package/build/runtime-chunk-A2LYIKKC.js.gz +0 -0
- package/build/runtime-chunk-BJVCOW72.js +1 -0
- package/build/runtime-chunk-BJVCOW72.js.br +0 -0
- package/build/runtime-chunk-BJVCOW72.js.gz +0 -0
- package/build/runtime-chunk-CTHMLYOZ.js +1 -0
- package/build/runtime-chunk-CTHMLYOZ.js.br +0 -0
- package/build/runtime-chunk-CTHMLYOZ.js.gz +0 -0
- package/build/runtime-chunk-CVUJ3GMH.js +1 -0
- package/build/runtime-chunk-CVUJ3GMH.js.br +0 -0
- package/build/runtime-chunk-CVUJ3GMH.js.gz +0 -0
- package/build/runtime-chunk-DZNU62CT.js +1 -0
- package/build/runtime-chunk-DZNU62CT.js.br +0 -0
- package/build/runtime-chunk-DZNU62CT.js.gz +0 -0
- package/build/runtime-chunk-E6JCDSXC.js +1 -0
- package/build/runtime-chunk-E6JCDSXC.js.br +0 -0
- package/build/runtime-chunk-E6JCDSXC.js.gz +0 -0
- package/build/runtime-chunk-EOV2DL2V.js +1 -0
- package/build/runtime-chunk-EOV2DL2V.js.br +0 -0
- package/build/runtime-chunk-EOV2DL2V.js.gz +0 -0
- package/build/runtime-chunk-FF5REN2J.js +1 -0
- package/build/runtime-chunk-FF5REN2J.js.br +0 -0
- package/build/runtime-chunk-FF5REN2J.js.gz +0 -0
- package/build/runtime-chunk-FQNSP44B.js +1 -0
- package/build/runtime-chunk-FQNSP44B.js.br +0 -0
- package/build/runtime-chunk-FQNSP44B.js.gz +0 -0
- package/build/runtime-chunk-FTVQTRM7.js +1 -0
- package/build/runtime-chunk-FTVQTRM7.js.br +0 -0
- package/build/runtime-chunk-FTVQTRM7.js.gz +0 -0
- package/build/runtime-chunk-GFTBNL2W.js +1 -0
- package/build/runtime-chunk-GFTBNL2W.js.br +0 -0
- package/build/runtime-chunk-GFTBNL2W.js.gz +0 -0
- package/build/runtime-chunk-HJS3VFEN.js +1 -0
- package/build/runtime-chunk-HJS3VFEN.js.br +0 -0
- package/build/runtime-chunk-HJS3VFEN.js.gz +0 -0
- package/build/runtime-chunk-HL3PBPHE.js +1 -0
- package/build/runtime-chunk-HL3PBPHE.js.br +0 -0
- package/build/runtime-chunk-HL3PBPHE.js.gz +0 -0
- package/build/runtime-chunk-I47C4XJU.js +1 -0
- package/build/runtime-chunk-I47C4XJU.js.br +0 -0
- package/build/runtime-chunk-I47C4XJU.js.gz +0 -0
- package/build/runtime-chunk-JFYHGEDN.js +1 -0
- package/build/runtime-chunk-JFYHGEDN.js.br +0 -0
- package/build/runtime-chunk-JFYHGEDN.js.gz +0 -0
- package/build/runtime-chunk-K4FLB6Y7.js +1 -0
- package/build/runtime-chunk-K4FLB6Y7.js.br +0 -0
- package/build/runtime-chunk-K4FLB6Y7.js.gz +0 -0
- package/build/runtime-chunk-KGZNRID6.js +1 -0
- package/build/runtime-chunk-KGZNRID6.js.br +1 -0
- package/build/runtime-chunk-KGZNRID6.js.gz +0 -0
- package/build/runtime-chunk-LSURXI4Y.js +1 -0
- package/build/runtime-chunk-LSURXI4Y.js.br +2 -0
- package/build/runtime-chunk-LSURXI4Y.js.gz +0 -0
- package/build/runtime-chunk-MBBODDV7.js +1 -0
- package/build/runtime-chunk-MBBODDV7.js.br +0 -0
- package/build/runtime-chunk-MBBODDV7.js.gz +0 -0
- package/build/runtime-chunk-ML3Z74BL.js +1 -0
- package/build/runtime-chunk-ML3Z74BL.js.br +0 -0
- package/build/runtime-chunk-ML3Z74BL.js.gz +0 -0
- package/build/runtime-chunk-MM75L5X4.js +1 -0
- package/build/runtime-chunk-MM75L5X4.js.br +0 -0
- package/build/runtime-chunk-MM75L5X4.js.gz +0 -0
- package/build/runtime-chunk-MRUNX43X.js +1 -0
- package/build/runtime-chunk-MRUNX43X.js.br +0 -0
- package/build/runtime-chunk-MRUNX43X.js.gz +0 -0
- package/build/runtime-chunk-N2ZRGNPR.js +1 -0
- package/build/runtime-chunk-N2ZRGNPR.js.br +0 -0
- package/build/runtime-chunk-N2ZRGNPR.js.gz +0 -0
- package/build/runtime-chunk-NBYTQLIB.js +1 -0
- package/build/runtime-chunk-NBYTQLIB.js.br +0 -0
- package/build/runtime-chunk-NBYTQLIB.js.gz +0 -0
- package/build/runtime-chunk-NSD7DU3P.js +1 -0
- package/build/runtime-chunk-NSD7DU3P.js.br +0 -0
- package/build/runtime-chunk-NSD7DU3P.js.gz +0 -0
- package/build/runtime-chunk-NTUTXO7Q.js +1 -0
- package/build/runtime-chunk-NTUTXO7Q.js.br +0 -0
- package/build/runtime-chunk-NTUTXO7Q.js.gz +0 -0
- package/build/runtime-chunk-OEXC34HT.js +1 -0
- package/build/runtime-chunk-OEXC34HT.js.br +0 -0
- package/build/runtime-chunk-OEXC34HT.js.gz +0 -0
- package/build/runtime-chunk-OFPUAZKY.js +1 -0
- package/build/runtime-chunk-OFPUAZKY.js.br +0 -0
- package/build/runtime-chunk-OFPUAZKY.js.gz +0 -0
- package/build/runtime-chunk-OLJVVNDS.js +1 -0
- package/build/runtime-chunk-OLJVVNDS.js.br +0 -0
- package/build/runtime-chunk-OLJVVNDS.js.gz +0 -0
- package/build/runtime-chunk-OW6T4XFV.js +1 -0
- package/build/runtime-chunk-OW6T4XFV.js.br +0 -0
- package/build/runtime-chunk-OW6T4XFV.js.gz +0 -0
- package/build/runtime-chunk-P2XISQYQ.js +1 -0
- package/build/runtime-chunk-P2XISQYQ.js.br +0 -0
- package/build/runtime-chunk-P2XISQYQ.js.gz +0 -0
- package/build/runtime-chunk-P3254QGK.js +1 -0
- package/build/runtime-chunk-P3254QGK.js.br +0 -0
- package/build/runtime-chunk-P3254QGK.js.gz +0 -0
- package/build/runtime-chunk-PPLLJM75.js +1 -0
- package/build/runtime-chunk-PPLLJM75.js.br +0 -0
- package/build/runtime-chunk-PPLLJM75.js.gz +0 -0
- package/build/runtime-chunk-QHPFAHXN.js +1 -0
- package/build/runtime-chunk-QHPFAHXN.js.br +0 -0
- package/build/runtime-chunk-QHPFAHXN.js.gz +0 -0
- package/build/runtime-chunk-QZ35BPGB.js +1 -0
- package/build/runtime-chunk-QZ35BPGB.js.br +0 -0
- package/build/runtime-chunk-QZ35BPGB.js.gz +0 -0
- package/build/runtime-chunk-R43XZP65.js +1 -0
- package/build/runtime-chunk-R43XZP65.js.br +0 -0
- package/build/runtime-chunk-R43XZP65.js.gz +0 -0
- package/build/runtime-chunk-RAX4YJZF.js +1 -0
- package/build/runtime-chunk-RAX4YJZF.js.br +0 -0
- package/build/runtime-chunk-RAX4YJZF.js.gz +0 -0
- package/build/runtime-chunk-RQ3ZQR4P.js +1 -0
- package/build/runtime-chunk-RQ3ZQR4P.js.br +0 -0
- package/build/runtime-chunk-RQ3ZQR4P.js.gz +0 -0
- package/build/runtime-chunk-SKLNU6XK.js +1 -0
- package/build/runtime-chunk-SKLNU6XK.js.br +0 -0
- package/build/runtime-chunk-SKLNU6XK.js.gz +0 -0
- package/build/runtime-chunk-T53JMQSH.js +1 -0
- package/build/runtime-chunk-T53JMQSH.js.br +0 -0
- package/build/runtime-chunk-T53JMQSH.js.gz +0 -0
- package/build/runtime-chunk-TDCFE5IE.js +1 -0
- package/build/runtime-chunk-TDCFE5IE.js.br +0 -0
- package/build/runtime-chunk-TDCFE5IE.js.gz +0 -0
- package/build/runtime-chunk-TU4KDRKR.js +1 -0
- package/build/runtime-chunk-TU4KDRKR.js.br +0 -0
- package/build/runtime-chunk-TU4KDRKR.js.gz +0 -0
- package/build/runtime-chunk-TZCHGFVF.js +1 -0
- package/build/runtime-chunk-TZCHGFVF.js.br +3 -0
- package/build/runtime-chunk-TZCHGFVF.js.gz +0 -0
- package/build/runtime-chunk-USXMESRF.js +1 -0
- package/build/runtime-chunk-USXMESRF.js.br +0 -0
- package/build/runtime-chunk-USXMESRF.js.gz +0 -0
- package/build/runtime-chunk-VAVYZ35B.js +1 -0
- package/build/runtime-chunk-VAVYZ35B.js.br +0 -0
- package/build/runtime-chunk-VAVYZ35B.js.gz +0 -0
- package/build/runtime-chunk-VGN7YHB7.js +1 -0
- package/build/runtime-chunk-VGN7YHB7.js.br +0 -0
- package/build/runtime-chunk-VGN7YHB7.js.gz +0 -0
- package/build/runtime-chunk-VRVV54WH.js +1 -0
- package/build/runtime-chunk-VRVV54WH.js.br +0 -0
- package/build/runtime-chunk-VRVV54WH.js.gz +0 -0
- package/build/runtime-chunk-WSJURWOC.js +1 -0
- package/build/runtime-chunk-WSJURWOC.js.br +0 -0
- package/build/runtime-chunk-WSJURWOC.js.gz +0 -0
- package/build/runtime-chunk-Y3BMDVJ7.js +1 -0
- package/build/runtime-chunk-Y3BMDVJ7.js.br +0 -0
- package/build/runtime-chunk-Y3BMDVJ7.js.gz +0 -0
- package/build/runtime-chunk-YXATXASV.js +1 -0
- package/build/runtime-chunk-YXATXASV.js.br +1 -0
- package/build/runtime-chunk-YXATXASV.js.gz +0 -0
- package/build/runtime-chunk-Z5OH244S.js +1 -0
- package/build/runtime-chunk-Z5OH244S.js.br +0 -0
- package/build/runtime-chunk-Z5OH244S.js.gz +0 -0
- package/build/runtime-classicRuntime-AMAXBOXT.js +1 -0
- package/build/runtime-classicRuntime-AMAXBOXT.js.br +0 -0
- package/build/runtime-classicRuntime-AMAXBOXT.js.gz +0 -0
- package/build/runtime-cloners-4W3AOAQX.js +1 -0
- package/build/runtime-cloners-4W3AOAQX.js.br +1 -0
- package/build/runtime-cloners-4W3AOAQX.js.gz +0 -0
- package/build/runtime-collisionBVH-KXZNWTEK.js +1 -0
- package/build/runtime-collisionBVH-KXZNWTEK.js.br +0 -0
- package/build/runtime-collisionBVH-KXZNWTEK.js.gz +0 -0
- package/build/runtime-components-EPAMFKSB.js +1 -0
- package/build/runtime-components-EPAMFKSB.js.br +0 -0
- package/build/runtime-components-EPAMFKSB.js.gz +0 -0
- package/build/runtime-conditional-3A423CXW.js +1 -0
- package/build/runtime-conditional-3A423CXW.js.br +0 -0
- package/build/runtime-conditional-3A423CXW.js.gz +0 -0
- package/build/runtime-createDestroy-HLHRAAC4.js +1 -0
- package/build/runtime-createDestroy-HLHRAAC4.js.br +0 -0
- package/build/runtime-createDestroy-HLHRAAC4.js.gz +0 -0
- package/build/runtime-depthOfField-BBWDHJYP.js +1 -0
- package/build/runtime-depthOfField-BBWDHJYP.js.br +0 -0
- package/build/runtime-depthOfField-BBWDHJYP.js.gz +0 -0
- package/build/runtime-dragDrop-K6LWK7FL.js +1 -0
- package/build/runtime-dragDrop-K6LWK7FL.js.br +0 -0
- package/build/runtime-dragDrop-K6LWK7FL.js.gz +0 -0
- package/build/runtime-fxBloom-IGFV4KJD.js +1 -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 +1 -0
- package/build/runtime-fxDepthOfField-WX7WD3K4.js.br +0 -0
- package/build/runtime-fxDepthOfField-WX7WD3K4.js.gz +0 -0
- package/build/runtime-gameControls-ZJUUKNHM.js +1 -0
- package/build/runtime-gameControls-ZJUUKNHM.js.br +0 -0
- package/build/runtime-gameControls-ZJUUKNHM.js.gz +0 -0
- package/build/runtime-hair-AGUMVL55.js +1 -0
- package/build/runtime-hair-AGUMVL55.js.br +3 -0
- package/build/runtime-hair-AGUMVL55.js.gz +0 -0
- package/build/runtime-hueSaturation-X3HAZK2G.js +1 -0
- package/build/runtime-hueSaturation-X3HAZK2G.js.br +0 -0
- package/build/runtime-hueSaturation-X3HAZK2G.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-AOGKOEBX.js +1 -0
- package/build/runtime-mergeStaticGeometries-AOGKOEBX.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-AOGKOEBX.js.gz +0 -0
- package/build/runtime-miscActions-L7BIGLEB.js +1 -0
- package/build/runtime-miscActions-L7BIGLEB.js.br +0 -0
- package/build/runtime-miscActions-L7BIGLEB.js.gz +0 -0
- package/build/runtime-mouseHover-BI5SRQSQ.js +1 -0
- package/build/runtime-mouseHover-BI5SRQSQ.js.br +0 -0
- package/build/runtime-mouseHover-BI5SRQSQ.js.gz +0 -0
- package/build/runtime-navmesh-UJTUAHXM.js +1 -0
- package/build/runtime-navmesh-UJTUAHXM.js.br +0 -0
- package/build/runtime-navmesh-UJTUAHXM.js.gz +0 -0
- package/build/runtime-noise-UF5CMIO3.js +1 -0
- package/build/runtime-noise-UF5CMIO3.js.br +0 -0
- package/build/runtime-noise-UF5CMIO3.js.gz +0 -0
- package/build/runtime-particles-W7YEQWJI.js +1 -0
- package/build/runtime-particles-W7YEQWJI.js.br +0 -0
- package/build/runtime-particles-W7YEQWJI.js.gz +0 -0
- package/build/runtime-paths-CK327WCT.js +1 -0
- package/build/runtime-paths-CK327WCT.js.br +0 -0
- package/build/runtime-paths-CK327WCT.js.gz +0 -0
- package/build/runtime-pixelation-QFSF4L6X.js +1 -0
- package/build/runtime-pixelation-QFSF4L6X.js.br +0 -0
- package/build/runtime-pixelation-QFSF4L6X.js.gz +0 -0
- package/build/runtime-resize-RUUW4IXW.js +1 -0
- package/build/runtime-resize-RUUW4IXW.js.br +0 -0
- package/build/runtime-resize-RUUW4IXW.js.gz +0 -0
- package/build/runtime-sceneTransition-7AG4A4P5.js +1 -0
- package/build/runtime-sceneTransition-7AG4A4P5.js.br +0 -0
- package/build/runtime-sceneTransition-7AG4A4P5.js.gz +0 -0
- package/build/runtime-scroll-MNQPPLQL.js +1 -0
- package/build/runtime-scroll-MNQPPLQL.js.br +0 -0
- package/build/runtime-scroll-MNQPPLQL.js.gz +0 -0
- package/build/runtime-shapeBlends-IP5LZ63L.js +1 -0
- package/build/runtime-shapeBlends-IP5LZ63L.js.br +0 -0
- package/build/runtime-shapeBlends-IP5LZ63L.js.gz +0 -0
- package/build/runtime-text-5RIKJ4US.js +1 -0
- package/build/runtime-text-5RIKJ4US.js.br +0 -0
- package/build/runtime-text-5RIKJ4US.js.gz +0 -0
- package/build/runtime-textInputs-YBGYTAMD.js +1 -0
- package/build/runtime-textInputs-YBGYTAMD.js.br +0 -0
- package/build/runtime-textInputs-YBGYTAMD.js.gz +0 -0
- package/build/runtime-timeline-32GBWMFJ.js +1 -0
- package/build/runtime-timeline-32GBWMFJ.js.br +0 -0
- package/build/runtime-timeline-32GBWMFJ.js.gz +0 -0
- package/build/runtime-tracking-2BXFBQQY.js +1 -0
- package/build/runtime-tracking-2BXFBQQY.js.br +0 -0
- package/build/runtime-tracking-2BXFBQQY.js.gz +0 -0
- package/build/runtime-transitions-6PZW2QIW.js +1 -0
- package/build/runtime-transitions-6PZW2QIW.js.br +0 -0
- package/build/runtime-transitions-6PZW2QIW.js.gz +0 -0
- package/build/runtime-ui2d-VEQUBXIE.js +1 -0
- package/build/runtime-ui2d-VEQUBXIE.js.br +0 -0
- package/build/runtime-ui2d-VEQUBXIE.js.gz +0 -0
- package/build/runtime-updater-3ELP7WMM.js +1 -0
- package/build/runtime-updater-3ELP7WMM.js.br +1 -0
- package/build/runtime-updater-3ELP7WMM.js.gz +0 -0
- package/build/runtime-variables-U36KPJ5V.js +1 -0
- package/build/runtime-variables-U36KPJ5V.js.br +0 -0
- package/build/runtime-variables-U36KPJ5V.js.gz +0 -0
- package/build/runtime-vectorShapes-4HPEEN3B.js +1 -0
- package/build/runtime-vectorShapes-4HPEEN3B.js.br +0 -0
- package/build/runtime-vectorShapes-4HPEEN3B.js.gz +0 -0
- package/build/runtime-video-TZNR7MEM.js +1 -0
- package/build/runtime-video-TZNR7MEM.js.br +0 -0
- package/build/runtime-video-TZNR7MEM.js.gz +0 -0
- package/build/runtime-vignette-3KJD4P5D.js +1 -0
- package/build/runtime-vignette-3KJD4P5D.js.br +0 -0
- package/build/runtime-vignette-3KJD4P5D.js.gz +0 -0
- package/build/runtime-webgpu-YNY4OXCZ.js +1 -0
- package/build/runtime-webgpu-YNY4OXCZ.js.br +0 -0
- package/build/runtime-webgpu-YNY4OXCZ.js.gz +0 -0
- package/build/runtime.cjs +6283 -4577
- package/build/runtime.js +1 -8186
- package/build/runtime.js.br +0 -0
- package/build/runtime.js.gz +0 -0
- package/build/runtime.standalone.js +1 -0
- package/build/runtime.standalone.js.br +0 -0
- package/build/runtime.standalone.js.gz +0 -0
- package/build/runtime.standalone.webgl.js +1 -0
- 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 -0
- 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 -0
- 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 -0
- package/build/runtime.standalone.webgpu.min.js.br +0 -0
- package/build/runtime.standalone.webgpu.min.js.gz +0 -0
- package/build/sky-alto.png +0 -0
- package/build/sky-cirrus.png +0 -0
- package/build/smaa-area.png +0 -0
- package/build/smaa-node-area.png +0 -0
- package/build/smaa-node-search.png +0 -0
- package/build/smaa-search.png +0 -0
- package/build/snippets/hana-82e9eb82a79dead4/js-imports.js +93 -0
- package/package.json +104 -89
- package/runtime.d.ts +301 -2
- package/build/ui.js +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as t}from"./runtime-chunk-NSD7DU3P.js";import{b as i,e as a}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-Z5OH244S.js";import{a as s}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var e=new Map,o=new Map,d=class{constructor(i,a,s,d){this.data=a,this.isPlayAudioAction=!0;let{audio:n,volume:r,delay:h,loop:u}=a;if(!n)throw new Error("Missing property");try{let i="string"==typeof n?d.getAudio(n).src:n.data;this.audioPlayer=new t({src:i,volume:r,delay:h,loop:u})}catch{console.warn(`Could not create an audio player for this object: "${s.name}" and this audio: "${n}"`)}o.has(s.uuid)?o.get(s.uuid).push(this):o.set(s.uuid,[this]),e.set(i,this)}playByToggle(){"stop"===this.data.toggle?"playing"===this.audioPlayer?.status?this.audioPlayer.stop():(this.audioPlayer?.stop(),this.audioPlayer?.play()):"pause"===this.data.toggle?"playing"===this.audioPlayer?.status?this.audioPlayer?.pause():this.audioPlayer?.play():(this.audioPlayer?.stop(),this.audioPlayer?.play())}dispose(){this.audioPlayer?.stop()}},n=class{constructor(t){this.data=t,this.isPauseAudioAction=!0}dispatch(){this.data.playAudio?this.pauseAudio(this.data.playAudio):this.data.object?this.pauseAllAudiosFromObject(this.data.object):this.pauseAllAudios()}pauseAudio(t){let i=e.get(t);!i||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.audioPlayer?.[this.data.interaction](),this.disposeDelay()},this.data.delay)):i.audioPlayer?.[this.data.interaction]())}pauseAllAudiosFromObject(t){let i=o.get(t);!i?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.forEach(t=>t.audioPlayer?.[this.data.interaction]()),this.disposeDelay()},this.data.delay)):i.forEach(t=>t.audioPlayer?.[this.data.interaction]()))}pauseAllAudios(){let t=[...o.values()];!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(t=>{t.forEach(t=>{t.audioPlayer?.[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):t.forEach(t=>{t.forEach(t=>{t.audioPlayer?.[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},r=class{constructor(t,i,a,s,e){if(this.data=i,this.shared=s,this.condition=e,"play"===i.interaction)this.interaction=new d(t,i,a,s);else{if("pause"!==i.interaction&&"stop"!==i.interaction)throw new Error("Missing property");this.interaction=new n(i)}}dispatchBasic(){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.playByToggle():this.interaction.dispatch()}dispatchConditional(){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.audioPlayer?.play():this.interaction.dispatch()}dispatchGameControl(t){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d&&("start"===t?this.interaction.audioPlayer?.play():this.interaction.audioPlayer?.stop())}dispose(){this.interaction.dispose()}};i("Audio",({id:t,data:i,object:a,shared:s,actionCondition:e})=>new r(t,i,a,s,e)),s("audio");
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./runtime-chunk-YXATXASV.js";import"./runtime-chunk-OFPUAZKY.js";import{a as t}from"./runtime-chunk-EOV2DL2V.js";import"./runtime-chunk-Y3BMDVJ7.js";import{Bc as n,Db as r,Dc as i,Fc as s,Ib as a,Lc as l,Le as h,Oc as o,Tc as u,Vc as c,Zc as d,a as g,ce as y,dd as f,ld as p,m as v,qa as m,ua as w,we as b}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var x=class extends y{constructor(e=new i){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new h(null),texelSize:new h(new i),halfTexelSize:new h(new i),kernel:new h(0),scale:new h(1)},blending:v,depthWrite:!1,depthTest:!1,fragmentShader:"#include <common>\n#include <dithering_pars_fragment>\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25;\n#include <colorspace_fragment>\n#include <dithering_fragment>\n}",vertexShader:"uniform vec2 texelSize;uniform vec2 halfTexelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize*vec2(kernel)+halfTexelSize)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1,this.setTexelSize(e.x,e.y)}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.inputBuffer=e}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(){return this.uniforms.scale.value}setScale(e){this.uniforms.scale.value=e}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(e){this.uniforms.kernel.value=e}setKernel(e){this.kernel=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t),this.uniforms.halfTexelSize.value.set(e,t).multiplyScalar(.5)}setSize(e,t){let n=this.uniforms;n.texelSize.value.set(1/e,1/t),n.halfTexelSize.value.copy(n.texelSize.value).multiplyScalar(.5)}},A=class extends y{constructor(e=!1,t=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:g.replace(/\D+/g,"")},uniforms:{inputBuffer:new h(null),threshold:new h(0),smoothing:new h(1),range:new h(null)},blending:v,depthWrite:!1,depthTest:!1,fragmentShader:"#include <common>\n#if THREE_REVISION < 143\n#define luminance(v) linearToRelativeLuminance(v)\n#endif\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef RANGE\nuniform vec2 range;\n#elif defined(THRESHOLD)\nuniform float threshold;uniform float smoothing;\n#endif\nvarying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);\n#ifdef RANGE\nfloat low=step(range.x,l);float high=step(l,range.y);l*=low*high;\n#elif defined(THRESHOLD)\nl=smoothstep(threshold,threshold+smoothing,l);\n#endif\n#ifdef COLOR\ngl_FragColor=vec4(texel.rgb*l,l);\n#else\ngl_FragColor=vec4(l);\n#endif\n}",vertexShader:"varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1,this.colorOutput=e,this.luminanceRange=t}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get threshold(){return this.uniforms.threshold.value}set threshold(e){this.smoothing>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=e}getThreshold(){return this.threshold}setThreshold(e){this.threshold=e}get smoothing(){return this.uniforms.smoothing.value}set smoothing(e){this.threshold>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=e}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(e){this.smoothing=e}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(e){}get colorOutput(){return void 0!==this.defines.COLOR}set colorOutput(e){e?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(e){return this.colorOutput}setColorOutputEnabled(e){this.colorOutput=e}get useRange(){return null!==this.luminanceRange}set useRange(e){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(e){null!==e?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=e,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(e){this.luminanceRange=e}},S=new b,F=null,T=class{constructor(e="Pass",t=new c,n=S){this.name=e,this.renderer=null,this.scene=t,this.camera=n,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){let t=this.getFullscreenMaterial();null!==t&&(t.needsUpdate=!0),this.rtt=!e}}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return null!==this.screen?this.screen.material:null}set fullscreenMaterial(e){let t=this.screen;null!==t?t.material=e:(t=new p(function(){if(null===F){let e=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),t=new Float32Array([0,0,2,0,0,2]);void 0!==(F=new f).setAttribute?(F.setAttribute("position",new d(e,3)),F.setAttribute("uv",new d(t,2))):(F.addAttribute("position",new d(e,3)),F.addAttribute("uv",new d(t,2)))}return F}(),e),t.frustumCulled=!1,null===this.scene&&(this.scene=new c),this.scene.add(t),this.screen=t)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}setDepthTexture(e,t=r){}render(e,t,n,r,i){throw new Error("Render method not implemented!")}setSize(e,t){}initialize(e,t,n){}dispose(){for(let e of Object.keys(this)){let t=this[e];if(null!==t&&"object"==typeof t&&"function"==typeof t.dispose){if(t instanceof c||t===this.renderer)continue;this[e].dispose()}}}},z=(new u,-1),U=class extends n{constructor(e,t=z,n=z,r=1){super(),this.resizable=e,this.base=new i(1,1),this.preferred=new i(t,n),this.target=this.preferred,this.s=r}get width(){let e,{base:t,preferred:n,scale:r}=this;return e=n.width!==z?n.width:n.height!==z?Math.round(n.height*(t.width/Math.max(t.height,1))):Math.round(t.width*r),e}set width(e){this.preferredWidth=e}get height(){let e,{base:t,preferred:n,scale:r}=this;return e=n.height!==z?n.height:n.width!==z?Math.round(n.width/Math.max(t.width/Math.max(t.height,1),1)):Math.round(t.height*r),e}set height(e){this.preferredHeight=e}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(e){this.s!==e&&(this.s=e,this.preferred.setScalar(z),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}getScale(){return this.scale}setScale(e){this.scale=e}get baseWidth(){return this.base.width}set baseWidth(e){this.base.width!==e&&(this.base.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}getBaseWidth(){return this.base.width}setBaseWidth(e){this.base.width!==e&&(this.base.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}get baseHeight(){return this.base.height}set baseHeight(e){this.base.height!==e&&(this.base.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(e){this.baseHeight=e}setBaseSize(e,t){(this.base.width!==e||this.base.height!==t)&&(this.base.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}get preferredWidth(){return this.preferred.width}set preferredWidth(e){this.preferred.width!==e&&(this.preferred.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(e){this.preferredWidth=e}get preferredHeight(){return this.preferred.height}set preferredHeight(e){this.preferred.height!==e&&(this.preferred.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(e){this.preferredHeight=e}setPreferredSize(e,t){(this.preferred.width!==e||this.preferred.height!==t)&&(this.preferred.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}copy(e){this.base.set(e.getBaseWidth(),e.getBaseHeight()),this.preferred.set(e.getPreferredWidth(),e.getPreferredHeight()),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height)}static get AUTO_SIZE(){return z}},E=(new Float32Array([255/256/256**3,255/256/65536,255/256/256,255/256]),16),M=new Map([[0,null],[1,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x+y,1.0)*opacity+x*(1.0-opacity);}"],[2,"vec3 blend(const in vec3 x,const in vec3 y,const in float opacity){return y*opacity+x*(1.0-opacity);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){float a=min(y.a,opacity);return vec4(blend(x.rgb,y.rgb,a),max(x.a,a));}"],[3,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y)*0.5*opacity+x*(1.0-opacity);}"],[4,"float blend(const in float x,const in float y){return(y==0.0)?y:max(1.0-(1.0-x)/y,0.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[5,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[6,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x,y)*opacity+x*(1.0-opacity);}"],[7,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return abs(x-y)*opacity+x*(1.0-opacity);}"],[8,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y-2.0*x*y)*opacity+x*(1.0-opacity);}"],[9,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x,y)*opacity+x*(1.0-opacity);}"],[10,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return x*y*opacity+x*(1.0-opacity);}"],[11,"float blend(const in float x,const in float y){return(y>0.0)?min(x/y,1.0):1.0;}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[12,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-abs(1.0-x-y))*opacity+x*(1.0-opacity);}"],[13,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y*opacity+x*(1.0-opacity);}"],[14,"float blend(const in float x,const in float y){return(x<0.5)?(2.0*x*y):(1.0-2.0*(1.0-x)*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[15,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x*x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[E,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-(1.0-x)*(1.0-y))*opacity+x*(1.0-opacity);}"],[17,"float blend(const in float x,const in float y){return(y<0.5)?(2.0*x*y+x*x*(1.0-2.0*y)):(sqrt(x)*(2.0*y-1.0)+2.0*x*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[18,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x+y-1.0,0.0)*opacity+x*(1.0-opacity);}"]]),B=class extends n{constructor(e,t=1){super(),this.f=e,this.opacity=new h(t)}getOpacity(){return this.opacity.value}setOpacity(e){this.opacity.value=e}get blendFunction(){return this.f}set blendFunction(e){this.f=e,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(e){this.blendFunction=e}getShaderCode(){return M.get(this.blendFunction)}},R=class extends n{constructor(e,t,{attributes:n=0,blendFunction:r=E,defines:i=new Map,uniforms:s=new Map,extensions:a=null,vertexShader:l=null}={}){super(),this.name=e,this.renderer=null,this.attributes=n,this.fragmentShader=t,this.vertexShader=l,this.defines=i,this.uniforms=s,this.extensions=a,this.blendMode=new B(r),this.blendMode.addEventListener("change",e=>this.setChanged())}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(e,t=r){}update(e,t,n){}setSize(e,t){}initialize(e,t,n){}dispose(){for(let e of Object.keys(this)){let t=this[e];if(null!==t&&"object"==typeof t&&"function"==typeof t.dispose){if(t instanceof c||t===this.renderer)continue;this[e].dispose()}}}},H=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],O=class extends T{constructor({resolutionScale:e=.5,width:t=U.AUTO_SIZE,height:n=U.AUTO_SIZE,kernelSize:r=I.LARGE}={}){super("KawaseBlurPass"),this.renderTargetA=new l(1,1,{minFilter:m,magFilter:m,stencilBuffer:!1,depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";let i=this.resolution=new U(this,t,n,e);i.addEventListener("change",e=>this.setSize(i.baseWidth,i.baseHeight)),this.blurMaterial=new x,this.ditheredBlurMaterial=new x,this.ditheredBlurMaterial.uniforms.scale=this.blurMaterial.uniforms.scale,this.ditheredBlurMaterial.dithering=!0,this.dithering=!1,this.kernelSize=r}getResolution(){return this.resolution}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get scale(){return this.blurMaterial.scale}set scale(e){this.blurMaterial.scale=e}getScale(){return this.blurMaterial.scale}setScale(e){this.blurMaterial.scale=e}getKernelSize(){return this.kernelSize}setKernelSize(e){this.kernelSize=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,r,i){let s,a,l=this.scene,h=this.camera,o=this.renderTargetA,u=this.renderTargetB,c=H[this.kernelSize],d=this.blurMaterial,g=t;for(this.fullscreenMaterial=d,s=0,a=c.length-1;s<a;++s){let t=1&s?u:o;d.kernel=c[s],d.inputBuffer=g.texture,e.setRenderTarget(t),e.render(l,h),g=t}this.dithering&&(d=this.ditheredBlurMaterial,this.fullscreenMaterial=d),d.kernel=c[s],d.inputBuffer=g.texture,e.setRenderTarget(this.renderToScreen?null:n),e.render(l,h)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t);let r=n.width,i=n.height;this.renderTargetA.setSize(r,i),this.renderTargetB.setSize(r,i),this.blurMaterial.setSize(r,i),this.ditheredBlurMaterial.setSize(r,i)}initialize(e,t,n){void 0!==n&&(this.renderTargetA.texture.type=n,this.renderTargetB.texture.type=n,n!==w?(this.blurMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.ditheredBlurMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1"):e.outputColorSpace===a&&(this.renderTargetA.texture.colorSpace=a,this.renderTargetB.texture.colorSpace=a))}static get AUTO_SIZE(){return U.AUTO_SIZE}},P=class extends T{constructor({width:e=U.AUTO_SIZE,height:t=U.AUTO_SIZE,renderTarget:n,luminanceRange:r,colorOutput:i}={}){super("LuminancePass"),this.fullscreenMaterial=new A(i,r),this.needsSwap=!1,this.renderTarget=n,void 0===this.renderTarget&&(this.renderTarget=new l(1,1,{minFilter:m,magFilter:m,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="LuminancePass.Target",this.renderTarget.texture.generateMipmaps=!1);let s=this.resolution=new U(this,e,t);s.addEventListener("change",e=>this.setSize(s.baseWidth,s.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(e,t,n,r,i){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}initialize(e,t,n){void 0!==n&&n!==w&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},I={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},L=class extends R{constructor({blendFunction:e=E,luminanceThreshold:t=.9,luminanceSmoothing:n=.025,resolutionScale:r=.5,intensity:i=1,width:s=U.AUTO_SIZE,height:a=U.AUTO_SIZE,kernelSize:o=I.LARGE}={}){super("BloomEffect","#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D map;\n#else\nuniform lowp sampler2D map;\n#endif\nuniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=clamp(texture2D(map,uv)*intensity,0.0,1.0);}",{blendFunction:e,uniforms:new Map([["map",new h(null)],["intensity",new h(i)]])}),this.renderTarget=new l(1,1,{minFilter:m,magFilter:m,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.renderTarget.texture.generateMipmaps=!1,this.uniforms.get("map").value=this.renderTarget.texture,this.luminancePass=new P({renderTarget:this.renderTarget,colorOutput:!0}),this.luminanceMaterial.threshold=t,this.luminanceMaterial.smoothingFactor=n,this.blurPass=new O({resolutionScale:r,width:s,height:a,kernelSize:o});let u=this.blurPass.getResolution();u.addEventListener("change",e=>this.setSize(u.baseWidth,u.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(e){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(e){this.uniforms.get("intensity").value=e}getIntensity(){return this.intensity}setIntensity(e){this.intensity=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}update(e,t,n){let r=this.renderTarget;this.luminancePass.enabled?(this.luminancePass.render(e,t,r),this.blurPass.render(e,r,r)):this.blurPass.render(e,t,r)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.luminancePass.resolution.copy(n)}initialize(e,t,n){this.blurPass.initialize(e,t,n),void 0!==n&&(this.renderTarget.texture.type=n,e.outputColorSpace===a&&(this.renderTarget.texture.colorSpace=a))}};function _(e,t,n){return e+(t-e)*n}function k(e,t,n,r){let i=_(e,t,.75),s=_(n,r,.75);return _(i,s,.875)}new s,new o,new u,Math.PI,new s,new s,new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array(2),new Float32Array(2),new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125]),new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4]),new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3]),new Map([[k(0,0,0,0),new Float32Array([0,0,0,0])],[k(0,0,0,1),new Float32Array([0,0,0,1])],[k(0,0,1,0),new Float32Array([0,0,1,0])],[k(0,0,1,1),new Float32Array([0,0,1,1])],[k(0,1,0,0),new Float32Array([0,1,0,0])],[k(0,1,0,1),new Float32Array([0,1,0,1])],[k(0,1,1,0),new Float32Array([0,1,1,0])],[k(0,1,1,1),new Float32Array([0,1,1,1])],[k(1,0,0,0),new Float32Array([1,0,0,0])],[k(1,0,0,1),new Float32Array([1,0,0,1])],[k(1,0,1,0),new Float32Array([1,0,1,0])],[k(1,0,1,1),new Float32Array([1,0,1,1])],[k(1,1,0,0),new Float32Array([1,1,0,0])],[k(1,1,0,1),new Float32Array([1,1,0,1])],[k(1,1,1,0),new Float32Array([1,1,1,0])],[k(1,1,1,1),new Float32Array([1,1,1,1])]]);var D=class extends e{constructor(){super(L),this.blendFunction=E}set intensity(e){this.effect.intensity=e}get intensity(){return this.effect.intensity}set luminanceThreshold(e){this.effect.luminanceMaterial.threshold=e}get luminanceThreshold(){return this.effect.luminanceMaterial.threshold}set luminanceSmoothing(e){this.effect.luminanceMaterial.smoothing=e}get luminanceSmoothing(){return this.effect.luminanceMaterial.smoothing}set blurScale(e){this.effect.blurPass.scale=e}get blurScale(){return this.effect.blurPass.scale}set kernelSize(e){this.effect.blurPass.kernelSize=e}get kernelSize(){return this.effect.blurPass.kernelSize}};t("bloom",()=>new D);
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./runtime-chunk-YXATXASV.js";import"./runtime-chunk-OFPUAZKY.js";import{a as n}from"./runtime-chunk-EOV2DL2V.js";import"./runtime-chunk-Y3BMDVJ7.js";import{Bc as e,Db as r,Fc as a,Le as o,Oc as i,Tc as s,Vc as c,we as y}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";new y,new s,new Float32Array([255/256/256**3,255/256/65536,255/256/256,255/256]);var l=new Map([[0,null],[1,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x+y,1.0)*opacity+x*(1.0-opacity);}"],[2,"vec3 blend(const in vec3 x,const in vec3 y,const in float opacity){return y*opacity+x*(1.0-opacity);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){float a=min(y.a,opacity);return vec4(blend(x.rgb,y.rgb,a),max(x.a,a));}"],[3,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y)*0.5*opacity+x*(1.0-opacity);}"],[4,"float blend(const in float x,const in float y){return(y==0.0)?y:max(1.0-(1.0-x)/y,0.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[5,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[6,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x,y)*opacity+x*(1.0-opacity);}"],[7,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return abs(x-y)*opacity+x*(1.0-opacity);}"],[8,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y-2.0*x*y)*opacity+x*(1.0-opacity);}"],[9,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x,y)*opacity+x*(1.0-opacity);}"],[10,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return x*y*opacity+x*(1.0-opacity);}"],[11,"float blend(const in float x,const in float y){return(y>0.0)?min(x/y,1.0):1.0;}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[12,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-abs(1.0-x-y))*opacity+x*(1.0-opacity);}"],[13,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y*opacity+x*(1.0-opacity);}"],[14,"float blend(const in float x,const in float y){return(x<0.5)?(2.0*x*y):(1.0-2.0*(1.0-x)*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[15,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x*x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[16,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-(1.0-x)*(1.0-y))*opacity+x*(1.0-opacity);}"],[17,"float blend(const in float x,const in float y){return(y<0.5)?(2.0*x*y+x*x*(1.0-2.0*y)):(sqrt(x)*(2.0*y-1.0)+2.0*x*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[18,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x+y-1.0,0.0)*opacity+x*(1.0-opacity);}"]]),u=class extends e{constructor(t,n=1){super(),this.f=t,this.opacity=new o(n)}getOpacity(){return this.opacity.value}setOpacity(t){this.opacity.value=t}get blendFunction(){return this.f}set blendFunction(t){this.f=t,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(t){this.blendFunction=t}getShaderCode(){return l.get(this.blendFunction)}},x=class extends e{constructor(t,n,{attributes:e=0,blendFunction:r=16,defines:a=new Map,uniforms:o=new Map,extensions:i=null,vertexShader:s=null}={}){super(),this.name=t,this.renderer=null,this.attributes=e,this.fragmentShader=n,this.vertexShader=s,this.defines=a,this.uniforms=o,this.extensions=i,this.blendMode=new u(r),this.blendMode.addEventListener("change",t=>this.setChanged())}getName(){return this.name}setRenderer(t){this.renderer=t}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(t){this.attributes=t,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(t){this.fragmentShader=t,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(t){this.vertexShader=t,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(t,n=r){}update(t,n,e){}setSize(t,n){}initialize(t,n,e){}dispose(){for(let t of Object.keys(this)){let n=this[t];if(null!==n&&"object"==typeof n&&"function"==typeof n.dispose){if(n instanceof c||n===this.renderer)continue;this[t].dispose()}}}},w=(new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10]),class extends x{constructor({blendFunction:t=13,brightness:n=0,contrast:e=0}={}){super("BrightnessContrastEffect","uniform float brightness;uniform float contrast;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=inputColor.rgb+vec3(brightness-0.5);if(contrast>0.0){color/=vec3(1.0-contrast);}else{color*=vec3(1.0+contrast);}outputColor=vec4(min(color+vec3(0.5),1.0),inputColor.a);}",{blendFunction:t,uniforms:new Map([["brightness",new o(n)],["contrast",new o(e)]])})}get brightness(){return this.uniforms.get("brightness").value}set brightness(t){this.uniforms.get("brightness").value=t}getBrightness(t){return this.brightness}setBrightness(t){this.brightness=t}get contrast(){return this.uniforms.get("contrast").value}set contrast(t){this.uniforms.get("contrast").value=t}getContrast(t){return this.contrast}setContrast(t){this.contrast=t}});function d(t,n,e){return t+(n-t)*e}function b(t,n,e,r){let a=d(t,n,.75),o=d(e,r,.75);return d(a,o,.875)}new a,new i,new s,Math.PI,new a,new a,new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array(2),new Float32Array(2),new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125]),new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4]),new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3]),new Map([[b(0,0,0,0),new Float32Array([0,0,0,0])],[b(0,0,0,1),new Float32Array([0,0,0,1])],[b(0,0,1,0),new Float32Array([0,0,1,0])],[b(0,0,1,1),new Float32Array([0,0,1,1])],[b(0,1,0,0),new Float32Array([0,1,0,0])],[b(0,1,0,1),new Float32Array([0,1,0,1])],[b(0,1,1,0),new Float32Array([0,1,1,0])],[b(0,1,1,1),new Float32Array([0,1,1,1])],[b(1,0,0,0),new Float32Array([1,0,0,0])],[b(1,0,0,1),new Float32Array([1,0,0,1])],[b(1,0,1,0),new Float32Array([1,0,1,0])],[b(1,0,1,1),new Float32Array([1,0,1,1])],[b(1,1,0,0),new Float32Array([1,1,0,0])],[b(1,1,0,1),new Float32Array([1,1,0,1])],[b(1,1,1,0),new Float32Array([1,1,1,0])],[b(1,1,1,1),new Float32Array([1,1,1,1])]]);var h=class extends t{constructor(){super(w)}set contrast(t){this.effect.uniforms.get("contrast").value=t}get contrast(){return this.effect.uniforms.get("contrast").value}set brightness(t){this.effect.uniforms.get("brightness").value=t}get brightness(){return this.effect.uniforms.get("brightness").value}};n("brightnessContrast",()=>new h);
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./runtime-chunk-YXATXASV.js";import"./runtime-chunk-OFPUAZKY.js";import{a as e}from"./runtime-chunk-EOV2DL2V.js";import"./runtime-chunk-Y3BMDVJ7.js";import{Bc as n,Db as r,Dc as a,Fc as o,Le as i,Oc as c,Tc as y,Vc as s,we as l}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";new l,new y,new Float32Array([255/256/256**3,255/256/65536,255/256/256,255/256]);var v=new Map([[0,null],[1,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x+y,1.0)*opacity+x*(1.0-opacity);}"],[2,"vec3 blend(const in vec3 x,const in vec3 y,const in float opacity){return y*opacity+x*(1.0-opacity);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){float a=min(y.a,opacity);return vec4(blend(x.rgb,y.rgb,a),max(x.a,a));}"],[3,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y)*0.5*opacity+x*(1.0-opacity);}"],[4,"float blend(const in float x,const in float y){return(y==0.0)?y:max(1.0-(1.0-x)/y,0.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[5,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[6,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x,y)*opacity+x*(1.0-opacity);}"],[7,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return abs(x-y)*opacity+x*(1.0-opacity);}"],[8,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y-2.0*x*y)*opacity+x*(1.0-opacity);}"],[9,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x,y)*opacity+x*(1.0-opacity);}"],[10,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return x*y*opacity+x*(1.0-opacity);}"],[11,"float blend(const in float x,const in float y){return(y>0.0)?min(x/y,1.0):1.0;}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[12,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-abs(1.0-x-y))*opacity+x*(1.0-opacity);}"],[13,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y*opacity+x*(1.0-opacity);}"],[14,"float blend(const in float x,const in float y){return(x<0.5)?(2.0*x*y):(1.0-2.0*(1.0-x)*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[15,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x*x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[16,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-(1.0-x)*(1.0-y))*opacity+x*(1.0-opacity);}"],[17,"float blend(const in float x,const in float y){return(y<0.5)?(2.0*x*y+x*x*(1.0-2.0*y)):(sqrt(x)*(2.0*y-1.0)+2.0*x*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[18,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x+y-1.0,0.0)*opacity+x*(1.0-opacity);}"]]),f=class extends n{constructor(t,e=1){super(),this.f=t,this.opacity=new i(e)}getOpacity(){return this.opacity.value}setOpacity(t){this.opacity.value=t}get blendFunction(){return this.f}set blendFunction(t){this.f=t,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(t){this.blendFunction=t}getShaderCode(){return v.get(this.blendFunction)}},u=class extends n{constructor(t,e,{attributes:n=0,blendFunction:r=16,defines:a=new Map,uniforms:o=new Map,extensions:i=null,vertexShader:c=null}={}){super(),this.name=t,this.renderer=null,this.attributes=n,this.fragmentShader=e,this.vertexShader=c,this.defines=a,this.uniforms=o,this.extensions=i,this.blendMode=new f(r),this.blendMode.addEventListener("change",t=>this.setChanged())}getName(){return this.name}setRenderer(t){this.renderer=t}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(t){this.attributes=t,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(t){this.fragmentShader=t,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(t){this.vertexShader=t,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(t,e=r){}update(t,e,n){}setSize(t,e){}initialize(t,e,n){}dispose(){for(let t of Object.keys(this)){let e=this[t];if(null!==e&&"object"==typeof e&&"function"==typeof e.dispose){if(e instanceof s||e===this.renderer)continue;this[t].dispose()}}}},x=(new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10]),class extends u{constructor({blendFunction:t=13,offset:e=new a(.001,5e-4)}={}){super("ChromaticAberrationEffect","varying vec2 vUvR;varying vec2 vUvB;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 ra=texture2D(inputBuffer,vUvR).ra;vec2 ba=texture2D(inputBuffer,vUvB).ba;outputColor=vec4(ra.x,inputColor.g,ba.x,max(max(ra.y,ba.y),inputColor.a));}",{vertexShader:"uniform vec2 offset;varying vec2 vUvR;varying vec2 vUvB;void mainSupport(const in vec2 uv){vec2 shift=offset*vec2(1.0,aspect);vUvR=uv+shift;vUvB=uv-shift;}",blendFunction:t,attributes:2,uniforms:new Map([["offset",new i(e)]])})}get offset(){return this.uniforms.get("offset").value}set offset(t){this.uniforms.get("offset").value=t}getOffset(){return this.offset}setOffset(t){this.offset=t}});function w(t,e,n){return t+(e-t)*n}function d(t,e,n,r){let a=w(t,e,.75),o=w(n,r,.75);return w(a,o,.875)}new o,new c,new y,Math.PI,new o,new o,new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array(2),new Float32Array(2),new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125]),new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4]),new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3]),new Map([[d(0,0,0,0),new Float32Array([0,0,0,0])],[d(0,0,0,1),new Float32Array([0,0,0,1])],[d(0,0,1,0),new Float32Array([0,0,1,0])],[d(0,0,1,1),new Float32Array([0,0,1,1])],[d(0,1,0,0),new Float32Array([0,1,0,0])],[d(0,1,0,1),new Float32Array([0,1,0,1])],[d(0,1,1,0),new Float32Array([0,1,1,0])],[d(0,1,1,1),new Float32Array([0,1,1,1])],[d(1,0,0,0),new Float32Array([1,0,0,0])],[d(1,0,0,1),new Float32Array([1,0,0,1])],[d(1,0,1,0),new Float32Array([1,0,1,0])],[d(1,0,1,1),new Float32Array([1,0,1,1])],[d(1,1,0,0),new Float32Array([1,1,0,0])],[d(1,1,0,1),new Float32Array([1,1,0,1])],[d(1,1,1,0),new Float32Array([1,1,1,0])],[d(1,1,1,1),new Float32Array([1,1,1,1])]]);var A=class extends t{constructor(){super(x),this.effect.offset=new a(.01,.01)}set offset(t){this.effect.offset.set(t[0]/1e3,t[1]/1e3)}get offset(){return[1e3*this.effect.offset.x,1e3*this.effect.offset.y]}};e("chromaticAberration",()=>new A);
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as s}from"./runtime-chunk-WSJURWOC.js";import{a as t,b as i}from"./runtime-chunk-VRVV54WH.js";import{Fc as a,Tc as o,Te as e,We as h,Xc as r,ze as d}from"./runtime-chunk-VGN7YHB7.js";var n=class extends(t(e)){constructor(s,t=15,i=6710886){super(s,t,i),this.object=s,this.name=`PointLightHelper: ${s.uuid}`}raycast(s,t){i(this.object,n.geometryHelper,s,t)}},p=class extends(s(d,n)){constructor(s,t,i){super(),this.super_Entity(s,t),this.castShadow=!0,this.shadow.mapSize.width=1024,this.shadow.mapSize.height=1024,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.fov=90,e.aspect=1,e.near=100,e.far=2500;let d=new a(-e.far+this.position.x,-e.far+this.position.y,-e.far+this.position.z),n=new a(e.far+this.position.x,e.far+this.position.y,e.far+this.position.z),p=new r(d,n),c=new h(p,new o(16755200));c.visible=!1,this.gizmos.shadowmap=c,this.update()}update(){if(this.shadow&&(this.shadow.camera.updateProjectionMatrix(),this.gizmos))for(let s in this.gizmos){let t=this.gizmos[s];if(t instanceof h){let s=this.shadow.camera,i=new a(-s.far+this.position.x,-s.far+this.position.y,-s.far+this.position.z),o=new a(s.far+this.position.x,s.far+this.position.y,s.far+this.position.z);t.box.set(i,o),t.updateMatrixWorld(!0)}}}updateMatrixWorld(s){super.updateMatrixWorld(s),this.objectHelper&&this.objectHelper.update()}updateState(s,t){this.updateState_Light(s,t),void 0!==s.distance&&(this.distance=s.distance),void 0!==s.decay&&(this.decay=s.decay),void 0!==s.shadowRadius&&(this.shadow.radius=s.shadowRadius),void 0!==s.shadowResolution&&(this.shadow.mapSize.set(s.shadowResolution,s.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null))}};export{p as a};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t}from"./runtime-chunk-QZ35BPGB.js";import{g as e}from"./runtime-chunk-4KZXQGUQ.js";import{a as i}from"./runtime-chunk-Z5OH244S.js";import{c as r}from"./runtime-chunk-TZCHGFVF.js";import{Ba as s,C as a,Ca as n,Ea as o,K as l,j as h,k as p,l as d,o as c}from"./runtime-chunk-OW6T4XFV.js";import{$c as u,Cc as m,Ec as f,Fc as y,Kd as g,Oc as v,Pc as x,Pd as S,Rc as w,Re as M,Xc as b,bd as B,cd as P,dd as E,kd as A,ld as C}from"./runtime-chunk-VGN7YHB7.js";var D={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function O(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 V(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 W=new y,_=new y,T=new v,U=[new y(-1,1,1),new y(-1,-1,1),new y(1,-1,1),new y(1,1,1),new y(-1,1,-1),new y(-1,-1,-1),new y(1,-1,-1),new y(1,1,-1)],R=[[0,3],[1,2],[5,6],[4,7],[0,1],[3,2],[7,6],[4,5],[0,4],[1,5],[2,6],[3,7]],z=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],I=(t,e,i)=>{t.updateEntityBoxSize(W,_),T.copy(e).multiply(t.matrixWorld),0===_.x&&0===_.y&&0===_.z?i.push(new y(W.x,W.y,W.z).applyMatrix4(T)):U.forEach(t=>{i.push(t.clone().multiply(_).add(W).applyMatrix4(T))})},L=class extends b{constructor(){super(...arguments),this.matrix=new v,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 v).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 T.copy(e).multiply(t.matrixWorld),void i.push((new y).applyMatrix4(T));I(t,e,r)}}),0===r.length&&r.push(...i)}else I(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(T.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(_).multiplyScalar(.5),this.getCenter(W),T.copy(this.matrix).setPosition(W),this.vertices=U.map(t=>t.clone().multiply(_).applyMatrix4(T))}computeEdges(){this.vertices.length>0&&this.computeVertices(),this.edges=R.map(([t,e])=>new M(this.vertices[t],this.vertices[e])),this.centerEdges=this.edges.map(t=>t.getCenter(new y))}computeFaces(){this.vertices.length>0&&this.computeVertices(),this.faces=z.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},N=new y,j=new y,F=new y,k=new y,q=new y,G=new y,H=new v,Z=1e-12,X=.01;function $(t){let e=t.elements;N.set(e[0],e[1],e[2]),j.set(e[4],e[5],e[6]),F.set(e[8],e[9],e[10])}function K(){let t=Math.max(N.lengthSq(),j.lengthSq(),F.lengthSq());N.lengthSq()>Z*t?k.copy(N).normalize():k.set(1,0,0),q.crossVectors(F,k),q.lengthSq()<=Z*t&&(q.copy(j).addScaledVector(k,-j.dot(k)),q.lengthSq()<=Z*t&&function(t,e){t.set(1,0,0).cross(e),t.lengthSq()<=Z&&t.set(0,1,0).cross(e),t.normalize()}(q,k)),q.normalize(),G.crossVectors(k,q)}function Q(t){return $(t),K(),H.makeBasis(k,q,G)}var Y,J=new v;(Y||(Y={})).is=function(t){return t&&t.__isSPEObject};var tt=t=>class extends t{constructor(){super(...arguments),this.previousModelViewMatrix=new v,this.copyPreviousMatrix=!0,this.hiddenMatrix=new v,this.pivotMatrix=new v,this.matrixWorldRigid=new v,this.shearScale=new v,this.shearScaleInv=new v}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 w&&(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)Y.is(i)&&i.traverseObject(t,e+1)}traverseObject(t,e=0){if(!0!==t(this,e))for(let i of this.children)Y.is(i)&&i.traverseObject(t,e+1)}updateMatrixWorldRigid(){this.hasNonUniformScale=function(t,e,i){return $(t),K(),e.makeBasis(k,q,G),i.set(k.dot(N),k.dot(j),k.dot(F),0,q.dot(N),q.dot(j),q.dot(F),0,G.dot(N),G.dot(j),G.dot(F),0,0,0,0,1),function(){let t=N.length(),e=j.length(),i=F.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(N.dot(j))>s||Math.abs(N.dot(F))>s||Math.abs(j.dot(F))>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 v).copy(this.matrixWorld).invert();return null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),i.multiply(t.parent.matrixWorld)),"hiddenMatrix"in t&&t.hiddenMatrix instanceof v?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)}},et=class extends S{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}},it=.001,rt=new y,st=new y,at=new y,nt=new y,ot=new y,lt=new y,ht=new y,pt=new y,dt=new y;function ct(t,e,i){return rt.subVectors(e,t),st.subVectors(e,i),rt.cross(st).length()<=it}var ut,mt=new WeakMap;function ft(t){let e=mt.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 y(...e[0].data.position)];at.copy(r[0]);for(let t=0;t<e.length-1;t++)rt.fromArray(e[t].data.position),st.fromArray(e[t+1].data.position),ot.subVectors(rt,at),ht.subVectors(rt,st),ot.cross(ht).length()>it&&(i.push(e[t]),r.push((new y).copy(rt)),at.copy(rt));let s=e[e.length-1];i.push(s),r.push(new y(...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 y(...e.controlPrevious.position)),h.push(new y(...e.controlNext.position))}let p=[];for(let t=0;t<n;t++){let e=t===o-1?0:t+1;p.push(ct(r[t],h[t],r[e])&&ct(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 y).subVectors(r[c],s).normalize(),f=(new y).subVectors(r[u],s).normalize();n.prevDir=m,n.nextDir=f;let g=p[a&&0===t?o-1:t-1],v=p[t];if(g&&v){nt.addVectors(m,f).normalize();let t=at.crossVectors(nt,m).length()/m.dot(nt);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(at.copy(i.nextDir).setLength(i.removedLength)),r.prevDir&&e.add(at.copy(r.prevDir).setLength(r.removedLength))),t.distanceTo(e)>it&&(s=new g(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(r.position)>it&&(s=new g(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;nt.addVectors(e.prevDir,e.nextDir).normalize(),ot.copy(r).lerp(s,.5);let n=r.distanceTo(s)/2;dt.copy(nt).multiplyScalar(Math.sqrt(Math.pow(a,2)-Math.pow(n,2))).add(ot),lt.copy(nt).multiplyScalar(-a).add(dt);let o=i.distanceTo(lt)/i.distanceTo(ot);ht.copy(e.prevDir).multiplyScalar(o*i.distanceTo(r)).add(i),pt.copy(ht).lerp(lt,2);let l=r.clone().lerp(ht,4/3),h=s.clone().lerp(pt,4/3);c[2*t]=new g(r,l,h,s)}let u=new et;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return mt.set(t.points,{isClosed:t.isClosed,curve:i}),i}(ut||(ut={})).is=function(t){return t&&t.__isEntity};var yt=t=>ut.is(t),gt={type:"completeState",isfromEntity:!0},vt=["x","y","z"],xt=new y,St=new y(1,1,1),wt=new f,Mt=new x,bt=(new y).set(0,1,0),Bt=new v,Pt=new v,Et=u=>class extends(tt(u)){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.currentTransitionEvent=null,this.previousAction=null,this._singleBBox=new L,this._recursiveBBox=new L,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(ut.is(e))return e}entityChildrenCount(){let t=this.children.length;for(;t--;)if(ut.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(!ut.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)o.toOps(this.data,t.data).forEach(t=>{let i=p.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=o.patch(this.data,i),o.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=>{yt(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(ut.is(e[i]))return e[i];if(ut.is(t))return t.traverseSortNextHelper()}}sortNext(){let t=this.children;return this.children.length>0&&ut.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)yt(e)&&t(e)}traverseEntityAncestors(t){this.traverseAncestors(e=>{ut.is(e)&&t(e)})}traverseConcreteEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)yt(i)&&i.isConcreteEntity&&i.traverseEntity(t,e+1)}traverseEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)yt(i)&&i.traverseEntity(t,e+1)}traverseVisibleEntity(t){t(this);for(let e of this.children)yt(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=>yt(t))}isAncestorOf(t){if(this.uuid===t)return!1;let e=!1;return this.traverseEntity(i=>{i.uuid===t&&(e=!0)}),e}toObjectTransformState(t=[]){this.updateWorldMatrix(!0,!1);let i={position:this.position.toArray(),rotation:[this.rotation.x*m.RAD2DEG,this.rotation.y*m.RAD2DEG,this.rotation.z*m.RAD2DEG],scale:this.scale.toArray(),hiddenMatrix:this.hiddenMatrix.toArray(),pivot:[0,0,0],pivotRotation:[0,0,0]};return e(i,t)}getTransformValues(t,e,i){return e[t].map((e,r)=>i?.shared.getVariable(e,[this.uuid,t,vt[r]])??e)}updateTransformState(t,e){let i=!1;if(t.position&&(this.position.fromArray(this.getTransformValues("position",t,e)),i=!0),t.rotation&&(xt.fromArray(this.getTransformValues("rotation",t,e)).multiplyScalar(m.DEG2RAD),this.rotation.setFromVector3(xt),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(xt.fromArray(t.pivot).negate(),wt.setFromEuler(Mt.fromArray(t.pivotRotation.map(t=>t*m.DEG2RAD))).invert(),St);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=xt.setFromMatrixPosition(this.pivotMatrix);wt.setFromEuler(Mt.fromArray(t.pivotRotation.map(t=>t*m.DEG2RAD))).invert(),this.pivotMatrix.compose(e,wt,St)}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)ut.is(t)&&t.disposeRecursively()}disposeRecursively(){this.dispose(),this.children.forEach(t=>{ut.is(t)&&t.disposeRecursively()})}toState(t=[]){let i={name:this.name,visible:this.visible,raycastLock:this.raycastLock,...this.toObjectTransformState(t)};return e(i,t)}updateByObjUpdateOp(t,e){void 0!==t&&this.updateByOp({type:0,props:t,path:[]},{...this.data,...t},e,!1)}updateByOp(t,e,i,r){let a=this.data;this.data=e;let l=t,p=V(t.path,["states","*"]);if(null!==p){if(0===t.type){let[e]=p;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=c.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])}}l={...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=c.removeOverridden(t.path,t.props,e);l={...t,props:i}}}if(this.updateByPatchedOpBase(l,o.patch(this.data,this.stateSelection?this.data.states.data(this.stateSelection):void 0),i),V(t.path,["overrides"])){let r=[],a=[...t.path];for(r.push(a[1]),a.splice(0,2);a.length>0&&"descendants"===a[0];)r.push(a[1]),a.splice(0,2);if(void 0===r[r.length-1]){if(0===t.type)for(let e of Object.keys(t.props)){r[r.length-1]=e;let s=i.scene.findInstance([this.uuid,...r]);s&&(s.overrideData=t.props[e],s.updateState(h.apply(s.component.data,s.overrideData),i))}}else{let n=i.scene.findInstance([this.uuid,...r]);if(n){let o=c.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=s.resolve(e.overrides,r),n.updateByOp(t,d.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 n.rootOverrideProps)i in t.props&&(void 0===e&&(e={}),e[i]=t.props[i]);e&&(r={...t,props:e})}else for(let e of n.rootOverrideProps)if(V(t.path,[e])){r=t;break}void 0!==r&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=h.filterOp(t.overrideData,r);e&&t.updateByOp(e,d.applySimple(t.data,e),i,!0)}}),this.instances.forEach(r=>{if(!r.isInstanceRoot){let s=h.filterOp(r.overrideData,t);if(s){let n;n=a===r.data&&t===s?e:d.applySimple(r.data,s),r.updateByOp(s,n,i,!0)}}})}}updateByPatchedOpBase(t,e,i){if(this.dataPatched=e,0===t.path.length&&0===t.type)void 0!==t.props.type&&!l.is(t.props.type)&&D.changeEntityProptotype(this,e,i);else if(1===t.path.length&&"geometry"===t.path[0]&&0===t.type&&"type"in t.props){D.changeEntityProptotype(this,e,i);for(let t of this.children)ut.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!==V(t.path,["pathSnapping"])&&this.updatePathSnapping(e.pathSnapping),null!==V(t.path,["cloner"])){let r=d.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,r=this._updatedPathSnapping?.slide??this.dataPatched.pathSnapping.slide??0,s=this._updatedPathSnapping?.offset??this.dataPatched.pathSnapping.offset??0,a=this._updatedPathSnapping?.orientation??this.dataPatched.pathSnapping.orientation;if(null===e)return;let n=t.find(e);if(!n)return;this._needApplyPathSnapping=!1;let o=n.data;if(o.geometry.path.points.length<=1)return;let l=ft(o.geometry.path),h=(r+s)%1;r+s===1&&0===h&&(h=1);let p=null;try{p=l.curves.length?l.getPointAt(h):null}catch(t){i&&(console.warn(`The aligned path on ${this.name} is invalid. (${n.name})`),console.error(t))}if(null===p)return;n.updateMatrixWorld();let d=this.parent?Bt.copy(this.parent.matrixWorld).invert():Bt.identity();d.multiply(n.matrixWorld),p.applyMatrix4(d);let c={position:p.toArray(),rotation:o.rotation};if("tangential"===a){let t=Pt.extractRotation(n.matrixWorld),e=l.getTangentAt(h).applyMatrix4(t).add(p),i=Pt.lookAt(p,e,bt),r=xt.setFromEuler(Mt.setFromRotationMatrix(i)).multiplyScalar(m.RAD2DEG);c={...c,rotation:r.toArray()}}this.updateTransformState(c),this.traverseEntity(t=>{t._cameraType&&t.dispatchEvent(gt)})}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(e=>t(e)&&"toObject"===e.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===D.Cloner)return void r("cloners","a cloner");this.cloner=new D.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"})}},At=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 Wt(!1,e,i,r,s,a,n,o,l,h,p,d);return Object.assign(c,{userData:{...t,type:"HelixGeometry"}})}},Ct=new u([0,0,0],1);function Dt(t){return"TorusGeometry"===t.type&&360===t.arc}var Ot,Vt,Wt=class extends E{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,f,g,v,x,S,w,M=()=>new y,b=new y,P=M(),E=M(),A=M(),C=M(),D=M(),O=M(),V=M(),W=M(),_=M(),T=M(),U=M(),R=i-2*o+.001,z=R/a,I=Math.ceil(n*a),L=I+1,N=R/I,j=-R/2,F=h+1,k=2*Math.PI/h,q=Math.PI/2/d,G=Math.min((1-p/100)*o,o-.01),H=o-G,Z=0,X=2*d+2,$=F*X/2,K=$+F*L,Q=Math.max(0,F*(L+X)),[Y,J,tt]=[3,3,2].map(t=>Array(Q*t).fill(0)),et=[],it=s-o;function rt(e,i){let r=Math.PI/2;x=i*N,w=2*Math.PI*(x%z)/z+r,x+=j,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*I+2*at,ot=G,lt=nt-at;for(let e=0;e<=I;e++){rt(E,e),U.subVectors(E,C).normalize(),C.copy(E),_.copy(E).setComponent(+t+1,0).normalize(),T.crossVectors(U,_).normalize();let i=0===e,r=e===I,s=i?3*Math.PI/2:q,a=i?ot:lt,n=i?F:K,l=i?0:Q-F,p=U.clone().multiplyScalar(i?-H:H).add(E),u=U.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<F;t++){let m=t*k;if(D.addVectors(b.copy(_).multiplyScalar(o*Math.cos(m)),P.copy(T).multiplyScalar(o*Math.sin(m))),O.copy(D).normalize(),i||r){c||(Z=l+t,[0,1,2].forEach(t=>{Y[3*Z+t]=p.getComponent(t),J[3*Z+t]=u.getComponent(t)}),tt[2*Z]=+r,tt[2*Z+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(U).multiplyScalar(H*Math.sin(r)),P.copy(O).multiplyScalar(H*Math.cos(r))),W.copy(V).normalize(),P.addVectors(A,V),V.normalize(),Z=n+e*F+t,[0,1,2].forEach(t=>{Y[3*Z+t]=P.getComponent(t),J[3*Z+t]=W.getComponent(t)});let o=+i+Math.sin(r);tt[2*Z]=(a+H*o)/nt,tt[2*Z+1]=t/h}}P.addVectors(E,D),Z=$+e*F+t,[0,1,2].forEach(t=>{Y[3*Z+t]=P.getComponent(t),J[3*Z+t]=O.getComponent(t)}),tt[2*Z]=(at+e*st)/nt,tt[2*Z+1]=t/h}}let ht=L+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<F-1;i++)u=t*F+i,m=u+1,f=(e?i:u)+F,g=(e?i+1:m)+F,0===t?et.push(m,g,f):t===ht-2?et.push(u,m,f):et.push(u,m,f,m,g,f)}this.setIndex(et),this.setAttribute("position",new B(Y,3)),this.setAttribute("normal",new B(J,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 Ct.array=new Uint32Array(l),Ct.count=l.length,Ct}},_t=new Map,Tt=0;function Ut(t){return Vt||(Vt=async function(){let e=t??(i?".":"https://cdn.spline.design/@splinetool/runtime@2.0.2/build"),r=import("./boolean.js"),[s,a]=await Promise.all([r,fetch(`${e}/boolean.wasm`).then(t=>t.arrayBuffer())]);await s.default({module_or_path:a}),Ot=s}())}function Rt(){if(void 0===Ot)throw new Error("boolean-wasm is not loaded");return Ot}function zt(t){let e=_t.get(t);if(void 0===e)throw new Error("Unknown csg mesh set handle "+t);return e}function It(t){return _t.set(++Tt,t),Tt}var Lt={0:0,1:1,2:2};function Nt(t,e,i){if(void 0===Ot)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=Dt(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 It(new Ot.CsgMesh(r,s,a))}function jt(t,e){let i=Rt(),r=Lt[e];if(void 0===r)throw new Error("Unknown boolean operation "+e);let s=t.map(zt);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 Ft(t,e,i,r){let s=Rt(),a=jt(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 P),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 It(a)}function kt(t,e){let i=Rt(),r=jt(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 qt(t,e){zt(t).transform(new Float32Array(e.elements))}function Gt(t){return null!==t&&"booleanOp"in t}var Ht=class extends(Et(C)){constructor(){super(...arguments),this.booleanMeshSetAddress=-1,this.booleanWasTransformed=!1,this.booleanMatrixInvOld=new v}updateVisible(t){super.updateVisible(t),this.visible=!Gt(this.parent)&&this.visible,Gt(this.parent)&&this.parent.invalidateDownstreamBooleanData()}freeBooleanPointer(){-1!==this.booleanMeshSetAddress&&(function(t){let e=_t.get(t);void 0!==e&&(e.free(),_t.delete(t))}(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}invalidateDownstreamBooleanData(t=!1){return t?this.booleanWasTransformed=!0:this.freeBooleanPointer(),Gt(this.parent)?this.parent.invalidateDownstreamBooleanData():this}invalidateUpstreamBooleanData(){this.freeBooleanPointer();for(let t of this.children)t instanceof Ht&&(t.freeBooleanPointer(),Gt(t)&&t.invalidateUpstreamBooleanData())}updateTransformState(t,e){let i=super.updateTransformState(t,e);return i&&Gt(this.parent)&&this.invalidateDownstreamBooleanData(!0),i}onVariableUpdate(t=!1){super.onVariableUpdate(t),Gt(this.parent)&&this.invalidateDownstreamBooleanData(!0)}},Zt=new b;function Xt(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)}Zt.min.set(a,n,o),Zt.max.set(l,h,p),Zt.getCenter(r),Zt.getSize(s).multiplyScalar(.5)}var $t=new E,Kt=new A,Qt=class extends Ht{constructor(t,e){super($t,Kt),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?Xt(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,e):super.updateEntityBoxSize(t,e)}};export{O as a,V as b,D as c,Q as d,Y as e,tt as f,ft as g,ut as h,yt as i,Et as j,At as k,Dt as l,Wt as m,Ut as n,Nt as o,Ft as p,kt as q,qt as r,Xt as s,Qt as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t=0,r={}){let n,i,f,a,o,s=!0===r.leading,u=!1!==r.trailing,c=void 0!==r.maxWait?Math.max(r.maxWait,t):void 0,l=0,g=t=>{let r=i,n=f;return i=f=void 0,l=t,a=e.apply(n,r),a},y=e=>{if(void 0===o)return!0;let r=e-o;return r>=t||r<0||void 0!==c&&e-l>=c},d=e=>(n=void 0,u&&i?g(e):(i=f=void 0,a)),p=()=>{let e=Date.now();y(e)?d(e):n=setTimeout(p,(e=>{let r=t-(e-o);return void 0!==c?Math.min(r,c-(e-l)):r})(e))},h=function(...e){let r=Date.now(),u=y(r);if(i=e,f=this,o=r,u){if(void 0===n)return l=r,n=setTimeout(p,t),s?g(r):a;if(void 0!==c)return n=setTimeout(p,t),g(r)}return void 0===n&&(n=setTimeout(p,t)),a};return h.cancel=()=>{void 0!==n&&clearTimeout(n),l=0,i=o=f=n=void 0},h.flush=()=>void 0===n?a:d(Date.now()),h}function t(t,r=0,n={}){return e(t,r,{leading:!1!==n.leading,trailing:!1!==n.trailing,maxWait:r})}function r(e){return n(e,new Map)}function n(e,t){if(null===e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof ArrayBuffer)return e.slice(0);if(ArrayBuffer.isView(e))return new e.constructor(e.buffer.slice(0),e.byteOffset,e instanceof DataView?e.byteLength:e.length);if(e instanceof Map){let r=new Map;return t.set(e,r),e.forEach((e,i)=>r.set(n(i,t),n(e,t))),r}if(e instanceof Set){let r=new Set;return t.set(e,r),e.forEach(e=>r.add(n(e,t))),r}if(Array.isArray(e)){let r=new e.constructor(e.length);t.set(e,r);for(let[i,f]of Object.entries(e))r[i]=n(f,t);return r}let r=Object.create(Object.getPrototypeOf(e));t.set(e,r);for(let[i,f]of Object.entries(e))r[i]=n(f,t);return r}function i(e,t){if(Object.is(e,t)||e!=e&&t!=t)return!0;if(null===e||null===t||"object"!=typeof e||"object"!=typeof t)return!1;if(e instanceof Date||t instanceof Date)return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime();if(e instanceof RegExp||t instanceof RegExp)return e instanceof RegExp&&t instanceof RegExp&&e.source===t.source&&e.flags===t.flags;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every((e,r)=>i(e,t[r]));if(ArrayBuffer.isView(e)||ArrayBuffer.isView(t))return!(!ArrayBuffer.isView(e)||!ArrayBuffer.isView(t)||e.constructor!==t.constructor||e.length!==t.length)&&e.every((e,r)=>Object.is(e,t[r]));if(e instanceof Map||t instanceof Map){if(!(e instanceof Map&&t instanceof Map&&e.size===t.size))return!1;for(let[r,n]of e)if(!t.has(r)||!i(n,t.get(r)))return!1;return!0}if(e instanceof Set||t instanceof Set){if(!(e instanceof Set&&t instanceof Set&&e.size===t.size))return!1;for(let r of e)if(!t.has(r))return!1;return!0}let r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(r=>Object.prototype.hasOwnProperty.call(t,r)&&i(e[r],t[r]))}function f(e){let t=[];for(let r in e)t.push(r);return t}function a(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}function o(e,t){let r=new Set(t),n={};for(let[t,i]of Object.entries(e))r.has(t)||(n[t]=i);return n}function s(e){if(!e||0===e.length)return;let t;for(let r of e)r==r&&(void 0===t||r>t)&&(t=r);return t}function u(e,t){if(void 0===t)return e.replace(/\s+$/,"");let r=e.length;for(;r>0&&t.includes(e[r-1]);)r--;return e.slice(0,r)}export{e as a,t as b,r as c,i as d,f as e,a as f,o as g,s as h,u as i};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=null,u=null;function t(u){n=u}function r(){return n}function c(n){u=n}function o(){return u}export{t as a,r as b,c,o as d};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t}from"./runtime-chunk-WSJURWOC.js";import{a as s,b as a}from"./runtime-chunk-VRVV54WH.js";import{Be as e,Cc as i,Ec as o,Fc as h,Se as r,Ue as d,Ve as n,ye as c}from"./runtime-chunk-VGN7YHB7.js";var l=class extends(s(d)){constructor(t,s=15,a=10066329){super(t,s,a),this.object=t,this.added=!1,this.name=`DirectionalLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,l.geometryHelper,t,s)}},p=class extends(t(e,l)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=2048,this.shadow.mapSize.height=2048,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.top=1250,e.bottom=-1250,e.right=1250,e.left=-1250,e.near=-1e4,e.far=2500;let i=new n(this.shadow.camera);i.visible=!1,this.gizmos.shadowmap=i}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof n&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s);let a=void 0!==t.depth&&t.depth!==this.shadow.camera.far||void 0!==t.size&&t.size/2!==this.shadow.camera.right;void 0!==t.size&&function(t,s){t.shadow.camera.right=s/2,t.shadow.camera.left=-s/2,t.shadow.camera.top=s/2,t.shadow.camera.bottom=-s/2,t.shadow.needsUpdate=!0}(this,t.size),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null)),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),a&&this.update()}},m=class extends(s(r)){constructor(t,s=6710886){super(t,s),this.object=t,this.matrix=t.matrixWorld,this.name=`SpotLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,m.geometryHelper,t,s)}update(){if(void 0!==this.object){let t=m._vector,s=this.object.distance?this.object.distance:1e3,a=s*Math.tan(this.object.angle);this.cone.scale.set(a,a,s),t.setFromMatrixPosition(this.object.target.matrixWorld),this.cone.lookAt(t);let e=void 0!==this.color?this.color:this.light.color;if(this.cone.material instanceof Array)for(let t=0,s=this.cone.material.length;t<s;t++)this.cone.material[t].color.set(e);else this.cone.material.color.set(e)}}},u=m;u._vector=new h;var w=new h,b=new h,g=new o,v=class extends(t(c,u)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=1024,this.shadow.mapSize.height=1024,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.fov=2*i.RAD2DEG*this.angle,e.aspect=1,e.near=100,e.far=2500;let o=new n(this.shadow.camera);o.visible=!1,this.gizmos.shadowmap=o,this.update()}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof n&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),b.setFromMatrixPosition(this.matrixWorld),g.setFromRotationMatrix(this.matrixWorld),w.copy(this.up).applyQuaternion(g).negate().multiplyScalar(this.distance),this.target.position.copy(b).add(w),this.target.updateMatrixWorld(),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.angle&&(this.angle=t.angle),void 0!==t.penumbra&&(this.penumbra=t.penumbra),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null))}};export{p as a,v as b};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t,b as e}from"./runtime-chunk-VRVV54WH.js";import{Ec as s,Fc as r,Sc as a,Xe as i}from"./runtime-chunk-VGN7YHB7.js";var o=new r(1,1,1),m=new r,d=new r,u=new s,c=class extends(t(i)){constructor(t,e=15){super(e),this.object=t,this.dummy=new a,this.object.updateMatrixWorld(),this.name=`EmptyObjectHelper: ${t.uuid}`,this.matrix=this.dummy.matrixWorld,this.matrixAutoUpdate=!1,this.object.isBone&&(this.visible=!1)}raycast(t,s){e(this.object,c.geometryHelper,t,s,!1,this.dummy)}update(){}updateMatrix(){}updateMatrixWorld(t){this.object.matrixWorld.decompose(m,u,d),this.matrix.compose(m,u,o),super.updateMatrixWorld(t)}updateWorldMatrix(t,e){}};export{c as a};
|
|
Binary file
|
|
Binary file
|