@splinetool/runtime 2.0.14 → 2.0.16
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-NQ5JYNZM.js → runtime-chunk-4V44BUT4.js} +1 -1
- package/build/runtime-chunk-4V44BUT4.js.br +0 -0
- package/build/runtime-chunk-4V44BUT4.js.gz +0 -0
- package/build/{runtime-chunk-U5366HDY.js → runtime-chunk-6N4VUXSU.js} +1 -1
- package/build/runtime-chunk-6N4VUXSU.js.br +0 -0
- package/build/runtime-chunk-6N4VUXSU.js.gz +0 -0
- package/build/{runtime-chunk-7PFZBRGF.js → runtime-chunk-B4C7LB2B.js} +1 -1
- package/build/runtime-chunk-B4C7LB2B.js.br +0 -0
- package/build/runtime-chunk-B4C7LB2B.js.gz +0 -0
- package/build/{runtime-chunk-LUASUHYM.js → runtime-chunk-BRGVQTZR.js} +1 -1
- package/build/{runtime-chunk-LUASUHYM.js.br → runtime-chunk-BRGVQTZR.js.br} +0 -0
- package/build/runtime-chunk-BRGVQTZR.js.gz +0 -0
- package/build/{runtime-chunk-XOP32NU4.js → runtime-chunk-C222NS5V.js} +1 -1
- package/build/runtime-chunk-C222NS5V.js.br +0 -0
- package/build/runtime-chunk-C222NS5V.js.gz +0 -0
- package/build/{runtime-chunk-YURN6PI7.js → runtime-chunk-C4UCKW24.js} +1 -1
- package/build/runtime-chunk-C4UCKW24.js.br +0 -0
- package/build/runtime-chunk-C4UCKW24.js.gz +0 -0
- package/build/{runtime-chunk-44ON5NFS.js → runtime-chunk-EOAWSAVM.js} +1 -1
- package/build/runtime-chunk-EOAWSAVM.js.br +0 -0
- package/build/runtime-chunk-EOAWSAVM.js.gz +0 -0
- package/build/{runtime-chunk-PLKRHTT5.js → runtime-chunk-EOITBA75.js} +1 -1
- package/build/runtime-chunk-EOITBA75.js.br +0 -0
- package/build/runtime-chunk-EOITBA75.js.gz +0 -0
- package/build/{runtime-chunk-4SENJRD5.js → runtime-chunk-HHAC2SNT.js} +1 -1
- package/build/runtime-chunk-HHAC2SNT.js.br +0 -0
- package/build/runtime-chunk-HHAC2SNT.js.gz +0 -0
- package/build/{runtime-chunk-HKD2ORV5.js → runtime-chunk-HWCLX3MX.js} +1 -1
- package/build/runtime-chunk-HWCLX3MX.js.br +0 -0
- package/build/runtime-chunk-HWCLX3MX.js.gz +0 -0
- package/build/{runtime-chunk-ZH7TNSZJ.js → runtime-chunk-IHQG4FS7.js} +1 -1
- package/build/runtime-chunk-IHQG4FS7.js.br +0 -0
- package/build/runtime-chunk-IHQG4FS7.js.gz +0 -0
- package/build/{runtime-chunk-MKUFNGGW.js → runtime-chunk-OMTLYUU2.js} +1 -1
- package/build/runtime-chunk-OMTLYUU2.js.br +0 -0
- package/build/runtime-chunk-OMTLYUU2.js.gz +0 -0
- package/build/{runtime-chunk-PCGGIHOQ.js → runtime-chunk-OPUEULYT.js} +1 -1
- package/build/runtime-chunk-OPUEULYT.js.br +0 -0
- package/build/runtime-chunk-OPUEULYT.js.gz +0 -0
- package/build/{runtime-chunk-S6KLXGEL.js → runtime-chunk-PTQSKVSN.js} +1 -1
- package/build/runtime-chunk-PTQSKVSN.js.br +0 -0
- package/build/runtime-chunk-PTQSKVSN.js.gz +0 -0
- package/build/{runtime-chunk-MF6PRJPV.js → runtime-chunk-RB2YUXYT.js} +1 -1
- package/build/runtime-chunk-RB2YUXYT.js.br +0 -0
- package/build/runtime-chunk-RB2YUXYT.js.gz +0 -0
- package/build/{runtime-chunk-DMRFHNRP.js → runtime-chunk-SUKB2OT6.js} +1 -1
- package/build/runtime-chunk-SUKB2OT6.js.br +0 -0
- package/build/runtime-chunk-SUKB2OT6.js.gz +0 -0
- package/build/{runtime-chunk-QYZPTNBH.js → runtime-chunk-U3O6AK7G.js} +1 -1
- package/build/{runtime-chunk-QYZPTNBH.js.br → runtime-chunk-U3O6AK7G.js.br} +0 -0
- package/build/{runtime-chunk-QYZPTNBH.js.gz → runtime-chunk-U3O6AK7G.js.gz} +0 -0
- package/build/{runtime-chunk-GZVBZLQ3.js → runtime-chunk-UHC42CMW.js} +1 -1
- package/build/{runtime-chunk-GZVBZLQ3.js.br → runtime-chunk-UHC42CMW.js.br} +0 -0
- package/build/runtime-chunk-UHC42CMW.js.gz +0 -0
- package/build/{runtime-chunk-N473U2V2.js → runtime-chunk-UIJZIWN4.js} +1 -1
- package/build/runtime-chunk-UIJZIWN4.js.br +0 -0
- package/build/runtime-chunk-UIJZIWN4.js.gz +0 -0
- package/build/{runtime-chunk-H2442PY7.js → runtime-chunk-UUXCNAV7.js} +1 -1
- package/build/runtime-chunk-UUXCNAV7.js.br +0 -0
- package/build/runtime-chunk-UUXCNAV7.js.gz +0 -0
- package/build/{runtime-chunk-L5SU5F5J.js → runtime-chunk-VDW6UL2I.js} +1 -1
- package/build/runtime-chunk-VDW6UL2I.js.br +0 -0
- package/build/runtime-chunk-VDW6UL2I.js.gz +0 -0
- package/build/{runtime-chunk-NAJO6T26.js → runtime-chunk-WIWW5RJN.js} +1 -1
- package/build/runtime-chunk-WIWW5RJN.js.br +0 -0
- package/build/runtime-chunk-WIWW5RJN.js.gz +0 -0
- package/build/{runtime-chunk-2PDJQLZS.js → runtime-chunk-X5OX4DSZ.js} +1 -1
- package/build/runtime-chunk-X5OX4DSZ.js.br +0 -0
- package/build/runtime-chunk-X5OX4DSZ.js.gz +0 -0
- package/build/{runtime-chunk-EJDIVLQA.js → runtime-chunk-XUTYOBLR.js} +1 -1
- package/build/runtime-chunk-XUTYOBLR.js.br +0 -0
- package/build/runtime-chunk-XUTYOBLR.js.gz +0 -0
- package/build/{runtime-chunk-4UHPUSEP.js → runtime-chunk-ZCK4Z4EH.js} +1 -1
- package/build/runtime-chunk-ZCK4Z4EH.js.br +0 -0
- package/build/runtime-chunk-ZCK4Z4EH.js.gz +0 -0
- package/build/{runtime-classicRuntime-CTLZXFOK.js → runtime-classicRuntime-IAEBXWWG.js} +1 -1
- package/build/runtime-classicRuntime-IAEBXWWG.js.br +0 -0
- package/build/{runtime-classicRuntime-CTLZXFOK.js.gz → runtime-classicRuntime-IAEBXWWG.js.gz} +0 -0
- package/build/{runtime-cloners-6BXWHHH6.js → runtime-cloners-6MEAJ65W.js} +1 -1
- package/build/runtime-cloners-6MEAJ65W.js.br +0 -0
- package/build/runtime-cloners-6MEAJ65W.js.gz +0 -0
- package/build/{runtime-components-YTMTPERH.js → runtime-components-CRKL2ZGZ.js} +1 -1
- package/build/runtime-components-CRKL2ZGZ.js.br +0 -0
- package/build/runtime-components-CRKL2ZGZ.js.gz +0 -0
- package/build/{runtime-createDestroy-2RJVOGQP.js → runtime-createDestroy-D7TLBP5H.js} +1 -1
- package/build/runtime-createDestroy-D7TLBP5H.js.br +0 -0
- package/build/runtime-createDestroy-D7TLBP5H.js.gz +0 -0
- package/build/{runtime-dragDrop-CUXGIFGP.js → runtime-dragDrop-2EATJCGV.js} +1 -1
- package/build/runtime-dragDrop-2EATJCGV.js.br +0 -0
- package/build/runtime-dragDrop-2EATJCGV.js.gz +0 -0
- package/build/{runtime-gameControls-HKLCWLKJ.js → runtime-gameControls-GRH3XFUT.js} +1 -1
- package/build/runtime-gameControls-GRH3XFUT.js.br +0 -0
- package/build/runtime-gameControls-GRH3XFUT.js.gz +0 -0
- package/build/{runtime-hair-R36ZBISB.js → runtime-hair-MSBLDKXL.js} +1 -1
- package/build/runtime-hair-MSBLDKXL.js.br +2 -0
- package/build/runtime-hair-MSBLDKXL.js.gz +0 -0
- package/build/{runtime-mergeStaticGeometries-RPBLPAJO.js → runtime-mergeStaticGeometries-5TVLIGDN.js} +1 -1
- package/build/runtime-mergeStaticGeometries-5TVLIGDN.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-5TVLIGDN.js.gz +0 -0
- package/build/{runtime-miscActions-V7N7OCRE.js → runtime-miscActions-5FKGJYQ4.js} +1 -1
- package/build/runtime-miscActions-5FKGJYQ4.js.br +0 -0
- package/build/runtime-miscActions-5FKGJYQ4.js.gz +0 -0
- package/build/{runtime-mouseHover-2FQXNHVN.js → runtime-mouseHover-JA4CJZDB.js} +1 -1
- package/build/runtime-mouseHover-JA4CJZDB.js.br +0 -0
- package/build/runtime-mouseHover-JA4CJZDB.js.gz +0 -0
- package/build/{runtime-particles-JZREUE5L.js → runtime-particles-OZJ2YUNM.js} +1 -1
- package/build/runtime-particles-OZJ2YUNM.js.br +0 -0
- package/build/runtime-particles-OZJ2YUNM.js.gz +0 -0
- package/build/{runtime-paths-H3BLID6D.js → runtime-paths-ZV4YTOEY.js} +1 -1
- package/build/runtime-paths-ZV4YTOEY.js.br +0 -0
- package/build/runtime-paths-ZV4YTOEY.js.gz +0 -0
- package/build/{runtime-resize-ZD62VEBD.js → runtime-resize-MPSPTIHT.js} +1 -1
- package/build/runtime-resize-MPSPTIHT.js.br +0 -0
- package/build/runtime-resize-MPSPTIHT.js.gz +0 -0
- package/build/{runtime-sceneTransition-UMLH7ZRG.js → runtime-sceneTransition-QRGYUBTR.js} +1 -1
- package/build/runtime-sceneTransition-QRGYUBTR.js.br +0 -0
- package/build/runtime-sceneTransition-QRGYUBTR.js.gz +0 -0
- package/build/{runtime-scroll-G27Z5O4C.js → runtime-scroll-EGZ5ROW6.js} +1 -1
- package/build/runtime-scroll-EGZ5ROW6.js.br +0 -0
- package/build/runtime-scroll-EGZ5ROW6.js.gz +0 -0
- package/build/runtime-shapeBlends-LSVA2H6A.js +1 -0
- package/build/runtime-shapeBlends-LSVA2H6A.js.br +2 -0
- package/build/runtime-shapeBlends-LSVA2H6A.js.gz +0 -0
- package/build/{runtime-text-MQDKSA5W.js → runtime-text-7O7CYADG.js} +1 -1
- package/build/runtime-text-7O7CYADG.js.br +0 -0
- package/build/runtime-text-7O7CYADG.js.gz +0 -0
- package/build/{runtime-textInputs-5DEQBIWS.js → runtime-textInputs-Y77C2A6Y.js} +1 -1
- package/build/runtime-textInputs-Y77C2A6Y.js.br +0 -0
- package/build/runtime-textInputs-Y77C2A6Y.js.gz +0 -0
- package/build/{runtime-timeline-Z7YJ7ASI.js → runtime-timeline-ZJ24PFAW.js} +1 -1
- package/build/runtime-timeline-ZJ24PFAW.js.br +0 -0
- package/build/runtime-timeline-ZJ24PFAW.js.gz +0 -0
- package/build/{runtime-tracking-IW6LURXT.js → runtime-tracking-JEDTOMFE.js} +1 -1
- package/build/runtime-tracking-JEDTOMFE.js.br +0 -0
- package/build/runtime-tracking-JEDTOMFE.js.gz +0 -0
- package/build/{runtime-transitions-B5OB67GR.js → runtime-transitions-NP22MHBN.js} +1 -1
- package/build/runtime-transitions-NP22MHBN.js.br +0 -0
- package/build/runtime-transitions-NP22MHBN.js.gz +0 -0
- package/build/{runtime-ui2d-R4W643OE.js → runtime-ui2d-JPC6RUQ5.js} +1 -1
- package/build/runtime-ui2d-JPC6RUQ5.js.br +0 -0
- package/build/runtime-ui2d-JPC6RUQ5.js.gz +0 -0
- package/build/{runtime-vectorShapes-ASLQ3T6K.js → runtime-vectorShapes-NFY542TW.js} +1 -1
- package/build/runtime-vectorShapes-NFY542TW.js.br +0 -0
- package/build/runtime-vectorShapes-NFY542TW.js.gz +0 -0
- package/build/{runtime-webgpu-XRBI423N.js → runtime-webgpu-F6GGNIBN.js} +1 -1
- package/build/runtime-webgpu-F6GGNIBN.js.br +0 -0
- package/build/runtime-webgpu-F6GGNIBN.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-2PDJQLZS.js.br +0 -0
- package/build/runtime-chunk-2PDJQLZS.js.gz +0 -0
- package/build/runtime-chunk-44ON5NFS.js.br +0 -0
- package/build/runtime-chunk-44ON5NFS.js.gz +0 -0
- package/build/runtime-chunk-4SENJRD5.js.br +0 -0
- package/build/runtime-chunk-4SENJRD5.js.gz +0 -0
- package/build/runtime-chunk-4UHPUSEP.js.br +0 -0
- package/build/runtime-chunk-4UHPUSEP.js.gz +0 -0
- package/build/runtime-chunk-7PFZBRGF.js.br +0 -0
- package/build/runtime-chunk-7PFZBRGF.js.gz +0 -0
- package/build/runtime-chunk-DMRFHNRP.js.br +0 -0
- package/build/runtime-chunk-DMRFHNRP.js.gz +0 -0
- package/build/runtime-chunk-EJDIVLQA.js.br +0 -0
- package/build/runtime-chunk-EJDIVLQA.js.gz +0 -0
- package/build/runtime-chunk-GZVBZLQ3.js.gz +0 -0
- package/build/runtime-chunk-H2442PY7.js.br +0 -0
- package/build/runtime-chunk-H2442PY7.js.gz +0 -0
- package/build/runtime-chunk-HKD2ORV5.js.br +0 -0
- package/build/runtime-chunk-HKD2ORV5.js.gz +0 -0
- package/build/runtime-chunk-L5SU5F5J.js.br +0 -0
- package/build/runtime-chunk-L5SU5F5J.js.gz +0 -0
- package/build/runtime-chunk-LUASUHYM.js.gz +0 -0
- package/build/runtime-chunk-MF6PRJPV.js.br +0 -0
- package/build/runtime-chunk-MF6PRJPV.js.gz +0 -0
- package/build/runtime-chunk-MKUFNGGW.js.br +0 -0
- package/build/runtime-chunk-MKUFNGGW.js.gz +0 -0
- package/build/runtime-chunk-N473U2V2.js.br +0 -0
- package/build/runtime-chunk-N473U2V2.js.gz +0 -0
- package/build/runtime-chunk-NAJO6T26.js.br +0 -0
- package/build/runtime-chunk-NAJO6T26.js.gz +0 -0
- package/build/runtime-chunk-NQ5JYNZM.js.br +0 -0
- package/build/runtime-chunk-NQ5JYNZM.js.gz +0 -0
- package/build/runtime-chunk-PCGGIHOQ.js.br +0 -0
- package/build/runtime-chunk-PCGGIHOQ.js.gz +0 -0
- package/build/runtime-chunk-PLKRHTT5.js.br +0 -0
- package/build/runtime-chunk-PLKRHTT5.js.gz +0 -0
- package/build/runtime-chunk-S6KLXGEL.js.br +0 -0
- package/build/runtime-chunk-S6KLXGEL.js.gz +0 -0
- package/build/runtime-chunk-U5366HDY.js.br +0 -0
- package/build/runtime-chunk-U5366HDY.js.gz +0 -0
- package/build/runtime-chunk-XOP32NU4.js.br +0 -0
- package/build/runtime-chunk-XOP32NU4.js.gz +0 -0
- package/build/runtime-chunk-YURN6PI7.js.br +0 -0
- package/build/runtime-chunk-YURN6PI7.js.gz +0 -0
- package/build/runtime-chunk-ZH7TNSZJ.js.br +0 -0
- package/build/runtime-chunk-ZH7TNSZJ.js.gz +0 -0
- package/build/runtime-classicRuntime-CTLZXFOK.js.br +0 -0
- package/build/runtime-cloners-6BXWHHH6.js.br +0 -0
- package/build/runtime-cloners-6BXWHHH6.js.gz +0 -0
- package/build/runtime-components-YTMTPERH.js.br +0 -0
- package/build/runtime-components-YTMTPERH.js.gz +0 -0
- package/build/runtime-createDestroy-2RJVOGQP.js.br +0 -0
- package/build/runtime-createDestroy-2RJVOGQP.js.gz +0 -0
- package/build/runtime-dragDrop-CUXGIFGP.js.br +0 -0
- package/build/runtime-dragDrop-CUXGIFGP.js.gz +0 -0
- package/build/runtime-gameControls-HKLCWLKJ.js.br +0 -0
- package/build/runtime-gameControls-HKLCWLKJ.js.gz +0 -0
- package/build/runtime-hair-R36ZBISB.js.br +0 -1
- package/build/runtime-hair-R36ZBISB.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-RPBLPAJO.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-RPBLPAJO.js.gz +0 -0
- package/build/runtime-miscActions-V7N7OCRE.js.br +0 -0
- package/build/runtime-miscActions-V7N7OCRE.js.gz +0 -0
- package/build/runtime-mouseHover-2FQXNHVN.js.br +0 -0
- package/build/runtime-mouseHover-2FQXNHVN.js.gz +0 -0
- package/build/runtime-particles-JZREUE5L.js.br +0 -0
- package/build/runtime-particles-JZREUE5L.js.gz +0 -0
- package/build/runtime-paths-H3BLID6D.js.br +0 -0
- package/build/runtime-paths-H3BLID6D.js.gz +0 -0
- package/build/runtime-resize-ZD62VEBD.js.br +0 -0
- package/build/runtime-resize-ZD62VEBD.js.gz +0 -0
- package/build/runtime-sceneTransition-UMLH7ZRG.js.br +0 -0
- package/build/runtime-sceneTransition-UMLH7ZRG.js.gz +0 -0
- package/build/runtime-scroll-G27Z5O4C.js.br +0 -0
- package/build/runtime-scroll-G27Z5O4C.js.gz +0 -0
- package/build/runtime-shapeBlends-E6SX5CX3.js +0 -1
- package/build/runtime-shapeBlends-E6SX5CX3.js.br +0 -0
- package/build/runtime-shapeBlends-E6SX5CX3.js.gz +0 -0
- package/build/runtime-text-MQDKSA5W.js.br +0 -0
- package/build/runtime-text-MQDKSA5W.js.gz +0 -0
- package/build/runtime-textInputs-5DEQBIWS.js.br +0 -0
- package/build/runtime-textInputs-5DEQBIWS.js.gz +0 -0
- package/build/runtime-timeline-Z7YJ7ASI.js.br +0 -0
- package/build/runtime-timeline-Z7YJ7ASI.js.gz +0 -0
- package/build/runtime-tracking-IW6LURXT.js.br +0 -0
- package/build/runtime-tracking-IW6LURXT.js.gz +0 -0
- package/build/runtime-transitions-B5OB67GR.js.br +0 -0
- package/build/runtime-transitions-B5OB67GR.js.gz +0 -0
- package/build/runtime-ui2d-R4W643OE.js.br +0 -0
- package/build/runtime-ui2d-R4W643OE.js.gz +0 -0
- package/build/runtime-vectorShapes-ASLQ3T6K.js.br +0 -0
- package/build/runtime-vectorShapes-ASLQ3T6K.js.gz +0 -0
- package/build/runtime-webgpu-XRBI423N.js.br +0 -0
- package/build/runtime-webgpu-XRBI423N.js.gz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,b as e,d as r}from"./runtime-chunk-NAJO6T26.js";import{f as i}from"./runtime-chunk-RTLL6WIB.js";import{J as a,xa as o}from"./runtime-chunk-AIWIOLR6.js";import{Ae as s,Ec as n,Fc as p,Oc as h,Rc as c,Tc as m,bd as f,dd as u,ud as d,wd as l,we as g,xe as v}from"./runtime-chunk-BVVSZMXD.js";var C=new p,j=new g,T=class extends l{constructor(t){let e=new u,r=new d({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],a=[],o={},s=new m(15711266),n=new m(15711266),p=new m(2857471);function h(t,e,r){c(t,r),c(e,r)}function c(t,e){i.push(0,0,0),a.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(i.length/3-1)}h("n1","n2",s),h("n2","n4",s),h("n4","n3",s),h("n3","n1",s),h("f1","f2",s),h("f2","f4",s),h("f4","f3",s),h("f3","f1",s),h("n1","f1",s),h("n2","f2",s),h("n3","f3",s),h("n4","f4",s),h("p","n1",n),h("p","n2",n),h("p","n3",n),h("p","n4",n),h("u1","u2",p),h("u2","u3",p),h("u3","u1",p),e.setAttribute("position",new f(i,3)),e.setAttribute("color",new f(a,3)),super(e,r),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){let t=this.geometry,e=this.pointMap;j.projectionMatrixInverse.elements=[.5112609807824982,-0,-0,-0,-0,.41421356237309503,-0,-0,-0,-0,-0,-.099999,-0,-0,-1.0000000000000002,.100001];let r=.8;y("n1",e,t,j,-1,-1,r),y("n2",e,t,j,1,-1,r),y("n3",e,t,j,-1,1,r),y("n4",e,t,j,1,1,r);let i=r;y("f1",e,t,j,-1,-1,i),y("f2",e,t,j,1,-1,i),y("f3",e,t,j,-1,1,i),y("f4",e,t,j,1,1,i);let a=i;y("u1",e,t,j,.35,1.1,a),y("u2",e,t,j,-.35,1.1,a),y("u3",e,t,j,0,1.55,a),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function y(t,e,r,i,a,o,s){C.set(a,o,s).unproject(i);let n=e[t];if(void 0!==n){let t=r.getAttribute("position");for(let e=0,r=n.length;e<r;e++)t.setXYZ(n[e],C.x,C.y,C.z)}}var w=class extends(t(T)){constructor(t){super(t),this.object=t,this.name=`CombinedCameraHelper: ${t.uuid}`}updateMatrixWorld(t){super.updateMatrixWorld(t),this.updateTarget()}updateTarget(){let t=this.object.getTarget();this.updateWorldMatrix(!0,!1),this.worldToLocal(t)}raycast(t,r){e(this.object,this.geometry,t,r,!0)}};function P(t){return 1-Math.pow(1-t,3)}var x=new p,b=new p,_=new n,M=new p,O=new p,F=new p,A=class extends(r(g,w)){constructor(t="",e={...o.defaultData,name:""}){super(),this._cameraType="OrthographicCamera",this.targetOffset=a.DefaultTargetOffset,this.isUpVectorFlipped=!1,this.angleOffsetFromUp=0,this.wasMovedByUser=!1,this.wasMovedBySwitchCameraAction=!1,this._createdAt=typeof performance<"u"?performance.now():0,this._tickProjectionTransition=()=>{let t=this._projectionTransition;if(void 0===t)return;if(this.disposed)return void this._endProjectionTransition();t.raf=requestAnimationFrame(this._tickProjectionTransition);let e=A.projectionTransitionRequestRender??t.requestRender;this.updateProjectionMatrix(),e?.()},this.super_Entity(t,e),this.previousProjectionMatrix=new h,this.matrixAutoUpdate=!0,this.width=window.innerWidth,this.height=window.innerHeight;let r=this.width,i=this.height;this.orthoCamera=new s(-.5*r,.5*r,.5*i,-.5*i,-5e4,1e4),this.perspCamera=new v(45,r/i,50,1e4),this.left=this.orthoCamera.left,this.right=this.orthoCamera.right,this.top=this.orthoCamera.top,this.bottom=this.orthoCamera.bottom,this.far=this.orthoCamera.far,this.view=this.orthoCamera.view,this.aspect=this.perspCamera.aspect,this.focus=this.perspCamera.focus,this.filmGauge=this.perspCamera.filmGauge,this.filmOffset=this.perspCamera.filmOffset,this.objectHelper.update()}static withoutProjectionTransition(t){let e=A.projectionTransitionsEnabled;A.projectionTransitionsEnabled=!1;try{return t()}finally{A.projectionTransitionsEnabled=e}}get isPerspectiveCamera(){return"PerspectiveCamera"===this.cameraType}get isOrthographicCamera(){return!this.isPerspectiveCamera}get cameraType(){return this._cameraType}set fov(t){this.perspCamera.fov=t}get fov(){return this.perspCamera.fov}setNear(t,e){"PerspectiveCamera"===t?this.perspCamera.near=e:this.orthoCamera.near=e}setZoom(t,e){e>=0&&("PerspectiveCamera"===t?this.perspCamera.zoom=e:this.orthoCamera.zoom=e)}set cameraType(t){"PerspectiveCamera"===t?this.toPerspective():"OrthographicCamera"===t&&this.toOrthographic()}get near(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.near:this.orthoCamera.near}set near(t){"PerspectiveCamera"===this._cameraType?this.perspCamera.near=t:this.orthoCamera.near=t}get zoom(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.zoom:this.orthoCamera.zoom}set zoom(t){t>=0&&("PerspectiveCamera"===this._cameraType?this.perspCamera.zoom=t:this.orthoCamera.zoom=t)}lookAt(t,e,r){"number"==typeof t&&(t=new p(t,e,r)),super.lookAt(t),this.getWorldPosition(x),this.targetOffset=x.distanceTo(t)}getTarget(t=new p){return this.getWorldDirection(b),this.getWorldPosition(x),b.multiplyScalar(this.targetOffset),t.copy(x).add(b),t}getDistanceToTarget(){let t=this.getTarget();return this.getWorldPosition(x),x.distanceTo(t)}updateUp(){this.getWorldQuaternion(_),M.set(0,0,1).applyQuaternion(_),O.copy(c.DEFAULT_UP),this.isUpVectorFlipped&&O.negate(),O.applyQuaternion(_),F.copy(c.DEFAULT_UP).projectOnPlane(M),this.angleOffsetFromUp=F.angleTo(O),this.angleOffsetFromUp*=F.cross(O).dot(M)>=0?1:-1}updateTransformState(t,e){let r=super.updateTransformState(t,e);return void 0!==t.isUpVectorFlipped&&(this.isUpVectorFlipped=t.isUpVectorFlipped),this.updateUp(),r}getViewFrontToObject(t){let e=t.getWorldPosition(new p),r=t.getWorldDirection(new p).multiplyScalar(this.targetOffset);return{position:e.clone().add(r),target:e}}getViewToTarget(t){let e=this.getWorldDirection(new p).multiplyScalar(this.targetOffset);return{position:t.clone().sub(e),target:t}}getViewToObject(t){let e=new p;return t.getWorldPosition(e),this.getViewToTarget(e)}setViewplaneSize(t,e,r=!1){if(this.aspect=t/e,r){let r=t>e?this.aspect:1,i=t>e?1:this.aspect;this.left=-395*r,this.right=395*r,this.top=1/i*395,this.bottom=1/i*-395}else this.left=.5*-t,this.right=.5*t,this.top=.5*e,this.bottom=.5*-e;this.updateProjectionMatrix()}copyViewPlaneSize(t){this.aspect=t.aspect,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.updateProjectionMatrix()}toOrthographic(){this.orthoCamera.left=this.left,this.orthoCamera.right=this.right,this.orthoCamera.top=this.top,this.orthoCamera.bottom=this.bottom,this.orthoCamera.view=this.view,this.orthoCamera.far=this.far,this.orthoCamera.updateProjectionMatrix(),this.projectionMatrix=this.orthoCamera.projectionMatrix,this.projectionMatrixInverse=this.orthoCamera.projectionMatrixInverse,this._cameraType="OrthographicCamera",this._applyProjectionTransition(),this.objectHelper&&this.objectHelper.update()}toPerspective(){this.perspCamera.aspect=this.aspect,this.perspCamera.fov=this.fov,this.perspCamera.view=this.view,this.perspCamera.far=this.far,this.perspCamera.updateProjectionMatrix(),this.projectionMatrix=this.perspCamera.projectionMatrix,this.projectionMatrixInverse=this.perspCamera.projectionMatrixInverse,this._cameraType="PerspectiveCamera",this._applyProjectionTransition(),this.objectHelper&&this.objectHelper.update()}get isProjectionTransitioning(){return void 0!==this._projectionTransition}get projectionTransitionProgress(){let t=this._projectionTransition;if(void 0===t)return 1;let e=(performance.now()-t.start)/t.duration;return e>=1?1:e<=0?0:P(e)}get _activeSubCamera(){return"PerspectiveCamera"===this._cameraType?this.perspCamera:this.orthoCamera}_canAnimateProjection(){return A.projectionTransitionsEnabled&&"function"==typeof requestAnimationFrame&&typeof performance<"u"&&performance.now()-this._createdAt>=A.projectionTransitionMinAgeMs}_beginProjectionTransition(t){let e=this._projectionTransition;void 0===e&&(e={from:new h,blend:new h,blendInverse:new h,start:0,duration:A.projectionTransitionDuration,referenceDepth:1,raf:0,requestRender:t},this._projectionTransition=e),e.from.copy(this.projectionMatrix),e.start=performance.now(),e.duration=A.projectionTransitionDuration,e.referenceDepth=Number.isFinite(this.targetOffset)?Math.max(1,this.targetOffset):1,t&&(e.requestRender=t),0!==e.raf&&cancelAnimationFrame(e.raf),e.raf=requestAnimationFrame(this._tickProjectionTransition)}_applyProjectionTransition(){let t=this._projectionTransition;if(void 0===t)return;let e=(performance.now()-t.start)/t.duration;if(e>=1)return void this._endProjectionTransition();let r=P(e),i=t.from.elements,a=this._activeSubCamera.projectionMatrix.elements,o=t.blend.elements,s=t.referenceDepth,n=Math.max(1e-6,i[15]-i[11]*s),p=r*n/(r*n+(1-r)*Math.max(1e-6,a[15]-a[11]*s));for(let t=0;t<16;t++)o[t]=i[t]+(a[t]-i[t])*p;t.blendInverse.copy(t.blend).invert(),this.projectionMatrix=t.blend,this.projectionMatrixInverse=t.blendInverse}_endProjectionTransition(){let t=this._projectionTransition;if(void 0===t)return;0!==t.raf&&cancelAnimationFrame(t.raf),this._projectionTransition=void 0;let e=this._activeSubCamera;this.projectionMatrix=e.projectionMatrix,this.projectionMatrixInverse=e.projectionMatrixInverse}_syncProjectionTransition(t){let e=t._projectionTransition;if(void 0===e)return void(void 0!==this._projectionTransition&&this._endProjectionTransition());let r=this._projectionTransition;void 0===r?(r={from:new h,blend:new h,blendInverse:new h,start:0,duration:1,referenceDepth:1,raf:0,requestRender:void 0},this._projectionTransition=r):0!==r.raf&&(cancelAnimationFrame(r.raf),r.raf=0),r.requestRender=void 0,r.from.copy(e.from),r.start=e.start,r.duration=e.duration,r.referenceDepth=e.referenceDepth,this._applyProjectionTransition()}setFocalLength(t){this.perspCamera.setFocalLength(t),this.toPerspective()}getFocalLength(){return this.perspCamera.getFocalLength()}getEffectiveFOV(){return this.perspCamera.getEffectiveFOV()}getFilmWidth(){return this.perspCamera.getFilmWidth()}getFilmHeight(){return this.perspCamera.getFilmHeight()}setViewOffset(t,e,r,i,a,o){"PerspectiveCamera"===this._cameraType?this.perspCamera.setViewOffset(t,e,r,i,a,o):this.orthoCamera.setViewOffset(t,e,r,i,a,o),this._applyProjectionTransition()}clearViewOffset(){"PerspectiveCamera"===this._cameraType?(this.perspCamera.clearViewOffset(),this.toPerspective()):(this.orthoCamera.clearViewOffset(),this.toOrthographic())}copyHistory(){this.previousProjectionMatrix&&this.previousProjectionMatrix.copy(this.projectionMatrix)}updateProjectionMatrix(){"PerspectiveCamera"===this._cameraType?this.toPerspective():"OrthographicCamera"===this._cameraType&&this.toOrthographic()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}copy(t,e){return super.copy(t,e),this.parent=t.parent,this.orthoCamera.copy(t.orthoCamera),this.perspCamera.copy(t.perspCamera),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.far=t.far,this.view=null===t.view?null:Object.assign({},t.view),this._cameraType=t._cameraType,this.aspect=t.aspect,this.fov=t.fov,this.focus=t.focus,this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this.targetOffset=a.sanitizeTargetOffset(t.targetOffset),this.updateProjectionMatrix(),this._syncProjectionTransition(t),this}toCameraState(t=[]){let e={type:this.cameraType,far:this.far,orthographic:{near:this.orthoCamera.near,zoom:this.orthoCamera.zoom},perspective:{near:this.perspCamera.near,fov:this.perspCamera.fov,zoom:this.perspCamera.zoom},up:this.up.toArray(),targetOffset:this.targetOffset,isUpVectorFlipped:this.isUpVectorFlipped};return i(e,t)}updateCameraSubtype(t,e){let r="perspective"===t?"PerspectiveCamera":"OrthographicCamera";void 0!==e.zoom&&this.setZoom(r,e.zoom),void 0!==e.near&&this.setNear(r,e.near),void 0!==e.fov&&"PerspectiveCamera"===r&&(this.fov=e.fov)}updateState(t,e){this.updateCameraState(t,e)}updateCameraState(t,e){this.updateState_Entity(t,e),void 0!==t.far&&(this.far=t.far),void 0!==t.orthographic&&this.updateCameraSubtype("orthographic",t.orthographic),void 0!==t.perspective&&this.updateCameraSubtype("perspective",t.perspective),void 0!==t.type&&(t.type!==this._cameraType&&this._canAnimateProjection()&&this._beginProjectionTransition(e?.shared.requestRender),this.cameraType=t.type),void 0!==t.up&&this.up.fromArray(t.up.map(t=>"number"==typeof t?t:0)),void 0!==t.targetOffset&&(this.targetOffset=a.sanitizeTargetOffset(t.targetOffset)),void 0!==t.isUpVectorFlipped&&(this.isUpVectorFlipped=t.isUpVectorFlipped),this.updateProjectionMatrix()}updateByPatchedOp(t,e,r){super.updateByPatchedOp(t,e,r),1===t.path.length&&0===t.type&&this.updateCameraSubtype(t.path[0],t.props)}toState(t){return{...super.toState(t),...this.toCameraState(t),type:this.cameraType}}},V=A;V.projectionTransitionsEnabled=!1,V.projectionTransitionDuration=350,V.projectionTransitionMinAgeMs=1e3;export{V as a};
|
|
1
|
+
import{a as t,b as e,d as r}from"./runtime-chunk-WIWW5RJN.js";import{f as i}from"./runtime-chunk-RTLL6WIB.js";import{J as a,xa as o}from"./runtime-chunk-AIWIOLR6.js";import{Ae as s,Ec as n,Fc as p,Oc as h,Rc as c,Tc as m,bd as f,dd as u,ud as d,wd as l,we as g,xe as v}from"./runtime-chunk-BVVSZMXD.js";var C=new p,j=new g,T=class extends l{constructor(t){let e=new u,r=new d({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],a=[],o={},s=new m(15711266),n=new m(15711266),p=new m(2857471);function h(t,e,r){c(t,r),c(e,r)}function c(t,e){i.push(0,0,0),a.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(i.length/3-1)}h("n1","n2",s),h("n2","n4",s),h("n4","n3",s),h("n3","n1",s),h("f1","f2",s),h("f2","f4",s),h("f4","f3",s),h("f3","f1",s),h("n1","f1",s),h("n2","f2",s),h("n3","f3",s),h("n4","f4",s),h("p","n1",n),h("p","n2",n),h("p","n3",n),h("p","n4",n),h("u1","u2",p),h("u2","u3",p),h("u3","u1",p),e.setAttribute("position",new f(i,3)),e.setAttribute("color",new f(a,3)),super(e,r),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){let t=this.geometry,e=this.pointMap;j.projectionMatrixInverse.elements=[.5112609807824982,-0,-0,-0,-0,.41421356237309503,-0,-0,-0,-0,-0,-.099999,-0,-0,-1.0000000000000002,.100001];let r=.8;y("n1",e,t,j,-1,-1,r),y("n2",e,t,j,1,-1,r),y("n3",e,t,j,-1,1,r),y("n4",e,t,j,1,1,r);let i=r;y("f1",e,t,j,-1,-1,i),y("f2",e,t,j,1,-1,i),y("f3",e,t,j,-1,1,i),y("f4",e,t,j,1,1,i);let a=i;y("u1",e,t,j,.35,1.1,a),y("u2",e,t,j,-.35,1.1,a),y("u3",e,t,j,0,1.55,a),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function y(t,e,r,i,a,o,s){C.set(a,o,s).unproject(i);let n=e[t];if(void 0!==n){let t=r.getAttribute("position");for(let e=0,r=n.length;e<r;e++)t.setXYZ(n[e],C.x,C.y,C.z)}}var w=class extends(t(T)){constructor(t){super(t),this.object=t,this.name=`CombinedCameraHelper: ${t.uuid}`}updateMatrixWorld(t){super.updateMatrixWorld(t),this.updateTarget()}updateTarget(){let t=this.object.getTarget();this.updateWorldMatrix(!0,!1),this.worldToLocal(t)}raycast(t,r){e(this.object,this.geometry,t,r,!0)}};function P(t){return 1-Math.pow(1-t,3)}var x=new p,b=new p,_=new n,M=new p,O=new p,F=new p,W=class extends(r(g,w)){constructor(t="",e={...o.defaultData,name:""}){super(),this._cameraType="OrthographicCamera",this.targetOffset=a.DefaultTargetOffset,this.isUpVectorFlipped=!1,this.angleOffsetFromUp=0,this.wasMovedByUser=!1,this.wasMovedBySwitchCameraAction=!1,this._createdAt=typeof performance<"u"?performance.now():0,this._tickProjectionTransition=()=>{let t=this._projectionTransition;if(void 0===t)return;if(this.disposed)return void this._endProjectionTransition();t.raf=requestAnimationFrame(this._tickProjectionTransition);let e=W.projectionTransitionRequestRender??t.requestRender;this.updateProjectionMatrix(),e?.()},this.super_Entity(t,e),this.previousProjectionMatrix=new h,this.matrixAutoUpdate=!0,this.width=window.innerWidth,this.height=window.innerHeight;let r=this.width,i=this.height;this.orthoCamera=new s(-.5*r,.5*r,.5*i,-.5*i,-5e4,1e4),this.perspCamera=new v(45,r/i,50,1e4),this.left=this.orthoCamera.left,this.right=this.orthoCamera.right,this.top=this.orthoCamera.top,this.bottom=this.orthoCamera.bottom,this.far=this.orthoCamera.far,this.view=this.orthoCamera.view,this.aspect=this.perspCamera.aspect,this.focus=this.perspCamera.focus,this.filmGauge=this.perspCamera.filmGauge,this.filmOffset=this.perspCamera.filmOffset,this.objectHelper.update()}static withoutProjectionTransition(t){let e=W.projectionTransitionsEnabled;W.projectionTransitionsEnabled=!1;try{return t()}finally{W.projectionTransitionsEnabled=e}}get isPerspectiveCamera(){return"PerspectiveCamera"===this.cameraType}get isOrthographicCamera(){return!this.isPerspectiveCamera}get cameraType(){return this._cameraType}set fov(t){this.perspCamera.fov=t}get fov(){return this.perspCamera.fov}setNear(t,e){"PerspectiveCamera"===t?this.perspCamera.near=e:this.orthoCamera.near=e}setZoom(t,e){e>=0&&("PerspectiveCamera"===t?this.perspCamera.zoom=e:this.orthoCamera.zoom=e)}set cameraType(t){"PerspectiveCamera"===t?this.toPerspective():"OrthographicCamera"===t&&this.toOrthographic()}get near(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.near:this.orthoCamera.near}set near(t){"PerspectiveCamera"===this._cameraType?this.perspCamera.near=t:this.orthoCamera.near=t}get zoom(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.zoom:this.orthoCamera.zoom}set zoom(t){t>=0&&("PerspectiveCamera"===this._cameraType?this.perspCamera.zoom=t:this.orthoCamera.zoom=t)}lookAt(t,e,r){"number"==typeof t&&(t=new p(t,e,r)),super.lookAt(t),this.getWorldPosition(x),this.targetOffset=x.distanceTo(t)}getTarget(t=new p){return this.getWorldDirection(b),this.getWorldPosition(x),b.multiplyScalar(this.targetOffset),t.copy(x).add(b),t}getDistanceToTarget(){let t=this.getTarget();return this.getWorldPosition(x),x.distanceTo(t)}updateUp(){this.getWorldQuaternion(_),M.set(0,0,1).applyQuaternion(_),O.copy(c.DEFAULT_UP),this.isUpVectorFlipped&&O.negate(),O.applyQuaternion(_),F.copy(c.DEFAULT_UP).projectOnPlane(M),this.angleOffsetFromUp=F.angleTo(O),this.angleOffsetFromUp*=F.cross(O).dot(M)>=0?1:-1}updateTransformState(t,e){let r=super.updateTransformState(t,e);return void 0!==t.isUpVectorFlipped&&(this.isUpVectorFlipped=t.isUpVectorFlipped),this.updateUp(),r}getViewFrontToObject(t){let e=t.getWorldPosition(new p),r=t.getWorldDirection(new p).multiplyScalar(this.targetOffset);return{position:e.clone().add(r),target:e}}getViewToTarget(t){let e=this.getWorldDirection(new p).multiplyScalar(this.targetOffset);return{position:t.clone().sub(e),target:t}}getViewToObject(t){let e=new p;return t.getWorldPosition(e),this.getViewToTarget(e)}setViewplaneSize(t,e,r=!1){if(this.aspect=t/e,r){let r=t>e?this.aspect:1,i=t>e?1:this.aspect;this.left=-395*r,this.right=395*r,this.top=1/i*395,this.bottom=1/i*-395}else this.left=.5*-t,this.right=.5*t,this.top=.5*e,this.bottom=.5*-e;this.updateProjectionMatrix()}copyViewPlaneSize(t){this.aspect=t.aspect,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.updateProjectionMatrix()}toOrthographic(){this.orthoCamera.left=this.left,this.orthoCamera.right=this.right,this.orthoCamera.top=this.top,this.orthoCamera.bottom=this.bottom,this.orthoCamera.view=this.view,this.orthoCamera.far=this.far,this.orthoCamera.updateProjectionMatrix(),this.projectionMatrix=this.orthoCamera.projectionMatrix,this.projectionMatrixInverse=this.orthoCamera.projectionMatrixInverse,this._cameraType="OrthographicCamera",this._applyProjectionTransition(),this.objectHelper&&this.objectHelper.update()}toPerspective(){this.perspCamera.aspect=this.aspect,this.perspCamera.fov=this.fov,this.perspCamera.view=this.view,this.perspCamera.far=this.far,this.perspCamera.updateProjectionMatrix(),this.projectionMatrix=this.perspCamera.projectionMatrix,this.projectionMatrixInverse=this.perspCamera.projectionMatrixInverse,this._cameraType="PerspectiveCamera",this._applyProjectionTransition(),this.objectHelper&&this.objectHelper.update()}get isProjectionTransitioning(){return void 0!==this._projectionTransition}get projectionTransitionProgress(){let t=this._projectionTransition;if(void 0===t)return 1;let e=(performance.now()-t.start)/t.duration;return e>=1?1:e<=0?0:P(e)}get _activeSubCamera(){return"PerspectiveCamera"===this._cameraType?this.perspCamera:this.orthoCamera}_canAnimateProjection(){return W.projectionTransitionsEnabled&&"function"==typeof requestAnimationFrame&&typeof performance<"u"&&performance.now()-this._createdAt>=W.projectionTransitionMinAgeMs}_beginProjectionTransition(t){let e=this._projectionTransition;void 0===e&&(e={from:new h,blend:new h,blendInverse:new h,start:0,duration:W.projectionTransitionDuration,referenceDepth:1,raf:0,requestRender:t},this._projectionTransition=e),e.from.copy(this.projectionMatrix),e.start=performance.now(),e.duration=W.projectionTransitionDuration,e.referenceDepth=Number.isFinite(this.targetOffset)?Math.max(1,this.targetOffset):1,t&&(e.requestRender=t),0!==e.raf&&cancelAnimationFrame(e.raf),e.raf=requestAnimationFrame(this._tickProjectionTransition)}_applyProjectionTransition(){let t=this._projectionTransition;if(void 0===t)return;let e=(performance.now()-t.start)/t.duration;if(e>=1)return void this._endProjectionTransition();let r=P(e),i=t.from.elements,a=this._activeSubCamera.projectionMatrix.elements,o=t.blend.elements,s=t.referenceDepth,n=Math.max(1e-6,i[15]-i[11]*s),p=r*n/(r*n+(1-r)*Math.max(1e-6,a[15]-a[11]*s));for(let t=0;t<16;t++)o[t]=i[t]+(a[t]-i[t])*p;t.blendInverse.copy(t.blend).invert(),this.projectionMatrix=t.blend,this.projectionMatrixInverse=t.blendInverse}_endProjectionTransition(){let t=this._projectionTransition;if(void 0===t)return;0!==t.raf&&cancelAnimationFrame(t.raf),this._projectionTransition=void 0;let e=this._activeSubCamera;this.projectionMatrix=e.projectionMatrix,this.projectionMatrixInverse=e.projectionMatrixInverse}_syncProjectionTransition(t){let e=t._projectionTransition;if(void 0===e)return void(void 0!==this._projectionTransition&&this._endProjectionTransition());let r=this._projectionTransition;void 0===r?(r={from:new h,blend:new h,blendInverse:new h,start:0,duration:1,referenceDepth:1,raf:0,requestRender:void 0},this._projectionTransition=r):0!==r.raf&&(cancelAnimationFrame(r.raf),r.raf=0),r.requestRender=void 0,r.from.copy(e.from),r.start=e.start,r.duration=e.duration,r.referenceDepth=e.referenceDepth,this._applyProjectionTransition()}setFocalLength(t){this.perspCamera.setFocalLength(t),this.toPerspective()}getFocalLength(){return this.perspCamera.getFocalLength()}getEffectiveFOV(){return this.perspCamera.getEffectiveFOV()}getFilmWidth(){return this.perspCamera.getFilmWidth()}getFilmHeight(){return this.perspCamera.getFilmHeight()}setViewOffset(t,e,r,i,a,o){"PerspectiveCamera"===this._cameraType?this.perspCamera.setViewOffset(t,e,r,i,a,o):this.orthoCamera.setViewOffset(t,e,r,i,a,o),this._applyProjectionTransition()}clearViewOffset(){"PerspectiveCamera"===this._cameraType?(this.perspCamera.clearViewOffset(),this.toPerspective()):(this.orthoCamera.clearViewOffset(),this.toOrthographic())}copyHistory(){this.previousProjectionMatrix&&this.previousProjectionMatrix.copy(this.projectionMatrix)}updateProjectionMatrix(){"PerspectiveCamera"===this._cameraType?this.toPerspective():"OrthographicCamera"===this._cameraType&&this.toOrthographic()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}copy(t,e){return super.copy(t,e),this.parent=t.parent,this.orthoCamera.copy(t.orthoCamera),this.perspCamera.copy(t.perspCamera),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.far=t.far,this.view=null===t.view?null:Object.assign({},t.view),this._cameraType=t._cameraType,this.aspect=t.aspect,this.fov=t.fov,this.focus=t.focus,this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this.targetOffset=a.sanitizeTargetOffset(t.targetOffset),this.updateProjectionMatrix(),this._syncProjectionTransition(t),this}toCameraState(t=[]){let e={type:this.cameraType,far:this.far,orthographic:{near:this.orthoCamera.near,zoom:this.orthoCamera.zoom},perspective:{near:this.perspCamera.near,fov:this.perspCamera.fov,zoom:this.perspCamera.zoom},up:this.up.toArray(),targetOffset:this.targetOffset,isUpVectorFlipped:this.isUpVectorFlipped};return i(e,t)}updateCameraSubtype(t,e){let r="perspective"===t?"PerspectiveCamera":"OrthographicCamera";void 0!==e.zoom&&this.setZoom(r,e.zoom),void 0!==e.near&&this.setNear(r,e.near),void 0!==e.fov&&"PerspectiveCamera"===r&&(this.fov=e.fov)}updateState(t,e){this.updateCameraState(t,e)}updateCameraState(t,e){this.updateState_Entity(t,e),void 0!==t.far&&(this.far=t.far),void 0!==t.orthographic&&this.updateCameraSubtype("orthographic",t.orthographic),void 0!==t.perspective&&this.updateCameraSubtype("perspective",t.perspective),void 0!==t.type&&(t.type!==this._cameraType&&this._canAnimateProjection()&&this._beginProjectionTransition(e?.shared.requestRender),this.cameraType=t.type),void 0!==t.up&&this.up.fromArray(t.up.map(t=>"number"==typeof t?t:0)),void 0!==t.targetOffset&&(this.targetOffset=a.sanitizeTargetOffset(t.targetOffset)),void 0!==t.isUpVectorFlipped&&(this.isUpVectorFlipped=t.isUpVectorFlipped),this.updateProjectionMatrix()}updateByPatchedOp(t,e,r){super.updateByPatchedOp(t,e,r),1===t.path.length&&0===t.type&&this.updateCameraSubtype(t.path[0],t.props)}toState(t){return{...super.toState(t),...this.toCameraState(t),type:this.cameraType}}},A=W;A.projectionTransitionsEnabled=!1,A.projectionTransitionDuration=350,A.projectionTransitionMinAgeMs=1e3;export{A as a};
|
|
Binary file
|
|
Binary file
|