@splinetool/runtime 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/boolean.js +24 -0
- 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/hana-ui.js +63 -46
- package/build/hana-ui.js.br +0 -0
- package/build/hana-ui.js.gz +0 -0
- package/build/hana-ui.wasm +0 -0
- package/build/hana-ui.wasm.br +0 -0
- package/build/hana-ui.wasm.gz +0 -0
- package/build/runtime-chunk-2PT2WH66.js +1 -0
- package/build/runtime-chunk-2PT2WH66.js.br +0 -0
- package/build/runtime-chunk-2PT2WH66.js.gz +0 -0
- package/build/{runtime-chunk-XLOQIQSS.js → runtime-chunk-32ZE2X4C.js} +1 -1
- package/build/runtime-chunk-32ZE2X4C.js.br +0 -0
- package/build/runtime-chunk-32ZE2X4C.js.gz +0 -0
- package/build/{runtime-chunk-O5NBGIBR.js → runtime-chunk-4FAMJWEB.js} +1 -1
- package/build/runtime-chunk-4FAMJWEB.js.br +0 -0
- package/build/runtime-chunk-4FAMJWEB.js.gz +0 -0
- package/build/{runtime-chunk-LATYCOUS.js → runtime-chunk-6UQ4Z4JG.js} +1 -1
- package/build/{runtime-chunk-LATYCOUS.js.br → runtime-chunk-6UQ4Z4JG.js.br} +0 -0
- package/build/runtime-chunk-6UQ4Z4JG.js.gz +0 -0
- package/build/{runtime-chunk-BXPWRF47.js → runtime-chunk-BCJEHBXX.js} +1 -1
- package/build/runtime-chunk-BCJEHBXX.js.br +0 -0
- package/build/runtime-chunk-BCJEHBXX.js.gz +0 -0
- package/build/{runtime-chunk-FDRTCOJ5.js → runtime-chunk-D2IFC55F.js} +1 -1
- package/build/runtime-chunk-D2IFC55F.js.br +0 -0
- package/build/runtime-chunk-D2IFC55F.js.gz +0 -0
- package/build/{runtime-chunk-J2I4VBHR.js → runtime-chunk-D6NWJJTR.js} +1 -1
- package/build/runtime-chunk-D6NWJJTR.js.br +0 -0
- package/build/runtime-chunk-D6NWJJTR.js.gz +0 -0
- package/build/{runtime-chunk-2VFLTNIU.js → runtime-chunk-EXHPAC6T.js} +1 -1
- package/build/runtime-chunk-EXHPAC6T.js.br +0 -0
- package/build/runtime-chunk-EXHPAC6T.js.gz +0 -0
- package/build/{runtime-chunk-H6BPTR74.js → runtime-chunk-G5XH52BM.js} +1 -1
- package/build/runtime-chunk-G5XH52BM.js.br +0 -0
- package/build/runtime-chunk-G5XH52BM.js.gz +0 -0
- package/build/{runtime-chunk-ARTGMJ7O.js → runtime-chunk-MC3OVJQU.js} +1 -1
- package/build/runtime-chunk-MC3OVJQU.js.br +0 -0
- package/build/runtime-chunk-MC3OVJQU.js.gz +0 -0
- package/build/{runtime-chunk-5CH7XRKY.js → runtime-chunk-MVRGHRTL.js} +1 -1
- package/build/runtime-chunk-MVRGHRTL.js.br +0 -0
- package/build/runtime-chunk-MVRGHRTL.js.gz +0 -0
- package/build/{runtime-chunk-EAXCCTR5.js → runtime-chunk-NGWM5WPD.js} +1 -1
- package/build/runtime-chunk-NGWM5WPD.js.br +0 -0
- package/build/runtime-chunk-NGWM5WPD.js.gz +0 -0
- package/build/{runtime-chunk-YUK55LCN.js → runtime-chunk-NRJDJMQZ.js} +1 -1
- package/build/runtime-chunk-NRJDJMQZ.js.br +0 -0
- package/build/runtime-chunk-NRJDJMQZ.js.gz +0 -0
- package/build/{runtime-chunk-7NBWIU4W.js → runtime-chunk-PXPQZ7SX.js} +1 -1
- package/build/runtime-chunk-PXPQZ7SX.js.br +0 -0
- package/build/runtime-chunk-PXPQZ7SX.js.gz +0 -0
- package/build/runtime-chunk-Q4H7PFTE.js +1 -0
- package/build/runtime-chunk-Q4H7PFTE.js.br +0 -0
- package/build/runtime-chunk-Q4H7PFTE.js.gz +0 -0
- package/build/runtime-chunk-QFGFABLH.js +1 -0
- package/build/runtime-chunk-QFGFABLH.js.br +0 -0
- package/build/runtime-chunk-QFGFABLH.js.gz +0 -0
- package/build/{runtime-chunk-44SAPZDZ.js → runtime-chunk-RAAW7WHN.js} +1 -1
- package/build/runtime-chunk-RAAW7WHN.js.br +0 -0
- package/build/runtime-chunk-RAAW7WHN.js.gz +0 -0
- package/build/{runtime-chunk-5VJGAC3M.js → runtime-chunk-SQKBNW2G.js} +1 -1
- package/build/runtime-chunk-SQKBNW2G.js.br +0 -0
- package/build/runtime-chunk-SQKBNW2G.js.gz +0 -0
- package/build/{runtime-chunk-H6T5LPRN.js → runtime-chunk-TQBPVLGB.js} +1 -1
- package/build/runtime-chunk-TQBPVLGB.js.br +0 -0
- package/build/runtime-chunk-TQBPVLGB.js.gz +0 -0
- package/build/{runtime-chunk-YVNDW5TV.js → runtime-chunk-U5ACSO5E.js} +1 -1
- package/build/runtime-chunk-U5ACSO5E.js.br +0 -0
- package/build/runtime-chunk-U5ACSO5E.js.gz +0 -0
- package/build/{runtime-chunk-HER7UVU3.js → runtime-chunk-W7THORYR.js} +1 -1
- package/build/runtime-chunk-W7THORYR.js.br +0 -0
- package/build/runtime-chunk-W7THORYR.js.gz +0 -0
- package/build/{runtime-chunk-JFAQQYSH.js → runtime-chunk-XTKPUDRE.js} +1 -1
- package/build/runtime-chunk-XTKPUDRE.js.br +0 -0
- package/build/runtime-chunk-XTKPUDRE.js.gz +0 -0
- package/build/{runtime-chunk-T6CHRQ6N.js → runtime-chunk-XV2ZLRKD.js} +1 -1
- package/build/runtime-chunk-XV2ZLRKD.js.br +0 -0
- package/build/runtime-chunk-XV2ZLRKD.js.gz +0 -0
- package/build/{runtime-chunk-UK4GQHMO.js → runtime-chunk-Y2GFSK5L.js} +1 -1
- package/build/runtime-chunk-Y2GFSK5L.js.br +0 -0
- package/build/runtime-chunk-Y2GFSK5L.js.gz +0 -0
- package/build/runtime-chunk-ZHNGVKGZ.js +1 -0
- package/build/runtime-chunk-ZHNGVKGZ.js.br +0 -0
- package/build/runtime-chunk-ZHNGVKGZ.js.gz +0 -0
- package/build/{runtime-chunk-DJJZN367.js → runtime-chunk-ZLW3UWOA.js} +1 -1
- package/build/runtime-chunk-ZLW3UWOA.js.br +0 -0
- package/build/runtime-chunk-ZLW3UWOA.js.gz +0 -0
- package/build/{runtime-chunk-W7QPV37Y.js → runtime-chunk-ZULFQKQK.js} +1 -1
- package/build/runtime-chunk-ZULFQKQK.js.br +0 -0
- package/build/runtime-chunk-ZULFQKQK.js.gz +0 -0
- package/build/{runtime-classicRuntime-F5CEZRNL.js → runtime-classicRuntime-IFIIFBNS.js} +1 -1
- package/build/runtime-classicRuntime-IFIIFBNS.js.br +0 -0
- package/build/runtime-classicRuntime-IFIIFBNS.js.gz +0 -0
- package/build/runtime-cloners-WEF7XIM4.js +1 -0
- package/build/runtime-cloners-WEF7XIM4.js.br +2 -0
- package/build/runtime-cloners-WEF7XIM4.js.gz +0 -0
- package/build/{runtime-components-DYNXEVOC.js → runtime-components-LNJJ3QLB.js} +1 -1
- package/build/runtime-components-LNJJ3QLB.js.br +0 -0
- package/build/runtime-components-LNJJ3QLB.js.gz +0 -0
- package/build/{runtime-createDestroy-FUUG7UAK.js → runtime-createDestroy-DWI7C4WO.js} +1 -1
- package/build/runtime-createDestroy-DWI7C4WO.js.br +0 -0
- package/build/runtime-createDestroy-DWI7C4WO.js.gz +0 -0
- package/build/{runtime-dragDrop-GPFMU3ZB.js → runtime-dragDrop-46CHKTIE.js} +1 -1
- package/build/runtime-dragDrop-46CHKTIE.js.br +0 -0
- package/build/runtime-dragDrop-46CHKTIE.js.gz +0 -0
- package/build/runtime-gameControls-YA2YP4UH.js +1 -0
- package/build/runtime-gameControls-YA2YP4UH.js.br +0 -0
- package/build/runtime-gameControls-YA2YP4UH.js.gz +0 -0
- package/build/{runtime-hair-YOTI2EFL.js → runtime-hair-XVWLJEZC.js} +1 -1
- package/build/runtime-hair-XVWLJEZC.js.br +3 -0
- package/build/runtime-hair-XVWLJEZC.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-O5XKFANJ.js +1 -0
- package/build/runtime-mergeStaticGeometries-O5XKFANJ.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-O5XKFANJ.js.gz +0 -0
- package/build/{runtime-miscActions-INSZA2CP.js → runtime-miscActions-IRARI4E6.js} +1 -1
- package/build/runtime-miscActions-IRARI4E6.js.br +0 -0
- package/build/runtime-miscActions-IRARI4E6.js.gz +0 -0
- package/build/{runtime-mouseHover-GZW7KW6H.js → runtime-mouseHover-3LVJJIFG.js} +1 -1
- package/build/runtime-mouseHover-3LVJJIFG.js.br +0 -0
- package/build/runtime-mouseHover-3LVJJIFG.js.gz +0 -0
- package/build/{runtime-particles-T2CREK6M.js → runtime-particles-INK4LA4P.js} +1 -1
- package/build/runtime-particles-INK4LA4P.js.br +0 -0
- package/build/runtime-particles-INK4LA4P.js.gz +0 -0
- package/build/{runtime-paths-PRHQFJ3X.js → runtime-paths-LRTW3RNL.js} +1 -1
- package/build/runtime-paths-LRTW3RNL.js.br +0 -0
- package/build/runtime-paths-LRTW3RNL.js.gz +0 -0
- package/build/{runtime-resize-SM6PZWJY.js → runtime-resize-4OIVU46M.js} +1 -1
- package/build/runtime-resize-4OIVU46M.js.br +0 -0
- package/build/runtime-resize-4OIVU46M.js.gz +0 -0
- package/build/{runtime-sceneTransition-JUZVB2S3.js → runtime-sceneTransition-X7RGRC3W.js} +1 -1
- package/build/runtime-sceneTransition-X7RGRC3W.js.br +0 -0
- package/build/runtime-sceneTransition-X7RGRC3W.js.gz +0 -0
- package/build/{runtime-scroll-Q6NRRL4F.js → runtime-scroll-VK7XXJPE.js} +1 -1
- package/build/runtime-scroll-VK7XXJPE.js.br +0 -0
- package/build/runtime-scroll-VK7XXJPE.js.gz +0 -0
- package/build/runtime-shapeBlends-VLITROES.js +1 -0
- package/build/runtime-shapeBlends-VLITROES.js.br +2 -0
- package/build/runtime-shapeBlends-VLITROES.js.gz +0 -0
- package/build/{runtime-text-TBHPCNPL.js → runtime-text-KC66JGLC.js} +1 -1
- package/build/runtime-text-KC66JGLC.js.br +0 -0
- package/build/runtime-text-KC66JGLC.js.gz +0 -0
- package/build/{runtime-textInputs-4HQER44D.js → runtime-textInputs-Y7CREUMS.js} +1 -1
- package/build/runtime-textInputs-Y7CREUMS.js.br +0 -0
- package/build/runtime-textInputs-Y7CREUMS.js.gz +0 -0
- package/build/{runtime-timeline-UKR4DEQS.js → runtime-timeline-KTMKRAZU.js} +1 -1
- package/build/runtime-timeline-KTMKRAZU.js.br +0 -0
- package/build/runtime-timeline-KTMKRAZU.js.gz +0 -0
- package/build/{runtime-tracking-5HISHPEY.js → runtime-tracking-FA45SGZJ.js} +1 -1
- package/build/runtime-tracking-FA45SGZJ.js.br +0 -0
- package/build/runtime-tracking-FA45SGZJ.js.gz +0 -0
- package/build/{runtime-transitions-FBNOSFXY.js → runtime-transitions-A7UP5OMB.js} +1 -1
- package/build/runtime-transitions-A7UP5OMB.js.br +0 -0
- package/build/runtime-transitions-A7UP5OMB.js.gz +0 -0
- package/build/{runtime-ui2d-3AMS3CSG.js → runtime-ui2d-XLYMHVMW.js} +1 -1
- package/build/runtime-ui2d-XLYMHVMW.js.br +0 -0
- package/build/runtime-ui2d-XLYMHVMW.js.gz +0 -0
- package/build/{runtime-vectorShapes-GIS26ELU.js → runtime-vectorShapes-MA6PKTF5.js} +1 -1
- package/build/runtime-vectorShapes-MA6PKTF5.js.br +0 -0
- package/build/runtime-vectorShapes-MA6PKTF5.js.gz +0 -0
- package/build/runtime-video-7GHZOZRJ.js +1 -0
- package/build/runtime-video-7GHZOZRJ.js.br +0 -0
- package/build/runtime-video-7GHZOZRJ.js.gz +0 -0
- package/build/runtime-webgpu-JPQ4VPBY.js +1 -0
- package/build/runtime-webgpu-JPQ4VPBY.js.br +0 -0
- package/build/runtime-webgpu-JPQ4VPBY.js.gz +0 -0
- package/build/runtime.cjs +359 -359
- package/build/runtime.js +1 -1
- package/build/runtime.js.br +0 -0
- package/build/runtime.js.gz +0 -0
- package/build/runtime.standalone.js +1 -1
- package/build/runtime.standalone.js.br +0 -0
- package/build/runtime.standalone.js.gz +0 -0
- package/build/runtime.standalone.webgl.js +1 -1
- package/build/runtime.standalone.webgl.js.br +0 -0
- package/build/runtime.standalone.webgl.js.gz +0 -0
- package/build/runtime.standalone.webgpu.js +1 -1
- package/build/runtime.standalone.webgpu.js.br +0 -0
- package/build/runtime.standalone.webgpu.js.gz +0 -0
- package/build/runtime.standalone.webgpu.micro.js +1 -1
- package/build/runtime.standalone.webgpu.micro.js.br +0 -0
- package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
- package/build/runtime.standalone.webgpu.min.js +1 -1
- package/build/runtime.standalone.webgpu.min.js.br +0 -0
- package/build/runtime.standalone.webgpu.min.js.gz +0 -0
- package/package.json +1 -1
- package/build/runtime-chunk-23QOKH2J.js +0 -1
- package/build/runtime-chunk-23QOKH2J.js.br +0 -0
- package/build/runtime-chunk-23QOKH2J.js.gz +0 -0
- package/build/runtime-chunk-2VFLTNIU.js.br +0 -0
- package/build/runtime-chunk-2VFLTNIU.js.gz +0 -0
- package/build/runtime-chunk-44SAPZDZ.js.br +0 -0
- package/build/runtime-chunk-44SAPZDZ.js.gz +0 -0
- package/build/runtime-chunk-5CH7XRKY.js.br +0 -0
- package/build/runtime-chunk-5CH7XRKY.js.gz +0 -0
- package/build/runtime-chunk-5VJGAC3M.js.br +0 -0
- package/build/runtime-chunk-5VJGAC3M.js.gz +0 -0
- package/build/runtime-chunk-7NBWIU4W.js.br +0 -0
- package/build/runtime-chunk-7NBWIU4W.js.gz +0 -0
- package/build/runtime-chunk-ARTGMJ7O.js.br +0 -0
- package/build/runtime-chunk-ARTGMJ7O.js.gz +0 -0
- package/build/runtime-chunk-BXPWRF47.js.br +0 -0
- package/build/runtime-chunk-BXPWRF47.js.gz +0 -0
- package/build/runtime-chunk-CRYQVRO6.js +0 -1
- package/build/runtime-chunk-CRYQVRO6.js.br +0 -0
- package/build/runtime-chunk-CRYQVRO6.js.gz +0 -0
- package/build/runtime-chunk-DJJZN367.js.br +0 -0
- package/build/runtime-chunk-DJJZN367.js.gz +0 -0
- package/build/runtime-chunk-EAXCCTR5.js.br +0 -0
- package/build/runtime-chunk-EAXCCTR5.js.gz +0 -0
- package/build/runtime-chunk-FDRTCOJ5.js.br +0 -0
- package/build/runtime-chunk-FDRTCOJ5.js.gz +0 -0
- package/build/runtime-chunk-H6BPTR74.js.br +0 -0
- package/build/runtime-chunk-H6BPTR74.js.gz +0 -0
- package/build/runtime-chunk-H6T5LPRN.js.br +0 -0
- package/build/runtime-chunk-H6T5LPRN.js.gz +0 -0
- package/build/runtime-chunk-HER7UVU3.js.br +0 -0
- package/build/runtime-chunk-HER7UVU3.js.gz +0 -0
- package/build/runtime-chunk-J2I4VBHR.js.br +0 -0
- package/build/runtime-chunk-J2I4VBHR.js.gz +0 -0
- package/build/runtime-chunk-JFAQQYSH.js.br +0 -0
- package/build/runtime-chunk-JFAQQYSH.js.gz +0 -0
- package/build/runtime-chunk-LATYCOUS.js.gz +0 -0
- package/build/runtime-chunk-O5NBGIBR.js.br +0 -0
- package/build/runtime-chunk-O5NBGIBR.js.gz +0 -0
- package/build/runtime-chunk-QZ35BPGB.js +0 -1
- package/build/runtime-chunk-QZ35BPGB.js.br +0 -0
- package/build/runtime-chunk-QZ35BPGB.js.gz +0 -0
- package/build/runtime-chunk-T6CHRQ6N.js.br +0 -0
- package/build/runtime-chunk-T6CHRQ6N.js.gz +0 -0
- package/build/runtime-chunk-UK4GQHMO.js.br +0 -0
- package/build/runtime-chunk-UK4GQHMO.js.gz +0 -0
- package/build/runtime-chunk-W7QPV37Y.js.br +0 -1
- package/build/runtime-chunk-W7QPV37Y.js.gz +0 -0
- package/build/runtime-chunk-WQXDDUFV.js +0 -1
- package/build/runtime-chunk-WQXDDUFV.js.br +0 -0
- package/build/runtime-chunk-WQXDDUFV.js.gz +0 -0
- package/build/runtime-chunk-XLOQIQSS.js.br +0 -0
- package/build/runtime-chunk-XLOQIQSS.js.gz +0 -0
- package/build/runtime-chunk-YUK55LCN.js.br +0 -0
- package/build/runtime-chunk-YUK55LCN.js.gz +0 -0
- package/build/runtime-chunk-YVNDW5TV.js.br +0 -0
- package/build/runtime-chunk-YVNDW5TV.js.gz +0 -0
- package/build/runtime-classicRuntime-F5CEZRNL.js.br +0 -0
- package/build/runtime-classicRuntime-F5CEZRNL.js.gz +0 -0
- package/build/runtime-cloners-BLAFVALM.js +0 -1
- package/build/runtime-cloners-BLAFVALM.js.br +0 -0
- package/build/runtime-cloners-BLAFVALM.js.gz +0 -0
- package/build/runtime-components-DYNXEVOC.js.br +0 -0
- package/build/runtime-components-DYNXEVOC.js.gz +0 -0
- package/build/runtime-createDestroy-FUUG7UAK.js.br +0 -0
- package/build/runtime-createDestroy-FUUG7UAK.js.gz +0 -0
- package/build/runtime-dragDrop-GPFMU3ZB.js.br +0 -0
- package/build/runtime-dragDrop-GPFMU3ZB.js.gz +0 -0
- package/build/runtime-gameControls-TGEINRCX.js +0 -1
- package/build/runtime-gameControls-TGEINRCX.js.br +0 -0
- package/build/runtime-gameControls-TGEINRCX.js.gz +0 -0
- package/build/runtime-hair-YOTI2EFL.js.br +0 -0
- package/build/runtime-hair-YOTI2EFL.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-JI7YWYGH.js +0 -1
- package/build/runtime-mergeStaticGeometries-JI7YWYGH.js.br +0 -3
- package/build/runtime-mergeStaticGeometries-JI7YWYGH.js.gz +0 -0
- package/build/runtime-miscActions-INSZA2CP.js.br +0 -0
- package/build/runtime-miscActions-INSZA2CP.js.gz +0 -0
- package/build/runtime-mouseHover-GZW7KW6H.js.br +0 -0
- package/build/runtime-mouseHover-GZW7KW6H.js.gz +0 -0
- package/build/runtime-particles-T2CREK6M.js.br +0 -0
- package/build/runtime-particles-T2CREK6M.js.gz +0 -0
- package/build/runtime-paths-PRHQFJ3X.js.br +0 -0
- package/build/runtime-paths-PRHQFJ3X.js.gz +0 -0
- package/build/runtime-resize-SM6PZWJY.js.br +0 -0
- package/build/runtime-resize-SM6PZWJY.js.gz +0 -0
- package/build/runtime-sceneTransition-JUZVB2S3.js.br +0 -0
- package/build/runtime-sceneTransition-JUZVB2S3.js.gz +0 -0
- package/build/runtime-scroll-Q6NRRL4F.js.br +0 -0
- package/build/runtime-scroll-Q6NRRL4F.js.gz +0 -0
- package/build/runtime-shapeBlends-CPHLT3XC.js +0 -1
- package/build/runtime-shapeBlends-CPHLT3XC.js.br +0 -0
- package/build/runtime-shapeBlends-CPHLT3XC.js.gz +0 -0
- package/build/runtime-text-TBHPCNPL.js.br +0 -0
- package/build/runtime-text-TBHPCNPL.js.gz +0 -0
- package/build/runtime-textInputs-4HQER44D.js.br +0 -0
- package/build/runtime-textInputs-4HQER44D.js.gz +0 -0
- package/build/runtime-timeline-UKR4DEQS.js.br +0 -0
- package/build/runtime-timeline-UKR4DEQS.js.gz +0 -0
- package/build/runtime-tracking-5HISHPEY.js.br +0 -0
- package/build/runtime-tracking-5HISHPEY.js.gz +0 -0
- package/build/runtime-transitions-FBNOSFXY.js.br +0 -0
- package/build/runtime-transitions-FBNOSFXY.js.gz +0 -0
- package/build/runtime-ui2d-3AMS3CSG.js.br +0 -0
- package/build/runtime-ui2d-3AMS3CSG.js.gz +0 -0
- package/build/runtime-vectorShapes-GIS26ELU.js.br +0 -0
- package/build/runtime-vectorShapes-GIS26ELU.js.gz +0 -0
- package/build/runtime-video-TZNR7MEM.js +0 -1
- package/build/runtime-video-TZNR7MEM.js.br +0 -0
- package/build/runtime-video-TZNR7MEM.js.gz +0 -0
- package/build/runtime-webgpu-LYDFJW3X.js +0 -1
- package/build/runtime-webgpu-LYDFJW3X.js.br +0 -0
- package/build/runtime-webgpu-LYDFJW3X.js.gz +0 -0
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,b as e}from"./runtime-chunk-
|
|
1
|
+
import{a as t,b as e}from"./runtime-chunk-D2IFC55F.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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t}from"./runtime-chunk-
|
|
1
|
+
import{a as e,b as t}from"./runtime-chunk-4FAMJWEB.js";import{b as a,e as i,g as r}from"./runtime-chunk-ZHNGVKGZ.js";import{a as s}from"./runtime-chunk-TU4KDRKR.js";import{a as n}from"./runtime-chunk-W7THORYR.js";import{a as l,b as o}from"./runtime-chunk-MC3OVJQU.js";import{T as h,d as u,da as c,e as d,h as p}from"./runtime-chunk-NRJDJMQZ.js";import{b as y,h as m,j as g,v as f}from"./runtime-chunk-ZLW3UWOA.js";import{c as b}from"./runtime-chunk-2PT2WH66.js";import{c as v,l as C}from"./runtime-chunk-TZCHGFVF.js";import{qa as k,ta as S,w as A,za as w}from"./runtime-chunk-OW6T4XFV.js";import{Ne as F,Oc as L,Tc as O,Uc as H,Vc as j,cd as T,jd as B,ld as M,ve as U}from"./runtime-chunk-VGN7YHB7.js";function D(e){return e instanceof c&&e.needsAO&&!b(e)&&!0!==e.isDecalObject}function z(e){let t=e.cloner;if(t&&Array.isArray(t.children))for(let a of t.children)a?.layers&&(a.layers.mask=e.layers.mask)}function x(e){return e.getLayersOfType("reflection").filter(e=>e.data.visible).length}function E(e){return e.getLayersOfType("reflection").some(e=>e.data.visible&&1===e.data.mirror)}function P(e){let t=1/0,a=-1/0;for(let i of e.getLayersOfType("reflection")){let e=i.data;if(!e.visible||1===e.mirror)continue;let r="number"==typeof e.blur?e.blur:null;t=Math.min(t,r??0),a=Math.max(a,r??10)}return t===1/0?null:{min:t,max:a}}function W(e){for(let t of e.getLayersOfType("reflection")){let e=t.data;if(!e.visible)continue;let{blur:a,thickness:i,steps:r,stepSize:s}=e;return"number"!=typeof a||"number"!=typeof i||"number"!=typeof r||"number"!=typeof s?"variable":{blur:a,thickness:i,steps:r,stepSize:s,tracingMode:1===e.tracingMode?1:0}}return null}function I(e,t){let a={outline:!1,cavity:!1},i=512&e.layers.mask,r=t.getLayersOfType("transmission"),s=t.getLayersOfType("outline"),n=x(t),h=t.getLayersOfType("cavity");return(s.length>0||h.length>0)&&(e.layers.set(8),r.length>0&&e.layers.enable(3),n>0&&e.layers.enable(4),a.outline=s.length>0,a.cavity=h.length>0,o(e),l(e)),0===r.length&&0===s.length&&0===h.length&&0===n&&e.layers.set(0),i&&e.layers.set(9),!i&&D(e)&&e.layers.enable(5),z(e),a}function V(e,t){if(!t.layers)return!1;let a=512&e.layers.mask,i=!1,r=t.getLayersOfType("transmission").filter(e=>e.data.visible),s=t.getLayersOfType("outline").filter(e=>e.data.visible),n=x(t),l=t.getLayersOfType("cavity").filter(e=>e.data.visible);return r.length>0&&(e.layers.set(3),(s.length>0||l.length>0)&&e.layers.enable(8),n>0&&e.layers.enable(4),i=!0),0===r.length&&0===s.length&&0===l.length&&0===n&&e.layers.set(0),a&&e.layers.set(9),!a&&D(e)&&e.layers.enable(5),z(e),i}function G(e,t){var a;if(!t.layers)return!1;let i=512&e.layers.mask,r=!1,s=x(t),n=t.getLayersOfType("transmission").filter(e=>e.data.visible),l=t.getLayersOfType("outline").filter(e=>e.data.visible),o=t.getLayersOfType("cavity").filter(e=>e.data.visible);return s>0&&((a=e.userData).__splinePlanarMirror??(a.__splinePlanarMirror=0),e.layers.set(4),n.length>0&&e.layers.enable(3),(l.length>0||o.length>0)&&e.layers.enable(8),r=!0),0===s&&0===n.length&&0===l.length&&0===o.length&&e.layers.set(0),i&&e.layers.set(9),!i&&D(e)&&e.layers.enable(5),z(e),r}function R(e){let t={outline:!1,cavity:!1},a=e=>{t.outline=t.outline||e.outline,t.cavity=t.cavity||e.cavity};return e.traverseEntity(e=>{if(e instanceof c)if(Array.isArray(e.material))for(let t=0;t<e.material.length;t++)a(I(e,e.material[t]));else a(I(e,e.material))}),t}function _(e){let t=!1;return e.traverseEntity(e=>{if(e instanceof c)if(Array.isArray(e.material))for(let a=0;a<e.material.length;a++)V(e,e.material[a])&&(t=!0);else V(e,e.material)&&(t=!0)}),t}function Z(e){let t=!1;return e.traverseEntity(e=>{if(e instanceof c)if(Array.isArray(e.material))for(let a=0;a<e.material.length;a++)G(e,e.material[a])&&(t=!0);else G(e,e.material)&&(t=!0)}),t}var J=new F,N=new L,Q=new B,K=new T;function Y(e,t,a,i=!1){let r=e.cloner;if(r){let s=null;if(e.raycast===M.prototype.raycast||e.raycast===f.prototype.raycast){let t=e.geometry;t&&(null===t.boundingSphere&&t.computeBoundingSphere(),s=t.boundingSphere)}for(let n of r.children){if(null!==s&&(K.copy(s).applyMatrix4(n.matrixWorld),!t.ray.intersectsSphere(K)))continue;let r=N.copy(n.matrixWorld).invert(),l=Q.copy(t.ray).applyMatrix4(r),o=e.matrixWorld;l.applyMatrix4(o);let h=J;h.set(l.origin,l.direction),h.near=t.near,h.far=t.far,h.layers.mask=t.layers.mask;let u=h.intersectObject(e,!1);u.length>0&&a.push({...u[0],object:i?n:e})}}}var q=class extends(g(j)){constructor(e,t,a){if(super(),this.data=t,this.bgColor=new p(1,1,1,1),this.fog=null,this.backupFog=new H(16777215,.1,2e3),this.fogUseBGColor=!1,this.fogMode="linear",this.fogDensity=k.getDensity({}),this.fogHeightFalloff=k.getHeightFalloff({}),this.fogHeightBase=k.getHeightBase({}),this.isActive=!1,this.skyState=null,this.skyStateVersion=0,this.gradingState=null,this.skyHdriHolder=null,this.aoColor=new O,this.penumbraSizeArrayCache=null,this.super_Entity(e,t),this.personalCamera=new n(A,{...w.defaultData,...t.camera,name:"Personal Camera"}),this.personalCamera.objectHelper.visible=!1,this.add(this.personalCamera),this.activeCamera=this.personalCamera,this.ambientLight=new U(13882323,8553090,.75*Math.PI),this.ambientLight.name="Default Ambient Light",this.ambientLight.layers.enable(3),this.ambientLight.removeFromParent(),this.add(this.ambientLight),t.uiScene){let i=C();null===i?v("ui-2d","a page's 2D scene"):this.uiScene=new i.Scene2D((Array.isArray(e)?e[0]:e)+"-ui",t.uiScene,{dpr:window.devicePixelRatio,shared:a.shared})}else t.uiFrame&&this.createUICanvas(t.uiFrame,a)}get scene(){return this.parent}get postprocessing(){return this.data.postprocessing}get frameId(){return this.data.uiFrame}get frame(){return this.uiCanvas?.frame}createUICanvas(e,t){let a=C();null!==a?(this.uiCanvas=new a.UICanvas(this.uuid+"-uiscreen",window.innerWidth,window.innerHeight,t),this.uiCanvas.isScreenSpace=!0,this.uiCanvas.promise.then(()=>{this.uiCanvas?.applyFrame(e),this.uiCanvas?.applySize()})):v("ui-2d","a page's UI canvas")}updateVisible(){}setBackgroundColor(e){this.bgColor=e,!0===this.fogUseBGColor&&(this.backupFog.color=e)}entityChildrenCount(){return this.uiScene?this.uiScene.children.length:super.entityChildrenCount()}updateAmbientLight(e,t){void 0!==e.color&&(this.ambientLight.color=s(e.color,t)),void 0!==e.intensity&&(this.ambientLight.intensity=e.intensity*Math.PI),void 0!==e.enabled&&(e.enabled?this.add(this.ambientLight):this.remove(this.ambientLight))}onDeactive(){this.isActive=!1}onActive(e){this.isActive=!0,e.fog=this.fog,this.traverseEntity(e=>{e instanceof a&&e.recomputeBoolean()}),this.updateShadow(this.data.shadow)}forceMaterialsUpdate(){this.traverseEntity(e=>{if(e instanceof c)if(Array.isArray(e.material))for(let t of e.material)t.needsUpdate=!0;else e.material.needsUpdate=!0,e.material.dispose()})}updateShadow(e){if(void 0===e.softShadowQuality&&void 0===e.type||!this.isActive)return;let t=this.data.shadow,a=S.isSoft(t);h(a,t?.softShadowQuality)&&this.forceMaterialsUpdate()}updateFog(e,t){e.enabled?this.fog=this.backupFog:this.fog=null,this.isActive&&(this.scene.fog=this.fog),this.fogUseBGColor=e.useBackgroundColor,e.useBackgroundColor?this.backupFog.color.set(this.bgColor):this.backupFog.color=s(e.color,t),this.backupFog.near=e.near,this.backupFog.far=e.far,this.fogMode=k.getMode(e),this.fogDensity=k.getDensity(e),this.fogHeightFalloff=k.getHeightFalloff(e),this.fogHeightBase=k.getHeightBase(e)}updateSky(e,t){this.skyState=e??null,this.skyStateVersion++;let a=e?.hdri?.image;this.skyHdriHolder=null!=a?t.image(a):null}updateAo(e,t){void 0!==e.aoColor&&(this.aoColor=s(e.aoColor,t))}updateByOp(e,t,a,i){let r=this.data.uiFrame;super.updateByOp(e,t,a,i);let s=t;y(e.path,["fog"])?this.updateFog(s.fog,a.shared):y(e.path,["sky"])?this.updateSky(s.sky,a.shared):y(e.path,["grading"])?this.gradingState=s.grading??null:y(e.path,["ao"])?this.updateAo(s.ao,a.shared):y(e.path,["ambient"])?this.updateAmbientLight(s.ambient,a.shared):y(e.path,["shadow"])?this.updateShadow(s.shadow):0===e.type&&0===e.path.length&&(void 0!==e.props.uiFrame||r!==s.uiFrame)&&this.updateUIFrame(e.props.uiFrame,a)}updateUIFrame(e,t){e?(this.uiCanvas||this.createUICanvas(e,t),this.uiCanvas.enabled=!0,this.uiCanvas.applyFrame(e)):this.uiCanvas&&(this.uiCanvas.enabled=!1)}updateState(e,t){this.updateState_Entity(e,t),void 0!==e.backgroundColor&&this.setBackgroundColor(s(e.backgroundColor,t.shared)),void 0!==e.fog&&this.updateFog(e.fog,t.shared),void 0!==e.sky&&this.updateSky(e.sky,t.shared),void 0!==e.grading&&(this.gradingState=e.grading),void 0!==e.ambient&&this.updateAmbientLight(e.ambient,t.shared),void 0!==e.ao&&this.updateAo(e.ao,t.shared),void 0!==e.shadow&&this.updateShadow(e.shadow)}createFrame(e,t){}raycast(e,t){super.raycast(e,t)}switchActiveCamera(e){e&&e.isDescendantOf(this)&&(this.activeCamera!==this.personalCamera&&(this.activeCamera.objectHelper.visible=!0),this.activeCamera=e,e.objectHelper.visible=!1)}get playCamera(){return this.scene?.find(this.data.publish.playCamera)??this.personalCamera}switchToPlayCamera(){this.switchActiveCamera(this.playCamera)}get penumbraSizeArray(){return null===this.penumbraSizeArrayCache&&this.updatePenumbraSizeArray(),this.penumbraSizeArrayCache}updatePenumbraSizeArray(){this.penumbraSizeArrayCache=new Array(u).fill(.5);let a=0,i=0;this.traverseEntity(r=>{if(!r.visible)return!0;r instanceof e&&r.visible&&a<d&&(this.penumbraSizeArrayCache[a]=r.data.penumbraSize??.5,a+=1),r instanceof t&&r.visible&&a<u-d&&(this.penumbraSizeArrayCache[d+i]=r.data.penumbraSize??.5,i+=1)})}raycastWithClones(e){let t=[],a=s=>{for(let n of s.children){let s=n.cloner;m.is(n)&&(n.visible||s?.object.data.visible)&&((i(n)||r(n)&&this.scene.enableHelpers&&n.objectHelper.visible)&&(e.intersectObject(n,!1,t),Y(n,e,t,!0)),a(n))}};return a(this),t}updateEntity2DByOp(e,t,a,i){this.uiCanvas?.updateEntity2DByOp(e,t,a,i)}};export{E as a,P as b,W as c,R as d,_ as e,Z as f,Y as g,q as h};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./runtime-chunk-
|
|
1
|
+
import{j as e}from"./runtime-chunk-ZLW3UWOA.js";import{Ed as t,Fc as r,Oc as i,We as n,cd as a,jd as o}from"./runtime-chunk-VGN7YHB7.js";var s;(s||(s={})).is=e=>"objectHelper"in e;var l=(r,i)=>class extends(e(r)){constructor(){super(...arguments),this.objectHelper=new i(this),this.gizmos={}}get geometryHelper(){return i.geometryHelper}raycast(e,t){this.objectHelper.raycast(e,t)}showGizmos(){for(let e in this.gizmos){let t=this.gizmos[e];t instanceof n&&(t.visible=!0)}}updateEntityBoxSize(e,r){this.objectHelper.visible&&this.geometryHelper instanceof t?(e.setScalar(0),r.set(this.geometryHelper.parameters.width,this.geometryHelper.parameters.height,this.geometryHelper.parameters.height).multiplyScalar(.5)):super.updateEntityBoxSize(e,r)}hideGizmos(){for(let e in this.gizmos){let t=this.gizmos[e];t instanceof n&&(t.visible=!1)}}},c=e=>{var r;return(r=class extends e{}).geometryHelper=new t(30,30,30),r},p=new o,u=new a,m=new i,f=(e,t,i,n,a=!1,o=e)=>{let s=t,l=o.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),u.copy(s.boundingSphere),u.applyMatrix4(l),!1===i.ray.intersectsSphere(u)||(m.copy(l).invert(),p.copy(i.ray).applyMatrix4(m),null!==s.boundingBox&&!1===p.intersectsBox(s.boundingBox)))return;let c,f,h,d,g,y,x=s.index,b=s.attributes.position,w=s.drawRange;if(!1===a){for(g=Math.max(0,w.start),y=Math.min(x.count,w.start+w.count);g<y;g+=3)if(f=x.getX(g),h=x.getX(g+1),d=x.getX(g+2),c=B(e,i,p,b,f,h,d),c)return c.faceIndex=Math.floor(g/3),void n.push(c)}else{let t=s.attributes.position,a=new r,l=new r,c=new r,u=new r,m=2,f=1/((o.scale.x+o.scale.y+o.scale.z)/3),h=f*f;for(let r=Math.max(0,w.start),s=Math.min(t.count,w.start+w.count)-1;r<s;r+=m){if(a.fromBufferAttribute(t,r),l.fromBufferAttribute(t,r+1),p.distanceSqToSegment(a,l,u,c)>h)continue;u.applyMatrix4(o.matrixWorld);let s=i.ray.origin.distanceTo(u);s<i.near||s>i.far||n.push({distance:s,point:c.clone().applyMatrix4(o.matrixWorld),object:e})}}function B(e,t,i,n,a,o,s){let l=new r,c=new r,p=new r,u=new r,m=new r;if(l.fromBufferAttribute(n,a),c.fromBufferAttribute(n,o),p.fromBufferAttribute(n,s),null===i.intersectTriangle(l,c,p,!1,u))return null;m.copy(u),m.applyMatrix4(e.matrixWorld);let f=t.ray.origin.distanceTo(m);return f<t.near||f>t.far?null:{faceIndex:1,distance:f,point:m.clone(),object:e}}};export{c as a,f as b,s as c,l as d};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as i}from"./runtime-chunk-
|
|
1
|
+
import{a as e,b as i}from"./runtime-chunk-MC3OVJQU.js";import{E as t,F as s,ea as o}from"./runtime-chunk-NRJDJMQZ.js";import{v as r}from"./runtime-chunk-ZLW3UWOA.js";import{Fc as h,Oc as a,Xc as d,cd as n}from"./runtime-chunk-VGN7YHB7.js";var l=new d,u=new h;function m(e){let i=!1;return e.scene.objects.traverse((e,t)=>{"Mesh"===t.type&&"SubdivGeometry"===t.geometry.type&&(i=!0)}),i}var y=class extends o{constructor(e,i,t){super(e,i,t),this.data=i,this.hiddenMatrixOld=new a,this.smoothShading=!0,this.skipReactionUpdate=!1}chooseGeoemtryCache(e){return this.dataPatched.flatShading?e.geometryCache:e.geometryCache2}get subdivPointerNew(){return void 0!==this.localGeometry?this.subdivPointer:this.geometry.ensureSubdivPointer()}get originalGeometryNew(){return void 0!==this.localGeometry?this.originalGeometry:this.geometry.originalGeometry}get phongAngle(){return this.data.geometry.phongAngle??45}updateEntityBoxSize(e,i){let t=this.geometry.userData.parameters;e.copy(this.originalGeometryNew.boundingSphere.center),i.set(t.width,t.height,t.depth??0).multiplyScalar(.5)}createGeometryByControls(s){if(!0===this.skipReactionUpdate)return;let o=this.localGeometry?.uuid,{originalGeometry:r,subdividedGeometry:h,subdivPointer:a}=t.build(s,this.subdivPointer,this.smoothShading,this.hasNonUniformScale?this.shearScale:void 0);this.subdivPointer=a,void 0!==r&&(this.originalGeometry?.dispose(),this.originalGeometry=r),void 0!==h&&(this.subdividedGeometry?.dispose(),this.subdividedGeometry=h??void 0),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),this.calcBoundingBox(),o&&(this.localGeometry.uuid=o)}updateState(e,i){if(super.updateState(e,i),void 0!==e.flatShading){let t=this.material;this.material=Array.isArray(t)?t.map(e=>e.getFlavor(!1,e.side,e.wireframe)):t.getFlavor(!1,t.side,t.wireframe),this.smoothShading=!e.flatShading,this.createGeometryDelayed(i)}}updateMesh(e=!1,i=!1,s=!1){i&&this.subdividedGeometry||t.buildLevel(this.subdivPointer,!0,this.smoothShading?this.phongAngle:-1,this.originalGeometry,e&&this.hasNonUniformScale?this.shearScaleInv:void 0,s),this.subdividedGeometry&&t.buildLevel(this.subdivPointer,!1,this.smoothShading?this.phongAngle:-1,this.subdividedGeometry,e&&this.hasNonUniformScale?this.shearScaleInv:void 0)}updateTopology(){let s=this.localGeometry?.uuid;this.originalGeometry.dispose(),this.originalGeometry=t.buildLevel(this.subdivPointer,!0,this.smoothShading?this.phongAngle:-1),this.subdividedGeometry&&(this.subdividedGeometry.dispose(),this.subdividedGeometry=t.buildLevel(this.subdivPointer,!1,this.smoothShading?this.phongAngle:-1)),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),this.calcBoundingBox(),s&&(this.localGeometry.uuid=s)}raycast(e,i){let t=this.localGeometry;this.localGeometry=this.originalGeometryNew,r.prototype.raycast.call(this,e,i),this.localGeometry=t}activateShearCompensation(){!this.hasNonUniformScale||(this.matrix.copy(this.matrixWorldRigid),this.hiddenMatrixOld.copy(this.hiddenMatrix),this.hiddenMatrix.copy(this.parent.matrixWorld).invert())}deactivateShearCompensation(){!this.hasNonUniformScale||(this.updateMatrix(),this.hasNonUniformScale=void 0,this.hiddenMatrix.copy(this.hiddenMatrixOld))}calcBoundingBox(){let e=this.originalGeometry;null===e.boundingSphere&&(e.boundingSphere=new n,this.subdividedGeometry&&(this.subdividedGeometry.boundingSphere=e.boundingSphere));let i=e.attributes.position,t=e.boundingSphere.center;l.setFromBufferAttribute(i),l.getCenter(t),e.boundingSphere.radius=t.distanceTo(l.max),isNaN(e.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this),l.getSize(u),this.hasNonUniformScale&&u.divide(this.scale);let s={width:u.x,height:u.y,depth:u.z};return this.geometry.userData.parameters=s,s}updateBoundingSphere(e){let i=this.originalGeometry;l.min.set(e[0],e[2],e[4]),l.max.set(e[1],e[3],e[5]),this.hasNonUniformScale&&(l.min.applyMatrix4(this.shearScaleInv),l.max.applyMatrix4(this.shearScaleInv)),null===i.boundingSphere&&(i.boundingSphere=new n);let t=i.boundingSphere.center;l.getCenter(t),i.boundingSphere.radius=t.distanceTo(l.max)}freeSubdivPointer(){this.subdivPointer&&(t.freeSubdivPointer(this.subdivPointer),this.subdivPointer=0),this.localGeometry=void 0,this.originalGeometry?.dispose(),this.subdividedGeometry?.dispose()}dispose(){super.dispose(),this.freeSubdivPointer()}updateSubdivisionLevel(s){if(!0===this.skipReactionUpdate)return;let o=this.localGeometry,r=o?.uuid,h=o?.userData.parameters,a=s.subdivisions>0?t.buildRefined(this.subdivPointer,s.subdivisions,this.smoothShading?s.phongAngle??35:-1):null;this.subdividedGeometry?.dispose(),this.subdividedGeometry=a??void 0,this.subdividedGeometry&&this.originalGeometry.boundingSphere&&(this.subdividedGeometry.boundingSphere=this.originalGeometry.boundingSphere),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),void 0!==h&&(this.localGeometry.userData.parameters=h),r&&(this.localGeometry.uuid=r)}updateByPatchedOpGeometry(e,i,t){super.updateByPatchedOpGeometry(e,i,t),this.localGeometry&&(0===e.type&&0===e.path.length&&s(e.props)&&this.subdivPointer?this.updateSubdivisionLevel(i):this.createGeometryByControls(i))}};export{m as a,y as b};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./runtime-chunk-DJJZN367.js";import{Ec as t,Fc as a,Fd as s,Gc as i,Ge as r,Ib as n,Oc as h,Tc as o,Wd as l,Xd as d,Zc as c,kd as u,ld as g}from"./runtime-chunk-VGN7YHB7.js";var p=null;function b(e){p=e}function m(){return p}var S=null;function f(e){S=e}function M(){return S}var y=new o;function x(e,t,a){return y.setRGB(e,t,a,n),{r:y.r,g:y.g,b:y.b}}var R=(e,t)=>"number"==typeof e&&Number.isFinite(e)?e:t,w=e=>Array.isArray(e)&&"number"==typeof e[0]&&"number"==typeof e[1]?[e[0],e[1]]:[0,0];function v(e,t,a){let s,i=R(e.angle,0),[r,n]=w(e.offset),[h,o]=w(e.morph),l=e.colors??[],d=e.steps??[],c=Math.min(10,l.length,d.length);if(0===c)return[1,1,1,1];if(1===e.gradientType){let e=3*(t+h)-(t+r)-1,l=3*(a+o)-(a+n)-1;s=Math.hypot(e,l)+i}else if(2===e.gradientType){let e=-1*Math.atan2(t+h-.5+r,a+o-.5+n),l=i/Math.PI/-2+.5*e/Math.PI;s=l-Math.floor(l)}else{let e=.5+h/(0!==t?t:1e-6),l=o/(0!==a?a:1e-6),d=Math.cos(i)*e-Math.sin(i)*l,c=Math.sin(i)*e+Math.cos(i)*l,u=d*d+c*c;s=u>1e-12?(((t-.5+r)/2+d/2)*d+((a-.5+n)/2+c/2)*c)/u:0}let u=l[0][0],g=l[0][1],p=l[0][2],b=l[0][3];for(let t=1;t<c;t++){let a=d[t-1],i=d[t]-a,r=0!==i?Math.min(1,Math.max(0,(s-a)/i)):s>=a?1:0;e.smooth&&(r=r*r*(3-2*r)),u+=(l[t][0]-u)*r,g+=(l[t][1]-g)*r,p+=(l[t][2]-p)*r,b+=(l[t][3]-b)*r}return[u,g,p,b]}function A(e,t){let a=e,s=a?.data?.layers;if(s&&"function"==typeof s.forEach){let e=t,a=[];return s.forEach(t=>{let s=t.data;if(!1===s.visible||!0===s.isMask)return;let i=R(s.alpha,1);if(!(i<=0))if("color"===s.type){let t,r=s.color;"string"==typeof r?t="function"==typeof e?.color?e.color(r):void 0:r&&"number"==typeof r.r&&(t=r),t&&a.push({kind:"color",layer:s,rgb:{...x(t.r,t.g,t.b),a:t.a??1},alpha:i})}else"gradient"===s.type&&a.push({kind:"gradient",layer:s,alpha:i})}),0===a.length?null:(e,t)=>{let s=1,i=1,r=1,n=!0;for(let h of a){let a,o,l,d;if("color"===h.kind)({r:a,g:o,b:l}=h.rgb),d=h.rgb.a;else{let[s,i,r,n]=v(h.layer,e,t);({r:a,g:o,b:l}=x(s,i,r)),d=n}let c=n?1:Math.min(1,Math.max(0,d*h.alpha));s+=(a-s)*c,i+=(o-i)*c,r+=(l-r)*c,n=!1}return{r:s,g:i,b:r}}}if(a?.color&&!0===a.color.isColor){let{r:e,g:t,b:s}=a.color;return()=>({r:e,g:t,b:s})}return null}var j=32,I=16384,W=32*I,H=100;function C(e,t){if("torus"===e){let e=t()*Math.PI*2,a=t()*Math.PI*2,s=Math.cos(e),i=Math.sin(e),r=Math.cos(a),n=Math.sin(a);return{x:(1.4+.7*r)*s,y:-(1.4+.7*r)*i,z:.7*n,nx:r*s,ny:-r*i,nz:n,cr:1,cg:1,cb:1}}if("cylinder"===e){let e=t()*Math.PI*2,a=Math.cos(e),s=Math.sin(e);return{x:.8*a,y:1.6*(t()-.5),z:.8*s,nx:a,ny:0,nz:s,cr:1,cg:1,cb:1}}let a=t()*Math.PI*2,s=2*t()-1,i=Math.acos(s),r=Math.sin(i)*Math.cos(a),n=Math.cos(i),h=Math.sin(i)*Math.sin(a);return{x:r,y:n,z:h,nx:r,ny:n,nz:h,cr:1,cg:1,cb:1}}function O(e){let{geometry:t,matrix:a}=e,s=t.getAttribute("position");if(!s||s.count<3)return null;let r=t.getAttribute("normal"),n=t.getAttribute("uv"),h=t.getAttribute("color"),o=t.getIndex(),l=o?o.count/3:s.count/3;if(l<1)return null;let d=(e,t)=>o?o.getX(3*e+t):3*e+t,c=a?a.elements:null,u=a?(new i).getNormalMatrix(a).elements:null,g=e=>{let t=s.getX(e),a=s.getY(e),i=s.getZ(e);return c?c[0]*t+c[4]*a+c[8]*i+c[12]:t},p=e=>{let t=s.getX(e),a=s.getY(e),i=s.getZ(e);return c?c[1]*t+c[5]*a+c[9]*i+c[13]:a},b=e=>{let t=s.getX(e),a=s.getY(e),i=s.getZ(e);return c?c[2]*t+c[6]*a+c[10]*i+c[14]:i},m=new Float64Array(l),S=0;for(let e=0;e<l;e++){let t=d(e,0),a=d(e,1),s=d(e,2),i=g(t),r=p(t),n=b(t),h=g(a)-i,o=p(a)-r,l=b(a)-n,c=g(s)-i,u=p(s)-r,f=b(s)-n,M=o*f-l*u,y=l*c-h*f,x=h*u-o*c;S+=.5*Math.sqrt(M*M+y*y+x*x),m[e]=S}return S<=0?null:{total:S,sample:(t,a)=>{let s=0,i=l-1;for(;s<i;){let e=s+i>>1;m[e]<t?s=e+1:i=e}let o=s,c=d(o,0),S=d(o,1),f=d(o,2),M=a(),y=a();M+y>1&&(M=1-M,y=1-y);let x,R,w,v=1-M-y,A=g(c)*v+g(S)*M+g(f)*y,j=p(c)*v+p(S)*M+p(f)*y,I=b(c)*v+b(S)*M+b(f)*y;if(r){if(x=r.getX(c)*v+r.getX(S)*M+r.getX(f)*y,R=r.getY(c)*v+r.getY(S)*M+r.getY(f)*y,w=r.getZ(c)*v+r.getZ(S)*M+r.getZ(f)*y,u){let e=u[0]*x+u[3]*R+u[6]*w,t=u[1]*x+u[4]*R+u[7]*w,a=u[2]*x+u[5]*R+u[8]*w;x=e,R=t,w=a}}else{let e=g(c),t=p(c),a=b(c),s=g(S)-e,i=p(S)-t,r=b(S)-a,n=g(f)-e,h=p(f)-t,o=b(f)-a;x=i*o-r*h,R=r*n-s*o,w=s*h-i*n}let W=Math.sqrt(x*x+R*R+w*w)||1,H=1,C=1,O=1;if(h)H=h.getX(c)*v+h.getX(S)*M+h.getX(f)*y,C=h.getY(c)*v+h.getY(S)*M+h.getY(f)*y,O=h.getZ(c)*v+h.getZ(S)*M+h.getZ(f)*y;else if(e.sampleColor){let t=n?n.getX(c)*v+n.getX(S)*M+n.getX(f)*y:.5,a=n?n.getY(c)*v+n.getY(S)*M+n.getY(f)*y:.5,s=e.sampleColor(t,a);s&&(H=s.r,C=s.g,O=s.b)}return{x:A,y:j,z:I,nx:x/W,ny:R/W,nz:w/W,cr:H,cg:C,cb:O}}}}function F(e){let t=Math.min(Math.max(1,Math.floor(e.guideStrands)),I),a=function(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}(e.seed??1337),s="object"===e.shape&&e.sampler,i=s?e.samplerRadius??H:H,r=new Float32Array(4*W),n=new Float32Array(W),h=new Float32Array(4*I).fill(1);for(let o=0;o<t;o++){let t=s?e.sampler(a):C(e.shape,a),l=s?t.x:t.x*i,d=s?t.y:t.y*i,c=s?t.z:t.z*i,{nx:u,ny:g,nz:p}=t;h[4*o+0]=t.cr,h[4*o+1]=t.cg,h[4*o+2]=t.cb;let b,m,S,f=32*o,M=(1.8+.8*a())*e.hairLength*i/31,y=.5+1.5*a(),x=(.02+.06*a())*i;Math.abs(g)<.99?(b=-p,m=0,S=u):(b=1,m=0,S=0);let R=Math.sqrt(b*b+m*m+S*S)||1;for(let e=0;e<32;e++){let t=e/31,a=t*t*.4*i,s=x*Math.sin(t*y*Math.PI*2),h=4*(f+e);r[h+0]=l+u*M*e+s*b/R,r[h+1]=d+g*M*e-a+s*m/R,r[h+2]=c+p*M*e+s*S/R,r[h+3]=0===e?0:1,e<31&&(n[f+e]=M)}}return{initialPositions:r,restLengths:n,unitScale:i,rootColors:h}}var k=1/60,z=4,P=new h,G=new t,L=new a,X=new a,B=class extends e{constructor(e,t,a){super(e,t),this.type="HairSystem",this.isHairSystem=!0,this.simRunning=!1,this.previewRequested=!1,this.playModeActive=!1,this.pendingSimSeconds=0,this.simTime=0,this.resetRequested=!0,this.generation=0,this.baseFoundAtRegen=!1,this.baseSourceGeomsAtRegen=[],this.baseSourceHashesAtRegen=[],this.baseColorHashAtRegen=0,this.baseScaleAtRegen=0,this.classicFallbackWarned=!1,this.regenSnapshot=null,this.context=a,this.data=t,this.geometry.setAttribute("position",new c(new Float32Array(0),3)),this.material=new u({colorWrite:!1,depthWrite:!1}),this.frustumCulled=!1,this.scalpMesh=new g(new l(H,48,32),new u({color:5448477})),this.scalpMesh.name="HairScalp",this.add(this.scalpMesh);let s=new r;s.setAttribute("position",new c(new Float32Array(12),3)),s.setIndex([0,2,1,2,3,1]),s.instanceCount=0,this.ribbonMesh=new g(s,new u({visible:!1})),this.ribbonMesh.name="HairRibbons",this.ribbonMesh.frustumCulled=!1,this.ribbonMesh.visible=!1,this.ribbonMesh.matrixAutoUpdate=!1,this.ribbonMesh.updateMatrixWorld=()=>{this.ribbonMesh.matrixWorld.identity()},this.ribbonMesh.updateWorldMatrix=()=>{this.ribbonMesh.matrixWorld.identity()},this.add(this.ribbonMesh),this.activeGuideStrands=t.guideStrands,this.roots=this.buildRoots(),this.regenSnapshot={guideStrands:t.guideStrands,hairLength:t.hairLength,spreadRadius:t.spreadRadius,headShape:t.headShape,baseObjectId:t.baseObjectId},this.applyScalpState(),this.applyShadowState(),this.syncSimRunning()}update(e){!this.simRunning||(this.pendingSimSeconds=Math.min(this.pendingSimSeconds+e/1e3,4*k*2))}get isSimulating(){return(this.simRunning||this.resetRequested)&&this.visible}startPreview(){this.previewRequested=!0,this.syncSimRunning()}stopPreview(){this.previewRequested=!1,this.syncSimRunning()}setPlayMode(e){this.playModeActive=e,e&&this.resetSimulation(),this.syncSimRunning()}resetSimulation(){this.resetRequested=!0,this.pendingSimSeconds=0,this.simTime=0}warnClassicFallbackOnce(){this.classicFallbackWarned||(this.classicFallbackWarned=!0,console.warn("[spline] Hair System strands require the WebGPU renderer — the WebGL fallback shows only the scalp. Reload with ?renderer=webgpu in a WebGPU-capable browser."))}syncSimRunning(){this.simRunning=this.playModeActive||this.previewRequested||this.data.autoPlay}updateState(e,t){super.updateState(e,t),this.updateHairState(e)}updateHairState(e){if((void 0!==e.guideStrands||void 0!==e.hairLength||void 0!==e.spreadRadius||void 0!==e.headShape||void 0!==e.baseObjectId)&&this.regenerate(),(void 0!==e.headShape||void 0!==e.baseObjectId)&&this.applyScalpState(),void 0!==e.headColor){let t=this.scalpMesh.material;!0===t.isMeshBasicMaterial&&t.color.setRGB(e.headColor.r,e.headColor.g,e.headColor.b,n)}(void 0!==e.castShadow||void 0!==e.receiveShadow)&&this.applyShadowState(),void 0!==e.autoPlay&&this.syncSimRunning()}applyShadowState(){let e=this.data.castShadow??!0,t=this.data.receiveShadow??!0;this.scalpMesh.castShadow=e,this.scalpMesh.receiveShadow=t,this.ribbonMesh.castShadow=e,this.ribbonMesh.receiveShadow=t}regenerate(){this.activeGuideStrands=Math.max(1,Math.min(Math.floor(this.data.guideStrands),16384)),this.roots=this.buildRoots(),this.generation++,this.regenSnapshot={guideStrands:this.data.guideStrands,hairLength:this.data.hairLength,spreadRadius:this.data.spreadRadius,headShape:this.data.headShape,baseObjectId:this.data.baseObjectId},this.resetSimulation()}checkDataDrift(){let e=this.data,t=this.regenSnapshot;if(null===t||t.guideStrands!==e.guideStrands||t.hairLength!==e.hairLength||t.spreadRadius!==e.spreadRadius||t.headShape!==e.headShape||t.baseObjectId!==e.baseObjectId){let a=null===t||t.headShape!==e.headShape||t.baseObjectId!==e.baseObjectId;this.regenerate(),a&&this.applyScalpState()}this.syncSimRunning(),this.applyShadowState(),this.checkBaseDrift()}buildRoots(){let{headShape:e,baseObjectId:t,guideStrands:a,hairLength:s}=this.data;if(this.baseFoundAtRegen=!1,this.baseSourceGeomsAtRegen=[],this.baseSourceHashesAtRegen=[],this.baseColorHashAtRegen=0,this.baseScaleAtRegen=0,"object"===e&&t){let e=this.context.scene.find(t);if(e){this.baseFoundAtRegen=!0,e.updateWorldMatrix(!0,!0);let t=this.collectBaseSources(e),i=t?function(e){let t=[];for(let a of e){let e=O(a);e&&t.push(e)}if(0===t.length)return null;let a=new Float64Array(t.length),s=0;for(let e=0;e<t.length;e++)s+=t[e].total,a[e]=s;return s<=0?null:e=>{let i=e()*s,r=0,n=t.length-1;for(;r<n;){let e=r+n>>1;a[e]<i?r=e+1:n=e}let h=0===r?i:i-a[r-1];return t[r].sample(h,e)}}(t.sources):null;if(this.baseSourceGeomsAtRegen=t?.sources.map(e=>e.geometry)??[],this.baseSourceHashesAtRegen=t?.hashes??[],this.baseColorHashAtRegen=t?.colorHash??0,t&&i){let r=this.baseWorldScale(e),n=Math.max(t.radius*r,.001);this.baseScaleAtRegen=r;let h=r;return F({shape:"object",guideStrands:a,hairLength:s,sampler:e=>{let t=i(e);return{...t,x:t.x*h,y:t.y*h,z:t.z*h}},samplerRadius:n})}}}return F({shape:"object"===e?"sphere":e,guideStrands:a,hairLength:s})}collectBaseSources(e){let t=[],a=[],s=0,i=0;P.copy(e.matrixWorld).invert();let r=P.clone(),n=o=>{if(!0===o.isHairSystem||o!==e&&!1===o.visible)return;let l=o.geometry;if(!0===o.isMesh&&l&&(l.getAttribute("position")?.count??0)>=3){let n=o===e?void 0:(new h).multiplyMatrices(r,o.matrixWorld),d=Array.isArray(o.material)?o.material[0]:o.material;t.push({geometry:l,matrix:n,sampleColor:A(d,this.context.shared)??void 0}),a.push(B.matrixHash(n)),i+=function(e,t){let a=e,s=0,i=1,r=e=>{s+=e*i,i+=1},n=a?.data?.layers;if(n&&"function"==typeof n.forEach){let e=t;n.forEach(t=>{let a=t.data;if(!1!==a.visible)if("color"===a.type){let t=a.color,s="string"==typeof t?"function"==typeof e?.color?e.color(t):void 0:t;s&&"number"==typeof s.r&&(r(s.r),r(s.g),r(s.b)),r(R(a.alpha,1))}else if("gradient"===a.type){let e=a;for(let t of e.colors??[])r(t[0]),r(t[1]),r(t[2]),r(t[3]);for(let t of e.steps??[])r(t);r(R(e.angle,0)),r(e.gradientType),r(e.smooth?1:0)}})}else a?.color&&!0===a.color.isColor&&(r(a.color.r),r(a.color.g),r(a.color.b));return s}(d,this.context.shared),null===l.boundingSphere&&l.computeBoundingSphere();let c=l.boundingSphere;if(c){let e=0,t=1;n?(L.copy(c.center).applyMatrix4(n),e=L.length(),t=B.matrixMaxScale(n)):e=c.center.length(),s=Math.max(s,e+c.radius*t)}}for(let e of o.children)n(e)};return n(e),0===t.length?null:{sources:t,hashes:a,radius:Math.max(s,.001),colorHash:i}}static matrixHash(e){if(!e)return 0;let t=e.elements,a=0;for(let e=0;e<16;e++)a+=t[e]*(e+1);return a}static matrixMaxScale(e){let t=e.elements,a=Math.hypot(t[0],t[1],t[2]),s=Math.hypot(t[4],t[5],t[6]),i=Math.hypot(t[8],t[9],t[10]);return Math.max(a,s,i,1e-6)}baseWorldScale(e){return P.copy(e.matrixWorld).decompose(L,G,X),Math.max(Math.abs(X.x),Math.abs(X.y),Math.abs(X.z),1e-6)}get widthWorldScale(){return"object"===this.data.headShape&&this.data.baseObjectId&&this.baseScaleAtRegen>0?this.baseScaleAtRegen:1}checkBaseDrift(){if("object"!==this.data.headShape||!this.data.baseObjectId)return;let e=this.context.scene.find(this.data.baseObjectId);if(!e)return;if(!this.baseFoundAtRegen)return void this.regenerate();e.updateWorldMatrix(!0,!0);let t=this.collectBaseSources(e),a=t?.sources??[],s=t?.hashes??[],i=this.baseSourceGeomsAtRegen,r=this.baseSourceHashesAtRegen,n=a.length!==i.length;if(!n)for(let e=0;e<a.length;e++)if(a[e].geometry!==i[e]||Math.abs(s[e]-r[e])>1e-4*Math.max(Math.abs(r[e]),1)){n=!0;break}if(!n&&"object"===this.data.hairColorSource&&(t?.colorHash??0)!==this.baseColorHashAtRegen&&(n=!0),!n&&a.length>0){let t=this.baseWorldScale(e);n=Math.abs(t-this.baseScaleAtRegen)>.001*Math.max(this.baseScaleAtRegen,1e-6)}n&&this.regenerate()}applyScalpState(){let e=this.data.headShape,t="object"===e&&null!==this.data.baseObjectId;this.scalpMesh.visible=!t,!t&&(this.scalpMesh.geometry.dispose(),this.scalpMesh.geometry="torus"===e?new d(140,70,24,48):"cylinder"===e?new s(80,80,160,48,1):new l(H,48,32))}boneTransform(e,t){let a=this.matrixWorld;if("object"===this.data.headShape&&this.data.baseObjectId){let e=this.context.scene.find(this.data.baseObjectId)?.matrixWorld;e&&(a=e)}P.copy(a).decompose(t,e,X)}raycast(e,t){if(!this.scalpMesh.visible)return;let a=[];this.scalpMesh.raycast(e,a);for(let e of a)e.object=this,t.push(e)}get shadowBoundsRadius(){return this.roots.unitScale*(1.5+2.6*Math.max(this.data.hairLength,0))}updateEntityBoxSize(e,t){let a=this.shadowBoundsRadius;e.set(0,0,0),t.set(a,a,a)}dispose(){super.dispose(),this.scalpMesh.geometry.dispose(),this.scalpMesh.material.dispose(),this.ribbonMesh.geometry.dispose(),this.ribbonMesh.material.dispose?.(),M()?.release(this)}};export{b as a,m as b,f as c,M as d,j as e,I as f,W as g,H as h,k as i,z as j,B as k};
|
|
1
|
+
import{v as e}from"./runtime-chunk-ZLW3UWOA.js";import{Ec as t,Fc as a,Fd as s,Gc as i,Ge as r,Ib as n,Oc as h,Tc as o,Wd as l,Xd as d,Zc as c,kd as u,ld as g}from"./runtime-chunk-VGN7YHB7.js";var p=null;function b(e){p=e}function m(){return p}var S=null;function f(e){S=e}function M(){return S}var y=new o;function x(e,t,a){return y.setRGB(e,t,a,n),{r:y.r,g:y.g,b:y.b}}var R=(e,t)=>"number"==typeof e&&Number.isFinite(e)?e:t,w=e=>Array.isArray(e)&&"number"==typeof e[0]&&"number"==typeof e[1]?[e[0],e[1]]:[0,0];function v(e,t,a){let s,i=R(e.angle,0),[r,n]=w(e.offset),[h,o]=w(e.morph),l=e.colors??[],d=e.steps??[],c=Math.min(10,l.length,d.length);if(0===c)return[1,1,1,1];if(1===e.gradientType){let e=3*(t+h)-(t+r)-1,l=3*(a+o)-(a+n)-1;s=Math.hypot(e,l)+i}else if(2===e.gradientType){let e=-1*Math.atan2(t+h-.5+r,a+o-.5+n),l=i/Math.PI/-2+.5*e/Math.PI;s=l-Math.floor(l)}else{let e=.5+h/(0!==t?t:1e-6),l=o/(0!==a?a:1e-6),d=Math.cos(i)*e-Math.sin(i)*l,c=Math.sin(i)*e+Math.cos(i)*l,u=d*d+c*c;s=u>1e-12?(((t-.5+r)/2+d/2)*d+((a-.5+n)/2+c/2)*c)/u:0}let u=l[0][0],g=l[0][1],p=l[0][2],b=l[0][3];for(let t=1;t<c;t++){let a=d[t-1],i=d[t]-a,r=0!==i?Math.min(1,Math.max(0,(s-a)/i)):s>=a?1:0;e.smooth&&(r=r*r*(3-2*r)),u+=(l[t][0]-u)*r,g+=(l[t][1]-g)*r,p+=(l[t][2]-p)*r,b+=(l[t][3]-b)*r}return[u,g,p,b]}function A(e,t){let a=e,s=a?.data?.layers;if(s&&"function"==typeof s.forEach){let e=t,a=[];return s.forEach(t=>{let s=t.data;if(!1===s.visible||!0===s.isMask)return;let i=R(s.alpha,1);if(!(i<=0))if("color"===s.type){let t,r=s.color;"string"==typeof r?t="function"==typeof e?.color?e.color(r):void 0:r&&"number"==typeof r.r&&(t=r),t&&a.push({kind:"color",layer:s,rgb:{...x(t.r,t.g,t.b),a:t.a??1},alpha:i})}else"gradient"===s.type&&a.push({kind:"gradient",layer:s,alpha:i})}),0===a.length?null:(e,t)=>{let s=1,i=1,r=1,n=!0;for(let h of a){let a,o,l,d;if("color"===h.kind)({r:a,g:o,b:l}=h.rgb),d=h.rgb.a;else{let[s,i,r,n]=v(h.layer,e,t);({r:a,g:o,b:l}=x(s,i,r)),d=n}let c=n?1:Math.min(1,Math.max(0,d*h.alpha));s+=(a-s)*c,i+=(o-i)*c,r+=(l-r)*c,n=!1}return{r:s,g:i,b:r}}}if(a?.color&&!0===a.color.isColor){let{r:e,g:t,b:s}=a.color;return()=>({r:e,g:t,b:s})}return null}var j=32,I=16384,W=32*I,H=100;function O(e,t){if("torus"===e){let e=t()*Math.PI*2,a=t()*Math.PI*2,s=Math.cos(e),i=Math.sin(e),r=Math.cos(a),n=Math.sin(a);return{x:(1.4+.7*r)*s,y:-(1.4+.7*r)*i,z:.7*n,nx:r*s,ny:-r*i,nz:n,cr:1,cg:1,cb:1}}if("cylinder"===e){let e=t()*Math.PI*2,a=Math.cos(e),s=Math.sin(e);return{x:.8*a,y:1.6*(t()-.5),z:.8*s,nx:a,ny:0,nz:s,cr:1,cg:1,cb:1}}let a=t()*Math.PI*2,s=2*t()-1,i=Math.acos(s),r=Math.sin(i)*Math.cos(a),n=Math.cos(i),h=Math.sin(i)*Math.sin(a);return{x:r,y:n,z:h,nx:r,ny:n,nz:h,cr:1,cg:1,cb:1}}function C(e){let{geometry:t,matrix:a}=e,s=t.getAttribute("position");if(!s||s.count<3)return null;let r=t.getAttribute("normal"),n=t.getAttribute("uv"),h=t.getAttribute("color"),o=t.getIndex(),l=o?o.count/3:s.count/3;if(l<1)return null;let d=(e,t)=>o?o.getX(3*e+t):3*e+t,c=a?a.elements:null,u=a?(new i).getNormalMatrix(a).elements:null,g=e=>{let t=s.getX(e),a=s.getY(e),i=s.getZ(e);return c?c[0]*t+c[4]*a+c[8]*i+c[12]:t},p=e=>{let t=s.getX(e),a=s.getY(e),i=s.getZ(e);return c?c[1]*t+c[5]*a+c[9]*i+c[13]:a},b=e=>{let t=s.getX(e),a=s.getY(e),i=s.getZ(e);return c?c[2]*t+c[6]*a+c[10]*i+c[14]:i},m=new Float64Array(l),S=0;for(let e=0;e<l;e++){let t=d(e,0),a=d(e,1),s=d(e,2),i=g(t),r=p(t),n=b(t),h=g(a)-i,o=p(a)-r,l=b(a)-n,c=g(s)-i,u=p(s)-r,f=b(s)-n,M=o*f-l*u,y=l*c-h*f,x=h*u-o*c;S+=.5*Math.sqrt(M*M+y*y+x*x),m[e]=S}return S<=0?null:{total:S,sample:(t,a)=>{let s=0,i=l-1;for(;s<i;){let e=s+i>>1;m[e]<t?s=e+1:i=e}let o=s,c=d(o,0),S=d(o,1),f=d(o,2),M=a(),y=a();M+y>1&&(M=1-M,y=1-y);let x,R,w,v=1-M-y,A=g(c)*v+g(S)*M+g(f)*y,j=p(c)*v+p(S)*M+p(f)*y,I=b(c)*v+b(S)*M+b(f)*y;if(r){if(x=r.getX(c)*v+r.getX(S)*M+r.getX(f)*y,R=r.getY(c)*v+r.getY(S)*M+r.getY(f)*y,w=r.getZ(c)*v+r.getZ(S)*M+r.getZ(f)*y,u){let e=u[0]*x+u[3]*R+u[6]*w,t=u[1]*x+u[4]*R+u[7]*w,a=u[2]*x+u[5]*R+u[8]*w;x=e,R=t,w=a}}else{let e=g(c),t=p(c),a=b(c),s=g(S)-e,i=p(S)-t,r=b(S)-a,n=g(f)-e,h=p(f)-t,o=b(f)-a;x=i*o-r*h,R=r*n-s*o,w=s*h-i*n}let W=Math.sqrt(x*x+R*R+w*w)||1,H=1,O=1,C=1;if(h)H=h.getX(c)*v+h.getX(S)*M+h.getX(f)*y,O=h.getY(c)*v+h.getY(S)*M+h.getY(f)*y,C=h.getZ(c)*v+h.getZ(S)*M+h.getZ(f)*y;else if(e.sampleColor){let t=n?n.getX(c)*v+n.getX(S)*M+n.getX(f)*y:.5,a=n?n.getY(c)*v+n.getY(S)*M+n.getY(f)*y:.5,s=e.sampleColor(t,a);s&&(H=s.r,O=s.g,C=s.b)}return{x:A,y:j,z:I,nx:x/W,ny:R/W,nz:w/W,cr:H,cg:O,cb:C}}}}function F(e){let t=Math.min(Math.max(1,Math.floor(e.guideStrands)),I),a=function(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}(e.seed??1337),s="object"===e.shape&&e.sampler,i=s?e.samplerRadius??H:H,r=new Float32Array(4*W),n=new Float32Array(W),h=new Float32Array(4*I).fill(1);for(let o=0;o<t;o++){let t=s?e.sampler(a):O(e.shape,a),l=s?t.x:t.x*i,d=s?t.y:t.y*i,c=s?t.z:t.z*i,{nx:u,ny:g,nz:p}=t;h[4*o+0]=t.cr,h[4*o+1]=t.cg,h[4*o+2]=t.cb;let b,m,S,f=32*o,M=(1.8+.8*a())*e.hairLength*i/31,y=.5+1.5*a(),x=(.02+.06*a())*i;Math.abs(g)<.99?(b=-p,m=0,S=u):(b=1,m=0,S=0);let R=Math.sqrt(b*b+m*m+S*S)||1;for(let e=0;e<32;e++){let t=e/31,a=t*t*.4*i,s=x*Math.sin(t*y*Math.PI*2),h=4*(f+e);r[h+0]=l+u*M*e+s*b/R,r[h+1]=d+g*M*e-a+s*m/R,r[h+2]=c+p*M*e+s*S/R,r[h+3]=0===e?0:1,e<31&&(n[f+e]=M)}}return{initialPositions:r,restLengths:n,unitScale:i,rootColors:h}}var k=1/60,z=4,L=new h,P=new t,G=new a,X=new a,B=class extends e{constructor(e,t,a){super(e,t),this.type="HairSystem",this.isHairSystem=!0,this.simRunning=!1,this.previewRequested=!1,this.playModeActive=!1,this.pendingSimSeconds=0,this.simTime=0,this.resetRequested=!0,this.generation=0,this.baseFoundAtRegen=!1,this.baseSourceGeomsAtRegen=[],this.baseSourceHashesAtRegen=[],this.baseColorHashAtRegen=0,this.baseScaleAtRegen=0,this.classicFallbackWarned=!1,this.regenSnapshot=null,this.context=a,this.data=t,this.geometry.setAttribute("position",new c(new Float32Array(0),3)),this.material=new u({colorWrite:!1,depthWrite:!1}),this.frustumCulled=!1,this.scalpMesh=new g(new l(H,48,32),new u({color:5448477})),this.scalpMesh.name="HairScalp",this.add(this.scalpMesh);let s=new r;s.setAttribute("position",new c(new Float32Array(12),3)),s.setIndex([0,2,1,2,3,1]),s.instanceCount=0,this.ribbonMesh=new g(s,new u({visible:!1})),this.ribbonMesh.name="HairRibbons",this.ribbonMesh.frustumCulled=!1,this.ribbonMesh.visible=!1,this.ribbonMesh.matrixAutoUpdate=!1,this.ribbonMesh.updateMatrixWorld=()=>{this.ribbonMesh.matrixWorld.identity()},this.ribbonMesh.updateWorldMatrix=()=>{this.ribbonMesh.matrixWorld.identity()},this.add(this.ribbonMesh),this.activeGuideStrands=t.guideStrands,this.roots=this.buildRoots(),this.regenSnapshot={guideStrands:t.guideStrands,hairLength:t.hairLength,spreadRadius:t.spreadRadius,headShape:t.headShape,baseObjectId:t.baseObjectId},this.applyScalpState(),this.applyShadowState(),this.syncSimRunning()}update(e){!this.simRunning||(this.pendingSimSeconds=Math.min(this.pendingSimSeconds+e/1e3,4*k*2))}get isSimulating(){return(this.simRunning||this.resetRequested)&&this.visible}startPreview(){this.previewRequested=!0,this.syncSimRunning()}stopPreview(){this.previewRequested=!1,this.syncSimRunning()}setPlayMode(e){this.playModeActive=e,e&&this.resetSimulation(),this.syncSimRunning()}resetSimulation(){this.resetRequested=!0,this.pendingSimSeconds=0,this.simTime=0}warnClassicFallbackOnce(){this.classicFallbackWarned||(this.classicFallbackWarned=!0,console.warn("[spline] Hair System strands require the WebGPU renderer — the WebGL fallback shows only the scalp. Reload with ?renderer=webgpu in a WebGPU-capable browser."))}syncSimRunning(){this.simRunning=this.playModeActive||this.previewRequested||this.data.autoPlay}updateState(e,t){super.updateState(e,t),this.updateHairState(e)}updateHairState(e){if((void 0!==e.guideStrands||void 0!==e.hairLength||void 0!==e.spreadRadius||void 0!==e.headShape||void 0!==e.baseObjectId)&&this.regenerate(),(void 0!==e.headShape||void 0!==e.baseObjectId)&&this.applyScalpState(),void 0!==e.headColor){let t=this.scalpMesh.material;!0===t.isMeshBasicMaterial&&t.color.setRGB(e.headColor.r,e.headColor.g,e.headColor.b,n)}(void 0!==e.castShadow||void 0!==e.receiveShadow)&&this.applyShadowState(),void 0!==e.autoPlay&&this.syncSimRunning()}applyShadowState(){let e=this.data.castShadow??!0,t=this.data.receiveShadow??!0;this.scalpMesh.castShadow=e,this.scalpMesh.receiveShadow=t,this.ribbonMesh.castShadow=e,this.ribbonMesh.receiveShadow=t}regenerate(){this.activeGuideStrands=Math.max(1,Math.min(Math.floor(this.data.guideStrands),16384)),this.roots=this.buildRoots(),this.generation++,this.regenSnapshot={guideStrands:this.data.guideStrands,hairLength:this.data.hairLength,spreadRadius:this.data.spreadRadius,headShape:this.data.headShape,baseObjectId:this.data.baseObjectId},this.resetSimulation()}checkDataDrift(){let e=this.data,t=this.regenSnapshot;if(null===t||t.guideStrands!==e.guideStrands||t.hairLength!==e.hairLength||t.spreadRadius!==e.spreadRadius||t.headShape!==e.headShape||t.baseObjectId!==e.baseObjectId){let a=null===t||t.headShape!==e.headShape||t.baseObjectId!==e.baseObjectId;this.regenerate(),a&&this.applyScalpState()}this.syncSimRunning(),this.applyShadowState(),this.checkBaseDrift()}buildRoots(){let{headShape:e,baseObjectId:t,guideStrands:a,hairLength:s}=this.data;if(this.baseFoundAtRegen=!1,this.baseSourceGeomsAtRegen=[],this.baseSourceHashesAtRegen=[],this.baseColorHashAtRegen=0,this.baseScaleAtRegen=0,"object"===e&&t){let e=this.context.scene.find(t);if(e){this.baseFoundAtRegen=!0,e.updateWorldMatrix(!0,!0);let t=this.collectBaseSources(e),i=t?function(e){let t=[];for(let a of e){let e=C(a);e&&t.push(e)}if(0===t.length)return null;let a=new Float64Array(t.length),s=0;for(let e=0;e<t.length;e++)s+=t[e].total,a[e]=s;return s<=0?null:e=>{let i=e()*s,r=0,n=t.length-1;for(;r<n;){let e=r+n>>1;a[e]<i?r=e+1:n=e}let h=0===r?i:i-a[r-1];return t[r].sample(h,e)}}(t.sources):null;if(this.baseSourceGeomsAtRegen=t?.sources.map(e=>e.geometry)??[],this.baseSourceHashesAtRegen=t?.hashes??[],this.baseColorHashAtRegen=t?.colorHash??0,t&&i){let r=this.baseWorldScale(e),n=Math.max(t.radius*r,.001);this.baseScaleAtRegen=r;let h=r;return F({shape:"object",guideStrands:a,hairLength:s,sampler:e=>{let t=i(e);return{...t,x:t.x*h,y:t.y*h,z:t.z*h}},samplerRadius:n})}}}return F({shape:"object"===e?"sphere":e,guideStrands:a,hairLength:s})}collectBaseSources(e){let t=[],a=[],s=0,i=0;L.copy(e.matrixWorld).invert();let r=L.clone(),n=o=>{if(!0===o.isHairSystem||o!==e&&!1===o.visible)return;let l=o.geometry;if(!0===o.isMesh&&l&&(l.getAttribute("position")?.count??0)>=3){let n=o===e?void 0:(new h).multiplyMatrices(r,o.matrixWorld),d=Array.isArray(o.material)?o.material[0]:o.material;t.push({geometry:l,matrix:n,sampleColor:A(d,this.context.shared)??void 0}),a.push(B.matrixHash(n)),i+=function(e,t){let a=e,s=0,i=1,r=e=>{s+=e*i,i+=1},n=a?.data?.layers;if(n&&"function"==typeof n.forEach){let e=t;n.forEach(t=>{let a=t.data;if(!1!==a.visible)if("color"===a.type){let t=a.color,s="string"==typeof t?"function"==typeof e?.color?e.color(t):void 0:t;s&&"number"==typeof s.r&&(r(s.r),r(s.g),r(s.b)),r(R(a.alpha,1))}else if("gradient"===a.type){let e=a;for(let t of e.colors??[])r(t[0]),r(t[1]),r(t[2]),r(t[3]);for(let t of e.steps??[])r(t);r(R(e.angle,0)),r(e.gradientType),r(e.smooth?1:0)}})}else a?.color&&!0===a.color.isColor&&(r(a.color.r),r(a.color.g),r(a.color.b));return s}(d,this.context.shared),null===l.boundingSphere&&l.computeBoundingSphere();let c=l.boundingSphere;if(c){let e=0,t=1;n?(G.copy(c.center).applyMatrix4(n),e=G.length(),t=B.matrixMaxScale(n)):e=c.center.length(),s=Math.max(s,e+c.radius*t)}}for(let e of o.children)n(e)};return n(e),0===t.length?null:{sources:t,hashes:a,radius:Math.max(s,.001),colorHash:i}}static matrixHash(e){if(!e)return 0;let t=e.elements,a=0;for(let e=0;e<16;e++)a+=t[e]*(e+1);return a}static matrixMaxScale(e){let t=e.elements,a=Math.hypot(t[0],t[1],t[2]),s=Math.hypot(t[4],t[5],t[6]),i=Math.hypot(t[8],t[9],t[10]);return Math.max(a,s,i,1e-6)}baseWorldScale(e){return L.copy(e.matrixWorld).decompose(G,P,X),Math.max(Math.abs(X.x),Math.abs(X.y),Math.abs(X.z),1e-6)}get widthWorldScale(){return"object"===this.data.headShape&&this.data.baseObjectId&&this.baseScaleAtRegen>0?this.baseScaleAtRegen:1}checkBaseDrift(){if("object"!==this.data.headShape||!this.data.baseObjectId)return;let e=this.context.scene.find(this.data.baseObjectId);if(!e)return;if(!this.baseFoundAtRegen)return void this.regenerate();e.updateWorldMatrix(!0,!0);let t=this.collectBaseSources(e),a=t?.sources??[],s=t?.hashes??[],i=this.baseSourceGeomsAtRegen,r=this.baseSourceHashesAtRegen,n=a.length!==i.length;if(!n)for(let e=0;e<a.length;e++)if(a[e].geometry!==i[e]||Math.abs(s[e]-r[e])>1e-4*Math.max(Math.abs(r[e]),1)){n=!0;break}if(!n&&"object"===this.data.hairColorSource&&(t?.colorHash??0)!==this.baseColorHashAtRegen&&(n=!0),!n&&a.length>0){let t=this.baseWorldScale(e);n=Math.abs(t-this.baseScaleAtRegen)>.001*Math.max(this.baseScaleAtRegen,1e-6)}n&&this.regenerate()}applyScalpState(){let e=this.data.headShape,t="object"===e&&null!==this.data.baseObjectId;this.scalpMesh.visible=!t,!t&&(this.scalpMesh.geometry.dispose(),this.scalpMesh.geometry="torus"===e?new d(140,70,24,48):"cylinder"===e?new s(80,80,160,48,1):new l(H,48,32))}boneTransform(e,t){let a=this.matrixWorld;if("object"===this.data.headShape&&this.data.baseObjectId){let e=this.context.scene.find(this.data.baseObjectId)?.matrixWorld;e&&(a=e)}L.copy(a).decompose(t,e,X)}raycast(e,t){if(!this.scalpMesh.visible)return;let a=[];this.scalpMesh.raycast(e,a);for(let e of a)e.object=this,t.push(e)}get shadowBoundsRadius(){return this.roots.unitScale*(1.5+2.6*Math.max(this.data.hairLength,0))}updateEntityBoxSize(e,t){let a=this.shadowBoundsRadius;e.set(0,0,0),t.set(a,a,a)}dispose(){super.dispose(),this.scalpMesh.geometry.dispose(),this.scalpMesh.material.dispose(),this.ribbonMesh.geometry.dispose(),this.ribbonMesh.material.dispose?.(),M()?.release(this)}};export{b as a,m as b,f as c,M as d,j as e,I as f,W as g,H as h,k as i,z as j,B as k};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./runtime-chunk-TU4KDRKR.js";import{W as o}from"./runtime-chunk-
|
|
1
|
+
import{a as e}from"./runtime-chunk-TU4KDRKR.js";import{W as o}from"./runtime-chunk-NRJDJMQZ.js";import{Dc as n,Fc as t,Jc as r}from"./runtime-chunk-VGN7YHB7.js";var i={enabled:!1},s=new WeakMap;function a(e){if(!i.enabled)return e;let o=s.get(e);return o||(o={...e,bloom:{...e.bloom,kernelSize:0},depthOfField:{...e.depthOfField,enabled:!1}},s.set(e,o)),o}var c=new WeakSet;function l(e){if(!e.isPointLight&&!e.isSpotLight&&!e.isDirectionalLight)return!1;if(i.enabled){if(!0===e.castShadow)return e.castShadow=!1,c.add(e),!0}else if(c.has(e)&&(c.delete(e),!1===e.castShadow))return e.castShadow=!0,!0;return!1}function u(i,s){switch(i.type){case"cavity":return function(e,o){return{...h(e,o),ridge:e.ridge,valley:e.valley}}(i,s);case"dust":return function(n,t){return{...h(n,t),color:e(n.color,t),coverage:o(n.coverage,t)??.2,softness:o(n.softness,t)??.2,noiseStrength:o(n.noiseStrength,t)??.2,noiseScale:o(n.noiseScale,t)??1}}(i,s);case"fresnel":return function(o,n){let{bias:t,scale:r,intensity:i,factor:s,color:a}=o;return{...h(o,n),color:e(a,n),bias:t,scale:r,intensity:i,factor:s}}(i,s);case"gradient":return function(e,o){let{gradientType:t,smooth:i,colors:s,steps:a,angle:c,offset:l,morph:u}=e;return{...h(e,o),gradientType:t,smooth:i,colors:s.map(e=>new r(e[0],e[1],e[2],e[3])),num:s.length,steps:a,offset:new n(...l.map(e=>"number"==typeof e?e:0)),morph:new n(...u.map(e=>"number"==typeof e?e:0)),angle:c}}(i,s);case"depth":return function(e,o){let{gradientType:n,near:i,far:s,isVector:a,isWorldSpace:c,origin:l,direction:u,colors:f,steps:p,smooth:m}=e;return{...h(e,o),gradientType:n,near:i,far:s,isVector:a,isWorldSpace:c,origin:new t(...l),direction:u?new t(...u):new t(1,0,0),colors:f.map(e=>void 0!==e?new r(e[0],e[1],e[2],e[3]):new r(0,0,0,0)),steps:p.slice(0,f.length),smooth:m}}(i,s);case"normal":return function(e,o){let{cnormal:n}=e;return{...h(e,o),cnormal:new t(n[0],n[1],n[2])}}(i,s);case"noise":return function(o,r){return{...h(o,r),scale:o.scale,move:o.move,fA:new n(...o.fA.map(e=>"number"==typeof e?e:0)),fB:new n(...o.fB.map(e=>"number"==typeof e?e:0)),size:new t(...o.size),distortion:new n(...o.distortion.map(e=>"number"==typeof e?e:0)),colorA:e(o.colorA,r),colorB:e(o.colorB,r),colorC:e(o.colorC,r),colorD:e(o.colorD,r),noiseType:o.noiseType,voronoiStyle:o.voronoiStyle,highCut:o.highCut,lowCut:o.lowCut,smoothness:o.smoothness,seed:o.seed,quality:o.quality}}(i,s);case"rainbow":return function(e,o){return{...h(e,o),filmThickness:e.filmThickness,movement:e.movement,wavelengths:new t(...e.wavelengths),noiseStrength:e.noiseStrength,noiseScale:e.noiseScale,offset:new t(...e.offset)}}(i,s);case"toon":return function(o,n){return{...h(o,n),positioning:o.positioning,colors:o.colors.map(e=>new r(e[0],e[1],e[2],e[3])),num:o.colors.length,steps:o.steps,source:new t(...o.source),isWorldSpace:o.isWorldSpace,noiseStrength:o.noiseStrength,noiseScale:o.noiseScale,shadowColor:e(o.shadowColor,n),offset:new t(...o.offset)}}(i,s);case"outline":return function(o,n){return{...h(o,n),outlineColor:e(o.outlineColor,n),contourColor:e(o.contourColor,n),outlineWidth:o.outlineWidth,contourWidth:o.contourWidth,outlineThreshold:o.outlineThreshold,contourThreshold:o.contourThreshold,outlineSmoothing:o.outlineSmoothing,contourFrequency:o.contourFrequency,contourDirection:new t(...o.contourDirection),positionalLines:o.positionalLines,compensation:o.compensation}}(i,s);case"transmission":return function(o,n){return{...h(o,n),thickness:o.thickness,ior:o.ior,roughness:o.roughness,attenuationColor:void 0!==o.attenuationColor?e(o.attenuationColor,n):{r:1,g:1,b:1,a:1},attenuationDistance:o.attenuationDistance??0}}(i,s);case"reflection":return function(e,n){return{...h(e,n),blur:o(e.blur,n)??0,thickness:o(e.thickness,n)??.001,steps:o(e.steps,n)??60,stepSize:o(e.stepSize,n)??.005,tracingMode:e.tracingMode,mirror:e.mirror??0}}(i,s);case"pattern":return function(o,t){return{...h(o,t),style:o.style,projection:o.projection,axis:o.axis,blending:o.blending,offset:new n(...o.offset.map(e=>"number"==typeof e?e:0)),colorA:e(o.colorA,t),colorB:e(o.colorB,t),frequency:new n(...o.frequency.map(e=>"number"==typeof e?e:0)),size:o.size,variation:o.variation,smoothness:o.smoothness,zigzag:o.zigzag,rotation:o.rotation,vertical:new n(...o.vertical.map(e=>"number"==typeof e?e:0)),horizontal:new n(...o.horizontal.map(e=>"number"==typeof e?e:0)),sides:o.sides}}(i,s);case"vertexColor":return h(i,s);default:return function(o,n){return{...h(o,n),color:e(o.color,n)}}(i,s)}}function f(e){return{type:e.type}}function h(e,o){let{alpha:n,mode:t,isMask:r}=e,i="string"==typeof n?Number(o.getVariable(n)??100)/100:n;return{...f(e),alpha:i,mode:t,isMask:r}}export{i as a,a as b,l as c,u as d};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ea as e,g as t}from"./runtime-chunk-
|
|
1
|
+
import{ea as e,g as t}from"./runtime-chunk-NRJDJMQZ.js";import{Cc as r,Fc as a,Zc as o,bd as n}from"./runtime-chunk-VGN7YHB7.js";function i(r){if(Array.isArray(r.material)){for(let e of r.material)if(0===e.getLayersOfType("outline").length)return}else if(!t(r.material)||0===r.material.getLayersOfType("outline").length)return;r instanceof e&&r.is2DAndNoDepth?function(e){if(e.geometry.attributes.extrudeNormals||!e.geometry.attributes.position)return;let t=e.geometry.attributes.position.array,r=new Float32Array(t.length),o=new a;for(let e=0;e<t.length;e+=3)o.set(t[e],t[e+1],t[e+2]).normalize(),r[e]=o.x,r[e+1]=o.y,r[e+2]=o.z;e.geometry.setAttribute("extrudeNormal",new n(r,3))}(r):function(e){if(e.geometry.attributes.extrudeNormal||!e.geometry.attributes.position||!e.geometry.attributes.normal)return;let t=new Map,r=e.geometry.attributes,o=r.position.array,i=r.normal.array,l=new Float32Array(o.length);for(let e=0;e<o.length;e+=3){let r=`${o[e]}_${o[e+1]}_${o[e+2]}`,n=new a(i[e],i[e+1],i[e+2]);t.has(r)?t.get(r)?.normals.push(n):t.set(r,{normals:[n],result:new a})}t.forEach((e,t)=>{for(let t of e.normals)e.result.add(t);e.result.divideScalar(e.normals.length)});for(let e=0;e<o.length;e+=3){let r=`${o[e]}_${o[e+1]}_${o[e+2]}`,a=t.get(r)?.result;a&&(l[e]=a.x,l[e+1]=a.y,l[e+2]=a.z)}e.geometry.setAttribute("extrudeNormal",new n(l,3))}(r)}function l(e){return Math.min(2047,Math.max(1,Math.round(2048*e)))/2048}function s(e){if(!e.geometry.attributes.position)return;let t=e.geometry.attributes,a=t.position.array,n=t.randomColor;if(void 0!==n&&3*n.count===a.length)return;let i=new Float32Array(a.length),s=parseInt(e.uuid.replace(/\D/g,"")),u=[l(r.seededRandom(s)),l(r.seededRandom(s+1e4)),l(r.seededRandom(s+2e4))];for(let e=0;e<a.length;e++)i[e]=u[e%3];e.geometry.setAttribute("randomColor",new o(i,3))}export{i as a,s as b};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./runtime-chunk-
|
|
1
|
+
import{a as t}from"./runtime-chunk-6UQ4Z4JG.js";import{d as e}from"./runtime-chunk-D2IFC55F.js";import{Sc as s}from"./runtime-chunk-VGN7YHB7.js";var r=class extends(e(s,t)){constructor(t,e){super(),this.super_Entity(t,e),this.objectHelper.update(),"Empty"===this.data.type&&(this.objectHelper.visible=!1)}updateState(t,e){this.updateState_Entity(t,e),"buffer"in t&&1===Object.keys(t).length&&e.scene.reloadSplats()}};export{r as a};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,j as e,k as i}from"./runtime-chunk-
|
|
1
|
+
import{h as t,j as e,k as i}from"./runtime-chunk-U5ACSO5E.js";import{a as s}from"./runtime-chunk-R43XZP65.js";import{a}from"./runtime-chunk-W7THORYR.js";import{e as n}from"./runtime-chunk-MM75L5X4.js";import{e as r}from"./runtime-chunk-2PT2WH66.js";import{q as o}from"./runtime-chunk-OW6T4XFV.js";import{Bc as h}from"./runtime-chunk-VGN7YHB7.js";var d=class extends h{constructor(t,e,i,s,a){if(super(),this.eventType=t,this.data=e,this.page=i,this.shared=s,this.condition=a,this.toggleIsForward=!1,this.timelineNeedsRebuild=!1,this.hasPlayedOnce=!1,this.pauseOnNextLoopEnd=!1,this.onTimelineChangeComplete=()=>{if(this.pauseOnNextLoopEnd)return this.pauseOnNextLoopEnd=!1,void this.timeline?.pause();"normal"!==this.data.tweens[0].data.direction&&(this.toggleIsForward=!this.toggleIsForward),!1!==this.timelineNeedsRebuild&&(this.timeline?.pause(),this.buildTimeline({isForward:this.toggleIsForward,needsRebuild:!1,isRebuild:!0}),this.timeline.play())},!e.object)throw new Error("Missing property");let n=this.page.scene.find(e.object)??this.page.uiCanvas?.find(e.object)??this.page.scene.find2DInUIObjects(e.object);if(!n)throw new Error("Missing property");if(!n.states)throw new Error("Missing property");if(this.object=n,e.tweens.length<2)throw new Error("Missing property");this.tweens=Array(this.data.tweens.length-1),this.startOnceDelay="start-once"===e.tweens[0].data.delayDirection?e.tweens[0].data.delay:0,this.init()}get playing(){return!1===this.timeline?.paused}get changeBegan(){return this.tweens.some(t=>t.changeBegan)??!1}init(){this.initialCurrentState=e(this.object,this.object.currentState).id,this.toggleIsForward=!1}get currentState(){return"Toggle"===this.data.runMode&&o(this.eventType)?this.initialCurrentState:this.object.currentState}buildTimeline({isForward:e=!0,needsRebuild:n=!1,isRebuild:r=!1}={}){try{let o=t(this.data.tweens[0].data);r&&"number"==typeof o.loop&&o.loop--,this.timeline?.pause(),this.timeline=s.timeline({autoplay:!1,...o,...!0===o.loop||o.loop>1?{timelineChangeComplete:this.onTimelineChangeComplete}:{}});let h=this.tweens.findIndex(t=>t?.changeBegan);if(!0===n&&(this.timelineNeedsRebuild=!0),e){let t=-1===h?0:h;for(let e=t;e<this.data.tweens.length-1;e++){let s,n=this.data.tweens[e],r=this.data.tweens[e+1];e!==t||!0!==this.object.wasMovedByUser&&!0!==this.object.previousAction?.changeBegan?s=void 0===n.data.state?this.currentState:n.data.state:(s=void 0,this.object instanceof a&&(this.object.wasMovedByUser=!1));let d=new i(this.object,s,void 0===r.data.state?this.currentState:r.data.state,r.data,this.shared,this.data.allowSlerp??!1,this.page);-1!==h&&e===t&&Object.assign(d.params,{startOnceDelay:0}),this.tweens[e]=d,this.timeline.add(d.params,this.timeline.duration+(e===t?o.delay:0))}this.timeline.duration+=o.endDelay}else{let t=-1===h?this.data.tweens.length-1:h+1;for(let e=t;e>0;e--){let s,n=this.data.tweens[e],r=this.data.tweens[e-1];e!==t||!0!==this.object.wasMovedByUser&&!0!==this.object.previousAction?.changeBegan?s=void 0===n.data.state?this.currentState:n.data.state:(s=void 0,this.object instanceof a&&(this.object.wasMovedByUser=!1));let d=new i(this.object,s,void 0===r.data.state?this.currentState:r.data.state,n.data,this.shared,this.data.allowSlerp??!1,this.page);-1!==h&&e===t&&Object.assign(d.params,{startOnceDelay:0}),this.tweens[e-1]=d,this.timeline.add(d.params,this.timeline.duration+(e===t?o.endDelay:0))}this.timeline.duration+=o.delay}}catch(t){t instanceof Error&&console.error(t.message)}!0===this.object.previousAction?.playing&&this.object.previousAction.pause(),this.object.previousAction=this}play(){if(!1===n(this.shared,this.condition)||o(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce||(this.hasPlayedOnce=!0,this.playing))return!1;this.startTimeout?.pause();let e=t(this.data.tweens[0].data).pingPongDelayCorrection;this.startTimeout=s({targets:{},duration:this.startOnceDelay+e,easing:"linear",complete:()=>{this.startTimeout=void 0;try{this.buildTimeline(),this.timeline.play()}catch(t){t instanceof Error&&console.error(t.message)}}})}pause(){this.timeline?.pause(),this.startTimeout?.pause(),this.tweens=Array(this.data.tweens.length-1),delete this.startTimeout}stop(){this.pause();let t=void 0===this.data.tweens[0].data.state?this.initialCurrentState:this.data.tweens[0].data.state;r(this.object)?this.object.changeSelectedState(t,{shared:this.shared}):this.object.changeSelectedState(t,{scene:this.page.scene,shared:this.shared}),this.object.currentState=t}seek(t){if(!1===n(this.shared,this.condition))return!1;void 0===this.timeline&&this.buildTimeline(),this.timeline?.seek(t*this.timeline.duration,!0)}toggle(t){if(!1===n(this.shared,this.condition))return!1;this.startTimeout?.pause(),this.toggleIsForward=t??!this.toggleIsForward,this.playing?(this.timeline?.pause(),this.buildTimeline({isForward:this.toggleIsForward,needsRebuild:!0}),this.pauseOnNextLoopEnd=!0,this.timeline.play()):this.startTimeout=s({targets:{},duration:this.startOnceDelay,easing:"linear",complete:()=>{this.startTimeout=void 0,this.timeline?.pause(),this.buildTimeline({isForward:this.toggleIsForward}),this.timeline.play()}})}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){this.pause()}};export{d as a};
|
|
Binary file
|
|
Binary file
|