1import{C as T}from"./Canvas2DFigure-CTHNVuxJ.js";import{F as M}from"./draw-C9i6pDRq.js";import"./Figure-jqdbFS1A.js";import"./index-5oHlzLJt.js";const P={jet:{label:"fighter jet",speed:"Mach 0.9",size:6,bright:1},drone:{label:"quadcopter drone",speed:"30 m/s",size:3.5,bright:.7},missile:{label:"ballistic warhead",speed:"Mach 8",size:5,bright:1}},d=l=>{const t=Math.sin(l*12.9898)*43758.5453;return t-Math.floor(t)};class j extends T{controlsSchema=[{type:"segmented",name:"type",label:"Target",options:[["Jet","jet"],["Drone","drone"],["Missile","missile"]],value:"jet"},{type:"range",name:"speed",label:"Speed",min:.2,max:2.5,step:.1,value:1,format:t=>`${t.toFixed(1)}Ã`}];init(){super.init(),this.mode="animated",this.t=0}update(t){this.t+=t*this.params.speed}draw(){const t=this.g,i=this.w,e=this.h;if(this.palette,!t)return;t.fillStyle="#0d1017",t.fillRect(0,0,i,e);for(let s=0;s<220;s++){const f=d(s)*i,g=d(s+999)*e,c=40+d(s+7)*70;t.fillStyle=`rgba(${c},${c+8},${c+12},0.7)`;const y=.6+d(s+3)*1.4;t.fillRect(f,g,y,y)}const r=P[this.params.type],o=this.t*.12%1,m=40+o*(i-80),b=e*.5+Math.sin(o*Math.PI*2)*e*.22,x=Math.min(1,this.params.speed/1.2);for(let s=6;s>=1;s--){const f=(o-s*.012*x+1)%1,g=40+f*(i-80),c=e*.5+Math.sin(f*Math.PI*2)*e*.22;t.fillStyle=`rgba(240,180,90,${.06*s*x})`,t.beginPath(),t.arc(g,c,r.size,0,Math.PI*2),t.fill()}t.fillStyle=`rgba(255,210,120,${r.bright})`,t.beginPath(),t.arc(m,b,r.size,0,Math.PI*2),t.fill(),t.shadowColor="rgba(255,200,100,0.8)",t.shadowBlur=12,t.beginPath(),t.arc(m,b,r.size*.6,0,Math.PI*2),t.fill(),t.shadowBlur=0;const a=26;t.strokeStyle="#3ee08a",t.lineWidth=1.5;const n=m,h=b;p(t,n-a,h-a,8,1,1),p(t,n+a,h-a,8,-1,1),p(t,n-a,h+a,8,1,-1),p(t,n+a,h+a,8,-1,-1),t.fillStyle="#3ee08a",t.font=`600 12px ${M}`,t.textAlign="left";const u=`TRACKING · ${r.label} · ${r.speed}`,S=Math.max(10,Math.min(n-a,i-t.measureText(u).width-10));t.fillText(u,S,h-a-8),t.fillStyle="rgba(200,205,215,0.75)",t.font=`11px ${M}`,t.textAlign="left",t.fillText("grey clutter · amber target · green custodial track",12,e-10),this.params.speed>1.5&&(t.fillStyle="#ff9d5c",t.textAlign="right",t.fillText("fast â motion smear",i-12,e-10))}}function p(l,t,i,e,r,o){l.beginPath(),l.moveTo(t,i+o*e),l.lineTo(t,i),l.lineTo(t+r*e,i),l.stroke()}export{j as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.