mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-07-09 13:34:43 +00:00
1 line
No EOL
978 B
JavaScript
1 line
No EOL
978 B
JavaScript
import{n as e}from"./jsx-runtime-BpGWiA-R.js";import{n as t,r as n}from"./traditional-CCqNJZlI.js";var r=e();function i(e,t=null,n=`feature`){return{targets:e,categoryName:t,tourType:n,currentIndex:0,phase:`traveling`,elapsed:0,phaseDuration:0,curve:null,startPos:null,startQuat:null,orbitCenter:null,orbitRadius:null,orbitStartAngle:0}}var a=n(e=>({animation:null,flyTo(t,n=`feature`){e({animation:i([t],null,n)})},startTour(t,n,r=`feature`){t.length!==0&&e({animation:i(t,n,r)})},advanceTarget(){e(e=>e.animation?{animation:{...e.animation,currentIndex:e.animation.currentIndex+1,phase:`traveling`,elapsed:0,curve:null,startPos:null,startQuat:null,orbitCenter:null,orbitRadius:null,orbitStartAngle:0}}:e)},cancel(){e({animation:null})}}));function o(e,n){return t(a,e,n)}function s(e){let t=(0,r.c)(2),n;return t[0]===e?n=t[1]:(n=t=>{let n=t.animation;return!n||n.tourType!==`debug`?!1:n.targets[n.currentIndex]?.entityId===e},t[0]=e,t[1]=n),o(n)}export{o as n,s as r,a as t}; |