@vimp-games/tanks 0.20.2 → 0.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client-B1rlGrPx.js +84 -0
- package/dist/manifest.json +3 -3
- package/dist/maps/garden.json +1 -1
- package/package.json +1 -1
- package/dist/client-Db8dXOAG.js +0 -84
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import{UniformGroup as ke,Filter as Ie,GpuProgram as Le,GlProgram as Ce,defaultFilterVert as Pe,Spritesheet as ze,Container as D,Sprite as U,Rectangle as X,MeshSimple as Ee,Ticker as Y,Assets as ge,Texture as Re,Graphics as O,PerspectiveMesh as De,Text as Fe,Particle as Ve,ParticleContainer as Ht,BlurFilter as Ut}from"pixi.js";const Oe=4;class Yt{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$t.unregister(this),t}free(){const t=this.__destroy_into_raw();p.__wbg_clientcore_free(t,0)}abi_describe(){let t,e;try{const i=p.clientcore_abi_describe(this.__wbg_ptr);return t=i[0],e=i[1],Q(i[0],i[1])}finally{p.__wbindgen_free(t,e,1)}}apply_aim(t,e,i,n){p.clientcore_apply_aim(this.__wbg_ptr,t,e,i,n)}apply_input(t,e,i){const n=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),o=F,r=it(e,p.__wbindgen_malloc,p.__wbindgen_realloc),a=F;p.clientcore_apply_input(this.__wbg_ptr,n,o,r,a,i)}cycle_weapon(t){p.clientcore_cycle_weapon(this.__wbg_ptr,t)}debug_json(){let t,e;try{const i=p.clientcore_debug_json(this.__wbg_ptr);return t=i[0],e=i[1],Q(i[0],i[1])}finally{p.__wbindgen_free(t,e,1)}}decode_frame(t){let e,i;try{const n=Dt(t,p.__wbindgen_malloc),o=F,r=p.clientcore_decode_frame(this.__wbg_ptr,n,o);return e=r[0],i=r[1],Q(r[0],r[1])}finally{p.__wbindgen_free(e,i,1)}}dispatch(t,e){const i=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),n=F,o=Dt(e,p.__wbindgen_malloc),r=F,a=p.clientcore_dispatch(this.__wbg_ptr,i,n,o,r);var l=Ye(a[0],a[1]).slice();return p.__wbindgen_free(a[0],a[1]*1,1),l}hot_ptr(){return p.clientcore_hot_ptr(this.__wbg_ptr)>>>0}hot_values(){const t=p.clientcore_hot_values(this.__wbg_ptr);var e=Kt(t[0],t[1]).slice();return p.__wbindgen_free(t[0],t[1]*4,4),e}map_dynamics_to_world(t,e,i){const n=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),o=F,r=p.clientcore_map_dynamics_to_world(this.__wbg_ptr,n,o,e,i);var a=Kt(r[0],r[1]).slice();return p.__wbindgen_free(r[0],r[1]*4,4),a}map_generation(){return p.clientcore_map_generation(this.__wbg_ptr)>>>0}my_game_id(){return p.clientcore_my_game_id(this.__wbg_ptr)}constructor(t){const e=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),i=F,n=p.clientcore_new(e,i);if(n[2])throw jt(n[1]);return this.__wbg_ptr=n[0],$t.register(this,this.__wbg_ptr,this),this}offset(){return p.clientcore_offset(this.__wbg_ptr)}push_frame(t,e){const i=Dt(t,p.__wbindgen_malloc),n=F;return p.clientcore_push_frame(this.__wbg_ptr,i,n,e)!==0}ramp_runs(){let t,e;try{const i=p.clientcore_ramp_runs(this.__wbg_ptr);return t=i[0],e=i[1],Q(i[0],i[1])}finally{p.__wbindgen_free(t,e,1)}}reset(){p.clientcore_reset(this.__wbg_ptr)}resync(){p.clientcore_resync(this.__wbg_ptr)}sample(t){return p.clientcore_sample(this.__wbg_ptr,t)>>>0}set_active(t){p.clientcore_set_active(this.__wbg_ptr,t)}set_map(t){const e=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),i=F,n=p.clientcore_set_map(this.__wbg_ptr,e,i);if(n[1])throw jt(n[0])}set_model(t){const e=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),i=F;p.clientcore_set_model(this.__wbg_ptr,e,i)}sync_panel(t){const e=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),i=F;p.clientcore_sync_panel(this.__wbg_ptr,e,i)}take_divergence(){let t,e;try{const i=p.clientcore_take_divergence(this.__wbg_ptr);return t=i[0],e=i[1],Q(i[0],i[1])}finally{p.__wbindgen_free(t,e,1)}}take_frames(){let t,e;try{const i=p.clientcore_take_frames(this.__wbg_ptr);return t=i[0],e=i[1],Q(i[0],i[1])}finally{p.__wbindgen_free(t,e,1)}}try_fire(t){const e=p.clientcore_try_fire(this.__wbg_ptr,t);let i;return e[0]!==0&&(i=Q(e[0],e[1]).slice(),p.__wbindgen_free(e[0],e[1]*1,1)),i}}Symbol.dispose&&(Yt.prototype[Symbol.dispose]=Yt.prototype.free);function Xe(){return{__proto__:null,"./vimp_tanks_core_bg.js":{__proto__:null,__wbg_Error_92b29b0548f8b746:function(t,e){return Error(Q(t,e))},__wbg___wbindgen_throw_344f42d3211c4765:function(t,e){throw new Error(Q(t,e))},__wbindgen_init_externref_table:function(){const t=p.__wbindgen_externrefs,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)}}}}const $t=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(s=>p.__wbg_clientcore_free(s,1));typeof FinalizationRegistry>"u"||new FinalizationRegistry(s=>p.__wbg_gamecore_free(s,1));function Kt(s,t){return s=s>>>0,Be().subarray(s/4,s/4+t)}function Ye(s,t){return s=s>>>0,lt().subarray(s/1,s/1+t)}let dt=null;function Be(){return(dt===null||dt.byteLength===0)&&(dt=new Float32Array(p.memory.buffer)),dt}function Q(s,t){return He(s>>>0,t)}let pt=null;function lt(){return(pt===null||pt.byteLength===0)&&(pt=new Uint8Array(p.memory.buffer)),pt}function Dt(s,t){const e=t(s.length*1,1)>>>0;return lt().set(s,e/1),F=s.length,e}function it(s,t,e){if(e===void 0){const a=gt.encode(s),l=t(a.length,1)>>>0;return lt().subarray(l,l+a.length).set(a),F=a.length,l}let i=s.length,n=t(i,1)>>>0;const o=lt();let r=0;for(;r<i;r++){const a=s.charCodeAt(r);if(a>127)break;o[n+r]=a}if(r!==i){r!==0&&(s=s.slice(r)),n=e(n,i,i=r+s.length*3,1)>>>0;const a=lt().subarray(n+r,n+i),l=gt.encodeInto(s,a);r+=l.written,n=e(n,i,r,1)>>>0}return F=r,n}function jt(s){const t=p.__wbindgen_externrefs.get(s);return p.__externref_table_dealloc(s),t}let Mt=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Mt.decode();const Ne=2146435072;let Ft=0;function He(s,t){return Ft+=t,Ft>=Ne&&(Mt=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Mt.decode(),Ft=t),Mt.decode(lt().subarray(s,s+t))}const gt=new TextEncoder;"encodeInto"in gt||(gt.encodeInto=function(s,t){const e=gt.encode(s);return t.set(e),{read:s.length,written:e.length}});let F=0,p;function Ue(s,t){return p=s.exports,dt=null,pt=null,p.__wbindgen_start(),p}async function We(s,t){if(typeof Response=="function"&&s instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(s,t)}catch(n){if(s.ok&&e(s.type)&&s.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",n);else throw n}const i=await s.arrayBuffer();return await WebAssembly.instantiate(i,t)}else{const i=await WebAssembly.instantiate(s,t);return i instanceof WebAssembly.Instance?{instance:i,module:s}:i}function e(i){switch(i){case"basic":case"cors":case"default":return!0}return!1}}async function Ge(s){if(p!==void 0)return p;s!==void 0&&(Object.getPrototypeOf(s)===Object.prototype?{module_or_path:s}=s:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),s===void 0&&(s=new URL("/assets/vimp_tanks_core_bg-BdjeV0Io.wasm",import.meta.url));const t=Xe();(typeof s=="string"||typeof Request=="function"&&s instanceof Request||typeof URL=="function"&&s instanceof URL)&&(s=fetch(s));const{instance:e,module:i}=await We(await s,t);return Ue(e)}const Ze='@charset "UTF-8";#panel table td#panel-bullet:before{content:"bullet: "}#panel table td#panel-bomb:before{content:"bomb: "}#panel table td#panel-time:before{content:"time: "}#vimp{background:#222;position:absolute;inset:0;margin:auto;z-index:1}#radar{position:absolute;right:1%;top:35px;z-index:2;border-radius:50%;background-color:#00be5acc;box-shadow:inset 0 0 47px #ee6,0 0 0 3px #054}#team1{color:#f56}#team2{color:#7ed}#spectators{color:#fe5}#team1 tHead tr,#team2 tHead tr,#spectators tHead tr{border-bottom:1px solid #888;text-transform:capitalize;font-weight:700}#team1 tBody tr,#team2 tBody tr{border-bottom:1px solid #444}#team1 tHead td:first-child:before{content:"team1 ("}#team1 tHead td:first-child:after{content:")"}#team2 tHead td:first-child:before{content:"team2 ("}#team2 tHead td:first-child:after{content:")"}#spectators tHead td:first-child:before{content:"spectators"}#spectators tBody td:nth-child(1){padding:0 1%;line-height:1.4em}#spectators tBody td:nth-child(2),#spectators tBody td:nth-child(3),#spectators tBody td:nth-child(4),#spectators tBody td:nth-child(5){display:none}',qe={mode:"hole",radius:260,softness:.45,minAlpha:.12,layerAlpha:.4,fadeRate:6,lowerTint:11579584},R={shear:.22,levelZStride:100},ft={slices:4,rampSegments:4,sideTint:10133674},St={scaleGain:.1,baseAlpha:.4,alphaFalloff:.12,sizeFactor:1.05},_t={lift:.35,vertices:6,shading:.28,lightDir:[-.7,-.7]},mt={fullImpact:6,squash:.14,duration:260,minImpact:1.5},$e=R.levelZStride,I=(s,t)=>s+$e*(t||0),Bt=(s,t)=>Math.min(s||0,Math.round(t));function J(s,t){const e=t?.screen;return!s||!e||!s.scale.x||!s.scale.y?null:{x:(e.width/2-s.position.x)/s.scale.x,y:(e.height/2-s.position.y)/s.scale.y,scaleX:s.scale.x,scaleY:s.scale.y}}function st(s,t,e,i){return!e||!i?{x:s,y:t}:{x:s+(s-e.x)*i,y:t+(t-e.y)*i}}function q(s,t,e,i=1){const n=typeof i=="number"?i:i.x,o=typeof i=="number"?i:i.y;if(!t||!e){s.scale.set(n,o),s.position.set(0,0);return}s.scale.set(n*(1+e),o*(1+e)),s.position.set(-t.x*e,-t.y*e)}function xe(s){const t=typeof s=="number"?s:s.x,e=typeof s=="number"?s:s.y;return{x:t,y:e}}function Jt(s,t,e){return Math.floor(s/t/e)}function Ke(s,t,e){return Math.round(s/t/e)}function je(s,t,e){return{map:s,scale:t,step:e}}function ye(s,t,e,i){const n=Jt(t,s.scale.x,s.step),o=Jt(e,s.scale.y,s.step),r=s.map?.[o]?.[n];return r!==void 0&&i.has(r)}const we=s=>s.radius*(1-s.softness),Je=(s,t,e)=>{if(t<=s)return e<t?0:1;const i=Math.min(1,Math.max(0,(e-s)/(t-s)));return i*i*(3-2*i)};function Qe({viewLevel:s,viewX:t,viewY:e,level:i,x:n,y:o,cfg:r}){if((i||0)<=(s||0))return 1;if(r.mode==="layer")return r.layerAlpha;const a=n-t,l=o-e,h=Math.sqrt(a*a+l*l),_=Je(we(r),r.radius,h);return r.minAlpha+(1-r.minAlpha)*_}function ti(s,t,e){return(t||0)<(s||0)?e.lowerTint:16777215}const ei=`
|
|
2
|
+
precision highp float;
|
|
3
|
+
|
|
4
|
+
in vec2 vTextureCoord;
|
|
5
|
+
|
|
6
|
+
out vec4 finalColor;
|
|
7
|
+
|
|
8
|
+
uniform sampler2D uTexture;
|
|
9
|
+
uniform vec4 uInputSize;
|
|
10
|
+
uniform vec4 uOutputFrame;
|
|
11
|
+
|
|
12
|
+
uniform vec2 uHoleCenter;
|
|
13
|
+
// x - внешний радиус, y - внутренний, z - alpha в центре дыры
|
|
14
|
+
uniform vec3 uHoleParams;
|
|
15
|
+
|
|
16
|
+
void main(void)
|
|
17
|
+
{
|
|
18
|
+
vec4 color = texture(uTexture, vTextureCoord);
|
|
19
|
+
vec2 pixel = uOutputFrame.xy + vTextureCoord * uInputSize.xy;
|
|
20
|
+
float d = distance(pixel, uHoleCenter);
|
|
21
|
+
float t = smoothstep(uHoleParams.y, uHoleParams.x, d);
|
|
22
|
+
|
|
23
|
+
finalColor = color * mix(uHoleParams.z, 1.0, t);
|
|
24
|
+
}
|
|
25
|
+
`,Qt=`
|
|
26
|
+
struct GlobalFilterUniforms {
|
|
27
|
+
uInputSize:vec4<f32>,
|
|
28
|
+
uInputPixel:vec4<f32>,
|
|
29
|
+
uInputClamp:vec4<f32>,
|
|
30
|
+
uOutputFrame:vec4<f32>,
|
|
31
|
+
uGlobalFrame:vec4<f32>,
|
|
32
|
+
uOutputTexture:vec4<f32>,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
struct HoleUniforms {
|
|
36
|
+
uHoleCenter:vec2<f32>,
|
|
37
|
+
uHoleParams:vec3<f32>,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;
|
|
41
|
+
@group(0) @binding(1) var uTexture: texture_2d<f32>;
|
|
42
|
+
@group(0) @binding(2) var uSampler : sampler;
|
|
43
|
+
|
|
44
|
+
@group(1) @binding(0) var<uniform> holeUniforms : HoleUniforms;
|
|
45
|
+
|
|
46
|
+
struct VSOutput {
|
|
47
|
+
@builtin(position) position: vec4<f32>,
|
|
48
|
+
@location(0) uv : vec2<f32>
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
fn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>
|
|
52
|
+
{
|
|
53
|
+
var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;
|
|
54
|
+
|
|
55
|
+
position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;
|
|
56
|
+
position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y)
|
|
57
|
+
- gfu.uOutputTexture.z;
|
|
58
|
+
|
|
59
|
+
return vec4(position, 0.0, 1.0);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
fn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
|
|
63
|
+
{
|
|
64
|
+
return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@vertex
|
|
68
|
+
fn mainVertex(@location(0) aPosition : vec2<f32>) -> VSOutput {
|
|
69
|
+
return VSOutput(
|
|
70
|
+
filterVertexPosition(aPosition),
|
|
71
|
+
filterTextureCoord(aPosition)
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@fragment
|
|
76
|
+
fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
|
|
77
|
+
var color = textureSample(uTexture, uSampler, uv);
|
|
78
|
+
var pixel = gfu.uOutputFrame.xy + uv * gfu.uInputSize.xy;
|
|
79
|
+
var d = distance(pixel, holeUniforms.uHoleCenter);
|
|
80
|
+
var t = smoothstep(holeUniforms.uHoleParams.y, holeUniforms.uHoleParams.x, d);
|
|
81
|
+
|
|
82
|
+
return color * mix(holeUniforms.uHoleParams.z, 1.0, t);
|
|
83
|
+
}
|
|
84
|
+
`;function ii(s){const t=new ke({uHoleCenter:{value:new Float32Array([0,0]),type:"vec2<f32>"},uHoleParams:{value:new Float32Array([s.radius,we(s),s.minAlpha]),type:"vec3<f32>"}});return new Ie({glProgram:Ce.from({vertex:Pe,fragment:ei,name:"see-through-hole-filter"}),gpuProgram:Le.from({vertex:{source:Qt,entryPoint:"mainVertex"},fragment:{source:Qt,entryPoint:"mainFragment"}}),resources:{holeUniforms:t}})}function si(s,{centerX:t,centerY:e,radius:i,softness:n,minAlpha:o}){const r=s.resources.holeUniforms.uniforms;r.uHoleCenter[0]=t,r.uHoleCenter[1]=e,r.uHoleParams[0]=i,r.uHoleParams[1]=i*(1-n),r.uHoleParams[2]=o}const ni=.01;function te(){return{strength:0,filter:null,attached:!1,tick:null}}function ve(s,t,e){return s.strength+=((t?1:0)-s.strength)*e,s.strength}function Se(s,t,e,i,n,o){if(t.strength<ni||!n){t.attached&&(s.filters=[],t.attached=!1);return}t.filter||(t.filter=ii(e)),t.attached||(s.filters=[t.filter],t.attached=!0);const r=st(i.x,i.y,o,i.z*R.shear);si(t.filter,{centerX:r.x*n.scale.x+n.position.x,centerY:r.y*n.scale.y+n.position.y,radius:e.radius*n.scale.x,softness:e.softness,minAlpha:1+(e.minAlpha-1)*t.strength})}function ee(s,t){if(!s.filter){s.attached=!1;return}t.filters=[],s.attached=!1,s.filter.destroy(),s.filter=null}async function be({baseTexture:s,spriteSheetData:t,map:e,tiles:i,step:n,renderer:o}){const r={};t.frames.forEach((f,g)=>{const[m,w,x,y]=f;r[`frame${g}`]={frame:{x:m,y:w,w:x,h:y}}});const a={frames:r,meta:{scale:"1"}},l=new ze(s,a);await l.parse();const h=e[0].length*n,_=e.length*n,c=new D;for(let f=0,g=e.length;f<g;f+=1)for(let m=0,w=e[f].length;m<w;m+=1){const x=e[f][m];if(i.includes(x)){const y=`frame${x}`,v=l.textures[y];if(v){const d=new U(v);d.x=m*n,d.y=f*n,c.addChild(d)}else console.warn(`Texture not found. Tile: ${x}, sprite: ${y}`)}}const u=o.generateTexture({target:c,frame:new X(0,0,h,_)});return c.destroy({children:!0}),l.destroy(),u}function ri(s,t){const e=[];if(!Array.isArray(s))return e;for(const i of s){const n=i.axis===0?0:1,o=n===0?1:0,r=t(i.min,n),a=t(i.max,n),l=t(i.crossMin,o),h=t(i.crossMax,o),_=typeof i.railMin=="number"&&typeof i.railMax=="number";e.push({axis:i.axis,sign:i.sign,from:i.from,to:i.to,block:i.block,rail0:_?t(i.railMin,n):null,rail1:_?t(i.railMax,n):null,col0:n===0?r:l,col1:n===0?a:h,row0:n===0?l:r,row1:n===0?h:a})}return oi(e)}function oi(s){const t=new Map;for(const i of s){const n=t.get(i.block);n?n.push(i):t.set(i.block,[i])}const e=[];for(const i of t.values()){const n=a=>a.axis===1?a.col0:a.row0,o=a=>a.axis===1?a.col1:a.row1;i.sort((a,l)=>n(a)-n(l));let r=null;for(const a of i){if(r&&n(a)===o(r)){r.axis===1?r.col1=a.col1:r.row1=a.row1;continue}r={...a},e.push(r)}}return e}function Me(s){const t=new Ee(s);return t.geometry.batchMode="batch",t}function ai({bakedTexture:s,level:t,volume:e,shear:i,count:n,sideTint:o}){const r=[];for(let a=1;a<=n;a+=1){const l=new U(s);l.tint=a===n?16777215:o,r.push({target:l,k:(t+e*a/n)*i,occluder:!0})}return r}function li({runs:s,texture:t,step:e,shear:i,baseScale:n,segments:o,sideTint:r}){const a=[],l=t.width||1,h=t.height||1,_=Math.max(1,Math.round(o)||1);for(const c of s){const u=c.axis===0,f=u?c.col1-c.col0:c.row1-c.row0,g=Math.max(1,f*_),m=u?c.col0:c.row0,w=typeof c.rail0=="number"&&typeof c.rail1=="number"?{first:(c.rail0-m)*_,last:(c.rail1-m)*_}:null,x=c.col0*e,y=c.col1*e,v=c.row0*e,d=c.row1*e,b=g+1,S=Math.min(c.from,c.to),M=Math.max(c.from,c.to),A=S*i,L=new Float32Array(b*4),k=new Float32Array(b*4),E=new Float32Array(b*4),W=new Float32Array(b*2),C=new Uint32Array(g*6),B=1;for(let G=0;G<b;G+=1){const Z=G/g,et=c.sign>0?Z:1-Z,Wt=(c.from+(c.to-c.from)*et)*i,Gt=u?x:v,ct=Gt+((u?y:d)-Gt)*Z,Pt=u?ct:x,zt=u?v:ct,Et=u?ct:y,Rt=u?d:ct,N=G*4;L[N]=Pt*n.x,L[N+1]=zt*n.y,L[N+2]=Et*n.x,L[N+3]=Rt*n.y,k[N]=Pt/l,k[N+1]=zt/h,k[N+2]=Et/l,k[N+3]=Rt/h;const Zt=u?zt+B:Pt+B,qt=u?Rt-B:Et-B,vt=Math.min(Math.max(ct,(u?x:v)+B),(u?y:d)-B);E[N]=(u?vt:Zt)/l,E[N+1]=(u?Zt:vt)/h,E[N+2]=(u?vt:qt)/l,E[N+3]=(u?qt:vt)/h,W[G*2]=Wt,W[G*2+1]=Wt}for(let G=0;G<g;G+=1){const Z=G*2,et=G*6;C[et]=Z,C[et+1]=Z+1,C[et+2]=Z+3,C[et+3]=Z,C[et+4]=Z+3,C[et+5]=Z+2}const Ct=Me({texture:t,vertices:L.slice(),uvs:k,indices:C});a.push(hi({base:L,uvs:E,heights:W,points:b,texture:t,kBase:A,sideTint:r,endIndex:c.sign>0?b-1:0,rails:w})),a.push({target:Ct,k:M*i,base:L,heights:W})}return a}function hi(s){const{base:t,uvs:e,heights:i,points:n,texture:o,kBase:r,endIndex:a,sideTint:l,rails:h}=s,_=h?Math.max(0,Math.min(h.first,n-1)):0,c=h?Math.max(_,Math.min(h.last,n-1)):-1,u=h?c-_+1:0,f=u*2+2,g=new Float32Array(f*4),m=new Float32Array(f*4),w=new Float32Array(f*2),x=Math.max(0,u-1)*2+1,y=new Uint32Array(x*6),v=S=>S<u?(_+S)*2:S<u*2?(_+S-u)*2+1:a*2+(S-u*2);for(let S=0;S<f;S+=1){const M=v(S),A=S*4,L=t[M*2],k=t[M*2+1];g[A]=L,g[A+1]=k,g[A+2]=L,g[A+3]=k,m[A]=e[M*2],m[A+1]=e[M*2+1],m[A+2]=e[M*2],m[A+3]=e[M*2+1],w[S*2]=i[M],w[S*2+1]=r}let d=0;for(let S=0;S<3;S+=1){const M=S===2?u*2:S*u,A=S===2?u*2+1:M+u-1;for(let L=M;L<A;L+=1){const k=L*2,E=d*6;y[E]=k,y[E+1]=k+1,y[E+2]=k+3,y[E+3]=k,y[E+4]=k+3,y[E+5]=k+2,d+=1}}const b=Me({texture:o,vertices:g.slice(),uvs:m,indices:y});return b.tint=l,{target:b,k:r,base:g,heights:w}}function ci(s,t){const{target:e,base:i,heights:n}=s,o=e.vertices;for(let r=0,a=n.length;r<a;r+=1){const l=i[r*2],h=i[r*2+1],_=n[r];o[r*2]=l+(l-t.x)*_,o[r*2+1]=h+(h-t.y)*_}e.vertices=o}const _i=5,ut={mapSprite:null,occluder:null,slices:[],rampTexture:null};function ui({mapSprite:s,bakedTexture:t,occluder:e,slices:i,rampTexture:n}){for(const o of i)o.target.parent?.removeChild(o.target),o.target.destroy({texture:!1,textureSource:!1});e?.destroy({children:!0,texture:!1,textureSource:!1}),n&&n.destroy(!0),s&&(s.parent?.removeChild(s),s.destroy({texture:!1,textureSource:!1})),t?.destroy(!0)}async function di(s){try{const t=await s.baseTexture;if(s.isAborted())return ut;const e=await be({baseTexture:t,spriteSheetData:s.spriteSheetData,map:s.map,tiles:s.tiles,step:s.step,renderer:s.renderer});if(s.isAborted())return e.destroy(!0),ut;const i=new U(e);if(q(i,null,s.parallaxK,s.baseScale),s.container.addChild(i),!s.extruding)return{...ut,mapSprite:i};const n=await pi(s,t,e),o={mapSprite:i,...n};return s.isAborted()?(ui({...o,bakedTexture:e}),ut):o}catch(t){return console.error(`Failed to create static map with asset ${s.assetUrl}:`,t),ut}}async function pi(s,t,e){const i=ft.slices,n=R.shear,o=[];let r=null,a=null;s.volume>0&&(r=new D,r.zIndex=I(Math.max(s.layer,_i),s.level),o.push(...ai({bakedTexture:e,level:s.level,volume:s.volume,shear:n,count:i,sideTint:ft.sideTint})));const l=fi(s);if(l.length){if(a=await be({baseTexture:t,spriteSheetData:s.spriteSheetData,map:s.map,tiles:s.ramps.map(h=>h.tile),step:s.step,renderer:s.renderer}),s.isAborted())return{occluder:r,slices:o,rampTexture:a};o.push(...li({runs:l,texture:a,step:s.step,shear:n,baseScale:s.baseScale,segments:ft.rampSegments,sideTint:ft.sideTint}))}if(s.isAborted())return{occluder:r,slices:o,rampTexture:a};o.sort((h,_)=>h.k-_.k);for(const h of o)h.base||q(h.target,null,h.k,s.baseScale),(h.occluder?r:s.container).addChild(h.target);return{occluder:r,slices:o,rampTexture:a}}function fi(s){if(!s.ramps?.length||!s.rampRuns)return[];const t=new Set(s.ramps.map(n=>`${n.from}:${n.to}`)),e=s.rampRuns.forLevel(s.level).filter(n=>t.has(`${n.from}:${n.to}`));return ri(e,(n,o)=>Ke(n,o===0?s.baseScale.x:s.baseScale.y,s.step))}function mi(s,t){if(!s.levelView)return;const e=s.levelView.cfg,i=Y.shared.lastTime,n=s.hole.tick===i;s.hole.tick=i;const o=Y.shared.deltaMS/1e3,r=n?0:Math.min(1,e.fadeRate*o);s.hasSprite&&gi(s,e,r,t),s.occluder&&xi(s,e,r,t)}function gi(s,t,e,i){const{levelView:n,container:o}=s;if(n.mode==="layer"){const l=n.level<s.level&&ye(s.grid,n.x,n.y,s.floorSet)?t.layerAlpha:1;o.alpha+=(l-o.alpha)*e;return}const r=n.level<s.level;ve(s.hole,r,e),Se(o,s.hole,t,n,s.stage,i)}function xi(s,t,e,i){const{levelView:n,occluder:o}=s,r=s.level>n.level;if(n.mode==="layer"){const l=r?t.layerAlpha:1;o.alpha+=(l-o.alpha)*e;return}const a=r||yi(s,i);ve(s.occluderHole,a,e),Se(o,s.occluderHole,t,n,s.stage,i)}function yi(s,t){if(!t||!s.grid.map)return!1;const e=s.levelView,i=R.shear,n=st(e.x,e.y,t,e.z*i),o=ft.slices;for(let r=1;r<=o;r+=1){const a=(s.level+s.volume*r/o)*i,l=1+a;if(ye(s.grid,(n.x+t.x*a)/l,(n.y+t.y*a)/l,s.tileSet))return!0}return!1}class wi{constructor(t,e,i,n){this._container=t,this._renderer=i.renderer,this._levelView=i.levelView||null,this._rampRuns=i.rampRuns||null,this._hole=te(),this._occluderHole=te(),this._occluder=null,this._baseScale=xe(e.scale),this._slices=[],this._rampTexture=null,this.mapSprite=null,this._assetUrl=`${n}${e.spriteSheet.img}`,this._baseTexturePromise=ge.load(this._assetUrl),this._map=e.map,this._tiles=e.tiles,this._level=e.level||0,this._floor=e.floor||[],this._tileSet=new Set(this._tiles),this._floorSet=new Set(this._floor),this._spriteSheetData=e.spriteSheet,this._step=e.step,this._layer=Number(e.layer)||1,t.zIndex=I(this._layer,this._level),this._parallaxK=this._level*R.shear,this._volume=Number(e.volume)||0,this._ramps=(e.ramps||[]).filter(o=>this._tiles.includes(o.tile)),this._extruding=this._volume>0||this._ramps.length>0,this.needsRender=this._level>=1||this._extruding,this._grid=je(this._map,this._baseScale,this._step),this._build(e)}async _build(t){const e=await di({container:this._container,baseTexture:this._baseTexturePromise,spriteSheetData:t.spriteSheet,map:this._map,tiles:this._tiles,step:this._step,renderer:this._renderer,level:this._level,layer:this._layer,volume:this._volume,ramps:this._ramps,rampRuns:this._rampRuns,baseScale:this._baseScale,parallaxK:this._parallaxK,extruding:this._extruding,assetUrl:this._assetUrl,isAborted:()=>this._container.destroyed});this.mapSprite=e.mapSprite,this._occluder=e.occluder,this._slices=e.slices,this._rampTexture=e.rampTexture}_seeThroughView(){return{levelView:this._levelView,container:this._container,stage:this._container.parent,occluder:this._occluder,hasSprite:!!this.mapSprite,hole:this._hole,occluderHole:this._occluderHole,level:this._level,volume:this._volume,grid:this._grid,tileSet:this._tileSet,floorSet:this._floorSet}}render(){this._attachOccluder(),this._levelView&&this._levelView.attachStage(this._container.parent,this._renderer);const t=this._levelView?this._levelView.camera():J(this._container.parent,this._renderer);if((this._level>=1||this._occluder)&&mi(this._seeThroughView(),t),!(!this._parallaxK&&!this._slices.length)&&t){this.mapSprite&&q(this.mapSprite,t,this._parallaxK,this._baseScale);for(let e=0;e<this._slices.length;e+=1){const i=this._slices[e];i.base?ci(i,t):q(i.target,t,i.k,this._baseScale)}}}_attachOccluder(){const t=this._container.parent;!this._occluder||!t||this._occluder.parent===t||t.addChild(this._occluder)}destroy(){const t=this._container;if(ee(this._hole,t),this._occluder){const o=this._occluder;this._occluder=null,o.filters=[],ee(this._occluderHole,o),o.parent?.removeChild(o),o.destroy({children:!0,texture:!1,textureSource:!1})}const e=this.mapSprite,i=this._rampTexture,n=this._slices;this.mapSprite=null,this._rampTexture=null,this._slices=[];for(const o of n)o.target.destroyed||(o.target.texture=Re.EMPTY);return e&&t.removeChild(e),this._baseTexturePromise=null,this._assetUrl=null,this._map=null,this._tiles=null,this._floor=null,this._tileSet=null,this._floorSet=null,this._grid=null,this._ramps=null,this._spriteSheetData=null,this._renderer=null,this._levelView=null,()=>{i&&i.destroy(!0),e&&e.destroy({children:!0,texture:!0,textureSource:!0})}}}const V=(s,t,e)=>s+(t-s)*e,xt=(s,t,e)=>Math.min(e,Math.max(t,s)),vi=s=>s*(Math.PI/180),Si=s=>{for(;s>Math.PI;)s-=Math.PI*2;for(;s<-Math.PI;)s+=Math.PI*2;return s},T=(s,t)=>Math.random()*(t-s)+s,$=0,K=1,nt=2,ie=3,Tt=4,At=5,rt=6,j=7,Lt=8,kt=9,ht=11,H=12,It=13,se=14,ne=15,bi=0,Mi=1,Ti=2,Ai=3,ki=4,Ii=5,Li=6,Ci=7,Pi=9,re=10,oe=0,ae=1,le=2,zi=3,Ei=4,Ri=6,Di=0,Fi=1,Vi=2,Oi=3,he=0,ce=1,Xi=2,Yi=3,Bi=4;class Ni{constructor(t,e,i,n){this._container=t,this._renderer=i.renderer,this._levelView=i.levelView||null,this._baseScale=xe(e.scale),t.scale=e.scale,this._assetUrl=`${n}${e.img}`,this._baseTexturePromise=ge.load(this._assetUrl),this._z=e.level||0,this._level=e.level||0,this._layer=Number(e.layer)||2,t.zIndex=I(this._layer,this._level),this._rotation=vi(e.angle),this._width=e.width,this._height=e.height,this._x=e.position[0],this._y=e.position[1],this._worldX=this._x*this._baseScale.x,this._worldY=this._y*this._baseScale.y,this.sprite=null,this.needsRender=!!this._levelView,this._create()}async _create(){try{const t=await this._baseTexturePromise;if(this._container.destroyed)return;this.sprite=new U(t),this.sprite.x=this._x,this.sprite.y=this._y,this.sprite.width=this._width,this.sprite.height=this._height,this.sprite.rotation=this._rotation,this._container.addChild(this.sprite)}catch(t){console.error(`Failed to create dynamic map with asset ${this._assetUrl}:`,t)}}render(){if(!this._levelView||!this.sprite)return;const t=this._container;t.alpha=this._levelView.alphaFor(this._level,this._worldX,this._worldY,this._z),t.tint=this._levelView.tintFor(this._level),!(!this._level&&!this._z)&&q(t,this._levelView.camera()??J(t.parent,this._renderer),this._z*R.shear,this._baseScale)}update(t){this.sprite&&(this.sprite.x=t[he]/this._baseScale.x,this.sprite.y=t[ce]/this._baseScale.y,this.sprite.rotation=t[Xi]),this._worldX=t[he],this._worldY=t[ce],this._z=t[Yi]||0;const e=Bt(t[Bi],this._z);e!==this._level&&(this._level=e,this._container.zIndex=I(this._layer,e),!e&&!this._z&&q(this._container,null,0,this._baseScale))}destroy(){this.sprite=null,this._baseTexturePromise=null,this._assetUrl=null,this._renderer=null,this._levelView=null}}let Hi=class extends D{constructor(t,e,i){if(super(),this._mode=null,typeof i.assetsBase!="string"){console.error("Map: сервис assetsBase недоступен — карта останется пустой. Объявите assetsBase в componentDependencies и запустите игру на vimp-engine >= 0.9.0");return}const n=`${i.assetsBase}img/`;this._mode=t.type==="dynamic"?new Ni(this,t,i,n):new wi(this,t,i,n),this._mode.needsRender&&(this.onRender=()=>this._mode.render())}update(t){this._mode?.update?.(t)}destroy(t){const e=this._mode?.destroy();this._mode=null,super.destroy({children:!0,texture:!1,textureSource:!1,...t}),e?.()}};const _e=[16777215,9418751,10477760,15783820,14721232,10541296,15773836,12632280],Te=s=>_e[s]??_e[0],Ui=2,Wi=.35;class Gi extends D{constructor(t,e,i={}){super(),this._map=t.map,this._level=t.level||0,this._solid=t.solid||t.physicsStatic||[],this._tiles=t.tiles||[],this._step=t.step,this.zIndex=I(Ui,this._level),this.scale=t.scale,this._draws=this._tiles.some(n=>this._solid.includes(n)),this.radarGraphics=new O,this.addChild(this.radarGraphics),this._levelView=i.levelView||null,this._levelView&&this._draws&&(this.onRender=()=>{this.alpha=this._levelView.level===this._level?1:Wi}),this.createRadarMap()}createRadarMap(){if(!this._draws)return;const t=this.radarGraphics;if(t.clear(),Array.isArray(this._map))for(let e=0;e<this._map.length;e+=1){const i=this._map[e];if(Array.isArray(i))for(let n=0;n<i.length;n+=1){const o=i[n];this._solid.includes(o)&&t.rect(n*this._step,e*this._step,this._step/2,this._step/2)}}t.fill(Te(this._level))}update(){}destroy(t){super.destroy({children:!0,texture:!1,textureSource:!1,...t}),this.radarGraphics=null,this._map=null,this._solid=null,this._tiles=null}}const ue=2,Zi=9,qi=1.5;class $i extends D{constructor(t,e){super(),this._level=t[H]||0,this.zIndex=I(ue,this._level),this._textures=e.tankRadarTexture,this.body=new U,this.body.anchor.set(.5),this.levelRing=new O,this.addChild(this.levelRing,this.body),this._drawLevelRing(),this.x=t[$]||0,this.y=t[K]||0,this._condition=t[j],this._teamId=t[kt],this.scale.set(5,5),this.create()}_drawLevelRing(){this.levelRing.clear(),this._level>0&&this.levelRing.circle(0,0,Zi).stroke({width:qi,color:Te(this._level)})}create(){this._condition===0?this.body.texture=this._textures.destroyed:this._teamId===1?this.body.texture=this._textures.liveTeamId1:this._teamId===2&&(this.body.texture=this._textures.liveTeamId2)}update(t){this.x=t[$],this.y=t[K];const e=t[H]||0;e!==this._level&&(this._level=e,this.zIndex=I(ue,e),this._drawLevelRing());const i=t[j],n=t[kt];let o=!1;i!==void 0&&i!==this._condition&&(this._condition=i,o=!0),n!==void 0&&n!==this._teamId&&(this._teamId=n,o=!0),o&&this.create()}destroy(t){super.destroy({children:!0,texture:!1,textureSource:!1,...t}),this.body=null,this.levelRing=null,this._textures=null}}function Ki({width:s,height:t,anchorX:e,anchorY:i,rotation:n,pitch:o,roll:r,shear:a,lift:l}){const h=-e*s,_=(1-e)*s,c=-i*t,u=(1-i)*t,f=[[h,c],[_,c],[_,u],[h,u]],g=Math.cos(n),m=Math.sin(n),w=Math.cos(o),x=Math.sin(o),y=Math.cos(r),v=Math.sin(r),d=[];for(const[b,S]of f){const M=b*g-S*m,A=b*m+S*g,L=A*w,k=-A*x,E=M*y,W=M*v,C=k+W,B=t?C/t*a:0;d.push(E*(1+B),L*(1+B)-C*l)}return d}function ji({angle:s,pitch:t,roll:e,lightDir:i,shading:n}){if(!i)return 1;const o=Math.cos(s),r=Math.sin(s),a=-Math.sin(t)*o-Math.sin(e)*r,l=-Math.sin(t)*r+Math.sin(e)*o,h=Math.hypot(i[0],i[1])||1,_=(a*i[0]+l*i[1])/h;return 1-Math.max(0,-_)*n}function Ji(s,t){const e=i=>{const n=Math.round((s>>i&255)*t);return Math.min(255,Math.max(0,n))};return e(16)<<16|e(8)<<8|e(0)}function Ae(s,t,{minImpact:e,fullImpact:i}){return!(s<-e)||t!==0?0:Math.min(1,-s/i)}const Qi=0,ts=1,Vt=3,es=7,is=1,de=1.15,ss=1.25,ns=.6,rs=1,os=.015,as=2.5;function ls(s,t=0){const e=Number.isFinite(s)?s:0,i=xt(e,0,1),n=Math.max(0,e-1),o=V(is,de,i)+(ss-de)*n,r=V(ns,rs,i),a=1+os*(1-i)*Math.sin(2*Math.PI*as*(t/1e3));return{rate:o*a,volumeFactor:r}}class hs extends D{constructor(t,e,i,n){super();const o=()=>{const _=new De({verticesX:_t.vertices,verticesY:_t.vertices});return _.geometry.batchMode="batch",_};this.body=o(),this.gun=o(),this.wreck=o(),this._bodyAnchor={x:.5,y:.5},this._wreckAnchor={x:.5,y:.5},this.addChild(this.body,this.gun,this.wreck),this._textures=e.tankTexture,this._shadowAsset=e.tankShadowTexture||null,this._renderer=i.renderer||null,this._shadow=null,this._worldX=t[$]||0,this._worldY=t[K]||0,this.x=this._worldX,this.y=this._worldY,this.rotation=t[nt]||0,this._gunRotation=t[ie]||0,this._engineLoad=t[rt]||0,this._condition=t[j],this._size=t[Lt],this._teamId=t[kt],this._z=t[ht]||0,this._physLevel=t[H]||0,this._vz=t[It]||0,this._prevVz=this._vz,this._pitch=t[se]||0,this._roll=t[ne]||0,this._landImpact=0,this._landTimer=0,this._squash=0,this._level=Bt(t[H],this._z),this.zIndex=I(Vt,this._level),this._isLocal=()=>i.localPlayer?.is(n?.id)===!0,this._levelView=i.levelView||null,this.onRender=()=>this._updateView();const r=this._teamId===1?this._textures.liveTeamId1:this._textures.liveTeamId2,a=r?r.gunAnchor:null;this._gunAnchor=a?{x:a.x,y:a.y}:{x:.5,y:.5};const l=10;this._scaleFactor=this._size/l,this._soundManager=i.soundManager,this._soundId=null;const h=this._soundManager.getSoundConfig("tankEngine");this._baseEngineVolume=h?.volume||0,this._hasEngineSound=!!h,this.create()}_initSounds(){this._soundId||this._condition===0||!this._hasEngineSound||(this._soundId=this._soundManager.registerSound("tankEngine",this._getSoundData()))}_getSoundData(){const{rate:t,volumeFactor:e}=ls(this._engineLoad,performance.now());return{position:{x:this._worldX,y:this._worldY},rate:t,volume:this._baseEngineVolume*e,spatial:!this._isLocal()}}create(){if(this._condition===0)this.body.visible=!1,this.gun.visible=!1,this.wreck.texture=this._textures.destroyed,this.wreck.visible=!0,this._gunRotation=0,this.destroySounds();else{this.wreck.visible=!1;let t;this._teamId===1?t=this._textures.liveTeamId1:this._teamId===2&&(t=this._textures.liveTeamId2),this.body.texture=t.body,this.gun.texture=t.gun,this.body.visible=!0,this.gun.visible=!0,this._initSounds()}this._applyTilt()}update(t){this._worldX=t[$],this._worldY=t[K],this.rotation=t[nt],this._gunRotation=t[ie],this._engineLoad=t[rt]||0,this._z=t[ht]||0,this._physLevel=t[H]||0,this._vz=t[It]||0,this._pitch=t[se]||0,this._roll=t[ne]||0;const e=Ae(this._prevVz,this._vz,mt);e>0&&(this._landImpact=e,this._landTimer=mt.duration),this._prevVz=this._vz;const i=Bt(t[H],this._z);i!==this._level&&(this._level=i,this.zIndex=I(Vt,i)),this._applyTilt(),this._levelView&&this._isLocal()&&this._levelView.set(i,this._worldX,this._worldY,this._z),this._condition>0&&(this._soundId===null?this._initSounds():this._soundManager.updateSoundData(this._soundId,this._getSoundData()));const n=t[j],o=t[kt];let r=!1;n!==void 0&&n!==this._condition&&(this._condition=n,r=!0),o!==void 0&&o!==this._teamId&&(this._teamId=o,r=!0),r&&this.create()}_setCorners(t,e,i,n,o){const{texture:r}=t;t.setCorners(...Ki({width:r.width*n,height:r.height*n*o,anchorX:e.x,anchorY:e.y,rotation:i,pitch:this._pitch,roll:this._roll,shear:R.shear,lift:_t.lift}))}_groundZ(){return this._vz!==0?this._physLevel:this._z}_applyTilt(){const t=1+this._z*R.shear,e=this._scaleFactor*t,i=1-this._squash;this._setCorners(this.body,this._bodyAnchor,0,e,i),this._setCorners(this.gun,this._gunAnchor,this._gunRotation,e,i),this._setCorners(this.wreck,this._wreckAnchor,0,e,i)}_updateView(){this._levelView&&this._levelView.attachStage(this.parent,this._renderer);const t=this._levelView?this._levelView.camera():J(this.parent,this._renderer);let e=16777215;this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this._worldX,this._worldY,this._z),e=this._levelView.tintFor(this._level),this.tint=e);const i=st(this._worldX,this._worldY,t,this._z*R.shear);this.position.set(i.x,i.y);{const n=xt(ji({angle:this.rotation,pitch:this._pitch,roll:this._roll,lightDir:_t.lightDir,shading:_t.shading}),Qi,ts);this.tint=Ji(e,n)}if(this._landTimer>0){this._landTimer=Math.max(0,this._landTimer-Y.shared.deltaMS);const n=this._landTimer/mt.duration;this._squash=Math.sin(n*Math.PI)*mt.squash*this._landImpact}else this._squash=0;this._applyTilt(),this._updateShadow(t)}_updateShadow(t){if(!this._shadowAsset||!this.parent)return;if(!(this._condition!==0&&this._vz!==0)){this._shadow&&(this._shadow.visible=!1);return}if(!this._shadow){const{texture:a,contentSize:l}=this._shadowAsset;this._shadow=new U(a),this._shadow.anchor.set(.5),this._shadowScale=this._size*4*St.sizeFactor/l,this.parent.addChild(this._shadow)}const i=this._shadow;i.visible=!0;const n=this._groundZ(),o=st(this._worldX,this._worldY,t,n*R.shear);i.x=o.x,i.y=o.y,i.rotation=this.rotation;const r=Math.max(0,this._z-n);i.scale.set(this._shadowScale*(1+r*St.scaleGain)),i.alpha=Math.max(0,St.baseAlpha-r*St.alphaFalloff)*this.alpha,i.zIndex=I(Vt-1,Math.min(es,Math.floor(n)))}destroySounds(){this._soundId&&(this._soundManager.unregisterSound(this._soundId),this._soundId=null)}destroy(t){this.destroySounds(),this._shadow&&(this._shadow.destroy({texture:!1,textureSource:!1}),this._shadow=null),super.destroy({children:!0,texture:!1,textureSource:!1,...t})}}const cs=2;class _s extends D{constructor(t,e,i){super(),this._level=t[Ri]||0,this.zIndex=I(cs,this._level),this._levelView=i.levelView||null,this._renderer=i.renderer||null,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this._worldX,this._worldY),this.tint=this._levelView.tintFor(this._level)),this._applyHeight()}),this.body=new U(e.bombTexture),this.body.anchor.set(.5),this._worldX=t[oe],this._worldY=t[ae],this.x=this._worldX,this.y=this._worldY,this.rotation=t[le],this._size=t[zi],this._totalDurationMs=t[Ei],this._soundManager=i.soundManager,this._soundId=null;const n=e.bombTexture.width,o=this._size/n;this.body.scale.set(o);const r=64,a=this._size/1.2/r;this.text=new Fe({style:{fontFamily:"Arial",fontSize:r,fill:16777215,align:"center"}}),this.text.anchor.set(.5),this.text.scale.set(a),this.text.x=0,this.text.y=0,this._accumulatedTimeMs=0,this._secondsLeft="",this.addChild(this.body,this.text),this._updateTimerDisplay(this._totalDurationMs),this._tickListener=l=>this._updateTimer(l.deltaMS),Y.shared.add(this._tickListener),this._soundId=this._soundManager.registerSound("bombHasBeenPlanted",{position:{x:this.x,y:this.y}})}_updateTimer(t){this._accumulatedTimeMs+=t;const e=Math.max(0,this._totalDurationMs-this._accumulatedTimeMs);this._updateTimerDisplay(e),e<=0&&(this._stopTimer(),this._updateTimerDisplay(0))}_updateTimerDisplay(t){const e=Math.round(t/1e3);this._secondsLeft!==e&&(this._secondsLeft=e,this.text.text=`${this._secondsLeft}`)}update(t){this._worldX=t[oe],this._worldY=t[ae],this.x=this._worldX,this.y=this._worldY,this.rotation=t[le],this._soundId&&(this._soundManager.updateSoundData(this._soundId,{position:{x:this._worldX,y:this._worldY}})||(this._soundId=null))}_applyHeight(){const t=this._level*R.shear,e=J(this.parent,this._renderer),i=st(this._worldX,this._worldY,e,t);this.position.set(i.x,i.y),this.scale.set(1+t)}_stopTimer(){this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null)}destroy(t){this._stopTimer(),this._soundId&&(this._soundManager.releaseSound(this._soundId),this._soundId=null),super.destroy({children:!0,texture:!1,textureSource:!1,...t}),this.body=null,this.text=null}}class wt extends D{constructor(t){super(),this._tickListener=null,this._isStarted=!1,this.isComplete=!1,this.onComplete=t}run(){this.isComplete||this._isStarted||(this._isStarted=!0,this._tickListener=t=>this._update(t.deltaMS),Y.shared.add(this._tickListener),this._onEffectStart(),this.isComplete||this._update(0))}_onEffectStart(){}_update(){}_completeEffect(){this.isComplete||(this.isComplete=!0,this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null),typeof this.onComplete=="function"&&this.onComplete())}destroy(t){this.isComplete=!0,this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null),this.parent&&this.parent.removeChild(this),super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class us extends wt{constructor(t,e,i,n,o){super(n);const{texture:r,contentSize:a}=o.explosionTexture;this.x=t,this.y=e,this._radius=i,this._durationMs=1500,this._elapsedMs=0,this._baseScale=this._radius*2/a,this._mainBody=new U(r),this._mainBody.anchor.set(.5),this._mainBody.tint=11393254,this._mainBody.scale.set(this._baseScale),this._core=new U(r),this._core.anchor.set(.5),this._core.tint=13882323,this._core.scale.set(this._baseScale),this.addChild(this._mainBody,this._core)}_update(t){if(!this.isComplete)if(this._elapsedMs+=t,this._elapsedMs<=this._durationMs){const e=this._elapsedMs/this._durationMs;this._draw(e)}else this._completeEffect()}_draw(t){const e=n=>n*n;this._mainBody.alpha=.6*(1-e(t));const i=Math.min(1,t*1.5);this._core.alpha=.7-i,this._core.scale.set(this._baseScale*(1-i))}destroy(t){super.destroy(t)}}const Ot=[],tt={get(s){if(Ot.length>0){const t=Ot.pop();return t.texture=s,t.alpha=1,t.scaleX=1,t.scaleY=1,t.rotation=0,t.tint=16777215,t.anchorX=.5,t.anchorY=.5,t}return new Ve({texture:s,anchorX:.5,anchorY:.5})},release(s){s&&Ot.push(s)}},Nt=50,ds=400,ps=800;class fs extends wt{constructor(t,e=Nt){super();const i=e/Nt;this._blastScale=i;const{texture:n,contentSize:o}=t.explosionTexture;this.explosionTexture=n,this._unitScale=1/o;const r=ds*i,a=ps*i;this._particleContainer=new Ht({texture:this.explosionTexture,boundsArea:new X(-r/2,-a/2,r,a),dynamicProperties:{position:!0,vertex:!0,rotation:!0,color:!0}}),this.addChild(this._particleContainer),this._particles=[],this._isSpawning=!0,this._particleSpawnRateMs=50,this._particleMaxLifeMs=2e3,this._minStartSize=2.1*i,this._maxStartSize=5.2*i,this._minTargetSize=8.3*i,this._maxTargetSize=16.6*i,this._startAlpha=.1,this._initialOffsetX=15*i,this._initialOffsetY=15*i,this._lastSpawnTime=0;for(let l=0;l<30;l+=1)this._createParticle()}stopSpawning(){this._isSpawning=!1}_createParticle(){const t=tt.get(this.explosionTexture),e=.2+Math.random()*.4,i=Math.floor(e*255);t.tint=i<<16|i<<8|i;const n=(this._minStartSize+Math.random()*(this._maxStartSize-this._minStartSize))*this._unitScale,o=.6+Math.random()*.8,r=.6+Math.random()*.8;t.scaleX=n*o,t.scaleY=n*r,t.alpha=this._startAlpha+Math.random()*.1,t.rotation=Math.random()*Math.PI*2,t.x=(Math.random()-.5)*this._initialOffsetX,t.y=(Math.random()-.5)*this._initialOffsetY;const a={view:t,life:0,maxLife:this._particleMaxLifeMs*(.7+Math.random()*.6),aspectRatioX:o,aspectRatioY:r,vx:(Math.random()-.5)*.2*this._blastScale,vy:(-.3-Math.random()*.4)*this._blastScale,swaySpeed:.002+Math.random()*.003,swayAmp:(.025+Math.random()*.05)*this._blastScale,swayOffset:Math.random()*100,rotationSpeed:(Math.random()-.5)*.05,targetScale:(this._minTargetSize+Math.random()*(this._maxTargetSize-this._minTargetSize))*this._unitScale,startScale:n};this._particleContainer.addParticle(t),this._particles.push(a)}_update(t){if(!this.isComplete){if(t=Math.min(t,100),this._isSpawning)for(this._lastSpawnTime+=t;this._lastSpawnTime>this._particleSpawnRateMs;)this._createParticle(),this._lastSpawnTime-=this._particleSpawnRateMs;for(let e=this._particles.length-1;e>=0;e-=1){const i=this._particles[e],n=i.view;if(i.life+=t,i.life>=i.maxLife)this._particleContainer.removeParticle(n),tt.release(n),this._particles.splice(e,1);else{const o=i.life/i.maxLife;i.vy*=.98,i.vx*=.95;const r=Math.sin(i.life*i.swaySpeed+i.swayOffset)*i.swayAmp;n.x+=(i.vx+r)*(t/16),n.y+=i.vy*(t/16),n.rotation+=i.rotationSpeed*(t/16);const a=1-Math.pow(1-o,3),l=i.startScale+(i.targetScale-i.startScale)*a;if(n.scaleX=l*i.aspectRatioX,n.scaleY=l*i.aspectRatioY,o<.1)n.alpha=o/.1*this._startAlpha;else if(o>.4){const h=(o-.4)/.6;n.alpha=this._startAlpha*(1-h)}else n.alpha=this._startAlpha}}!this._isSpawning&&this._particles.length===0&&this._isStarted&&(this._completeEffect(),this.destroyed||this.destroy())}}destroy(t){for(let e=0;e<this._particles.length;e+=1)tt.release(this._particles[e].view);this._particles=[],super.destroy(t)}}const ms=.168,gs=.225,pe=.15,xs=2e4,ys=50,ws=4e3,vs=4e3;class Ss extends wt{constructor(t,e,i,n,o){super(n),this._assets=o,this._radius=i,this.x=t,this.y=e,this._funnelDurationMs=xs,this._funnelFadeInDurationMs=ys,this._funnelFadeDurationMs=ws,this._elapsedMs=0,this._smokeDurationMs=vs,this._smokeSpawningStopped=!1,this._funnel=this._createFunnelSprite(),this._smoke=new fs(this._assets,this._radius),this.addChild(this._funnel,this._smoke)}_createFunnelSprite(){const{textures:t,contentSize:e}=this._assets.funnelTexture,i=t[Math.floor(Math.random()*t.length)],n=new U(i);n.anchor.set(.5),n.alpha=0,n.rotation=Math.random()*Math.PI*2;const o=this._radius*ms*T(1-pe,1+pe);return n.scale.set(o/e),n}_onEffectStart(){super._onEffectStart(),this._smoke&&this._smoke.run()}_update(t){if(this.isComplete)return;this._elapsedMs+=t,!this._smokeSpawningStopped&&this._elapsedMs>=this._smokeDurationMs&&(this._smoke.stopSpawning(),this._smokeSpawningStopped=!0);const e=this._funnelDurationMs-this._elapsedMs,i=this._funnelFadeInDurationMs>0?this._elapsedMs/this._funnelFadeInDurationMs:1,n=e/this._funnelFadeDurationMs;this._funnel.alpha=gs*xt(Math.min(i,n),0,1),e<=0&&this._completeEffect()}destroy(t){this._smoke&&(this._smoke.destroy(),this._smoke=null),this._funnel=null,super.destroy(t)}}const bs=4,Ms=2;class Ts extends D{constructor(t,e,i){super(),this.originX=t[Di],this.originY=t[Fi],this.radius=t[Vi]??Nt,this._level=t[Oi]||0,this._assets=e,this._soundManager=i.soundManager,this._levelView=i.levelView||null,this._renderer=i.renderer||null,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&this._updateSeeThrough(),this._applyHeight()}),this.x=this.originX,this.y=this.originY,this.explosion=null,this.funnel=null,this._isStarted=!1,this._isDestroyed=!1,this._soundId=this._soundManager.registerSound("explosion",{position:{x:this.originX,y:this.originY}})}_updateSeeThrough(){const t=this._levelView.alphaFor(this._level,this.originX,this.originY),e=this._levelView.tintFor(this._level);this.explosion&&(this.explosion.alpha=t,this.explosion.tint=e),this.funnel&&(this.funnel.alpha=t,this.funnel.tint=e)}_applyHeight(){const t=this._level*R.shear,e=J(this.parent,this._renderer),i=st(this.originX,this.originY,e,t);for(const n of[this.explosion,this.funnel])n&&(n.position.set(i.x,i.y),n.scale.set(1+t))}run(){if(!(this._isDestroyed||this._isStarted)){if(this._isStarted=!0,!this.parent){this.destroy();return}this.explosion=new us(this.originX,this.originY,this.radius,this._onExplosionComplete.bind(this),this._assets),this.explosion.zIndex=I(bs,this._level),this.funnel=new Ss(this.originX,this.originY,this.radius,this._onFunnelComplete.bind(this),this._assets),this.funnel.zIndex=I(Ms,this._level),this.parent.addChild(this.explosion,this.funnel),this.parent.sortChildren(),this.explosion.run(),this.funnel.run()}}_onExplosionComplete(){this._isDestroyed||this.explosion&&(this.explosion.destroy(),this.explosion=null)}_onFunnelComplete(){this._isDestroyed||this.destroy()}destroy(){this._isDestroyed||(this._isDestroyed=!0,this._soundId&&(this._soundManager.unregisterSound(this._soundId),this._soundId=null),this.explosion&&(this.explosion.destroy(),this.explosion=null),this.funnel&&(this.funnel.destroy(),this.funnel=null),this.parent&&this.parent.removeChild(this),super.destroy({children:!0}))}}const fe=4,ot=400,As=0,ks=0,Is=8,P={particleLifetime:{min:800,max:1800},particleStartSizeFactor:{1:2,2:1,0:.25},particleEndSizeFactor:{1:3,2:2,0:1},particleStartAlpha:.08,particleEndAlpha:0,particleColor:3355443,particleSpawnRate:{1:60,2:50,0:30},particleInitialVelocity:{away:{min:-10,max:100},side:{min:-30,max:30}},airResistance:.92,particleVelocityVariance:10,streamOffsetFactor:.1,burstParticleCount:3,exhaust:{spawnRate:45,idleSpawnRate:4,minLoad:.05,startSizeFactor:.6,endSizeFactor:1.6,startAlpha:.05,color:5592405,lifetime:{min:350,max:750}}};class Ls extends D{constructor(t,e,i={}){super(),this._level=t[H]||0,this.zIndex=I(fe,this._level);const{texture:n,contentSize:o}=e.smokeTexture;this._smokeTexture=n,this._textureScale=Is/o,this._emitterX=t[$],this._emitterY=t[K],this._emitterRotation=t[nt],this._emitterVX=t[Tt],this._emitterVY=t[At],this._engineLoad=t[rt],this._condition=t[j],this._z=t[ht]||0,this._size=t[Lt],this._width=this._size*4,this._height=this._size*3,this._particleScaleMultiplier=Math.max(.5,Math.sqrt(this._width*this._height*.001)),this._particles=[],this._levelView=i.levelView||null,this._renderer=i.renderer||null,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this._emitterX,this._emitterY,this._z),this.tint=this._levelView.tintFor(this._level)),q(this,J(this.parent,this._renderer),this._z*R.shear,1)}),this._particleContainer=new Ht({texture:this._smokeTexture,boundsArea:new X(this._emitterX-ot,this._emitterY-ot,ot*2,ot*2),dynamicProperties:{position:!0,vertex:!0,rotation:!0,color:!0}}),this.addChild(this._particleContainer),this._timeSinceLastSpawn=0,this._timeSinceExhaust=0,this._tickListener=r=>this._updateParticles(r.deltaMS),Y.shared.add(this._tickListener)}update(t){const e=this._condition,i=t[H]||0;i!==this._level&&(this._level=i,this.zIndex=I(fe,i)),this._emitterX=t[$],this._emitterY=t[K],this._emitterRotation=t[nt],this._emitterVX=t[Tt],this._emitterVY=t[At],this._engineLoad=t[rt],this._condition=t[j],this._z=t[ht]||0,this._particleContainer.boundsArea.x=this._emitterX-ot,this._particleContainer.boundsArea.y=this._emitterY-ot,this._condition!==e&&this._condition!==3&&this._triggerSmokeBurst()}_triggerSmokeBurst(){let t=0;if(this._condition===1?t=2:(this._condition===2||this._condition===0)&&(t=1),t>0){const e=P.burstParticleCount,i=Math.ceil(e/t);for(let n=0;n<i;n+=1)for(let o=0;o<t;o+=1)this.spawnParticle(o,t,"burst")}}_updateParticles(t){if(t<=0)return;const e=t/1e3;this._timeSinceLastSpawn+=t,this._timeSinceExhaust+=t;let i=0;this._condition===3?i=0:this._condition===1?i=2:(this._condition===2||this._condition===0)&&(i=1);const n=P.particleSpawnRate[this._condition]||0,o=n>0?1e3/n:1/0;if(i>0&&n>0)for(;this._timeSinceLastSpawn>=o;){for(let _=0;_<i;_+=1)this.spawnParticle(_,i);this._timeSinceLastSpawn-=o}else this._timeSinceLastSpawn=0;const r=Math.min(this._engineLoad,1),a=this._condition>0&&r>=P.exhaust.minLoad?V(P.exhaust.idleSpawnRate,P.exhaust.spawnRate,r):0;if(a>0){const _=1e3/a;for(;this._timeSinceExhaust>=_;)this.spawnParticle(0,1,"exhaust"),this._timeSinceExhaust-=_}else this._timeSinceExhaust=0;const h=1-Math.pow(P.airResistance,t/16);for(let _=this._particles.length-1;_>=0;_-=1){const c=this._particles[_];if(c.age+=t,c.age>=c.lifetime){this._particleContainer.removeParticle(c.view),tt.release(c.view),this._particles.splice(_,1);continue}c.vx=c.vx+(As-c.vx)*h,c.vy=c.vy+(ks-c.vy)*h,c.x+=c.vx*e,c.y+=c.vy*e;const u=c.age/c.lifetime,f=1-(1-u)*(1-u),g=V(c.startSizeFactor,c.endSizeFactor,f),m=V(c.startAlpha,c.endAlpha,u),w=g*this._particleScaleMultiplier*this._textureScale,x=c.view;x.x=c.x,x.y=c.y,x.scaleX=w,x.scaleY=w,x.alpha=m,x.rotation+=c.rotSpeed*e}}spawnParticle(t,e,i="damage"){const n=i==="burst",o=i==="exhaust",r=P.exhaust,a=o?T(r.lifetime.min,r.lifetime.max):T(P.particleLifetime.min,P.particleLifetime.max);let l=o?r.startSizeFactor:P.particleStartSizeFactor[this._condition]||.3,h=o?r.endSizeFactor:P.particleEndSizeFactor[this._condition]||1,_=o?r.startAlpha:P.particleStartAlpha,c=1;n&&(l*=2,h*=2.5,_=.8,c=2);const u=this._emitterRotation,f=u+Math.PI,g=Math.cos(f),m=Math.sin(f),w=u+Math.PI/2,x=Math.cos(w),y=Math.sin(w);let v=0;const d=this._width/2*P.streamOffsetFactor;e===2?v=t===0?-d:d:e===3&&(v=(t-1)*d);const b=this._height*.22,S=this._emitterX+g*b+x*v,M=this._emitterY+m*b+y*v;let A=T(P.particleInitialVelocity.away.min,P.particleInitialVelocity.away.max),L=T(P.particleInitialVelocity.side.min,P.particleInitialVelocity.side.max);A*=c,L*=c;let k=g*A+x*L,E=m*A+y*L;const W=P.particleVelocityVariance;k+=T(-W,W),E+=T(-W,W),k+=this._emitterVX,E+=this._emitterVY;const C=tt.get(this._smokeTexture);C.tint=o?r.color:P.particleColor,C.x=S,C.y=M,C.alpha=_;const B=l*this._particleScaleMultiplier*this._textureScale;C.scaleX=B,C.scaleY=B,C.rotation=T(0,Math.PI*2);const Ct={view:C,x:S,y:M,vx:k,vy:E,age:0,lifetime:a,startSizeFactor:l,endSizeFactor:h,startAlpha:_,endAlpha:P.particleEndAlpha,rotSpeed:T(-1,1)};this._particleContainer.addParticle(C),this._particles.push(Ct)}_stopTimer(){this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null)}destroy(t){this._stopTimer();for(let e=0;e<this._particles.length;e+=1)tt.release(this._particles[e].view);this._particles=[],super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class Cs extends U{constructor(t,e,i,n,o,r,a){super(a),this.anchor.set(.5),this.x=t,this.y=e,this.rotation=i,this.width=o,this.height=n,this.alpha=r,this._initialAlpha=r,this._elapsedTime=0,this._fadeDuration=1800+Math.random()*700}update(t){this._elapsedTime+=t;const e=Math.min(this._elapsedTime/this._fadeDuration,1);return this.alpha=(1-e)*this._initialAlpha,e>=1}}const Xt=1;class Ps extends D{constructor(t,e,i={}){super(),this._levelView=i.levelView||null,this._renderer=i.renderer||null,this._level=t[H]||0,this._markLayers=new Map,this.zIndex=I(Xt,this._level),this._currentX=t[$]||0,this._currentY=t[K]||0,this._currentRotation=t[nt]||0,this._engineLoad=t[rt]||0,this._condition=t[j],this._size=t[Lt],this._prevX=this._currentX,this._prevY=this._currentY,this._prevRotation=this._currentRotation,this._prevSpeed=0,this._prevAngularSpeed=0,this._assets=e,this._trackMarkCooldown=2,this._lastTrackMarkTime=0,this._minAbsAccelerationForMark=4,this._minAngularSpeedForMark=.02,this._minRotationAccelerationForMark=.4,this._minSpeedForRotationMarks=1.4,this._trackWidth=this._size*.4,this._trackLength=this._size*.5;const n=this._size*3;this._trackOffset=n/2*.7,this._backwardOffset=n*.4,this._trackInitialAlpha=.4,this._tickListener=o=>this._internalUpdate(o.deltaMS),Y.shared.add(this._tickListener),this._levelView&&(this.onRender=()=>this._updateLayers())}update(t){this._currentX=t[$],this._currentY=t[K],this._currentRotation=t[nt],this._engineLoad=t[rt],this._condition=t[j];const e=t[H]||0;e!==this._level&&(this._level=e,this.zIndex=I(Xt,e))}_markLayer(t){let e=this._markLayers.get(t);if(e)return e;e=new D,e.zIndex=I(Xt,t),this._markLayers.set(t,e);const i=this.parent||this;return i.addChild(e),i.sortChildren(),e}_internalUpdate(t){if(t<=0)return;for(const f of this._markLayers.values())for(let g=f.children.length-1;g>=0;g-=1){const m=f.children[g];m.update(t)&&m.destroy()}const e=this._currentX-this._prevX,i=this._currentY-this._prevY,n=Math.sqrt(e*e+i*i),o=Si(this._currentRotation-this._prevRotation),r=Math.abs(o),a=n-this._prevSpeed,l=Math.abs(a),h=r-this._prevAngularSpeed,_=Math.abs(h),c=performance.now();let u=!1;this._condition!==0&&c-this._lastTrackMarkTime>this._trackMarkCooldown&&(l>this._minAbsAccelerationForMark&&(u=!0),n>this._minSpeedForRotationMarks&&(r>this._minAngularSpeedForMark||_>this._minRotationAccelerationForMark)&&(u=!0)),this._engineLoad>1&&(u=!0),u&&(this.createTrackMarksAtPreviousPosition(),this._lastTrackMarkTime=c),this._prevX=this._currentX,this._prevY=this._currentY,this._prevRotation=this._currentRotation,this._prevSpeed=n,this._prevAngularSpeed=r}createTrackMarksAtPreviousPosition(){const t=this._markLayer(this._level);for(let e=-1;e<=1;e+=2){const i=Math.cos(this._prevRotation+Math.PI/2)*this._trackOffset*e,n=Math.sin(this._prevRotation+Math.PI/2)*this._trackOffset*e,o=-Math.cos(this._prevRotation)*this._backwardOffset,r=-Math.sin(this._prevRotation)*this._backwardOffset,a=this._prevX+i+o,l=this._prevY+n+r,h=new Cs(a,l,this._prevRotation,this._trackWidth,this._trackLength,this._trackInitialAlpha,this._assets.trackMarkTexture);t.addChild(h)}}_updateLayers(){if(!this._markLayers.size)return;const t=J(this.parent,this._renderer);for(const[e,i]of this._markLayers)i.alpha=this._levelView.alphaFor(e,this._currentX,this._currentY),i.tint=this._levelView.tintFor(e),e&&q(i,t,e*R.shear)}_stopTimer(){this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null)}destroy(t){this._stopTimer();for(const e of this._markLayers.values())e.destroyed||e.destroy({children:!0});this._markLayers.clear(),super.destroy({children:!0,texture:!1,textureSource:!1,...t})}}const me=2,at=300,zs=6,z={lifetime:{min:300,max:700},startSizeFactor:.7,endSizeFactor:2,startAlpha:.35,endAlpha:0,color:10260343,airResistance:.86,spawnRate:30,maxSpinSpeed:8,spinVelocity:{back:{min:20,max:70},side:{min:-25,max:25}},landingBurst:14,landingVelocity:{min:40,max:110},landingSizeFactor:1.6};class Es extends D{constructor(t,e,i={}){super(),this._level=t[H]||0,this.zIndex=I(me,this._level);const{texture:n,contentSize:o}=e.dustTexture;this._dustTexture=n,this._textureScale=zs/o,this._x=t[$],this._y=t[K],this._rotation=t[nt],this._vx=t[Tt]||0,this._vy=t[At]||0,this._engineLoad=t[rt]||0,this._condition=t[j],this._z=t[ht]||0,this._vz=t[It]||0,this._prevVz=this._vz,this._size=t[Lt];const r=this._size*3;this._trackOffset=r/2*.7,this._backwardOffset=r*.4,this._particleScaleMultiplier=Math.max(.5,Math.sqrt(this._size*4*r*.001)),this._particles=[],this._timeSinceSpawn=0,this._levelView=i.levelView||null,this._renderer=i.renderer||null,this._soundManager=i.soundManager||null;const a=this._soundManager?.getSoundConfig("tankLanding");this._landingVolume=a?.volume||0,this._hasLandingSound=!!a,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this._x,this._y,this._z),this.tint=this._levelView.tintFor(this._level)),q(this,J(this.parent,this._renderer),this._z*R.shear,1)}),this._particleContainer=new Ht({texture:this._dustTexture,boundsArea:new X(this._x-at,this._y-at,at*2,at*2),dynamicProperties:{position:!0,vertex:!0,rotation:!0,color:!0}}),this.addChild(this._particleContainer),this._tickListener=l=>this._updateParticles(l.deltaMS),Y.shared.add(this._tickListener)}update(t){const e=t[H]||0;e!==this._level&&(this._level=e,this.zIndex=I(me,e)),this._x=t[$],this._y=t[K],this._rotation=t[nt],this._vx=t[Tt]||0,this._vy=t[At]||0,this._engineLoad=t[rt]||0,this._condition=t[j],this._z=t[ht]||0,this._vz=t[It]||0,this._particleContainer.boundsArea.x=this._x-at,this._particleContainer.boundsArea.y=this._y-at;const i=Ae(this._prevVz,this._vz,mt);i>0&&(this._triggerLandingBurst(i),this._playLandingSound(i)),this._prevVz=this._vz}_playLandingSound(t){this._hasLandingSound&&this._soundManager.registerSound("tankLanding",{position:{x:this._x,y:this._y},volume:this._landingVolume*t})}_contactPoint(t){const e=this._rotation+Math.PI/2;return{x:this._x+Math.cos(e)*this._trackOffset*t-Math.cos(this._rotation)*this._backwardOffset,y:this._y+Math.sin(e)*this._trackOffset*t-Math.sin(this._rotation)*this._backwardOffset}}_triggerLandingBurst(t){const e=Math.round(z.landingBurst*t);if(!(e<=0))for(let i=-1;i<=1;i+=2){const n=this._contactPoint(i);for(let o=0;o<e;o+=1){const r=T(0,Math.PI*2),a=T(z.landingVelocity.min,z.landingVelocity.max)*t;this._spawnParticle(n.x,n.y,Math.cos(r)*a,Math.sin(r)*a,z.landingSizeFactor*t)}}}_spawnSpinDust(){const t=this._rotation+Math.PI,e=this._rotation+Math.PI/2;for(let i=-1;i<=1;i+=2){const n=this._contactPoint(i),o=T(z.spinVelocity.back.min,z.spinVelocity.back.max),r=T(z.spinVelocity.side.min,z.spinVelocity.side.max);this._spawnParticle(n.x,n.y,Math.cos(t)*o+Math.cos(e)*r,Math.sin(t)*o+Math.sin(e)*r,1)}}_spawnParticle(t,e,i,n,o){const r=z.startSizeFactor*o,a=z.endSizeFactor*o,l=tt.get(this._dustTexture),h=r*this._particleScaleMultiplier*this._textureScale;l.tint=z.color,l.x=t,l.y=e,l.alpha=z.startAlpha,l.scaleX=h,l.scaleY=h,l.rotation=T(0,Math.PI*2),this._particles.push({view:l,x:t,y:e,vx:i,vy:n,age:0,lifetime:T(z.lifetime.min,z.lifetime.max),startSizeFactor:r,endSizeFactor:a,rotSpeed:T(-1,1)}),this._particleContainer.addParticle(l)}_updateParticles(t){if(t<=0)return;const e=t/1e3;this._timeSinceSpawn+=t;const i=Math.max(0,this._engineLoad-1),n=Math.hypot(this._vx,this._vy),r=this._condition>0&&i>0&&n<z.maxSpinSpeed?z.spawnRate*Math.min(i,1):0;if(r>0){const l=1e3/r;for(;this._timeSinceSpawn>=l;)this._spawnSpinDust(),this._timeSinceSpawn-=l}else this._timeSinceSpawn=0;const a=Math.pow(z.airResistance,t/16);for(let l=this._particles.length-1;l>=0;l-=1){const h=this._particles[l];if(h.age+=t,h.age>=h.lifetime){this._particleContainer.removeParticle(h.view),tt.release(h.view),this._particles.splice(l,1);continue}h.vx*=a,h.vy*=a,h.x+=h.vx*e,h.y+=h.vy*e;const _=h.age/h.lifetime,c=1-(1-_)*(1-_),u=(h.startSizeFactor+(h.endSizeFactor-h.startSizeFactor)*c)*this._particleScaleMultiplier*this._textureScale,f=h.view;f.x=h.x,f.y=h.y,f.scaleX=u,f.scaleY=u,f.alpha=z.startAlpha+(z.endAlpha-z.startAlpha)*_,f.rotation+=h.rotSpeed*e}}_stopTimer(){this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null)}destroy(t){this._stopTimer();for(let e=0;e<this._particles.length;e+=1)tt.release(this._particles[e].view);this._particles=[],super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class Rs extends wt{constructor(t,e,i,n,o){super(o),this.startPositionX=t,this.startPositionY=e,this.endPositionX=i,this.endPositionY=n,this.config={color:16777113,alphaStart:1,alphaEnd:.6,trailLength:55,tracerSpeed:19e3,minDuration:45,maxDuration:80,trailShrinkPower:1,trailStartOffset:30,segmentCount:12,segmentRadius:1,alphaPulseFrequency:.1,alphaPulseAmplitude:.15},this.graphics=new O,this.addChild(this.graphics),this.elapsedTime=0,this.dx=this.endPositionX-this.startPositionX,this.dy=this.endPositionY-this.startPositionY,this.totalDist=Math.hypot(this.dx,this.dy),this.totalDist>.001?(this.nx=this.dx/this.totalDist,this.ny=this.dy/this.totalDist,this.animationDuration=this.totalDist/this.config.tracerSpeed*1e3):(this.nx=0,this.ny=0,this.totalDist=0,this.animationDuration=this.config.minDuration),this.animationDuration=Math.max(this.config.minDuration,this.animationDuration),this.animationDuration=Math.min(this.config.maxDuration,this.animationDuration),this.animationDuration<=0&&(this.animationDuration=this.config.minDuration)}_drawSegment(t,e,i,n,o){this.graphics.circle(t,e,i),this.graphics.fill({color:n,alpha:xt(o,0,1)})}_update(t){if(this.isComplete)return;this.elapsedTime+=t,this.graphics.clear();const e=Math.min(this.elapsedTime/this.animationDuration,1);if(e>0){const i=V(this.startPositionX,this.endPositionX,e),n=V(this.startPositionY,this.endPositionY,e),o=V(this.config.alphaStart,this.config.alphaEnd,e),r=Math.sin(this.elapsedTime*this.config.alphaPulseFrequency)*this.config.alphaPulseAmplitude;let a=o+r;a=xt(a,0,this.config.alphaStart);const l=Math.pow(e,this.config.trailShrinkPower),h=V(this.config.trailLength,0,l),_=this.totalDist*e;if(_>=this.config.trailStartOffset){let c=_;this.totalDist>.001&&(c=Math.max(0,_-this.config.trailStartOffset));const u=Math.min(c,h);let f,g;this.totalDist>.001?(f=i-this.nx*u,g=n-this.ny*u):(f=i,g=n);const m=Math.hypot(i-f,n-g);if(m<this.config.segmentRadius*.5&&this.totalDist===0)this._drawSegment(i,n,this.config.segmentRadius,this.config.color,a);else if(m>=this.config.segmentRadius*.5){const w=Math.max(1,this.config.segmentCount);for(let x=0;x<w;x++){let y=.5;w>1&&(y=x/(w-1));const v=V(f,i,y),d=V(g,n,y),b=V(1,.8,y);this._drawSegment(v,d,this.config.segmentRadius,this.config.color,a*b)}}}}this.elapsedTime>=this.animationDuration&&(this.graphics.clear(),this._completeEffect())}destroy(t){this.graphics&&this.graphics.clear(),super.destroy(t)}}class Ds extends wt{constructor(t,e,i,n,o,r){super(o),this.x=t,this.y=e,this._assets=r;const{texture:a,contentSize:l}=this._assets.impactParticleTexture;this._particleTexture=a,this._textureContentSize=l,this.config={particleCount:T(2,4),particleMinSize:.8,particleMaxSize:2.4,minInitialSpeed:10,maxInitialSpeed:300,minLifetime:8e3,maxLifetime:15e3,color:[3355443,2236962,4473924],fadeOutStart:.8,impactDirectionX:i,impactDirectionY:n,spreadAngle:60,dragCoefficient:13,minSpeedThreshold:1,lingerDuration:6e3},this.config.impactDirectionX===0&&this.config.impactDirectionY===0?this.useOmnidirectionalSpread=!0:this.useOmnidirectionalSpread=!1,this.particlesData=[],this.elapsedTime=0,this._createParticles()}_createParticles(){let t;this.useOmnidirectionalSpread||(t=Math.atan2(this.config.impactDirectionY,this.config.impactDirectionX));const i=this.config.spreadAngle*(Math.PI/180)/2;for(let n=0,o=this.config.particleCount;n<o;n+=1){let r;this.useOmnidirectionalSpread?r=Math.random()*Math.PI*2:r=t+T(-i,i);const a=T(this.config.minInitialSpeed,this.config.maxInitialSpeed),l=new U(this._particleTexture);l.anchor.set(.5);const h={sprite:l,x:0,y:0,vx:Math.cos(r)*a,vy:Math.sin(r)*a,size:T(this.config.particleMinSize,this.config.particleMaxSize),color:Array.isArray(this.config.color)?this.config.color[Math.floor(Math.random()*this.config.color.length)]:this.config.color,lifetime:T(this.config.minLifetime,this.config.maxLifetime),age:0,alpha:1,active:!0,isMoving:!0,timeSinceStopped:0};l.tint=h.color,this.particlesData.push(h),this.addChild(l)}}_update(t){if(this.isComplete)return;this.elapsedTime+=t;const e=t/1e3;let i=0;for(let n=0,o=this.particlesData.length;n<o;n+=1){const r=this.particlesData[n];if(!r.active)continue;if(i+=1,r.age+=t,r.isMoving){const _=Math.hypot(r.vx,r.vy);if(_>0){const u=_*this.config.dragCoefficient*e,f=Math.max(0,1-u/_);r.vx*=f,r.vy*=f}r.x+=r.vx*e,r.y+=r.vy*e,Math.hypot(r.vx,r.vy)<this.config.minSpeedThreshold&&(r.isMoving=!1,r.vx=0,r.vy=0)}else r.timeSinceStopped+=t;const a=r.age/r.lifetime;if(!r.isMoving&&r.timeSinceStopped>=this.config.lingerDuration){const _=r.timeSinceStopped-this.config.lingerDuration,c=Math.min(500,r.lifetime*(1-this.config.fadeOutStart));r.alpha=V(1,0,Math.min(_/c,1))}else if(a>=this.config.fadeOutStart){const _=r.age-r.lifetime*this.config.fadeOutStart,c=r.lifetime*(1-this.config.fadeOutStart);r.alpha=c>0?V(1,0,Math.min(_/c,1)):0}(r.age>=r.lifetime||r.alpha<.01)&&(r.active=!1,r.alpha=0);const l=r.sprite;l.position.set(r.x,r.y),l.alpha=r.alpha,l.visible=r.active;const h=r.size/this._textureContentSize;l.scale.set(h)}i===0&&this._isStarted&&this._completeEffect()}destroy(t){this.particlesData=[],super.destroy(t)}}const Fs=2;class Vs extends D{constructor(t,e,i){super(),this.startPositionX=t[bi],this.startPositionY=t[Mi],this.endPositionX=t[Ti],this.endPositionY=t[Ai],this.soundPositionX=t[ki],this.soundPositionY=t[Ii],this.hit=t[Li],this.endLevel=t[Pi]||0,this.zIndex=I(Fs,this.endLevel),this.anchorKey=null,this.anchorLocalX=0,this.anchorLocalY=0,Array.isArray(t[re])&&([this.anchorKey,this.anchorLocalX,this.anchorLocalY]=t[re]),this._assets=e,this._soundManager=i.soundManager,this._isLocalShot=i.localPlayer?.is(t[Ci])===!0,this._mapDynamics=i.mapDynamics||null,this._levelView=i.levelView||null,this._renderer=i.renderer||null,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&(this.alpha=this._levelView.alphaFor(this.endLevel,this.endPositionX,this.endPositionY),this.tint=this._levelView.tintFor(this.endLevel)),q(this,J(this.parent,this._renderer),this.endLevel*R.shear,1)}),this.tracer=null,this.impact=null,this._isDestroyed=!1,this._visualsComplete=!1,this._soundComplete=!1,this._soundId=this._soundManager.registerSound("shot",{position:{x:this.soundPositionX,y:this.soundPositionY},spatial:!this._isLocalShot},()=>{this._soundComplete=!0,this._soundId=null,this._tryDestroy()}),this._soundId||(this._soundComplete=!0)}run(){this._isDestroyed||(this.tracer=new Rs(this.startPositionX,this.startPositionY,this.endPositionX,this.endPositionY,this._onTracerComplete.bind(this)),this.addChild(this.tracer),this.tracer.run())}_onTracerComplete(){if(!this._isDestroyed)if(this.hit){let t=this.endPositionX,e=this.endPositionY;if(this.anchorKey!==null&&this._mapDynamics){const l=this._mapDynamics.toWorld(this.anchorKey,this.anchorLocalX,this.anchorLocalY);l&&(t=l.x,e=l.y)}const i=t-this.startPositionX,n=e-this.startPositionY,o=Math.hypot(i,n);let r=0,a=0;o>.001&&(r=-(i/o),a=-(n/o)),this.impact=new Ds(t,e,r,a,this._onImpactComplete.bind(this),this._assets),this.addChild(this.impact),this.impact.run()}else this._visualsComplete=!0,this._tryDestroy()}_onImpactComplete(){this._isDestroyed||(this._visualsComplete=!0,this._tryDestroy())}_tryDestroy(){this._visualsComplete&&this._soundComplete&&this.destroy()}destroy(){this._isDestroyed||(this._isDestroyed=!0,this._soundId&&(this._soundManager.unregisterSound(this._soundId),this._soundId=null),this.tracer&&(this.tracer.destroy(),this.tracer=null),this.impact&&(this.impact.destroy(),this.impact=null),this.parent&&this.parent.removeChild(this),super.destroy({children:!0}))}}const Os={Map:Hi,MapRadar:Gi,TankRadar:$i,Tank:hs,Bomb:_s,ExplosionEffect:Ts,Smoke:Ls,Tracks:Ps,Dust:Es,ShotEffect:Vs},Xs=4;function yt(s){return Math.ceil(s*Xs)}function bt(s,t){const{radius:e,blur:i,color:n,quality:o=40}=s,r=new O,a=(e+yt(i))*2,l=a/2;r.circle(l,l,e),r.fill(n);const h=new Ut({strength:i,quality:o});h.padding=yt(i),r.filters=[h];const _=t.generateTexture({target:r,frame:new X(0,0,a,a)});return r.destroy(!0),{texture:_,contentSize:e*2}}function Ys(s,t){const{baseRadius:e,irregularity:i=0,blur:n=0,numPoints:o=20,colorFill:r,colorRim:a=r,rimWidth:l=0,variants:h=1}=s,_=Math.max(1,Math.floor(h)||1),c=(e+i+l)*2,u=c+yt(n)*2,f=u/2,g=[];for(let m=0;m<_;m+=1){const w=new O,x=[];for(let v=0;v<o;v+=1){const d=v/o*Math.PI*2,b=e+T(-i,i);x.push(f+b*Math.cos(d),f+b*Math.sin(d))}w.poly(x).fill(r).stroke({width:l,color:a,alignment:1});const y=new Ut({strength:n,quality:10});y.padding=yt(n),w.filters=[y],g.push(t.generateTexture({target:w,frame:new X(0,0,u,u)})),w.destroy(!0)}return{textures:g,contentSize:c}}function Bs(s,t){const{colors:e}=s,i={},n=10,o=n*4,r=n*3,a=15658734,l=_=>{const c=new O,u=new O,f=o,g=r;c.rect(-f/2,-g/2,f,g).fill(5592405).rect(-f/2+1,-g/2+1,f-2,g-2).fill(10066329).rect(-f/2+2,-g/2+2,f-4,g-4).fill(13421772).rect(-f/2+3,-g/2+3,f-6,g-6).fill(a),u.moveTo(1.33*n,-.42*n).lineTo(.42*n,-1*n).lineTo(-.42*n,-1*n).lineTo(-1.33*n,-.42*n).lineTo(-1.33*n,.42*n).lineTo(-.42*n,1*n).lineTo(.42*n,1*n).lineTo(1.33*n,.42*n).closePath().fill(_).stroke({width:.17*n,color:11184810}).moveTo(2.33*n,-.25*n).lineTo(.25*n,-.25*n).lineTo(.25*n,.25*n).lineTo(2.33*n,.25*n).closePath().stroke({width:.17*n,color:11184810}).fill(_);const m=c.getBounds(),w=t.generateTexture({target:c,frame:new X(m.x,m.y,m.width,m.height)}),x=u.getBounds(),y=t.generateTexture({target:u,frame:new X(x.x,x.y,x.width,x.height)}),v={x:-x.x/x.width,y:-x.y/x.height};return c.destroy(!0),u.destroy(!0),{body:w,gun:y,gunAnchor:v}},h=()=>{const _=new D,c=new O,u=new O;_.addChild(c,u);const f=3815994,g=2434341,m=3158064,w=1579032,x=5263440,y=o,v=r,d=n;c.moveTo(-y/2-d*.1,-v/2+d*.2).lineTo(y/2+d*.2,-v/2-d*.1).lineTo(y/2-d*.1,v/2+d*.3).lineTo(-y/2+d*.3,v/2-d*.2).closePath().fill(f).stroke({width:d*.2,color:x,alignment:.5}),c.moveTo(-y/2+d*.4,-v/2+d*.5).lineTo(y/2-d*.3,-v/2+d*.2).lineTo(y/2-d*.4,v/2-d*.1).lineTo(-y/2+d*.2,v/2-d*.4).closePath().fill(g),c.circle(y*.15,v*.1,d*1.2).fill(w),c.circle(-y*.3,-v*.25,d*.5).fill(w),u.position.set(d*.3,-d*.2);const b=[d*1.1,-d*.7,d*.2,-d*1,-d*.6,-d*.9,-d*1.3,-d*.2,-d*1.1,d*.6,-d*.2,d*1,d*.7,d*.8,d*1.3,d*.1];u.poly(b).fill(m).stroke({width:d*.15,color:x,alignment:0});const S=[d*.8,-d*.25,d*1.5,-d*.4,d*1.4,d*.15,d*.7,d*.05];u.poly(S).fill(m).stroke({width:d*.1,color:x,alignment:0}),u.circle(d*.1,-d*.2,d*.4).fill(w);const M=_.getBounds(),A=t.generateTexture({target:_,frame:new X(M.x,M.y,M.width,M.height)});return _.destroy({children:!0}),A};return i.liveTeamId1=l(e.teamId1),i.liveTeamId2=l(e.teamId2),i.destroyed=h(),i}function Ns(s,t){const{radius:e,borderWidth:i,crossSize:n,crossThickness:o,colors:r}=s,a={},l=(e+i)*2,h=l/2,_=15658734,c=3355443,u=g=>{const m=new O;m.circle(h,h,e).fill(_),m.circle(h,h,e-i).fill(g);const w=t.generateTexture({target:m,frame:new X(0,0,l,l)});return m.destroy(!0),w},f=()=>{const g=new O,m=n/2;g.moveTo(h-m,h-m).lineTo(h+m,h+m).moveTo(h-m,h+m).lineTo(h+m,h-m).stroke({width:o,color:c});const w=t.generateTexture({target:g,frame:new X(0,0,l,l)});return g.destroy(!0),w};return a.liveTeamId1=u(r.teamId1),a.liveTeamId2=u(r.teamId2),a.destroyed=f(),a}function Hs(s,t){const{colorOuter:e,colorInner:i}=s,n=new O,o=20,r=1;n.rect(0,0,o,o).fill(e),n.rect(r,r,o-r*2,o-r*2).fill(i);const a=t.generateTexture({target:n,frame:new X(0,0,o,o)});return n.destroy(!0),a}function Us(s,t){const{width:e,length:i,color:n}=s,o=new O;o.rect(0,0,i,e).fill(n);const r=t.generateTexture({target:o,frame:new X(0,0,i,e)});return o.destroy(!0),r}function Ws(s,t){const{width:e,height:i,radius:n,blur:o,color:r,quality:a=20}=s,l=new O,h=yt(o),_=e+h*2,c=i+h*2;l.roundRect(h,h,e,i,n),l.fill(r);const u=new Ut({strength:o,quality:a});u.padding=h,l.filters=[u];const f=t.generateTexture({target:l,frame:new X(0,0,_,c)});return l.destroy(!0),{texture:f,contentSize:e}}const Gs={explosionTexture:bt,smokeTexture:bt,impactParticleTexture:bt,dustTexture:bt,tankShadowTexture:Ws,funnelTexture:Ys,tankTexture:Bs,tankRadarTexture:Ns,bombTexture:Hs,trackMarkTexture:Us},Zs=s=>(s??"").split(/[?#]/)[0].endsWith(".js"),qs=s=>import(s);function $s(s=qe,t={}){const e={level:0,x:0,y:0,z:0,camera:null,key:null,stage:t.stage||null,renderer:t.renderer||null},i=()=>{if(!e.stage)return null;const{position:n,scale:o}=e.stage,r=e.renderer?.screen,a=r?r.width:0,l=r?r.height:0,h=e.key;return(e.camera===null||h===null||h.x!==n.x||h.y!==n.y||h.scaleX!==o.x||h.scaleY!==o.y||h.width!==a||h.height!==l)&&(e.key={x:n.x,y:n.y,scaleX:o.x,scaleY:o.y,width:a,height:l},e.camera=J(e.stage,e.renderer)),e.camera};return{attachStage(n,o){e.stage||!n||!o||(e.stage=n,e.renderer=o,e.key=null)},camera(){return i()},set(n,o,r,a=0){e.level=n,e.x=o,e.y=r,e.z=a},alphaFor(n,o,r,a=n){const l=i(),h=st(e.x,e.y,l,e.z*R.shear),_=st(o,r,l,a*R.shear);return Qe({viewLevel:e.level,viewX:h.x,viewY:h.y,level:n,x:_.x,y:_.y,cfg:s})},tintFor(n){return ti(e.level,n,s)},get cfg(){return s},get mode(){return s.mode},get level(){return e.level},get x(){return e.x},get y(){return e.y},get z(){return e.z}}}const Qs={id:"tanks",engineApi:Oe,requires:["map.layers","map.levelsN"],async createClientCore(s,{wasmUrl:t}){if(Zs(t)){const i=await qs(t);return{core:new i.ClientCore(s),memory:null}}const e=await Ge({module_or_path:t});return{core:new Yt(s),memory:e.memory}},parts:Os,bakers:Gs,styles:Ze,serviceNames:["levelView","mapDynamics","rampRuns"],hooks:{services(s){const t=$s();let e=[],i=null;return{levelView:t,mapDynamics:{toWorld(n,o,r){const a=s.map_dynamics_to_world(n,o,r);return a.length===0?null:{x:a[0],y:a[1]}}},rampRuns:{forLevel(n){const o=s.map_generation();return o!==i&&(i=o,e=JSON.parse(s.ramp_runs())),e.filter(r=>r.from===n)}}}},onAuth(s,t){s.set_model(t.model)},onPanel(s,t){s.sync_panel(JSON.stringify(t))},onLocalAction(s,t,e,i){return t!=="down"?null:e==="fire"?s.try_fire(i)||null:((e==="nextWeapon"||e==="prevWeapon")&&s.cycle_weapon(e==="prevWeapon"),null)}}};export{Qs as default};
|
package/dist/manifest.json
CHANGED
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
"map.layers",
|
|
6
6
|
"map.levelsN"
|
|
7
7
|
],
|
|
8
|
-
"version": "
|
|
8
|
+
"version": "84f09934ab3b3898",
|
|
9
9
|
"title": "Tanks",
|
|
10
10
|
"entries": {
|
|
11
|
-
"client": "/games/tanks/client-
|
|
11
|
+
"client": "/games/tanks/client-B1rlGrPx.js",
|
|
12
12
|
"host": "/games/tanks/host-ByOTlcsk.js",
|
|
13
13
|
"wasm": "/games/tanks/assets/vimp_tanks_core_bg-BdjeV0Io.wasm",
|
|
14
14
|
"wasmNode": "./core-node/vimp_tanks_core.js"
|
|
15
15
|
},
|
|
16
16
|
"assetsBase": "/games/tanks/",
|
|
17
17
|
"maps": {
|
|
18
|
-
"version": "
|
|
18
|
+
"version": "d69e6644eaae47bd",
|
|
19
19
|
"list": [
|
|
20
20
|
"canopy",
|
|
21
21
|
"garden",
|
package/dist/maps/garden.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"setId":"c1","spriteSheet":{"img":"tiles3.png","frames":[[96,0,32,32],[32,32,32,32],[64,32,32,32],[0,96,32,32]]},"layers":{"1":[0,1,2],"4":[3]},"step":32,"physicsStatic":[2],"physicsDynamic":[{"density":100,"layer":3,"position":[960,64],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,96],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,128],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,160],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,192],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,224],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,256],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,288],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,320],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,352],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[64,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[96,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[128,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[160,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[192,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[224,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[256,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[288,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[320,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[352,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,704],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,736],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,768],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,800],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,832],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,864],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,896],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,928],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[704,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[736,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[768,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[800,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[832,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[864,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[896,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[928,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3456],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3488],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3520],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3552],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3584],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3616],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3648],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3680],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3712],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3744],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3456,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3488,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3520,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3552,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3584,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3616,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3648,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3680,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3712,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3744,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2880],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2912],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2944],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2976],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3008],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3040],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3072],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3104],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2880,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2912,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2944,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2976,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3008,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3040,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3072,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3104,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14}],"respawns":{"team1":[[320,320,45],[320,480,45],[320,640,45],[480,320,45],[480,480,45],[480,640,45],[640,320,45],[640,480,45],[640,640,45],[800,400,45]],"team2":[[3520,3520,225],[3520,3360,225],[3520,3200,225],[3360,3520,225],[3360,3360,225],[3360,3200,225],[3200,3520,225],[3200,3360,225],[3200,3200,225],[3040,3440,225]]},"map":[[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2],[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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1,1,1,1,1,1,1,1,1,1,1,1,1,2],[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2],[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2],[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]]}
|
|
1
|
+
{"setId":"c1","spriteSheet":{"img":"tiles3.png","frames":[[96,0,32,32],[32,32,32,32],[64,32,32,32],[0,96,32,32]]},"layers":{"1":[0,1,2],"4":[3]},"step":32,"physicsStatic":[2],"physicsDynamic":[{"density":100,"layer":3,"position":[960,64],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,96],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,128],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,160],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,192],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,224],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,256],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,288],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,320],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,352],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[64,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[96,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[128,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[160,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[192,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[224,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[256,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[288,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[320,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[352,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,704],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,736],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,768],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,800],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,832],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,864],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,896],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,928],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[704,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[736,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[768,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[800,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[832,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[864,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[896,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[928,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3456],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3488],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3520],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3552],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3584],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3616],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3648],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3680],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3712],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3744],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3456,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3488,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3520,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3552,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3584,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3616,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3648,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3680,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3712,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3744,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2880],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2912],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2944],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2976],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3008],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3040],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3072],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3104],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2880,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2912,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2944,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2976,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3008,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3040,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3072,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3104,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14}],"respawns":{"team1":[[320,320,45],[320,480,45],[320,640,45],[480,320,45],[480,480,45],[480,640,45],[640,320,45],[640,480,45],[640,640,45],[800,400,45]],"team2":[[3520,3520,225],[3520,3360,225],[3520,3200,225],[3360,3520,225],[3360,3360,225],[3360,3200,225],[3200,3520,225],[3200,3360,225],[3200,3200,225],[3040,3440,225]]},"map":[[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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@@ -1,84 +0,0 @@
|
|
|
1
|
-
import{UniformGroup as ke,Filter as Ie,GpuProgram as Le,GlProgram as Pe,defaultFilterVert as ze,Spritesheet as Ce,Container as D,Sprite as U,Rectangle as X,MeshSimple as ge,Ticker as Y,Assets as xe,Texture as Ee,Graphics as O,PerspectiveMesh as Re,Text as De,Particle as Fe,ParticleContainer as Ht,BlurFilter as Ut}from"pixi.js";const Ve=4;class Yt{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$t.unregister(this),t}free(){const t=this.__destroy_into_raw();p.__wbg_clientcore_free(t,0)}abi_describe(){let t,e;try{const i=p.clientcore_abi_describe(this.__wbg_ptr);return t=i[0],e=i[1],Q(i[0],i[1])}finally{p.__wbindgen_free(t,e,1)}}apply_aim(t,e,i,n){p.clientcore_apply_aim(this.__wbg_ptr,t,e,i,n)}apply_input(t,e,i){const n=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),o=F,r=it(e,p.__wbindgen_malloc,p.__wbindgen_realloc),a=F;p.clientcore_apply_input(this.__wbg_ptr,n,o,r,a,i)}cycle_weapon(t){p.clientcore_cycle_weapon(this.__wbg_ptr,t)}debug_json(){let t,e;try{const i=p.clientcore_debug_json(this.__wbg_ptr);return t=i[0],e=i[1],Q(i[0],i[1])}finally{p.__wbindgen_free(t,e,1)}}decode_frame(t){let e,i;try{const n=Dt(t,p.__wbindgen_malloc),o=F,r=p.clientcore_decode_frame(this.__wbg_ptr,n,o);return e=r[0],i=r[1],Q(r[0],r[1])}finally{p.__wbindgen_free(e,i,1)}}dispatch(t,e){const i=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),n=F,o=Dt(e,p.__wbindgen_malloc),r=F,a=p.clientcore_dispatch(this.__wbg_ptr,i,n,o,r);var l=Xe(a[0],a[1]).slice();return p.__wbindgen_free(a[0],a[1]*1,1),l}hot_ptr(){return p.clientcore_hot_ptr(this.__wbg_ptr)>>>0}hot_values(){const t=p.clientcore_hot_values(this.__wbg_ptr);var e=Kt(t[0],t[1]).slice();return p.__wbindgen_free(t[0],t[1]*4,4),e}map_dynamics_to_world(t,e,i){const n=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),o=F,r=p.clientcore_map_dynamics_to_world(this.__wbg_ptr,n,o,e,i);var a=Kt(r[0],r[1]).slice();return p.__wbindgen_free(r[0],r[1]*4,4),a}map_generation(){return p.clientcore_map_generation(this.__wbg_ptr)>>>0}my_game_id(){return p.clientcore_my_game_id(this.__wbg_ptr)}constructor(t){const e=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),i=F,n=p.clientcore_new(e,i);if(n[2])throw jt(n[1]);return this.__wbg_ptr=n[0],$t.register(this,this.__wbg_ptr,this),this}offset(){return p.clientcore_offset(this.__wbg_ptr)}push_frame(t,e){const i=Dt(t,p.__wbindgen_malloc),n=F;return p.clientcore_push_frame(this.__wbg_ptr,i,n,e)!==0}ramp_runs(){let t,e;try{const i=p.clientcore_ramp_runs(this.__wbg_ptr);return t=i[0],e=i[1],Q(i[0],i[1])}finally{p.__wbindgen_free(t,e,1)}}reset(){p.clientcore_reset(this.__wbg_ptr)}resync(){p.clientcore_resync(this.__wbg_ptr)}sample(t){return p.clientcore_sample(this.__wbg_ptr,t)>>>0}set_active(t){p.clientcore_set_active(this.__wbg_ptr,t)}set_map(t){const e=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),i=F,n=p.clientcore_set_map(this.__wbg_ptr,e,i);if(n[1])throw jt(n[0])}set_model(t){const e=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),i=F;p.clientcore_set_model(this.__wbg_ptr,e,i)}sync_panel(t){const e=it(t,p.__wbindgen_malloc,p.__wbindgen_realloc),i=F;p.clientcore_sync_panel(this.__wbg_ptr,e,i)}take_divergence(){let t,e;try{const i=p.clientcore_take_divergence(this.__wbg_ptr);return t=i[0],e=i[1],Q(i[0],i[1])}finally{p.__wbindgen_free(t,e,1)}}take_frames(){let t,e;try{const i=p.clientcore_take_frames(this.__wbg_ptr);return t=i[0],e=i[1],Q(i[0],i[1])}finally{p.__wbindgen_free(t,e,1)}}try_fire(t){const e=p.clientcore_try_fire(this.__wbg_ptr,t);let i;return e[0]!==0&&(i=Q(e[0],e[1]).slice(),p.__wbindgen_free(e[0],e[1]*1,1)),i}}Symbol.dispose&&(Yt.prototype[Symbol.dispose]=Yt.prototype.free);function Oe(){return{__proto__:null,"./vimp_tanks_core_bg.js":{__proto__:null,__wbg_Error_92b29b0548f8b746:function(t,e){return Error(Q(t,e))},__wbg___wbindgen_throw_344f42d3211c4765:function(t,e){throw new Error(Q(t,e))},__wbindgen_init_externref_table:function(){const t=p.__wbindgen_externrefs,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)}}}}const $t=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(s=>p.__wbg_clientcore_free(s,1));typeof FinalizationRegistry>"u"||new FinalizationRegistry(s=>p.__wbg_gamecore_free(s,1));function Kt(s,t){return s=s>>>0,Ye().subarray(s/4,s/4+t)}function Xe(s,t){return s=s>>>0,lt().subarray(s/1,s/1+t)}let ut=null;function Ye(){return(ut===null||ut.byteLength===0)&&(ut=new Float32Array(p.memory.buffer)),ut}function Q(s,t){return Ne(s>>>0,t)}let dt=null;function lt(){return(dt===null||dt.byteLength===0)&&(dt=new Uint8Array(p.memory.buffer)),dt}function Dt(s,t){const e=t(s.length*1,1)>>>0;return lt().set(s,e/1),F=s.length,e}function it(s,t,e){if(e===void 0){const a=mt.encode(s),l=t(a.length,1)>>>0;return lt().subarray(l,l+a.length).set(a),F=a.length,l}let i=s.length,n=t(i,1)>>>0;const o=lt();let r=0;for(;r<i;r++){const a=s.charCodeAt(r);if(a>127)break;o[n+r]=a}if(r!==i){r!==0&&(s=s.slice(r)),n=e(n,i,i=r+s.length*3,1)>>>0;const a=lt().subarray(n+r,n+i),l=mt.encodeInto(s,a);r+=l.written,n=e(n,i,r,1)>>>0}return F=r,n}function jt(s){const t=p.__wbindgen_externrefs.get(s);return p.__externref_table_dealloc(s),t}let Mt=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Mt.decode();const Be=2146435072;let Ft=0;function Ne(s,t){return Ft+=t,Ft>=Be&&(Mt=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Mt.decode(),Ft=t),Mt.decode(lt().subarray(s,s+t))}const mt=new TextEncoder;"encodeInto"in mt||(mt.encodeInto=function(s,t){const e=mt.encode(s);return t.set(e),{read:s.length,written:e.length}});let F=0,p;function He(s,t){return p=s.exports,ut=null,dt=null,p.__wbindgen_start(),p}async function Ue(s,t){if(typeof Response=="function"&&s instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(s,t)}catch(n){if(s.ok&&e(s.type)&&s.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",n);else throw n}const i=await s.arrayBuffer();return await WebAssembly.instantiate(i,t)}else{const i=await WebAssembly.instantiate(s,t);return i instanceof WebAssembly.Instance?{instance:i,module:s}:i}function e(i){switch(i){case"basic":case"cors":case"default":return!0}return!1}}async function We(s){if(p!==void 0)return p;s!==void 0&&(Object.getPrototypeOf(s)===Object.prototype?{module_or_path:s}=s:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),s===void 0&&(s=new URL("/assets/vimp_tanks_core_bg-BdjeV0Io.wasm",import.meta.url));const t=Oe();(typeof s=="string"||typeof Request=="function"&&s instanceof Request||typeof URL=="function"&&s instanceof URL)&&(s=fetch(s));const{instance:e,module:i}=await Ue(await s,t);return He(e)}const Ge='@charset "UTF-8";#panel table td#panel-bullet:before{content:"bullet: "}#panel table td#panel-bomb:before{content:"bomb: "}#panel table td#panel-time:before{content:"time: "}#vimp{background:#222;position:absolute;inset:0;margin:auto;z-index:1}#radar{position:absolute;right:1%;top:35px;z-index:2;border-radius:50%;background-color:#00be5acc;box-shadow:inset 0 0 47px #ee6,0 0 0 3px #054}#team1{color:#f56}#team2{color:#7ed}#spectators{color:#fe5}#team1 tHead tr,#team2 tHead tr,#spectators tHead tr{border-bottom:1px solid #888;text-transform:capitalize;font-weight:700}#team1 tBody tr,#team2 tBody tr{border-bottom:1px solid #444}#team1 tHead td:first-child:before{content:"team1 ("}#team1 tHead td:first-child:after{content:")"}#team2 tHead td:first-child:before{content:"team2 ("}#team2 tHead td:first-child:after{content:")"}#spectators tHead td:first-child:before{content:"spectators"}#spectators tBody td:nth-child(1){padding:0 1%;line-height:1.4em}#spectators tBody td:nth-child(2),#spectators tBody td:nth-child(3),#spectators tBody td:nth-child(4),#spectators tBody td:nth-child(5){display:none}',Ze={mode:"hole",radius:260,softness:.45,minAlpha:.12,layerAlpha:.4,fadeRate:6,lowerTint:11579584},R={shear:.22,levelZStride:100},pt={slices:4,rampSegments:4,sideTint:10133674},vt={scaleGain:.1,baseAlpha:.4,alphaFalloff:.12,sizeFactor:1.05},_t={lift:.35,vertices:6,shading:.28,lightDir:[-.7,-.7]},ft={fullImpact:6,squash:.14,duration:260,minImpact:1.5},qe=R.levelZStride,I=(s,t)=>s+qe*(t||0),Bt=(s,t)=>Math.min(s||0,Math.round(t));function J(s,t){const e=t?.screen;return!s||!e||!s.scale.x||!s.scale.y?null:{x:(e.width/2-s.position.x)/s.scale.x,y:(e.height/2-s.position.y)/s.scale.y,scaleX:s.scale.x,scaleY:s.scale.y}}function st(s,t,e,i){return!e||!i?{x:s,y:t}:{x:s+(s-e.x)*i,y:t+(t-e.y)*i}}function q(s,t,e,i=1){const n=typeof i=="number"?i:i.x,o=typeof i=="number"?i:i.y;if(!t||!e){s.scale.set(n,o),s.position.set(0,0);return}s.scale.set(n*(1+e),o*(1+e)),s.position.set(-t.x*e,-t.y*e)}function ye(s){const t=typeof s=="number"?s:s.x,e=typeof s=="number"?s:s.y;return{x:t,y:e}}function Jt(s,t,e){return Math.floor(s/t/e)}function $e(s,t,e){return Math.round(s/t/e)}function Ke(s,t,e){return{map:s,scale:t,step:e}}function we(s,t,e,i){const n=Jt(t,s.scale.x,s.step),o=Jt(e,s.scale.y,s.step),r=s.map?.[o]?.[n];return r!==void 0&&i.has(r)}const ve=s=>s.radius*(1-s.softness),je=(s,t,e)=>{if(t<=s)return e<t?0:1;const i=Math.min(1,Math.max(0,(e-s)/(t-s)));return i*i*(3-2*i)};function Je({viewLevel:s,viewX:t,viewY:e,level:i,x:n,y:o,cfg:r}){if((i||0)<=(s||0))return 1;if(r.mode==="layer")return r.layerAlpha;const a=n-t,l=o-e,h=Math.sqrt(a*a+l*l),_=je(ve(r),r.radius,h);return r.minAlpha+(1-r.minAlpha)*_}function Qe(s,t,e){return(t||0)<(s||0)?e.lowerTint:16777215}const ti=`
|
|
2
|
-
precision highp float;
|
|
3
|
-
|
|
4
|
-
in vec2 vTextureCoord;
|
|
5
|
-
|
|
6
|
-
out vec4 finalColor;
|
|
7
|
-
|
|
8
|
-
uniform sampler2D uTexture;
|
|
9
|
-
uniform vec4 uInputSize;
|
|
10
|
-
uniform vec4 uOutputFrame;
|
|
11
|
-
|
|
12
|
-
uniform vec2 uHoleCenter;
|
|
13
|
-
// x - внешний радиус, y - внутренний, z - alpha в центре дыры
|
|
14
|
-
uniform vec3 uHoleParams;
|
|
15
|
-
|
|
16
|
-
void main(void)
|
|
17
|
-
{
|
|
18
|
-
vec4 color = texture(uTexture, vTextureCoord);
|
|
19
|
-
vec2 pixel = uOutputFrame.xy + vTextureCoord * uInputSize.xy;
|
|
20
|
-
float d = distance(pixel, uHoleCenter);
|
|
21
|
-
float t = smoothstep(uHoleParams.y, uHoleParams.x, d);
|
|
22
|
-
|
|
23
|
-
finalColor = color * mix(uHoleParams.z, 1.0, t);
|
|
24
|
-
}
|
|
25
|
-
`,Qt=`
|
|
26
|
-
struct GlobalFilterUniforms {
|
|
27
|
-
uInputSize:vec4<f32>,
|
|
28
|
-
uInputPixel:vec4<f32>,
|
|
29
|
-
uInputClamp:vec4<f32>,
|
|
30
|
-
uOutputFrame:vec4<f32>,
|
|
31
|
-
uGlobalFrame:vec4<f32>,
|
|
32
|
-
uOutputTexture:vec4<f32>,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
struct HoleUniforms {
|
|
36
|
-
uHoleCenter:vec2<f32>,
|
|
37
|
-
uHoleParams:vec3<f32>,
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;
|
|
41
|
-
@group(0) @binding(1) var uTexture: texture_2d<f32>;
|
|
42
|
-
@group(0) @binding(2) var uSampler : sampler;
|
|
43
|
-
|
|
44
|
-
@group(1) @binding(0) var<uniform> holeUniforms : HoleUniforms;
|
|
45
|
-
|
|
46
|
-
struct VSOutput {
|
|
47
|
-
@builtin(position) position: vec4<f32>,
|
|
48
|
-
@location(0) uv : vec2<f32>
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
fn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>
|
|
52
|
-
{
|
|
53
|
-
var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;
|
|
54
|
-
|
|
55
|
-
position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;
|
|
56
|
-
position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y)
|
|
57
|
-
- gfu.uOutputTexture.z;
|
|
58
|
-
|
|
59
|
-
return vec4(position, 0.0, 1.0);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
fn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
|
|
63
|
-
{
|
|
64
|
-
return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@vertex
|
|
68
|
-
fn mainVertex(@location(0) aPosition : vec2<f32>) -> VSOutput {
|
|
69
|
-
return VSOutput(
|
|
70
|
-
filterVertexPosition(aPosition),
|
|
71
|
-
filterTextureCoord(aPosition)
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@fragment
|
|
76
|
-
fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
|
|
77
|
-
var color = textureSample(uTexture, uSampler, uv);
|
|
78
|
-
var pixel = gfu.uOutputFrame.xy + uv * gfu.uInputSize.xy;
|
|
79
|
-
var d = distance(pixel, holeUniforms.uHoleCenter);
|
|
80
|
-
var t = smoothstep(holeUniforms.uHoleParams.y, holeUniforms.uHoleParams.x, d);
|
|
81
|
-
|
|
82
|
-
return color * mix(holeUniforms.uHoleParams.z, 1.0, t);
|
|
83
|
-
}
|
|
84
|
-
`;function ei(s){const t=new ke({uHoleCenter:{value:new Float32Array([0,0]),type:"vec2<f32>"},uHoleParams:{value:new Float32Array([s.radius,ve(s),s.minAlpha]),type:"vec3<f32>"}});return new Ie({glProgram:Pe.from({vertex:ze,fragment:ti,name:"see-through-hole-filter"}),gpuProgram:Le.from({vertex:{source:Qt,entryPoint:"mainVertex"},fragment:{source:Qt,entryPoint:"mainFragment"}}),resources:{holeUniforms:t}})}function ii(s,{centerX:t,centerY:e,radius:i,softness:n,minAlpha:o}){const r=s.resources.holeUniforms.uniforms;r.uHoleCenter[0]=t,r.uHoleCenter[1]=e,r.uHoleParams[0]=i,r.uHoleParams[1]=i*(1-n),r.uHoleParams[2]=o}const si=.01;function te(){return{strength:0,filter:null,attached:!1,tick:null}}function Se(s,t,e){return s.strength+=((t?1:0)-s.strength)*e,s.strength}function be(s,t,e,i,n,o){if(t.strength<si||!n){t.attached&&(s.filters=[],t.attached=!1);return}t.filter||(t.filter=ei(e)),t.attached||(s.filters=[t.filter],t.attached=!0);const r=st(i.x,i.y,o,i.z*R.shear);ii(t.filter,{centerX:r.x*n.scale.x+n.position.x,centerY:r.y*n.scale.y+n.position.y,radius:e.radius*n.scale.x,softness:e.softness,minAlpha:1+(e.minAlpha-1)*t.strength})}function ee(s,t){if(!s.filter){s.attached=!1;return}t.filters=[],s.attached=!1,s.filter.destroy(),s.filter=null}async function Me({baseTexture:s,spriteSheetData:t,map:e,tiles:i,step:n,renderer:o}){const r={};t.frames.forEach((f,g)=>{const[m,w,x,y]=f;r[`frame${g}`]={frame:{x:m,y:w,w:x,h:y}}});const a={frames:r,meta:{scale:"1"}},l=new Ce(s,a);await l.parse();const h=e[0].length*n,_=e.length*n,c=new D;for(let f=0,g=e.length;f<g;f+=1)for(let m=0,w=e[f].length;m<w;m+=1){const x=e[f][m];if(i.includes(x)){const y=`frame${x}`,v=l.textures[y];if(v){const d=new U(v);d.x=m*n,d.y=f*n,c.addChild(d)}else console.warn(`Texture not found. Tile: ${x}, sprite: ${y}`)}}const u=o.generateTexture({target:c,frame:new X(0,0,h,_)});return c.destroy({children:!0}),l.destroy(),u}function ni(s,t){const e=[];if(!Array.isArray(s))return e;for(const i of s){const n=i.axis===0?0:1,o=n===0?1:0,r=t(i.min,n),a=t(i.max,n),l=t(i.crossMin,o),h=t(i.crossMax,o),_=typeof i.railMin=="number"&&typeof i.railMax=="number";e.push({axis:i.axis,sign:i.sign,from:i.from,to:i.to,block:i.block,rail0:_?t(i.railMin,n):null,rail1:_?t(i.railMax,n):null,col0:n===0?r:l,col1:n===0?a:h,row0:n===0?l:r,row1:n===0?h:a})}return ri(e)}function ri(s){const t=new Map;for(const i of s){const n=t.get(i.block);n?n.push(i):t.set(i.block,[i])}const e=[];for(const i of t.values()){const n=a=>a.axis===1?a.col0:a.row0,o=a=>a.axis===1?a.col1:a.row1;i.sort((a,l)=>n(a)-n(l));let r=null;for(const a of i){if(r&&n(a)===o(r)){r.axis===1?r.col1=a.col1:r.row1=a.row1;continue}r={...a},e.push(r)}}return e}function oi({bakedTexture:s,level:t,volume:e,shear:i,count:n,sideTint:o}){const r=[];for(let a=1;a<=n;a+=1){const l=new U(s);l.tint=a===n?16777215:o,r.push({target:l,k:(t+e*a/n)*i,occluder:!0})}return r}function ai({runs:s,texture:t,step:e,shear:i,baseScale:n,segments:o,sideTint:r}){const a=[],l=t.width||1,h=t.height||1,_=Math.max(1,Math.round(o)||1);for(const c of s){const u=c.axis===0,f=u?c.col1-c.col0:c.row1-c.row0,g=Math.max(1,f*_),m=u?c.col0:c.row0,w=typeof c.rail0=="number"&&typeof c.rail1=="number"?{first:(c.rail0-m)*_,last:(c.rail1-m)*_}:null,x=c.col0*e,y=c.col1*e,v=c.row0*e,d=c.row1*e,b=g+1,S=Math.min(c.from,c.to),M=Math.max(c.from,c.to),A=S*i,L=new Float32Array(b*4),k=new Float32Array(b*4),E=new Float32Array(b*4),W=new Float32Array(b*2),P=new Uint32Array(g*6),B=1;for(let G=0;G<b;G+=1){const Z=G/g,et=c.sign>0?Z:1-Z,Wt=(c.from+(c.to-c.from)*et)*i,Gt=u?x:v,ct=Gt+((u?y:d)-Gt)*Z,zt=u?ct:x,Ct=u?v:ct,Et=u?ct:y,Rt=u?d:ct,N=G*4;L[N]=zt*n.x,L[N+1]=Ct*n.y,L[N+2]=Et*n.x,L[N+3]=Rt*n.y,k[N]=zt/l,k[N+1]=Ct/h,k[N+2]=Et/l,k[N+3]=Rt/h;const Zt=u?Ct+B:zt+B,qt=u?Rt-B:Et-B,wt=Math.min(Math.max(ct,(u?x:v)+B),(u?y:d)-B);E[N]=(u?wt:Zt)/l,E[N+1]=(u?Zt:wt)/h,E[N+2]=(u?wt:qt)/l,E[N+3]=(u?qt:wt)/h,W[G*2]=Wt,W[G*2+1]=Wt}for(let G=0;G<g;G+=1){const Z=G*2,et=G*6;P[et]=Z,P[et+1]=Z+1,P[et+2]=Z+3,P[et+3]=Z,P[et+4]=Z+3,P[et+5]=Z+2}const Pt=new ge({texture:t,vertices:L.slice(),uvs:k,indices:P});a.push(li({base:L,uvs:E,heights:W,points:b,texture:t,kBase:A,sideTint:r,endIndex:c.sign>0?b-1:0,rails:w})),a.push({target:Pt,k:M*i,base:L,heights:W})}return a}function li(s){const{base:t,uvs:e,heights:i,points:n,texture:o,kBase:r,endIndex:a,sideTint:l,rails:h}=s,_=h?Math.max(0,Math.min(h.first,n-1)):0,c=h?Math.max(_,Math.min(h.last,n-1)):-1,u=h?c-_+1:0,f=u*2+2,g=new Float32Array(f*4),m=new Float32Array(f*4),w=new Float32Array(f*2),x=Math.max(0,u-1)*2+1,y=new Uint32Array(x*6),v=S=>S<u?(_+S)*2:S<u*2?(_+S-u)*2+1:a*2+(S-u*2);for(let S=0;S<f;S+=1){const M=v(S),A=S*4,L=t[M*2],k=t[M*2+1];g[A]=L,g[A+1]=k,g[A+2]=L,g[A+3]=k,m[A]=e[M*2],m[A+1]=e[M*2+1],m[A+2]=e[M*2],m[A+3]=e[M*2+1],w[S*2]=i[M],w[S*2+1]=r}let d=0;for(let S=0;S<3;S+=1){const M=S===2?u*2:S*u,A=S===2?u*2+1:M+u-1;for(let L=M;L<A;L+=1){const k=L*2,E=d*6;y[E]=k,y[E+1]=k+1,y[E+2]=k+3,y[E+3]=k,y[E+4]=k+3,y[E+5]=k+2,d+=1}}const b=new ge({texture:o,vertices:g.slice(),uvs:m,indices:y});return b.tint=l,{target:b,k:r,base:g,heights:w}}function hi(s,t){const{target:e,base:i,heights:n}=s,o=e.vertices;for(let r=0,a=n.length;r<a;r+=1){const l=i[r*2],h=i[r*2+1],_=n[r];o[r*2]=l+(l-t.x)*_,o[r*2+1]=h+(h-t.y)*_}e.vertices=o}const ci=5,St={mapSprite:null,occluder:null,slices:[],rampTexture:null};async function _i(s){try{const t=await s.baseTexture;if(s.isAborted())return St;const e=await Me({baseTexture:t,spriteSheetData:s.spriteSheetData,map:s.map,tiles:s.tiles,step:s.step,renderer:s.renderer});if(s.isAborted())return e.destroy(!0),St;const i=new U(e);if(q(i,null,s.parallaxK,s.baseScale),s.container.addChild(i),!s.extruding)return{...St,mapSprite:i};const n=await ui(s,t,e);return{mapSprite:i,...n}}catch(t){return console.error(`Failed to create static map with asset ${s.assetUrl}:`,t),St}}async function ui(s,t,e){const i=pt.slices,n=R.shear,o=[];let r=null,a=null;s.volume>0&&(r=new D,r.zIndex=I(Math.max(s.layer,ci),s.level),o.push(...oi({bakedTexture:e,level:s.level,volume:s.volume,shear:n,count:i,sideTint:pt.sideTint})));const l=di(s);if(l.length){if(a=await Me({baseTexture:t,spriteSheetData:s.spriteSheetData,map:s.map,tiles:s.ramps.map(h=>h.tile),step:s.step,renderer:s.renderer}),s.isAborted())return a.destroy(!0),{occluder:r,slices:[],rampTexture:null};o.push(...ai({runs:l,texture:a,step:s.step,shear:n,baseScale:s.baseScale,segments:pt.rampSegments,sideTint:pt.sideTint}))}if(s.isAborted())return{occluder:r,slices:[],rampTexture:a};o.sort((h,_)=>h.k-_.k);for(const h of o)h.base||q(h.target,null,h.k,s.baseScale),(h.occluder?r:s.container).addChild(h.target);return{occluder:r,slices:o,rampTexture:a}}function di(s){if(!s.ramps?.length||!s.rampRuns)return[];const t=new Set(s.ramps.map(n=>`${n.from}:${n.to}`)),e=s.rampRuns.forLevel(s.level).filter(n=>t.has(`${n.from}:${n.to}`));return ni(e,(n,o)=>$e(n,o===0?s.baseScale.x:s.baseScale.y,s.step))}function pi(s,t){if(!s.levelView)return;const e=s.levelView.cfg,i=Y.shared.lastTime,n=s.hole.tick===i;s.hole.tick=i;const o=Y.shared.deltaMS/1e3,r=n?0:Math.min(1,e.fadeRate*o);s.hasSprite&&fi(s,e,r,t),s.occluder&&mi(s,e,r,t)}function fi(s,t,e,i){const{levelView:n,container:o}=s;if(n.mode==="layer"){const l=n.level<s.level&&we(s.grid,n.x,n.y,s.floorSet)?t.layerAlpha:1;o.alpha+=(l-o.alpha)*e;return}const r=n.level<s.level;Se(s.hole,r,e),be(o,s.hole,t,n,s.stage,i)}function mi(s,t,e,i){const{levelView:n,occluder:o}=s,r=s.level>n.level;if(n.mode==="layer"){const l=r?t.layerAlpha:1;o.alpha+=(l-o.alpha)*e;return}const a=r||gi(s,i);Se(s.occluderHole,a,e),be(o,s.occluderHole,t,n,s.stage,i)}function gi(s,t){if(!t||!s.grid.map)return!1;const e=s.levelView,i=R.shear,n=st(e.x,e.y,t,e.z*i),o=pt.slices;for(let r=1;r<=o;r+=1){const a=(s.level+s.volume*r/o)*i,l=1+a;if(we(s.grid,(n.x+t.x*a)/l,(n.y+t.y*a)/l,s.tileSet))return!0}return!1}class xi{constructor(t,e,i,n){this._container=t,this._renderer=i.renderer,this._levelView=i.levelView||null,this._rampRuns=i.rampRuns||null,this._hole=te(),this._occluderHole=te(),this._occluder=null,this._baseScale=ye(e.scale),this._slices=[],this._rampTexture=null,this.mapSprite=null,this._assetUrl=`${n}${e.spriteSheet.img}`,this._baseTexturePromise=xe.load(this._assetUrl),this._map=e.map,this._tiles=e.tiles,this._level=e.level||0,this._floor=e.floor||[],this._tileSet=new Set(this._tiles),this._floorSet=new Set(this._floor),this._spriteSheetData=e.spriteSheet,this._step=e.step,this._layer=Number(e.layer)||1,t.zIndex=I(this._layer,this._level),this._parallaxK=this._level*R.shear,this._volume=Number(e.volume)||0,this._ramps=(e.ramps||[]).filter(o=>this._tiles.includes(o.tile)),this._extruding=this._volume>0||this._ramps.length>0,this.needsRender=this._level>=1||this._extruding,this._grid=Ke(this._map,this._baseScale,this._step),this._build(e)}async _build(t){const e=await _i({container:this._container,baseTexture:this._baseTexturePromise,spriteSheetData:t.spriteSheet,map:this._map,tiles:this._tiles,step:this._step,renderer:this._renderer,level:this._level,layer:this._layer,volume:this._volume,ramps:this._ramps,rampRuns:this._rampRuns,baseScale:this._baseScale,parallaxK:this._parallaxK,extruding:this._extruding,assetUrl:this._assetUrl,isAborted:()=>this._container.destroyed});this.mapSprite=e.mapSprite,this._occluder=e.occluder,this._slices=e.slices,this._rampTexture=e.rampTexture}_seeThroughView(){return{levelView:this._levelView,container:this._container,stage:this._container.parent,occluder:this._occluder,hasSprite:!!this.mapSprite,hole:this._hole,occluderHole:this._occluderHole,level:this._level,volume:this._volume,grid:this._grid,tileSet:this._tileSet,floorSet:this._floorSet}}render(){this._attachOccluder(),this._levelView&&this._levelView.attachStage(this._container.parent,this._renderer);const t=this._levelView?this._levelView.camera():J(this._container.parent,this._renderer);if((this._level>=1||this._occluder)&&pi(this._seeThroughView(),t),!(!this._parallaxK&&!this._slices.length)&&t){this.mapSprite&&q(this.mapSprite,t,this._parallaxK,this._baseScale);for(let e=0;e<this._slices.length;e+=1){const i=this._slices[e];i.base?hi(i,t):q(i.target,t,i.k,this._baseScale)}}}_attachOccluder(){const t=this._container.parent;!this._occluder||!t||this._occluder.parent===t||t.addChild(this._occluder)}destroy(){const t=this._container;if(ee(this._hole,t),this._occluder){const o=this._occluder;this._occluder=null,o.filters=[],ee(this._occluderHole,o),o.parent?.removeChild(o),o.destroy({children:!0,texture:!1,textureSource:!1})}const e=this.mapSprite,i=this._rampTexture,n=this._slices;this.mapSprite=null,this._rampTexture=null,this._slices=[];for(const o of n)o.target.destroyed||(o.target.texture=Ee.EMPTY);return e&&t.removeChild(e),this._baseTexturePromise=null,this._assetUrl=null,this._map=null,this._tiles=null,this._floor=null,this._tileSet=null,this._floorSet=null,this._grid=null,this._ramps=null,this._spriteSheetData=null,this._renderer=null,this._levelView=null,()=>{i&&i.destroy(!0),e&&e.destroy({children:!0,texture:!0,textureSource:!0})}}}const V=(s,t,e)=>s+(t-s)*e,gt=(s,t,e)=>Math.min(e,Math.max(t,s)),yi=s=>s*(Math.PI/180),wi=s=>{for(;s>Math.PI;)s-=Math.PI*2;for(;s<-Math.PI;)s+=Math.PI*2;return s},T=(s,t)=>Math.random()*(t-s)+s,$=0,K=1,nt=2,ie=3,Tt=4,At=5,rt=6,j=7,Lt=8,kt=9,ht=11,H=12,It=13,se=14,ne=15,vi=0,Si=1,bi=2,Mi=3,Ti=4,Ai=5,ki=6,Ii=7,Li=9,re=10,oe=0,ae=1,le=2,Pi=3,zi=4,Ci=6,Ei=0,Ri=1,Di=2,Fi=3,he=0,ce=1,Vi=2,Oi=3,Xi=4;class Yi{constructor(t,e,i,n){this._container=t,this._renderer=i.renderer,this._levelView=i.levelView||null,this._baseScale=ye(e.scale),t.scale=e.scale,this._assetUrl=`${n}${e.img}`,this._baseTexturePromise=xe.load(this._assetUrl),this._z=e.level||0,this._level=e.level||0,this._layer=Number(e.layer)||2,t.zIndex=I(this._layer,this._level),this._rotation=yi(e.angle),this._width=e.width,this._height=e.height,this._x=e.position[0],this._y=e.position[1],this._worldX=this._x*this._baseScale.x,this._worldY=this._y*this._baseScale.y,this.sprite=null,this.needsRender=!!this._levelView,this._create()}async _create(){try{const t=await this._baseTexturePromise;if(this._container.destroyed)return;this.sprite=new U(t),this.sprite.x=this._x,this.sprite.y=this._y,this.sprite.width=this._width,this.sprite.height=this._height,this.sprite.rotation=this._rotation,this._container.addChild(this.sprite)}catch(t){console.error(`Failed to create dynamic map with asset ${this._assetUrl}:`,t)}}render(){if(!this._levelView||!this.sprite)return;const t=this._container;t.alpha=this._levelView.alphaFor(this._level,this._worldX,this._worldY,this._z),t.tint=this._levelView.tintFor(this._level),!(!this._level&&!this._z)&&q(t,this._levelView.camera()??J(t.parent,this._renderer),this._z*R.shear,this._baseScale)}update(t){this.sprite&&(this.sprite.x=t[he]/this._baseScale.x,this.sprite.y=t[ce]/this._baseScale.y,this.sprite.rotation=t[Vi]),this._worldX=t[he],this._worldY=t[ce],this._z=t[Oi]||0;const e=Bt(t[Xi],this._z);e!==this._level&&(this._level=e,this._container.zIndex=I(this._layer,e),!e&&!this._z&&q(this._container,null,0,this._baseScale))}destroy(){this.sprite=null,this._baseTexturePromise=null,this._assetUrl=null,this._renderer=null,this._levelView=null}}let Bi=class extends D{constructor(t,e,i){if(super(),this._mode=null,typeof i.assetsBase!="string"){console.error("Map: сервис assetsBase недоступен — карта останется пустой. Объявите assetsBase в componentDependencies и запустите игру на vimp-engine >= 0.9.0");return}const n=`${i.assetsBase}img/`;this._mode=t.type==="dynamic"?new Yi(this,t,i,n):new xi(this,t,i,n),this._mode.needsRender&&(this.onRender=()=>this._mode.render())}update(t){this._mode?.update?.(t)}destroy(t){const e=this._mode?.destroy();this._mode=null,super.destroy({children:!0,texture:!1,textureSource:!1,...t}),e?.()}};const _e=[16777215,9418751,10477760,15783820,14721232,10541296,15773836,12632280],Te=s=>_e[s]??_e[0],Ni=2,Hi=.35;class Ui extends D{constructor(t,e,i={}){super(),this._map=t.map,this._level=t.level||0,this._solid=t.solid||t.physicsStatic||[],this._tiles=t.tiles||[],this._step=t.step,this.zIndex=I(Ni,this._level),this.scale=t.scale,this._draws=this._tiles.some(n=>this._solid.includes(n)),this.radarGraphics=new O,this.addChild(this.radarGraphics),this._levelView=i.levelView||null,this._levelView&&this._draws&&(this.onRender=()=>{this.alpha=this._levelView.level===this._level?1:Hi}),this.createRadarMap()}createRadarMap(){if(!this._draws)return;const t=this.radarGraphics;if(t.clear(),Array.isArray(this._map))for(let e=0;e<this._map.length;e+=1){const i=this._map[e];if(Array.isArray(i))for(let n=0;n<i.length;n+=1){const o=i[n];this._solid.includes(o)&&t.rect(n*this._step,e*this._step,this._step/2,this._step/2)}}t.fill(Te(this._level))}update(){}destroy(t){super.destroy({children:!0,texture:!1,textureSource:!1,...t}),this.radarGraphics=null,this._map=null,this._solid=null,this._tiles=null}}const ue=2,Wi=9,Gi=1.5;class Zi extends D{constructor(t,e){super(),this._level=t[H]||0,this.zIndex=I(ue,this._level),this._textures=e.tankRadarTexture,this.body=new U,this.body.anchor.set(.5),this.levelRing=new O,this.addChild(this.levelRing,this.body),this._drawLevelRing(),this.x=t[$]||0,this.y=t[K]||0,this._condition=t[j],this._teamId=t[kt],this.scale.set(5,5),this.create()}_drawLevelRing(){this.levelRing.clear(),this._level>0&&this.levelRing.circle(0,0,Wi).stroke({width:Gi,color:Te(this._level)})}create(){this._condition===0?this.body.texture=this._textures.destroyed:this._teamId===1?this.body.texture=this._textures.liveTeamId1:this._teamId===2&&(this.body.texture=this._textures.liveTeamId2)}update(t){this.x=t[$],this.y=t[K];const e=t[H]||0;e!==this._level&&(this._level=e,this.zIndex=I(ue,e),this._drawLevelRing());const i=t[j],n=t[kt];let o=!1;i!==void 0&&i!==this._condition&&(this._condition=i,o=!0),n!==void 0&&n!==this._teamId&&(this._teamId=n,o=!0),o&&this.create()}destroy(t){super.destroy({children:!0,texture:!1,textureSource:!1,...t}),this.body=null,this.levelRing=null,this._textures=null}}function qi({width:s,height:t,anchorX:e,anchorY:i,rotation:n,pitch:o,roll:r,shear:a,lift:l}){const h=-e*s,_=(1-e)*s,c=-i*t,u=(1-i)*t,f=[[h,c],[_,c],[_,u],[h,u]],g=Math.cos(n),m=Math.sin(n),w=Math.cos(o),x=Math.sin(o),y=Math.cos(r),v=Math.sin(r),d=[];for(const[b,S]of f){const M=b*g-S*m,A=b*m+S*g,L=A*w,k=-A*x,E=M*y,W=M*v,P=k+W,B=t?P/t*a:0;d.push(E*(1+B),L*(1+B)-P*l)}return d}function $i({angle:s,pitch:t,roll:e,lightDir:i,shading:n}){if(!i)return 1;const o=Math.cos(s),r=Math.sin(s),a=-Math.sin(t)*o-Math.sin(e)*r,l=-Math.sin(t)*r+Math.sin(e)*o,h=Math.hypot(i[0],i[1])||1,_=(a*i[0]+l*i[1])/h;return 1-Math.max(0,-_)*n}function Ki(s,t){const e=i=>{const n=Math.round((s>>i&255)*t);return Math.min(255,Math.max(0,n))};return e(16)<<16|e(8)<<8|e(0)}function Ae(s,t,{minImpact:e,fullImpact:i}){return!(s<-e)||t!==0?0:Math.min(1,-s/i)}const ji=0,Ji=1,Vt=3,Qi=7,ts=1,de=1.15,es=1.25,is=.6,ss=1,ns=.015,rs=2.5;function os(s,t=0){const e=Number.isFinite(s)?s:0,i=gt(e,0,1),n=Math.max(0,e-1),o=V(ts,de,i)+(es-de)*n,r=V(is,ss,i),a=1+ns*(1-i)*Math.sin(2*Math.PI*rs*(t/1e3));return{rate:o*a,volumeFactor:r}}class as extends D{constructor(t,e,i,n){super();const o=()=>new Re({verticesX:_t.vertices,verticesY:_t.vertices});this.body=o(),this.gun=o(),this.wreck=o(),this._bodyAnchor={x:.5,y:.5},this._wreckAnchor={x:.5,y:.5},this.addChild(this.body,this.gun,this.wreck),this._textures=e.tankTexture,this._shadowAsset=e.tankShadowTexture||null,this._renderer=i.renderer||null,this._shadow=null,this._worldX=t[$]||0,this._worldY=t[K]||0,this.x=this._worldX,this.y=this._worldY,this.rotation=t[nt]||0,this._gunRotation=t[ie]||0,this._engineLoad=t[rt]||0,this._condition=t[j],this._size=t[Lt],this._teamId=t[kt],this._z=t[ht]||0,this._physLevel=t[H]||0,this._vz=t[It]||0,this._prevVz=this._vz,this._pitch=t[se]||0,this._roll=t[ne]||0,this._landImpact=0,this._landTimer=0,this._squash=0,this._level=Bt(t[H],this._z),this.zIndex=I(Vt,this._level),this._isLocal=()=>i.localPlayer?.is(n?.id)===!0,this._levelView=i.levelView||null,this.onRender=()=>this._updateView();const r=this._teamId===1?this._textures.liveTeamId1:this._textures.liveTeamId2,a=r?r.gunAnchor:null;this._gunAnchor=a?{x:a.x,y:a.y}:{x:.5,y:.5};const l=10;this._scaleFactor=this._size/l,this._soundManager=i.soundManager,this._soundId=null;const h=this._soundManager.getSoundConfig("tankEngine");this._baseEngineVolume=h?.volume||0,this._hasEngineSound=!!h,this.create()}_initSounds(){this._soundId||this._condition===0||!this._hasEngineSound||(this._soundId=this._soundManager.registerSound("tankEngine",this._getSoundData()))}_getSoundData(){const{rate:t,volumeFactor:e}=os(this._engineLoad,performance.now());return{position:{x:this._worldX,y:this._worldY},rate:t,volume:this._baseEngineVolume*e,spatial:!this._isLocal()}}create(){if(this._condition===0)this.body.visible=!1,this.gun.visible=!1,this.wreck.texture=this._textures.destroyed,this.wreck.visible=!0,this._gunRotation=0,this.destroySounds();else{this.wreck.visible=!1;let t;this._teamId===1?t=this._textures.liveTeamId1:this._teamId===2&&(t=this._textures.liveTeamId2),this.body.texture=t.body,this.gun.texture=t.gun,this.body.visible=!0,this.gun.visible=!0,this._initSounds()}this._applyTilt()}update(t){this._worldX=t[$],this._worldY=t[K],this.rotation=t[nt],this._gunRotation=t[ie],this._engineLoad=t[rt]||0,this._z=t[ht]||0,this._physLevel=t[H]||0,this._vz=t[It]||0,this._pitch=t[se]||0,this._roll=t[ne]||0;const e=Ae(this._prevVz,this._vz,ft);e>0&&(this._landImpact=e,this._landTimer=ft.duration),this._prevVz=this._vz;const i=Bt(t[H],this._z);i!==this._level&&(this._level=i,this.zIndex=I(Vt,i)),this._applyTilt(),this._levelView&&this._isLocal()&&this._levelView.set(i,this._worldX,this._worldY,this._z),this._condition>0&&(this._soundId===null?this._initSounds():this._soundManager.updateSoundData(this._soundId,this._getSoundData()));const n=t[j],o=t[kt];let r=!1;n!==void 0&&n!==this._condition&&(this._condition=n,r=!0),o!==void 0&&o!==this._teamId&&(this._teamId=o,r=!0),r&&this.create()}_setCorners(t,e,i,n,o){const{texture:r}=t;t.setCorners(...qi({width:r.width*n,height:r.height*n*o,anchorX:e.x,anchorY:e.y,rotation:i,pitch:this._pitch,roll:this._roll,shear:R.shear,lift:_t.lift}))}_groundZ(){return this._vz!==0?this._physLevel:this._z}_applyTilt(){const t=1+this._z*R.shear,e=this._scaleFactor*t,i=1-this._squash;this._setCorners(this.body,this._bodyAnchor,0,e,i),this._setCorners(this.gun,this._gunAnchor,this._gunRotation,e,i),this._setCorners(this.wreck,this._wreckAnchor,0,e,i)}_updateView(){this._levelView&&this._levelView.attachStage(this.parent,this._renderer);const t=this._levelView?this._levelView.camera():J(this.parent,this._renderer);let e=16777215;this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this._worldX,this._worldY,this._z),e=this._levelView.tintFor(this._level),this.tint=e);const i=st(this._worldX,this._worldY,t,this._z*R.shear);this.position.set(i.x,i.y);{const n=gt($i({angle:this.rotation,pitch:this._pitch,roll:this._roll,lightDir:_t.lightDir,shading:_t.shading}),ji,Ji);this.tint=Ki(e,n)}if(this._landTimer>0){this._landTimer=Math.max(0,this._landTimer-Y.shared.deltaMS);const n=this._landTimer/ft.duration;this._squash=Math.sin(n*Math.PI)*ft.squash*this._landImpact}else this._squash=0;this._applyTilt(),this._updateShadow(t)}_updateShadow(t){if(!this._shadowAsset||!this.parent)return;if(!(this._condition!==0&&this._vz!==0)){this._shadow&&(this._shadow.visible=!1);return}if(!this._shadow){const{texture:a,contentSize:l}=this._shadowAsset;this._shadow=new U(a),this._shadow.anchor.set(.5),this._shadowScale=this._size*4*vt.sizeFactor/l,this.parent.addChild(this._shadow)}const i=this._shadow;i.visible=!0;const n=this._groundZ(),o=st(this._worldX,this._worldY,t,n*R.shear);i.x=o.x,i.y=o.y,i.rotation=this.rotation;const r=Math.max(0,this._z-n);i.scale.set(this._shadowScale*(1+r*vt.scaleGain)),i.alpha=Math.max(0,vt.baseAlpha-r*vt.alphaFalloff)*this.alpha,i.zIndex=I(Vt-1,Math.min(Qi,Math.floor(n)))}destroySounds(){this._soundId&&(this._soundManager.unregisterSound(this._soundId),this._soundId=null)}destroy(t){this.destroySounds(),this._shadow&&(this._shadow.destroy({texture:!1,textureSource:!1}),this._shadow=null),super.destroy({children:!0,texture:!1,textureSource:!1,...t})}}const ls=2;class hs extends D{constructor(t,e,i){super(),this._level=t[Ci]||0,this.zIndex=I(ls,this._level),this._levelView=i.levelView||null,this._renderer=i.renderer||null,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this._worldX,this._worldY),this.tint=this._levelView.tintFor(this._level)),this._applyHeight()}),this.body=new U(e.bombTexture),this.body.anchor.set(.5),this._worldX=t[oe],this._worldY=t[ae],this.x=this._worldX,this.y=this._worldY,this.rotation=t[le],this._size=t[Pi],this._totalDurationMs=t[zi],this._soundManager=i.soundManager,this._soundId=null;const n=e.bombTexture.width,o=this._size/n;this.body.scale.set(o);const r=64,a=this._size/1.2/r;this.text=new De({style:{fontFamily:"Arial",fontSize:r,fill:16777215,align:"center"}}),this.text.anchor.set(.5),this.text.scale.set(a),this.text.x=0,this.text.y=0,this._accumulatedTimeMs=0,this._secondsLeft="",this.addChild(this.body,this.text),this._updateTimerDisplay(this._totalDurationMs),this._tickListener=l=>this._updateTimer(l.deltaMS),Y.shared.add(this._tickListener),this._soundId=this._soundManager.registerSound("bombHasBeenPlanted",{position:{x:this.x,y:this.y}})}_updateTimer(t){this._accumulatedTimeMs+=t;const e=Math.max(0,this._totalDurationMs-this._accumulatedTimeMs);this._updateTimerDisplay(e),e<=0&&(this._stopTimer(),this._updateTimerDisplay(0))}_updateTimerDisplay(t){const e=Math.round(t/1e3);this._secondsLeft!==e&&(this._secondsLeft=e,this.text.text=`${this._secondsLeft}`)}update(t){this._worldX=t[oe],this._worldY=t[ae],this.x=this._worldX,this.y=this._worldY,this.rotation=t[le],this._soundId&&(this._soundManager.updateSoundData(this._soundId,{position:{x:this._worldX,y:this._worldY}})||(this._soundId=null))}_applyHeight(){const t=this._level*R.shear,e=J(this.parent,this._renderer),i=st(this._worldX,this._worldY,e,t);this.position.set(i.x,i.y),this.scale.set(1+t)}_stopTimer(){this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null)}destroy(t){this._stopTimer(),this._soundId&&(this._soundManager.releaseSound(this._soundId),this._soundId=null),super.destroy({children:!0,texture:!1,textureSource:!1,...t}),this.body=null,this.text=null}}class yt extends D{constructor(t){super(),this._tickListener=null,this._isStarted=!1,this.isComplete=!1,this.onComplete=t}run(){this.isComplete||this._isStarted||(this._isStarted=!0,this._tickListener=t=>this._update(t.deltaMS),Y.shared.add(this._tickListener),this._onEffectStart(),this.isComplete||this._update(0))}_onEffectStart(){}_update(){}_completeEffect(){this.isComplete||(this.isComplete=!0,this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null),typeof this.onComplete=="function"&&this.onComplete())}destroy(t){this.isComplete=!0,this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null),this.parent&&this.parent.removeChild(this),super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class cs extends yt{constructor(t,e,i,n,o){super(n);const{texture:r,contentSize:a}=o.explosionTexture;this.x=t,this.y=e,this._radius=i,this._durationMs=1500,this._elapsedMs=0,this._baseScale=this._radius*2/a,this._mainBody=new U(r),this._mainBody.anchor.set(.5),this._mainBody.tint=11393254,this._mainBody.scale.set(this._baseScale),this._core=new U(r),this._core.anchor.set(.5),this._core.tint=13882323,this._core.scale.set(this._baseScale),this.addChild(this._mainBody,this._core)}_update(t){if(!this.isComplete)if(this._elapsedMs+=t,this._elapsedMs<=this._durationMs){const e=this._elapsedMs/this._durationMs;this._draw(e)}else this._completeEffect()}_draw(t){const e=n=>n*n;this._mainBody.alpha=.6*(1-e(t));const i=Math.min(1,t*1.5);this._core.alpha=.7-i,this._core.scale.set(this._baseScale*(1-i))}destroy(t){super.destroy(t)}}const Ot=[],tt={get(s){if(Ot.length>0){const t=Ot.pop();return t.texture=s,t.alpha=1,t.scaleX=1,t.scaleY=1,t.rotation=0,t.tint=16777215,t.anchorX=.5,t.anchorY=.5,t}return new Fe({texture:s,anchorX:.5,anchorY:.5})},release(s){s&&Ot.push(s)}},Nt=50,_s=400,us=800;class ds extends yt{constructor(t,e=Nt){super();const i=e/Nt;this._blastScale=i;const{texture:n,contentSize:o}=t.explosionTexture;this.explosionTexture=n,this._unitScale=1/o;const r=_s*i,a=us*i;this._particleContainer=new Ht({texture:this.explosionTexture,boundsArea:new X(-r/2,-a/2,r,a),dynamicProperties:{position:!0,vertex:!0,rotation:!0,color:!0}}),this.addChild(this._particleContainer),this._particles=[],this._isSpawning=!0,this._particleSpawnRateMs=50,this._particleMaxLifeMs=2e3,this._minStartSize=2.1*i,this._maxStartSize=5.2*i,this._minTargetSize=8.3*i,this._maxTargetSize=16.6*i,this._startAlpha=.1,this._initialOffsetX=15*i,this._initialOffsetY=15*i,this._lastSpawnTime=0;for(let l=0;l<30;l+=1)this._createParticle()}stopSpawning(){this._isSpawning=!1}_createParticle(){const t=tt.get(this.explosionTexture),e=.2+Math.random()*.4,i=Math.floor(e*255);t.tint=i<<16|i<<8|i;const n=(this._minStartSize+Math.random()*(this._maxStartSize-this._minStartSize))*this._unitScale,o=.6+Math.random()*.8,r=.6+Math.random()*.8;t.scaleX=n*o,t.scaleY=n*r,t.alpha=this._startAlpha+Math.random()*.1,t.rotation=Math.random()*Math.PI*2,t.x=(Math.random()-.5)*this._initialOffsetX,t.y=(Math.random()-.5)*this._initialOffsetY;const a={view:t,life:0,maxLife:this._particleMaxLifeMs*(.7+Math.random()*.6),aspectRatioX:o,aspectRatioY:r,vx:(Math.random()-.5)*.2*this._blastScale,vy:(-.3-Math.random()*.4)*this._blastScale,swaySpeed:.002+Math.random()*.003,swayAmp:(.025+Math.random()*.05)*this._blastScale,swayOffset:Math.random()*100,rotationSpeed:(Math.random()-.5)*.05,targetScale:(this._minTargetSize+Math.random()*(this._maxTargetSize-this._minTargetSize))*this._unitScale,startScale:n};this._particleContainer.addParticle(t),this._particles.push(a)}_update(t){if(!this.isComplete){if(t=Math.min(t,100),this._isSpawning)for(this._lastSpawnTime+=t;this._lastSpawnTime>this._particleSpawnRateMs;)this._createParticle(),this._lastSpawnTime-=this._particleSpawnRateMs;for(let e=this._particles.length-1;e>=0;e-=1){const i=this._particles[e],n=i.view;if(i.life+=t,i.life>=i.maxLife)this._particleContainer.removeParticle(n),tt.release(n),this._particles.splice(e,1);else{const o=i.life/i.maxLife;i.vy*=.98,i.vx*=.95;const r=Math.sin(i.life*i.swaySpeed+i.swayOffset)*i.swayAmp;n.x+=(i.vx+r)*(t/16),n.y+=i.vy*(t/16),n.rotation+=i.rotationSpeed*(t/16);const a=1-Math.pow(1-o,3),l=i.startScale+(i.targetScale-i.startScale)*a;if(n.scaleX=l*i.aspectRatioX,n.scaleY=l*i.aspectRatioY,o<.1)n.alpha=o/.1*this._startAlpha;else if(o>.4){const h=(o-.4)/.6;n.alpha=this._startAlpha*(1-h)}else n.alpha=this._startAlpha}}!this._isSpawning&&this._particles.length===0&&this._isStarted&&(this._completeEffect(),this.destroyed||this.destroy())}}destroy(t){for(let e=0;e<this._particles.length;e+=1)tt.release(this._particles[e].view);this._particles=[],super.destroy(t)}}const ps=.168,fs=.225,pe=.15,ms=2e4,gs=50,xs=4e3,ys=4e3;class ws extends yt{constructor(t,e,i,n,o){super(n),this._assets=o,this._radius=i,this.x=t,this.y=e,this._funnelDurationMs=ms,this._funnelFadeInDurationMs=gs,this._funnelFadeDurationMs=xs,this._elapsedMs=0,this._smokeDurationMs=ys,this._smokeSpawningStopped=!1,this._funnel=this._createFunnelSprite(),this._smoke=new ds(this._assets,this._radius),this.addChild(this._funnel,this._smoke)}_createFunnelSprite(){const{textures:t,contentSize:e}=this._assets.funnelTexture,i=t[Math.floor(Math.random()*t.length)],n=new U(i);n.anchor.set(.5),n.alpha=0,n.rotation=Math.random()*Math.PI*2;const o=this._radius*ps*T(1-pe,1+pe);return n.scale.set(o/e),n}_onEffectStart(){super._onEffectStart(),this._smoke&&this._smoke.run()}_update(t){if(this.isComplete)return;this._elapsedMs+=t,!this._smokeSpawningStopped&&this._elapsedMs>=this._smokeDurationMs&&(this._smoke.stopSpawning(),this._smokeSpawningStopped=!0);const e=this._funnelDurationMs-this._elapsedMs,i=this._funnelFadeInDurationMs>0?this._elapsedMs/this._funnelFadeInDurationMs:1,n=e/this._funnelFadeDurationMs;this._funnel.alpha=fs*gt(Math.min(i,n),0,1),e<=0&&this._completeEffect()}destroy(t){this._smoke&&(this._smoke.destroy(),this._smoke=null),this._funnel=null,super.destroy(t)}}const vs=4,Ss=2;class bs extends D{constructor(t,e,i){super(),this.originX=t[Ei],this.originY=t[Ri],this.radius=t[Di]??Nt,this._level=t[Fi]||0,this._assets=e,this._soundManager=i.soundManager,this._levelView=i.levelView||null,this._renderer=i.renderer||null,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&this._updateSeeThrough(),this._applyHeight()}),this.x=this.originX,this.y=this.originY,this.explosion=null,this.funnel=null,this._isStarted=!1,this._isDestroyed=!1,this._soundId=this._soundManager.registerSound("explosion",{position:{x:this.originX,y:this.originY}})}_updateSeeThrough(){const t=this._levelView.alphaFor(this._level,this.originX,this.originY),e=this._levelView.tintFor(this._level);this.explosion&&(this.explosion.alpha=t,this.explosion.tint=e),this.funnel&&(this.funnel.alpha=t,this.funnel.tint=e)}_applyHeight(){const t=this._level*R.shear,e=J(this.parent,this._renderer),i=st(this.originX,this.originY,e,t);for(const n of[this.explosion,this.funnel])n&&(n.position.set(i.x,i.y),n.scale.set(1+t))}run(){if(!(this._isDestroyed||this._isStarted)){if(this._isStarted=!0,!this.parent){this.destroy();return}this.explosion=new cs(this.originX,this.originY,this.radius,this._onExplosionComplete.bind(this),this._assets),this.explosion.zIndex=I(vs,this._level),this.funnel=new ws(this.originX,this.originY,this.radius,this._onFunnelComplete.bind(this),this._assets),this.funnel.zIndex=I(Ss,this._level),this.parent.addChild(this.explosion,this.funnel),this.parent.sortChildren(),this.explosion.run(),this.funnel.run()}}_onExplosionComplete(){this._isDestroyed||this.explosion&&(this.explosion.destroy(),this.explosion=null)}_onFunnelComplete(){this._isDestroyed||this.destroy()}destroy(){this._isDestroyed||(this._isDestroyed=!0,this._soundId&&(this._soundManager.unregisterSound(this._soundId),this._soundId=null),this.explosion&&(this.explosion.destroy(),this.explosion=null),this.funnel&&(this.funnel.destroy(),this.funnel=null),this.parent&&this.parent.removeChild(this),super.destroy({children:!0}))}}const fe=4,ot=400,Ms=0,Ts=0,As=8,z={particleLifetime:{min:800,max:1800},particleStartSizeFactor:{1:2,2:1,0:.25},particleEndSizeFactor:{1:3,2:2,0:1},particleStartAlpha:.08,particleEndAlpha:0,particleColor:3355443,particleSpawnRate:{1:60,2:50,0:30},particleInitialVelocity:{away:{min:-10,max:100},side:{min:-30,max:30}},airResistance:.92,particleVelocityVariance:10,streamOffsetFactor:.1,burstParticleCount:3,exhaust:{spawnRate:45,idleSpawnRate:4,minLoad:.05,startSizeFactor:.6,endSizeFactor:1.6,startAlpha:.05,color:5592405,lifetime:{min:350,max:750}}};class ks extends D{constructor(t,e,i={}){super(),this._level=t[H]||0,this.zIndex=I(fe,this._level);const{texture:n,contentSize:o}=e.smokeTexture;this._smokeTexture=n,this._textureScale=As/o,this._emitterX=t[$],this._emitterY=t[K],this._emitterRotation=t[nt],this._emitterVX=t[Tt],this._emitterVY=t[At],this._engineLoad=t[rt],this._condition=t[j],this._z=t[ht]||0,this._size=t[Lt],this._width=this._size*4,this._height=this._size*3,this._particleScaleMultiplier=Math.max(.5,Math.sqrt(this._width*this._height*.001)),this._particles=[],this._levelView=i.levelView||null,this._renderer=i.renderer||null,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this._emitterX,this._emitterY,this._z),this.tint=this._levelView.tintFor(this._level)),q(this,J(this.parent,this._renderer),this._z*R.shear,1)}),this._particleContainer=new Ht({texture:this._smokeTexture,boundsArea:new X(this._emitterX-ot,this._emitterY-ot,ot*2,ot*2),dynamicProperties:{position:!0,vertex:!0,rotation:!0,color:!0}}),this.addChild(this._particleContainer),this._timeSinceLastSpawn=0,this._timeSinceExhaust=0,this._tickListener=r=>this._updateParticles(r.deltaMS),Y.shared.add(this._tickListener)}update(t){const e=this._condition,i=t[H]||0;i!==this._level&&(this._level=i,this.zIndex=I(fe,i)),this._emitterX=t[$],this._emitterY=t[K],this._emitterRotation=t[nt],this._emitterVX=t[Tt],this._emitterVY=t[At],this._engineLoad=t[rt],this._condition=t[j],this._z=t[ht]||0,this._particleContainer.boundsArea.x=this._emitterX-ot,this._particleContainer.boundsArea.y=this._emitterY-ot,this._condition!==e&&this._condition!==3&&this._triggerSmokeBurst()}_triggerSmokeBurst(){let t=0;if(this._condition===1?t=2:(this._condition===2||this._condition===0)&&(t=1),t>0){const e=z.burstParticleCount,i=Math.ceil(e/t);for(let n=0;n<i;n+=1)for(let o=0;o<t;o+=1)this.spawnParticle(o,t,"burst")}}_updateParticles(t){if(t<=0)return;const e=t/1e3;this._timeSinceLastSpawn+=t,this._timeSinceExhaust+=t;let i=0;this._condition===3?i=0:this._condition===1?i=2:(this._condition===2||this._condition===0)&&(i=1);const n=z.particleSpawnRate[this._condition]||0,o=n>0?1e3/n:1/0;if(i>0&&n>0)for(;this._timeSinceLastSpawn>=o;){for(let _=0;_<i;_+=1)this.spawnParticle(_,i);this._timeSinceLastSpawn-=o}else this._timeSinceLastSpawn=0;const r=Math.min(this._engineLoad,1),a=this._condition>0&&r>=z.exhaust.minLoad?V(z.exhaust.idleSpawnRate,z.exhaust.spawnRate,r):0;if(a>0){const _=1e3/a;for(;this._timeSinceExhaust>=_;)this.spawnParticle(0,1,"exhaust"),this._timeSinceExhaust-=_}else this._timeSinceExhaust=0;const h=1-Math.pow(z.airResistance,t/16);for(let _=this._particles.length-1;_>=0;_-=1){const c=this._particles[_];if(c.age+=t,c.age>=c.lifetime){this._particleContainer.removeParticle(c.view),tt.release(c.view),this._particles.splice(_,1);continue}c.vx=c.vx+(Ms-c.vx)*h,c.vy=c.vy+(Ts-c.vy)*h,c.x+=c.vx*e,c.y+=c.vy*e;const u=c.age/c.lifetime,f=1-(1-u)*(1-u),g=V(c.startSizeFactor,c.endSizeFactor,f),m=V(c.startAlpha,c.endAlpha,u),w=g*this._particleScaleMultiplier*this._textureScale,x=c.view;x.x=c.x,x.y=c.y,x.scaleX=w,x.scaleY=w,x.alpha=m,x.rotation+=c.rotSpeed*e}}spawnParticle(t,e,i="damage"){const n=i==="burst",o=i==="exhaust",r=z.exhaust,a=o?T(r.lifetime.min,r.lifetime.max):T(z.particleLifetime.min,z.particleLifetime.max);let l=o?r.startSizeFactor:z.particleStartSizeFactor[this._condition]||.3,h=o?r.endSizeFactor:z.particleEndSizeFactor[this._condition]||1,_=o?r.startAlpha:z.particleStartAlpha,c=1;n&&(l*=2,h*=2.5,_=.8,c=2);const u=this._emitterRotation,f=u+Math.PI,g=Math.cos(f),m=Math.sin(f),w=u+Math.PI/2,x=Math.cos(w),y=Math.sin(w);let v=0;const d=this._width/2*z.streamOffsetFactor;e===2?v=t===0?-d:d:e===3&&(v=(t-1)*d);const b=this._height*.22,S=this._emitterX+g*b+x*v,M=this._emitterY+m*b+y*v;let A=T(z.particleInitialVelocity.away.min,z.particleInitialVelocity.away.max),L=T(z.particleInitialVelocity.side.min,z.particleInitialVelocity.side.max);A*=c,L*=c;let k=g*A+x*L,E=m*A+y*L;const W=z.particleVelocityVariance;k+=T(-W,W),E+=T(-W,W),k+=this._emitterVX,E+=this._emitterVY;const P=tt.get(this._smokeTexture);P.tint=o?r.color:z.particleColor,P.x=S,P.y=M,P.alpha=_;const B=l*this._particleScaleMultiplier*this._textureScale;P.scaleX=B,P.scaleY=B,P.rotation=T(0,Math.PI*2);const Pt={view:P,x:S,y:M,vx:k,vy:E,age:0,lifetime:a,startSizeFactor:l,endSizeFactor:h,startAlpha:_,endAlpha:z.particleEndAlpha,rotSpeed:T(-1,1)};this._particleContainer.addParticle(P),this._particles.push(Pt)}_stopTimer(){this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null)}destroy(t){this._stopTimer();for(let e=0;e<this._particles.length;e+=1)tt.release(this._particles[e].view);this._particles=[],super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class Is extends U{constructor(t,e,i,n,o,r,a){super(a),this.anchor.set(.5),this.x=t,this.y=e,this.rotation=i,this.width=o,this.height=n,this.alpha=r,this._initialAlpha=r,this._elapsedTime=0,this._fadeDuration=1800+Math.random()*700}update(t){this._elapsedTime+=t;const e=Math.min(this._elapsedTime/this._fadeDuration,1);return this.alpha=(1-e)*this._initialAlpha,e>=1}}const Xt=1;class Ls extends D{constructor(t,e,i={}){super(),this._levelView=i.levelView||null,this._renderer=i.renderer||null,this._level=t[H]||0,this._markLayers=new Map,this.zIndex=I(Xt,this._level),this._currentX=t[$]||0,this._currentY=t[K]||0,this._currentRotation=t[nt]||0,this._engineLoad=t[rt]||0,this._condition=t[j],this._size=t[Lt],this._prevX=this._currentX,this._prevY=this._currentY,this._prevRotation=this._currentRotation,this._prevSpeed=0,this._prevAngularSpeed=0,this._assets=e,this._trackMarkCooldown=2,this._lastTrackMarkTime=0,this._minAbsAccelerationForMark=4,this._minAngularSpeedForMark=.02,this._minRotationAccelerationForMark=.4,this._minSpeedForRotationMarks=1.4,this._trackWidth=this._size*.4,this._trackLength=this._size*.5;const n=this._size*3;this._trackOffset=n/2*.7,this._backwardOffset=n*.4,this._trackInitialAlpha=.4,this._tickListener=o=>this._internalUpdate(o.deltaMS),Y.shared.add(this._tickListener),this._levelView&&(this.onRender=()=>this._updateLayers())}update(t){this._currentX=t[$],this._currentY=t[K],this._currentRotation=t[nt],this._engineLoad=t[rt],this._condition=t[j];const e=t[H]||0;e!==this._level&&(this._level=e,this.zIndex=I(Xt,e))}_markLayer(t){let e=this._markLayers.get(t);if(e)return e;e=new D,e.zIndex=I(Xt,t),this._markLayers.set(t,e);const i=this.parent||this;return i.addChild(e),i.sortChildren(),e}_internalUpdate(t){if(t<=0)return;for(const f of this._markLayers.values())for(let g=f.children.length-1;g>=0;g-=1){const m=f.children[g];m.update(t)&&m.destroy()}const e=this._currentX-this._prevX,i=this._currentY-this._prevY,n=Math.sqrt(e*e+i*i),o=wi(this._currentRotation-this._prevRotation),r=Math.abs(o),a=n-this._prevSpeed,l=Math.abs(a),h=r-this._prevAngularSpeed,_=Math.abs(h),c=performance.now();let u=!1;this._condition!==0&&c-this._lastTrackMarkTime>this._trackMarkCooldown&&(l>this._minAbsAccelerationForMark&&(u=!0),n>this._minSpeedForRotationMarks&&(r>this._minAngularSpeedForMark||_>this._minRotationAccelerationForMark)&&(u=!0)),this._engineLoad>1&&(u=!0),u&&(this.createTrackMarksAtPreviousPosition(),this._lastTrackMarkTime=c),this._prevX=this._currentX,this._prevY=this._currentY,this._prevRotation=this._currentRotation,this._prevSpeed=n,this._prevAngularSpeed=r}createTrackMarksAtPreviousPosition(){const t=this._markLayer(this._level);for(let e=-1;e<=1;e+=2){const i=Math.cos(this._prevRotation+Math.PI/2)*this._trackOffset*e,n=Math.sin(this._prevRotation+Math.PI/2)*this._trackOffset*e,o=-Math.cos(this._prevRotation)*this._backwardOffset,r=-Math.sin(this._prevRotation)*this._backwardOffset,a=this._prevX+i+o,l=this._prevY+n+r,h=new Is(a,l,this._prevRotation,this._trackWidth,this._trackLength,this._trackInitialAlpha,this._assets.trackMarkTexture);t.addChild(h)}}_updateLayers(){if(!this._markLayers.size)return;const t=J(this.parent,this._renderer);for(const[e,i]of this._markLayers)i.alpha=this._levelView.alphaFor(e,this._currentX,this._currentY),i.tint=this._levelView.tintFor(e),e&&q(i,t,e*R.shear)}_stopTimer(){this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null)}destroy(t){this._stopTimer();for(const e of this._markLayers.values())e.destroyed||e.destroy({children:!0});this._markLayers.clear(),super.destroy({children:!0,texture:!1,textureSource:!1,...t})}}const me=2,at=300,Ps=6,C={lifetime:{min:300,max:700},startSizeFactor:.7,endSizeFactor:2,startAlpha:.35,endAlpha:0,color:10260343,airResistance:.86,spawnRate:30,maxSpinSpeed:8,spinVelocity:{back:{min:20,max:70},side:{min:-25,max:25}},landingBurst:14,landingVelocity:{min:40,max:110},landingSizeFactor:1.6};class zs extends D{constructor(t,e,i={}){super(),this._level=t[H]||0,this.zIndex=I(me,this._level);const{texture:n,contentSize:o}=e.dustTexture;this._dustTexture=n,this._textureScale=Ps/o,this._x=t[$],this._y=t[K],this._rotation=t[nt],this._vx=t[Tt]||0,this._vy=t[At]||0,this._engineLoad=t[rt]||0,this._condition=t[j],this._z=t[ht]||0,this._vz=t[It]||0,this._prevVz=this._vz,this._size=t[Lt];const r=this._size*3;this._trackOffset=r/2*.7,this._backwardOffset=r*.4,this._particleScaleMultiplier=Math.max(.5,Math.sqrt(this._size*4*r*.001)),this._particles=[],this._timeSinceSpawn=0,this._levelView=i.levelView||null,this._renderer=i.renderer||null,this._soundManager=i.soundManager||null;const a=this._soundManager?.getSoundConfig("tankLanding");this._landingVolume=a?.volume||0,this._hasLandingSound=!!a,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this._x,this._y,this._z),this.tint=this._levelView.tintFor(this._level)),q(this,J(this.parent,this._renderer),this._z*R.shear,1)}),this._particleContainer=new Ht({texture:this._dustTexture,boundsArea:new X(this._x-at,this._y-at,at*2,at*2),dynamicProperties:{position:!0,vertex:!0,rotation:!0,color:!0}}),this.addChild(this._particleContainer),this._tickListener=l=>this._updateParticles(l.deltaMS),Y.shared.add(this._tickListener)}update(t){const e=t[H]||0;e!==this._level&&(this._level=e,this.zIndex=I(me,e)),this._x=t[$],this._y=t[K],this._rotation=t[nt],this._vx=t[Tt]||0,this._vy=t[At]||0,this._engineLoad=t[rt]||0,this._condition=t[j],this._z=t[ht]||0,this._vz=t[It]||0,this._particleContainer.boundsArea.x=this._x-at,this._particleContainer.boundsArea.y=this._y-at;const i=Ae(this._prevVz,this._vz,ft);i>0&&(this._triggerLandingBurst(i),this._playLandingSound(i)),this._prevVz=this._vz}_playLandingSound(t){this._hasLandingSound&&this._soundManager.registerSound("tankLanding",{position:{x:this._x,y:this._y},volume:this._landingVolume*t})}_contactPoint(t){const e=this._rotation+Math.PI/2;return{x:this._x+Math.cos(e)*this._trackOffset*t-Math.cos(this._rotation)*this._backwardOffset,y:this._y+Math.sin(e)*this._trackOffset*t-Math.sin(this._rotation)*this._backwardOffset}}_triggerLandingBurst(t){const e=Math.round(C.landingBurst*t);if(!(e<=0))for(let i=-1;i<=1;i+=2){const n=this._contactPoint(i);for(let o=0;o<e;o+=1){const r=T(0,Math.PI*2),a=T(C.landingVelocity.min,C.landingVelocity.max)*t;this._spawnParticle(n.x,n.y,Math.cos(r)*a,Math.sin(r)*a,C.landingSizeFactor*t)}}}_spawnSpinDust(){const t=this._rotation+Math.PI,e=this._rotation+Math.PI/2;for(let i=-1;i<=1;i+=2){const n=this._contactPoint(i),o=T(C.spinVelocity.back.min,C.spinVelocity.back.max),r=T(C.spinVelocity.side.min,C.spinVelocity.side.max);this._spawnParticle(n.x,n.y,Math.cos(t)*o+Math.cos(e)*r,Math.sin(t)*o+Math.sin(e)*r,1)}}_spawnParticle(t,e,i,n,o){const r=C.startSizeFactor*o,a=C.endSizeFactor*o,l=tt.get(this._dustTexture),h=r*this._particleScaleMultiplier*this._textureScale;l.tint=C.color,l.x=t,l.y=e,l.alpha=C.startAlpha,l.scaleX=h,l.scaleY=h,l.rotation=T(0,Math.PI*2),this._particles.push({view:l,x:t,y:e,vx:i,vy:n,age:0,lifetime:T(C.lifetime.min,C.lifetime.max),startSizeFactor:r,endSizeFactor:a,rotSpeed:T(-1,1)}),this._particleContainer.addParticle(l)}_updateParticles(t){if(t<=0)return;const e=t/1e3;this._timeSinceSpawn+=t;const i=Math.max(0,this._engineLoad-1),n=Math.hypot(this._vx,this._vy),r=this._condition>0&&i>0&&n<C.maxSpinSpeed?C.spawnRate*Math.min(i,1):0;if(r>0){const l=1e3/r;for(;this._timeSinceSpawn>=l;)this._spawnSpinDust(),this._timeSinceSpawn-=l}else this._timeSinceSpawn=0;const a=Math.pow(C.airResistance,t/16);for(let l=this._particles.length-1;l>=0;l-=1){const h=this._particles[l];if(h.age+=t,h.age>=h.lifetime){this._particleContainer.removeParticle(h.view),tt.release(h.view),this._particles.splice(l,1);continue}h.vx*=a,h.vy*=a,h.x+=h.vx*e,h.y+=h.vy*e;const _=h.age/h.lifetime,c=1-(1-_)*(1-_),u=(h.startSizeFactor+(h.endSizeFactor-h.startSizeFactor)*c)*this._particleScaleMultiplier*this._textureScale,f=h.view;f.x=h.x,f.y=h.y,f.scaleX=u,f.scaleY=u,f.alpha=C.startAlpha+(C.endAlpha-C.startAlpha)*_,f.rotation+=h.rotSpeed*e}}_stopTimer(){this._tickListener&&(Y.shared.remove(this._tickListener),this._tickListener=null)}destroy(t){this._stopTimer();for(let e=0;e<this._particles.length;e+=1)tt.release(this._particles[e].view);this._particles=[],super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class Cs extends yt{constructor(t,e,i,n,o){super(o),this.startPositionX=t,this.startPositionY=e,this.endPositionX=i,this.endPositionY=n,this.config={color:16777113,alphaStart:1,alphaEnd:.6,trailLength:55,tracerSpeed:19e3,minDuration:45,maxDuration:80,trailShrinkPower:1,trailStartOffset:30,segmentCount:12,segmentRadius:1,alphaPulseFrequency:.1,alphaPulseAmplitude:.15},this.graphics=new O,this.addChild(this.graphics),this.elapsedTime=0,this.dx=this.endPositionX-this.startPositionX,this.dy=this.endPositionY-this.startPositionY,this.totalDist=Math.hypot(this.dx,this.dy),this.totalDist>.001?(this.nx=this.dx/this.totalDist,this.ny=this.dy/this.totalDist,this.animationDuration=this.totalDist/this.config.tracerSpeed*1e3):(this.nx=0,this.ny=0,this.totalDist=0,this.animationDuration=this.config.minDuration),this.animationDuration=Math.max(this.config.minDuration,this.animationDuration),this.animationDuration=Math.min(this.config.maxDuration,this.animationDuration),this.animationDuration<=0&&(this.animationDuration=this.config.minDuration)}_drawSegment(t,e,i,n,o){this.graphics.circle(t,e,i),this.graphics.fill({color:n,alpha:gt(o,0,1)})}_update(t){if(this.isComplete)return;this.elapsedTime+=t,this.graphics.clear();const e=Math.min(this.elapsedTime/this.animationDuration,1);if(e>0){const i=V(this.startPositionX,this.endPositionX,e),n=V(this.startPositionY,this.endPositionY,e),o=V(this.config.alphaStart,this.config.alphaEnd,e),r=Math.sin(this.elapsedTime*this.config.alphaPulseFrequency)*this.config.alphaPulseAmplitude;let a=o+r;a=gt(a,0,this.config.alphaStart);const l=Math.pow(e,this.config.trailShrinkPower),h=V(this.config.trailLength,0,l),_=this.totalDist*e;if(_>=this.config.trailStartOffset){let c=_;this.totalDist>.001&&(c=Math.max(0,_-this.config.trailStartOffset));const u=Math.min(c,h);let f,g;this.totalDist>.001?(f=i-this.nx*u,g=n-this.ny*u):(f=i,g=n);const m=Math.hypot(i-f,n-g);if(m<this.config.segmentRadius*.5&&this.totalDist===0)this._drawSegment(i,n,this.config.segmentRadius,this.config.color,a);else if(m>=this.config.segmentRadius*.5){const w=Math.max(1,this.config.segmentCount);for(let x=0;x<w;x++){let y=.5;w>1&&(y=x/(w-1));const v=V(f,i,y),d=V(g,n,y),b=V(1,.8,y);this._drawSegment(v,d,this.config.segmentRadius,this.config.color,a*b)}}}}this.elapsedTime>=this.animationDuration&&(this.graphics.clear(),this._completeEffect())}destroy(t){this.graphics&&this.graphics.clear(),super.destroy(t)}}class Es extends yt{constructor(t,e,i,n,o,r){super(o),this.x=t,this.y=e,this._assets=r;const{texture:a,contentSize:l}=this._assets.impactParticleTexture;this._particleTexture=a,this._textureContentSize=l,this.config={particleCount:T(2,4),particleMinSize:.8,particleMaxSize:2.4,minInitialSpeed:10,maxInitialSpeed:300,minLifetime:8e3,maxLifetime:15e3,color:[3355443,2236962,4473924],fadeOutStart:.8,impactDirectionX:i,impactDirectionY:n,spreadAngle:60,dragCoefficient:13,minSpeedThreshold:1,lingerDuration:6e3},this.config.impactDirectionX===0&&this.config.impactDirectionY===0?this.useOmnidirectionalSpread=!0:this.useOmnidirectionalSpread=!1,this.particlesData=[],this.elapsedTime=0,this._createParticles()}_createParticles(){let t;this.useOmnidirectionalSpread||(t=Math.atan2(this.config.impactDirectionY,this.config.impactDirectionX));const i=this.config.spreadAngle*(Math.PI/180)/2;for(let n=0,o=this.config.particleCount;n<o;n+=1){let r;this.useOmnidirectionalSpread?r=Math.random()*Math.PI*2:r=t+T(-i,i);const a=T(this.config.minInitialSpeed,this.config.maxInitialSpeed),l=new U(this._particleTexture);l.anchor.set(.5);const h={sprite:l,x:0,y:0,vx:Math.cos(r)*a,vy:Math.sin(r)*a,size:T(this.config.particleMinSize,this.config.particleMaxSize),color:Array.isArray(this.config.color)?this.config.color[Math.floor(Math.random()*this.config.color.length)]:this.config.color,lifetime:T(this.config.minLifetime,this.config.maxLifetime),age:0,alpha:1,active:!0,isMoving:!0,timeSinceStopped:0};l.tint=h.color,this.particlesData.push(h),this.addChild(l)}}_update(t){if(this.isComplete)return;this.elapsedTime+=t;const e=t/1e3;let i=0;for(let n=0,o=this.particlesData.length;n<o;n+=1){const r=this.particlesData[n];if(!r.active)continue;if(i+=1,r.age+=t,r.isMoving){const _=Math.hypot(r.vx,r.vy);if(_>0){const u=_*this.config.dragCoefficient*e,f=Math.max(0,1-u/_);r.vx*=f,r.vy*=f}r.x+=r.vx*e,r.y+=r.vy*e,Math.hypot(r.vx,r.vy)<this.config.minSpeedThreshold&&(r.isMoving=!1,r.vx=0,r.vy=0)}else r.timeSinceStopped+=t;const a=r.age/r.lifetime;if(!r.isMoving&&r.timeSinceStopped>=this.config.lingerDuration){const _=r.timeSinceStopped-this.config.lingerDuration,c=Math.min(500,r.lifetime*(1-this.config.fadeOutStart));r.alpha=V(1,0,Math.min(_/c,1))}else if(a>=this.config.fadeOutStart){const _=r.age-r.lifetime*this.config.fadeOutStart,c=r.lifetime*(1-this.config.fadeOutStart);r.alpha=c>0?V(1,0,Math.min(_/c,1)):0}(r.age>=r.lifetime||r.alpha<.01)&&(r.active=!1,r.alpha=0);const l=r.sprite;l.position.set(r.x,r.y),l.alpha=r.alpha,l.visible=r.active;const h=r.size/this._textureContentSize;l.scale.set(h)}i===0&&this._isStarted&&this._completeEffect()}destroy(t){this.particlesData=[],super.destroy(t)}}const Rs=2;class Ds extends D{constructor(t,e,i){super(),this.startPositionX=t[vi],this.startPositionY=t[Si],this.endPositionX=t[bi],this.endPositionY=t[Mi],this.soundPositionX=t[Ti],this.soundPositionY=t[Ai],this.hit=t[ki],this.endLevel=t[Li]||0,this.zIndex=I(Rs,this.endLevel),this.anchorKey=null,this.anchorLocalX=0,this.anchorLocalY=0,Array.isArray(t[re])&&([this.anchorKey,this.anchorLocalX,this.anchorLocalY]=t[re]),this._assets=e,this._soundManager=i.soundManager,this._isLocalShot=i.localPlayer?.is(t[Ii])===!0,this._mapDynamics=i.mapDynamics||null,this._levelView=i.levelView||null,this._renderer=i.renderer||null,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&(this.alpha=this._levelView.alphaFor(this.endLevel,this.endPositionX,this.endPositionY),this.tint=this._levelView.tintFor(this.endLevel)),q(this,J(this.parent,this._renderer),this.endLevel*R.shear,1)}),this.tracer=null,this.impact=null,this._isDestroyed=!1,this._visualsComplete=!1,this._soundComplete=!1,this._soundId=this._soundManager.registerSound("shot",{position:{x:this.soundPositionX,y:this.soundPositionY},spatial:!this._isLocalShot},()=>{this._soundComplete=!0,this._soundId=null,this._tryDestroy()}),this._soundId||(this._soundComplete=!0)}run(){this._isDestroyed||(this.tracer=new Cs(this.startPositionX,this.startPositionY,this.endPositionX,this.endPositionY,this._onTracerComplete.bind(this)),this.addChild(this.tracer),this.tracer.run())}_onTracerComplete(){if(!this._isDestroyed)if(this.hit){let t=this.endPositionX,e=this.endPositionY;if(this.anchorKey!==null&&this._mapDynamics){const l=this._mapDynamics.toWorld(this.anchorKey,this.anchorLocalX,this.anchorLocalY);l&&(t=l.x,e=l.y)}const i=t-this.startPositionX,n=e-this.startPositionY,o=Math.hypot(i,n);let r=0,a=0;o>.001&&(r=-(i/o),a=-(n/o)),this.impact=new Es(t,e,r,a,this._onImpactComplete.bind(this),this._assets),this.addChild(this.impact),this.impact.run()}else this._visualsComplete=!0,this._tryDestroy()}_onImpactComplete(){this._isDestroyed||(this._visualsComplete=!0,this._tryDestroy())}_tryDestroy(){this._visualsComplete&&this._soundComplete&&this.destroy()}destroy(){this._isDestroyed||(this._isDestroyed=!0,this._soundId&&(this._soundManager.unregisterSound(this._soundId),this._soundId=null),this.tracer&&(this.tracer.destroy(),this.tracer=null),this.impact&&(this.impact.destroy(),this.impact=null),this.parent&&this.parent.removeChild(this),super.destroy({children:!0}))}}const Fs={Map:Bi,MapRadar:Ui,TankRadar:Zi,Tank:as,Bomb:hs,ExplosionEffect:bs,Smoke:ks,Tracks:Ls,Dust:zs,ShotEffect:Ds},Vs=4;function xt(s){return Math.ceil(s*Vs)}function bt(s,t){const{radius:e,blur:i,color:n,quality:o=40}=s,r=new O,a=(e+xt(i))*2,l=a/2;r.circle(l,l,e),r.fill(n);const h=new Ut({strength:i,quality:o});h.padding=xt(i),r.filters=[h];const _=t.generateTexture({target:r,frame:new X(0,0,a,a)});return r.destroy(!0),{texture:_,contentSize:e*2}}function Os(s,t){const{baseRadius:e,irregularity:i=0,blur:n=0,numPoints:o=20,colorFill:r,colorRim:a=r,rimWidth:l=0,variants:h=1}=s,_=Math.max(1,Math.floor(h)||1),c=(e+i+l)*2,u=c+xt(n)*2,f=u/2,g=[];for(let m=0;m<_;m+=1){const w=new O,x=[];for(let v=0;v<o;v+=1){const d=v/o*Math.PI*2,b=e+T(-i,i);x.push(f+b*Math.cos(d),f+b*Math.sin(d))}w.poly(x).fill(r).stroke({width:l,color:a,alignment:1});const y=new Ut({strength:n,quality:10});y.padding=xt(n),w.filters=[y],g.push(t.generateTexture({target:w,frame:new X(0,0,u,u)})),w.destroy(!0)}return{textures:g,contentSize:c}}function Xs(s,t){const{colors:e}=s,i={},n=10,o=n*4,r=n*3,a=15658734,l=_=>{const c=new O,u=new O,f=o,g=r;c.rect(-f/2,-g/2,f,g).fill(5592405).rect(-f/2+1,-g/2+1,f-2,g-2).fill(10066329).rect(-f/2+2,-g/2+2,f-4,g-4).fill(13421772).rect(-f/2+3,-g/2+3,f-6,g-6).fill(a),u.moveTo(1.33*n,-.42*n).lineTo(.42*n,-1*n).lineTo(-.42*n,-1*n).lineTo(-1.33*n,-.42*n).lineTo(-1.33*n,.42*n).lineTo(-.42*n,1*n).lineTo(.42*n,1*n).lineTo(1.33*n,.42*n).closePath().fill(_).stroke({width:.17*n,color:11184810}).moveTo(2.33*n,-.25*n).lineTo(.25*n,-.25*n).lineTo(.25*n,.25*n).lineTo(2.33*n,.25*n).closePath().stroke({width:.17*n,color:11184810}).fill(_);const m=c.getBounds(),w=t.generateTexture({target:c,frame:new X(m.x,m.y,m.width,m.height)}),x=u.getBounds(),y=t.generateTexture({target:u,frame:new X(x.x,x.y,x.width,x.height)}),v={x:-x.x/x.width,y:-x.y/x.height};return c.destroy(!0),u.destroy(!0),{body:w,gun:y,gunAnchor:v}},h=()=>{const _=new D,c=new O,u=new O;_.addChild(c,u);const f=3815994,g=2434341,m=3158064,w=1579032,x=5263440,y=o,v=r,d=n;c.moveTo(-y/2-d*.1,-v/2+d*.2).lineTo(y/2+d*.2,-v/2-d*.1).lineTo(y/2-d*.1,v/2+d*.3).lineTo(-y/2+d*.3,v/2-d*.2).closePath().fill(f).stroke({width:d*.2,color:x,alignment:.5}),c.moveTo(-y/2+d*.4,-v/2+d*.5).lineTo(y/2-d*.3,-v/2+d*.2).lineTo(y/2-d*.4,v/2-d*.1).lineTo(-y/2+d*.2,v/2-d*.4).closePath().fill(g),c.circle(y*.15,v*.1,d*1.2).fill(w),c.circle(-y*.3,-v*.25,d*.5).fill(w),u.position.set(d*.3,-d*.2);const b=[d*1.1,-d*.7,d*.2,-d*1,-d*.6,-d*.9,-d*1.3,-d*.2,-d*1.1,d*.6,-d*.2,d*1,d*.7,d*.8,d*1.3,d*.1];u.poly(b).fill(m).stroke({width:d*.15,color:x,alignment:0});const S=[d*.8,-d*.25,d*1.5,-d*.4,d*1.4,d*.15,d*.7,d*.05];u.poly(S).fill(m).stroke({width:d*.1,color:x,alignment:0}),u.circle(d*.1,-d*.2,d*.4).fill(w);const M=_.getBounds(),A=t.generateTexture({target:_,frame:new X(M.x,M.y,M.width,M.height)});return _.destroy({children:!0}),A};return i.liveTeamId1=l(e.teamId1),i.liveTeamId2=l(e.teamId2),i.destroyed=h(),i}function Ys(s,t){const{radius:e,borderWidth:i,crossSize:n,crossThickness:o,colors:r}=s,a={},l=(e+i)*2,h=l/2,_=15658734,c=3355443,u=g=>{const m=new O;m.circle(h,h,e).fill(_),m.circle(h,h,e-i).fill(g);const w=t.generateTexture({target:m,frame:new X(0,0,l,l)});return m.destroy(!0),w},f=()=>{const g=new O,m=n/2;g.moveTo(h-m,h-m).lineTo(h+m,h+m).moveTo(h-m,h+m).lineTo(h+m,h-m).stroke({width:o,color:c});const w=t.generateTexture({target:g,frame:new X(0,0,l,l)});return g.destroy(!0),w};return a.liveTeamId1=u(r.teamId1),a.liveTeamId2=u(r.teamId2),a.destroyed=f(),a}function Bs(s,t){const{colorOuter:e,colorInner:i}=s,n=new O,o=20,r=1;n.rect(0,0,o,o).fill(e),n.rect(r,r,o-r*2,o-r*2).fill(i);const a=t.generateTexture({target:n,frame:new X(0,0,o,o)});return n.destroy(!0),a}function Ns(s,t){const{width:e,length:i,color:n}=s,o=new O;o.rect(0,0,i,e).fill(n);const r=t.generateTexture({target:o,frame:new X(0,0,i,e)});return o.destroy(!0),r}function Hs(s,t){const{width:e,height:i,radius:n,blur:o,color:r,quality:a=20}=s,l=new O,h=xt(o),_=e+h*2,c=i+h*2;l.roundRect(h,h,e,i,n),l.fill(r);const u=new Ut({strength:o,quality:a});u.padding=h,l.filters=[u];const f=t.generateTexture({target:l,frame:new X(0,0,_,c)});return l.destroy(!0),{texture:f,contentSize:e}}const Us={explosionTexture:bt,smokeTexture:bt,impactParticleTexture:bt,dustTexture:bt,tankShadowTexture:Hs,funnelTexture:Os,tankTexture:Xs,tankRadarTexture:Ys,bombTexture:Bs,trackMarkTexture:Ns},Ws=s=>(s??"").split(/[?#]/)[0].endsWith(".js"),Gs=s=>import(s);function Zs(s=Ze,t={}){const e={level:0,x:0,y:0,z:0,camera:null,key:null,stage:t.stage||null,renderer:t.renderer||null},i=()=>{if(!e.stage)return null;const{position:n,scale:o}=e.stage,r=e.renderer?.screen,a=r?r.width:0,l=r?r.height:0,h=e.key;return(e.camera===null||h===null||h.x!==n.x||h.y!==n.y||h.scaleX!==o.x||h.scaleY!==o.y||h.width!==a||h.height!==l)&&(e.key={x:n.x,y:n.y,scaleX:o.x,scaleY:o.y,width:a,height:l},e.camera=J(e.stage,e.renderer)),e.camera};return{attachStage(n,o){e.stage||!n||!o||(e.stage=n,e.renderer=o,e.key=null)},camera(){return i()},set(n,o,r,a=0){e.level=n,e.x=o,e.y=r,e.z=a},alphaFor(n,o,r,a=n){const l=i(),h=st(e.x,e.y,l,e.z*R.shear),_=st(o,r,l,a*R.shear);return Je({viewLevel:e.level,viewX:h.x,viewY:h.y,level:n,x:_.x,y:_.y,cfg:s})},tintFor(n){return Qe(e.level,n,s)},get cfg(){return s},get mode(){return s.mode},get level(){return e.level},get x(){return e.x},get y(){return e.y},get z(){return e.z}}}const js={id:"tanks",engineApi:Ve,requires:["map.layers","map.levelsN"],async createClientCore(s,{wasmUrl:t}){if(Ws(t)){const i=await Gs(t);return{core:new i.ClientCore(s),memory:null}}const e=await We({module_or_path:t});return{core:new Yt(s),memory:e.memory}},parts:Fs,bakers:Us,styles:Ge,serviceNames:["levelView","mapDynamics","rampRuns"],hooks:{services(s){const t=Zs();let e=[],i=null;return{levelView:t,mapDynamics:{toWorld(n,o,r){const a=s.map_dynamics_to_world(n,o,r);return a.length===0?null:{x:a[0],y:a[1]}}},rampRuns:{forLevel(n){const o=s.map_generation();return o!==i&&(i=o,e=JSON.parse(s.ramp_runs())),e.filter(r=>r.from===n)}}}},onAuth(s,t){s.set_model(t.model)},onPanel(s,t){s.sync_panel(JSON.stringify(t))},onLocalAction(s,t,e,i){return t!=="down"?null:e==="fire"?s.try_fire(i)||null:((e==="nextWeapon"||e==="prevWeapon")&&s.cycle_weapon(e==="prevWeapon"),null)}}};export{js as default};
|