@splinetool/runtime 2.0.1 → 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/build/{runtime-chunk-5VJGAC3M.js → runtime-chunk-2SYZJBYJ.js} +1 -1
- package/build/runtime-chunk-2SYZJBYJ.js.br +0 -0
- package/build/runtime-chunk-2SYZJBYJ.js.gz +0 -0
- package/build/{runtime-chunk-DJJZN367.js → runtime-chunk-2Y73BLCY.js} +1 -1
- package/build/runtime-chunk-2Y73BLCY.js.br +0 -0
- package/build/{runtime-chunk-DJJZN367.js.gz → runtime-chunk-2Y73BLCY.js.gz} +0 -0
- package/build/{runtime-chunk-O5NBGIBR.js → runtime-chunk-A2LYIKKC.js} +1 -1
- package/build/runtime-chunk-A2LYIKKC.js.br +0 -0
- package/build/runtime-chunk-A2LYIKKC.js.gz +0 -0
- package/build/{runtime-chunk-LATYCOUS.js → runtime-chunk-BJVCOW72.js} +1 -1
- package/build/runtime-chunk-BJVCOW72.js.br +0 -0
- package/build/runtime-chunk-BJVCOW72.js.gz +0 -0
- package/build/{runtime-chunk-YUK55LCN.js → runtime-chunk-CTHMLYOZ.js} +1 -1
- package/build/runtime-chunk-CTHMLYOZ.js.br +0 -0
- package/build/runtime-chunk-CTHMLYOZ.js.gz +0 -0
- package/build/{runtime-chunk-J2I4VBHR.js → runtime-chunk-E6JCDSXC.js} +1 -1
- package/build/runtime-chunk-E6JCDSXC.js.br +0 -0
- package/build/runtime-chunk-E6JCDSXC.js.gz +0 -0
- package/build/{runtime-chunk-XLOQIQSS.js → runtime-chunk-FF5REN2J.js} +1 -1
- package/build/runtime-chunk-FF5REN2J.js.br +0 -0
- package/build/runtime-chunk-FF5REN2J.js.gz +0 -0
- package/build/{runtime-chunk-2VFLTNIU.js → runtime-chunk-HJS3VFEN.js} +1 -1
- package/build/runtime-chunk-HJS3VFEN.js.br +0 -0
- package/build/runtime-chunk-HJS3VFEN.js.gz +0 -0
- package/build/{runtime-chunk-CRYQVRO6.js → runtime-chunk-HL3PBPHE.js} +1 -1
- package/build/runtime-chunk-HL3PBPHE.js.br +0 -0
- package/build/runtime-chunk-HL3PBPHE.js.gz +0 -0
- package/build/{runtime-chunk-BXPWRF47.js → runtime-chunk-I47C4XJU.js} +1 -1
- package/build/runtime-chunk-I47C4XJU.js.br +0 -0
- package/build/runtime-chunk-I47C4XJU.js.gz +0 -0
- package/build/{runtime-chunk-H6T5LPRN.js → runtime-chunk-JFYHGEDN.js} +1 -1
- package/build/runtime-chunk-JFYHGEDN.js.br +0 -0
- package/build/runtime-chunk-JFYHGEDN.js.gz +0 -0
- package/build/{runtime-chunk-T6CHRQ6N.js → runtime-chunk-K4FLB6Y7.js} +1 -1
- package/build/runtime-chunk-K4FLB6Y7.js.br +0 -0
- package/build/runtime-chunk-K4FLB6Y7.js.gz +0 -0
- package/build/{runtime-chunk-W7QPV37Y.js → runtime-chunk-LSURXI4Y.js} +1 -1
- package/build/runtime-chunk-LSURXI4Y.js.br +2 -0
- package/build/runtime-chunk-LSURXI4Y.js.gz +0 -0
- package/build/{runtime-chunk-JFAQQYSH.js → runtime-chunk-MRUNX43X.js} +1 -1
- package/build/runtime-chunk-MRUNX43X.js.br +0 -0
- package/build/runtime-chunk-MRUNX43X.js.gz +0 -0
- package/build/{runtime-chunk-EAXCCTR5.js → runtime-chunk-OEXC34HT.js} +1 -1
- package/build/runtime-chunk-OEXC34HT.js.br +0 -0
- package/build/runtime-chunk-OEXC34HT.js.gz +0 -0
- package/build/{runtime-chunk-H6BPTR74.js → runtime-chunk-OLJVVNDS.js} +1 -1
- package/build/runtime-chunk-OLJVVNDS.js.br +0 -0
- package/build/runtime-chunk-OLJVVNDS.js.gz +0 -0
- package/build/{runtime-chunk-5CH7XRKY.js → runtime-chunk-P2XISQYQ.js} +1 -1
- package/build/runtime-chunk-P2XISQYQ.js.br +0 -0
- package/build/runtime-chunk-P2XISQYQ.js.gz +0 -0
- package/build/{runtime-chunk-44SAPZDZ.js → runtime-chunk-P3254QGK.js} +1 -1
- package/build/runtime-chunk-P3254QGK.js.br +0 -0
- package/build/runtime-chunk-P3254QGK.js.gz +0 -0
- package/build/{runtime-chunk-UK4GQHMO.js → runtime-chunk-PPLLJM75.js} +1 -1
- package/build/{runtime-chunk-UK4GQHMO.js.br → runtime-chunk-PPLLJM75.js.br} +0 -0
- package/build/runtime-chunk-PPLLJM75.js.gz +0 -0
- package/build/{runtime-chunk-7NBWIU4W.js → runtime-chunk-QHPFAHXN.js} +1 -1
- package/build/runtime-chunk-QHPFAHXN.js.br +0 -0
- package/build/runtime-chunk-QHPFAHXN.js.gz +0 -0
- package/build/{runtime-chunk-WQXDDUFV.js → runtime-chunk-RAX4YJZF.js} +1 -1
- package/build/runtime-chunk-RAX4YJZF.js.br +0 -0
- package/build/runtime-chunk-RAX4YJZF.js.gz +0 -0
- package/build/{runtime-chunk-HER7UVU3.js → runtime-chunk-RQ3ZQR4P.js} +1 -1
- package/build/runtime-chunk-RQ3ZQR4P.js.br +0 -0
- package/build/runtime-chunk-RQ3ZQR4P.js.gz +0 -0
- package/build/{runtime-chunk-YVNDW5TV.js → runtime-chunk-SKLNU6XK.js} +1 -1
- package/build/runtime-chunk-SKLNU6XK.js.br +0 -0
- package/build/runtime-chunk-SKLNU6XK.js.gz +0 -0
- package/build/{runtime-chunk-ARTGMJ7O.js → runtime-chunk-TDCFE5IE.js} +1 -1
- package/build/runtime-chunk-TDCFE5IE.js.br +0 -0
- package/build/runtime-chunk-TDCFE5IE.js.gz +0 -0
- package/build/{runtime-chunk-FDRTCOJ5.js → runtime-chunk-VRVV54WH.js} +1 -1
- package/build/runtime-chunk-VRVV54WH.js.br +0 -0
- package/build/runtime-chunk-VRVV54WH.js.gz +0 -0
- package/build/{runtime-chunk-23QOKH2J.js → runtime-chunk-WSJURWOC.js} +1 -1
- package/build/runtime-chunk-WSJURWOC.js.br +0 -0
- package/build/runtime-chunk-WSJURWOC.js.gz +0 -0
- package/build/{runtime-classicRuntime-F5CEZRNL.js → runtime-classicRuntime-AMAXBOXT.js} +1 -1
- package/build/runtime-classicRuntime-AMAXBOXT.js.br +0 -0
- package/build/runtime-classicRuntime-AMAXBOXT.js.gz +0 -0
- package/build/{runtime-cloners-BLAFVALM.js → runtime-cloners-4W3AOAQX.js} +1 -1
- package/build/runtime-cloners-4W3AOAQX.js.br +1 -0
- package/build/runtime-cloners-4W3AOAQX.js.gz +0 -0
- package/build/{runtime-components-DYNXEVOC.js → runtime-components-EPAMFKSB.js} +1 -1
- package/build/runtime-components-EPAMFKSB.js.br +0 -0
- package/build/runtime-components-EPAMFKSB.js.gz +0 -0
- package/build/{runtime-createDestroy-FUUG7UAK.js → runtime-createDestroy-HLHRAAC4.js} +1 -1
- package/build/runtime-createDestroy-HLHRAAC4.js.br +0 -0
- package/build/runtime-createDestroy-HLHRAAC4.js.gz +0 -0
- package/build/{runtime-dragDrop-GPFMU3ZB.js → runtime-dragDrop-K6LWK7FL.js} +1 -1
- package/build/runtime-dragDrop-K6LWK7FL.js.br +0 -0
- package/build/runtime-dragDrop-K6LWK7FL.js.gz +0 -0
- package/build/{runtime-gameControls-TGEINRCX.js → runtime-gameControls-ZJUUKNHM.js} +1 -1
- package/build/runtime-gameControls-ZJUUKNHM.js.br +0 -0
- package/build/runtime-gameControls-ZJUUKNHM.js.gz +0 -0
- package/build/{runtime-hair-YOTI2EFL.js → runtime-hair-AGUMVL55.js} +1 -1
- package/build/runtime-hair-AGUMVL55.js.br +3 -0
- package/build/runtime-hair-AGUMVL55.js.gz +0 -0
- package/build/{runtime-mergeStaticGeometries-JI7YWYGH.js → runtime-mergeStaticGeometries-AOGKOEBX.js} +1 -1
- package/build/runtime-mergeStaticGeometries-AOGKOEBX.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-AOGKOEBX.js.gz +0 -0
- package/build/{runtime-miscActions-INSZA2CP.js → runtime-miscActions-L7BIGLEB.js} +1 -1
- package/build/runtime-miscActions-L7BIGLEB.js.br +0 -0
- package/build/runtime-miscActions-L7BIGLEB.js.gz +0 -0
- package/build/{runtime-mouseHover-GZW7KW6H.js → runtime-mouseHover-BI5SRQSQ.js} +1 -1
- package/build/runtime-mouseHover-BI5SRQSQ.js.br +0 -0
- package/build/runtime-mouseHover-BI5SRQSQ.js.gz +0 -0
- package/build/{runtime-particles-T2CREK6M.js → runtime-particles-W7YEQWJI.js} +1 -1
- package/build/runtime-particles-W7YEQWJI.js.br +0 -0
- package/build/runtime-particles-W7YEQWJI.js.gz +0 -0
- package/build/{runtime-paths-PRHQFJ3X.js → runtime-paths-CK327WCT.js} +1 -1
- package/build/runtime-paths-CK327WCT.js.br +0 -0
- package/build/runtime-paths-CK327WCT.js.gz +0 -0
- package/build/{runtime-resize-SM6PZWJY.js → runtime-resize-RUUW4IXW.js} +1 -1
- package/build/runtime-resize-RUUW4IXW.js.br +0 -0
- package/build/runtime-resize-RUUW4IXW.js.gz +0 -0
- package/build/{runtime-sceneTransition-JUZVB2S3.js → runtime-sceneTransition-7AG4A4P5.js} +1 -1
- package/build/runtime-sceneTransition-7AG4A4P5.js.br +0 -0
- package/build/runtime-sceneTransition-7AG4A4P5.js.gz +0 -0
- package/build/{runtime-scroll-Q6NRRL4F.js → runtime-scroll-MNQPPLQL.js} +1 -1
- 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-TBHPCNPL.js → runtime-text-5RIKJ4US.js} +1 -1
- package/build/runtime-text-5RIKJ4US.js.br +0 -0
- package/build/runtime-text-5RIKJ4US.js.gz +0 -0
- package/build/{runtime-textInputs-4HQER44D.js → runtime-textInputs-YBGYTAMD.js} +1 -1
- package/build/runtime-textInputs-YBGYTAMD.js.br +0 -0
- package/build/runtime-textInputs-YBGYTAMD.js.gz +0 -0
- package/build/{runtime-timeline-UKR4DEQS.js → runtime-timeline-32GBWMFJ.js} +1 -1
- package/build/runtime-timeline-32GBWMFJ.js.br +0 -0
- package/build/runtime-timeline-32GBWMFJ.js.gz +0 -0
- package/build/{runtime-tracking-5HISHPEY.js → runtime-tracking-2BXFBQQY.js} +1 -1
- package/build/runtime-tracking-2BXFBQQY.js.br +0 -0
- package/build/runtime-tracking-2BXFBQQY.js.gz +0 -0
- package/build/{runtime-transitions-FBNOSFXY.js → runtime-transitions-6PZW2QIW.js} +1 -1
- package/build/runtime-transitions-6PZW2QIW.js.br +0 -0
- package/build/runtime-transitions-6PZW2QIW.js.gz +0 -0
- package/build/{runtime-ui2d-3AMS3CSG.js → runtime-ui2d-VEQUBXIE.js} +1 -1
- package/build/runtime-ui2d-VEQUBXIE.js.br +0 -0
- package/build/runtime-ui2d-VEQUBXIE.js.gz +0 -0
- package/build/{runtime-vectorShapes-GIS26ELU.js → runtime-vectorShapes-4HPEEN3B.js} +1 -1
- package/build/runtime-vectorShapes-4HPEEN3B.js.br +0 -0
- package/build/runtime-vectorShapes-4HPEEN3B.js.gz +0 -0
- package/build/{runtime-webgpu-LYDFJW3X.js → runtime-webgpu-YNY4OXCZ.js} +1 -1
- package/build/runtime-webgpu-YNY4OXCZ.js.br +0 -0
- package/build/runtime-webgpu-YNY4OXCZ.js.gz +0 -0
- package/build/runtime.cjs +5 -5
- 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.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.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-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.br +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-T6CHRQ6N.js.br +0 -0
- package/build/runtime-chunk-T6CHRQ6N.js.gz +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.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.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.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.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-webgpu-LYDFJW3X.js.br +0 -0
- package/build/runtime-webgpu-LYDFJW3X.js.gz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as s}from"./runtime-chunk-
|
|
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
|
|
@@ -1 +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.1/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};
|
|
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t}from"./runtime-chunk-
|
|
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,b as e}from"./runtime-chunk-
|
|
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
|