@vimp-games/tanks 0.18.1 → 0.19.1
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/assets/vimp_tanks_core_bg-EoY5gurr.wasm +0 -0
- package/dist/client-BOXjbg0z.js +84 -0
- package/dist/core-node/vimp_tanks_core_bg.wasm +0 -0
- package/dist/{host-BNJE-lq0.js → host-XM9vOGou.js} +1 -1
- package/dist/manifest.json +5 -5
- package/dist/maps/garden.json +1 -1
- package/dist/sounds/bomb-has-been-planted.mp3 +0 -0
- package/dist/sounds/bomb-has-been-planted.webm +0 -0
- package/dist/sounds/bomb-has-been-planted2.mp3 +0 -0
- package/dist/sounds/bomb-has-been-planted2.webm +0 -0
- package/dist/sounds/defeat.mp3 +0 -0
- package/dist/sounds/defeat.webm +0 -0
- package/dist/sounds/empty-bullet.mp3 +0 -0
- package/dist/sounds/empty-bullet.webm +0 -0
- package/dist/sounds/explosion.mp3 +0 -0
- package/dist/sounds/explosion.webm +0 -0
- package/dist/sounds/frag.mp3 +0 -0
- package/dist/sounds/frag.webm +0 -0
- package/dist/sounds/game-over.mp3 +0 -0
- package/dist/sounds/game-over.webm +0 -0
- package/dist/sounds/hit.mp3 +0 -0
- package/dist/sounds/hit.webm +0 -0
- package/dist/sounds/round-start.mp3 +0 -0
- package/dist/sounds/round-start.webm +0 -0
- package/dist/sounds/shot.mp3 +0 -0
- package/dist/sounds/shot.webm +0 -0
- package/dist/sounds/tank-engine.mp3 +0 -0
- package/dist/sounds/tank-engine.webm +0 -0
- package/dist/sounds/victory.mp3 +0 -0
- package/dist/sounds/victory.webm +0 -0
- package/package.json +3 -2
- package/dist/assets/vimp_tanks_core_bg-DJG6soEC.wasm +0 -0
- package/dist/client-BS_Gxxiz.js +0 -84
|
Binary file
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import{UniformGroup as se,Filter as re,GpuProgram as ne,GlProgram as oe,defaultFilterVert as ae,Spritesheet as le,Container as D,Sprite as I,Rectangle as z,Assets as Pt,MeshSimple as Rt,Ticker as B,Texture as he,Graphics as C,Text as ce,Particle as _e,ParticleContainer as te,BlurFilter as kt}from"pixi.js";const ue=4;class Mt{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ft.unregister(this),t}free(){const t=this.__destroy_into_raw();d.__wbg_clientcore_free(t,0)}abi_describe(){let t,e;try{const i=d.clientcore_abi_describe(this.__wbg_ptr);return t=i[0],e=i[1],W(i[0],i[1])}finally{d.__wbindgen_free(t,e,1)}}apply_aim(t,e,i,s){d.clientcore_apply_aim(this.__wbg_ptr,t,e,i,s)}apply_input(t,e,i){const s=H(t,d.__wbindgen_malloc,d.__wbindgen_realloc),o=L,r=H(e,d.__wbindgen_malloc,d.__wbindgen_realloc),a=L;d.clientcore_apply_input(this.__wbg_ptr,s,o,r,a,i)}cycle_weapon(t){d.clientcore_cycle_weapon(this.__wbg_ptr,t)}debug_json(){let t,e;try{const i=d.clientcore_debug_json(this.__wbg_ptr);return t=i[0],e=i[1],W(i[0],i[1])}finally{d.__wbindgen_free(t,e,1)}}decode_frame(t){let e,i;try{const s=xt(t,d.__wbindgen_malloc),o=L,r=d.clientcore_decode_frame(this.__wbg_ptr,s,o);return e=r[0],i=r[1],W(r[0],r[1])}finally{d.__wbindgen_free(e,i,1)}}dispatch(t,e){const i=H(t,d.__wbindgen_malloc,d.__wbindgen_realloc),s=L,o=xt(e,d.__wbindgen_malloc),r=L,a=d.clientcore_dispatch(this.__wbg_ptr,i,s,o,r);var l=pe(a[0],a[1]).slice();return d.__wbindgen_free(a[0],a[1]*1,1),l}hot_ptr(){return d.clientcore_hot_ptr(this.__wbg_ptr)>>>0}hot_values(){const t=d.clientcore_hot_values(this.__wbg_ptr);var e=zt(t[0],t[1]).slice();return d.__wbindgen_free(t[0],t[1]*4,4),e}map_dynamics_to_world(t,e,i){const s=H(t,d.__wbindgen_malloc,d.__wbindgen_realloc),o=L,r=d.clientcore_map_dynamics_to_world(this.__wbg_ptr,s,o,e,i);var a=zt(r[0],r[1]).slice();return d.__wbindgen_free(r[0],r[1]*4,4),a}my_game_id(){return d.clientcore_my_game_id(this.__wbg_ptr)}constructor(t){const e=H(t,d.__wbindgen_malloc,d.__wbindgen_realloc),i=L,s=d.clientcore_new(e,i);if(s[2])throw Yt(s[1]);return this.__wbg_ptr=s[0],Ft.register(this,this.__wbg_ptr,this),this}offset(){return d.clientcore_offset(this.__wbg_ptr)}push_frame(t,e){const i=xt(t,d.__wbindgen_malloc),s=L;return d.clientcore_push_frame(this.__wbg_ptr,i,s,e)!==0}reset(){d.clientcore_reset(this.__wbg_ptr)}resync(){d.clientcore_resync(this.__wbg_ptr)}sample(t){return d.clientcore_sample(this.__wbg_ptr,t)>>>0}set_active(t){d.clientcore_set_active(this.__wbg_ptr,t)}set_map(t){const e=H(t,d.__wbindgen_malloc,d.__wbindgen_realloc),i=L,s=d.clientcore_set_map(this.__wbg_ptr,e,i);if(s[1])throw Yt(s[0])}set_model(t){const e=H(t,d.__wbindgen_malloc,d.__wbindgen_realloc),i=L;d.clientcore_set_model(this.__wbg_ptr,e,i)}sync_panel(t){const e=H(t,d.__wbindgen_malloc,d.__wbindgen_realloc),i=L;d.clientcore_sync_panel(this.__wbg_ptr,e,i)}take_divergence(){let t,e;try{const i=d.clientcore_take_divergence(this.__wbg_ptr);return t=i[0],e=i[1],W(i[0],i[1])}finally{d.__wbindgen_free(t,e,1)}}take_frames(){let t,e;try{const i=d.clientcore_take_frames(this.__wbg_ptr);return t=i[0],e=i[1],W(i[0],i[1])}finally{d.__wbindgen_free(t,e,1)}}try_fire(t){const e=d.clientcore_try_fire(this.__wbg_ptr,t);let i;return e[0]!==0&&(i=W(e[0],e[1]).slice(),d.__wbindgen_free(e[0],e[1]*1,1)),i}}Symbol.dispose&&(Mt.prototype[Symbol.dispose]=Mt.prototype.free);function de(){return{__proto__:null,"./vimp_tanks_core_bg.js":{__proto__:null,__wbg_Error_92b29b0548f8b746:function(t,e){return Error(W(t,e))},__wbg___wbindgen_throw_344f42d3211c4765:function(t,e){throw new Error(W(t,e))},__wbindgen_init_externref_table:function(){const t=d.__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 Ft=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>d.__wbg_clientcore_free(n,1));typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>d.__wbg_gamecore_free(n,1));function zt(n,t){return n=n>>>0,fe().subarray(n/4,n/4+t)}function pe(n,t){return n=n>>>0,j().subarray(n/1,n/1+t)}let st=null;function fe(){return(st===null||st.byteLength===0)&&(st=new Float32Array(d.memory.buffer)),st}function W(n,t){return ge(n>>>0,t)}let rt=null;function j(){return(rt===null||rt.byteLength===0)&&(rt=new Uint8Array(d.memory.buffer)),rt}function xt(n,t){const e=t(n.length*1,1)>>>0;return j().set(n,e/1),L=n.length,e}function H(n,t,e){if(e===void 0){const a=nt.encode(n),l=t(a.length,1)>>>0;return j().subarray(l,l+a.length).set(a),L=a.length,l}let i=n.length,s=t(i,1)>>>0;const o=j();let r=0;for(;r<i;r++){const a=n.charCodeAt(r);if(a>127)break;o[s+r]=a}if(r!==i){r!==0&&(n=n.slice(r)),s=e(s,i,i=r+n.length*3,1)>>>0;const a=j().subarray(s+r,s+i),l=nt.encodeInto(n,a);r+=l.written,s=e(s,i,r,1)>>>0}return L=r,s}function Yt(n){const t=d.__wbindgen_externrefs.get(n);return d.__externref_table_dealloc(n),t}let _t=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});_t.decode();const me=2146435072;let wt=0;function ge(n,t){return wt+=t,wt>=me&&(_t=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),_t.decode(),wt=t),_t.decode(j().subarray(n,n+t))}const nt=new TextEncoder;"encodeInto"in nt||(nt.encodeInto=function(n,t){const e=nt.encode(n);return t.set(e),{read:n.length,written:e.length}});let L=0,d;function ye(n,t){return d=n.exports,st=null,rt=null,d.__wbindgen_start(),d}async function xe(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(s){if(n.ok&&e(n.type)&&n.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",s);else throw s}const i=await n.arrayBuffer();return await WebAssembly.instantiate(i,t)}else{const i=await WebAssembly.instantiate(n,t);return i instanceof WebAssembly.Instance?{instance:i,module:n}:i}function e(i){switch(i){case"basic":case"cors":case"default":return!0}return!1}}async function we(n){if(d!==void 0)return d;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),n===void 0&&(n=new URL("/assets/vimp_tanks_core_bg-EoY5gurr.wasm",import.meta.url));const t=de();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:i}=await xe(await n,t);return ye(e)}const ve='@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}',R=(n,t,e)=>n+(t-n)*e,ut=(n,t,e)=>Math.min(e,Math.max(t,n)),Se=n=>n*(Math.PI/180),be=n=>{for(;n>Math.PI;)n-=Math.PI*2;for(;n<-Math.PI;)n+=Math.PI*2;return n},E=(n,t)=>Math.random()*(t-n)+n,Te={mode:"hole",radius:260,softness:.45,minAlpha:.12,layerAlpha:.4,fadeRate:6,lowerTint:11579584},F={shear:.22,levelZStride:100},it={slices:4,rampSegments:4,sideTint:10133674},ct={scaleGain:.1,baseAlpha:.4,alphaFalloff:.12,sizeFactor:1.05},Me=F.levelZStride,A=(n,t)=>n+Me*(t||0);function O(n,t){const e=t?.screen;return!n||!e||!n.scale.x||!n.scale.y?null:{x:(e.width/2-n.position.x)/n.scale.x,y:(e.height/2-n.position.y)/n.scale.y,scaleX:n.scale.x,scaleY:n.scale.y}}function ot(n,t,e,i){return!e||!i?{x:n,y:t}:{x:n+(n-e.x)*i,y:t+(t-e.y)*i}}function N(n,t,e,i=1){const s=typeof i=="number"?i:i.x,o=typeof i=="number"?i:i.y;if(!t||!e){n.scale.set(s,o),n.position.set(0,0);return}n.scale.set(s*(1+e),o*(1+e)),n.position.set(-t.x*e,-t.y*e)}const ee=n=>n.radius*(1-n.softness),Ae=(n,t,e)=>{if(t<=n)return e<t?0:1;const i=Math.min(1,Math.max(0,(e-n)/(t-n)));return i*i*(3-2*i)};function ke({viewLevel:n,viewX:t,viewY:e,level:i,x:s,y:o,cfg:r}){if((i||0)<=(n||0))return 1;if(r.mode==="layer")return r.layerAlpha;const a=s-t,l=o-e,h=Math.sqrt(a*a+l*l),c=Ae(ee(r),r.radius,h);return r.minAlpha+(1-r.minAlpha)*c}function Ie(n,t,e){return(t||0)<(n||0)?e.lowerTint:16777215}const Le=`
|
|
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
|
+
`,Xt=`
|
|
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 Ee(n){const t=new se({uHoleCenter:{value:new Float32Array([0,0]),type:"vec2<f32>"},uHoleParams:{value:new Float32Array([n.radius,ee(n),n.minAlpha]),type:"vec3<f32>"}});return new re({glProgram:oe.from({vertex:ae,fragment:Le,name:"see-through-hole-filter"}),gpuProgram:ne.from({vertex:{source:Xt,entryPoint:"mainVertex"},fragment:{source:Xt,entryPoint:"mainFragment"}}),resources:{holeUniforms:t}})}function Ce(n,{centerX:t,centerY:e,radius:i,softness:s,minAlpha:o}){const r=n.resources.holeUniforms.uniforms;r.uHoleCenter[0]=t,r.uHoleCenter[1]=e,r.uHoleParams[0]=i,r.uHoleParams[1]=i*(1-s),r.uHoleParams[2]=o}async function Vt({baseTexture:n,spriteSheetData:t,map:e,tiles:i,step:s,renderer:o}){const r={};t.frames.forEach((g,m)=>{const[f,v,w,y]=g;r[`frame${m}`]={frame:{x:f,y:v,w,h:y}}});const a={frames:r,meta:{scale:"1"}},l=new le(n,a);await l.parse();const h=e[0].length*s,c=e.length*s,u=new D;for(let g=0,m=e.length;g<m;g+=1)for(let f=0,v=e[g].length;f<v;f+=1){const w=e[g][f];if(i.includes(w)){const y=`frame${w}`,x=l.textures[y];if(x){const _=new I(x);_.x=f*s,_.y=g*s,u.addChild(_)}else console.warn(`Texture not found. Tile: ${w}, sprite: ${y}`)}}const p=o.generateTexture({target:u,frame:new z(0,0,h,c)});return u.destroy({children:!0}),l.destroy(),p}const De={north:{axis:1,sign:-1},south:{axis:1,sign:1},west:{axis:0,sign:-1},east:{axis:0,sign:1}};function Pe(n,t){const e=[];if(!Array.isArray(n)||!n.length||!Array.isArray(t))return e;const i=n.length,s=n.reduce((a,l)=>Math.max(a,l.length),0),o=n.map(a=>new Array(a.length).fill(!1)),r=(a,l,h,c,u,p,g)=>{let m=!1;for(let f=p;f<g;f+=1)for(let v=c;v<u;v+=1)o[f]?.[v]===!1&&(o[f][v]=!0,m=!0);m&&e.push({axis:a,sign:l,rise:h,col0:c,col1:u,row0:p,row1:g})};for(const a of t){const l=De[a?.dir];if(!l)continue;const h=(Number(a.to)||0)-(Number(a.from)||0);if(!(h<=0))if(l.axis===1)for(let c=0;c<s;c+=1){let u=0;for(;u<i;){if(n[u][c]!==a.tile){u+=1;continue}const p=u;for(;u<i&&n[u][c]===a.tile;)u+=1;r(l.axis,l.sign,h,c,c+1,p,u)}}else for(let c=0;c<i;c+=1){const u=n[c];let p=0;for(;p<u.length;){if(u[p]!==a.tile){p+=1;continue}const g=p;for(;p<u.length&&u[p]===a.tile;)p+=1;r(l.axis,l.sign,h,g,p,c,c+1)}}}return Re(e)}function Re(n){const t=new Map;for(const i of n){const s=i.axis===1?`${i.row0}:${i.row1}`:`${i.col0}:${i.col1}`,o=`${i.axis}|${i.sign}|${i.rise}|${s}`,r=t.get(o);r?r.push(i):t.set(o,[i])}const e=[];for(const i of t.values()){const s=a=>a.axis===1?a.col0:a.row0,o=a=>a.axis===1?a.col1:a.row1;i.sort((a,l)=>s(a)-s(l));let r=null;for(const a of i){if(r&&s(a)===o(r)){r.axis===1?r.col1=a.col1:r.row1=a.row1;continue}r={...a},e.push(r)}}return e}const U=0,G=1,Q=2,Ot=3,Bt=4,Nt=5,tt=6,$=7,It=8,dt=9,pt=11,Z=12,Fe=0,ze=1,Ye=2,Xe=3,Ve=4,Oe=5,Be=6,Ne=7,He=9,Ht=10,Wt=0,Ut=1,Gt=2,We=3,Ue=4,Ge=6,$e=0,Ze=1,Ke=2,qe=3,$t=0,Zt=1,je=2,Je=4,Qe=.01,ti=5;let ei=class extends D{constructor(t,e,i){super(),this._baseTexturePromise=null,this._assetUrl=null,this._renderer=i.renderer,this._imageBase=null,this._levelView=i.levelView||null,this._level=0,this._targetAlpha=1,this._hole={strength:0,filter:null,attached:!1},this._occluderHole={strength:0,filter:null,attached:!1},this._occluder=null,this._layer=1,this._worldX=0,this._worldY=0;const s=t.scale;if(this._baseScaleX=typeof s=="number"?s:s.x,this._baseScaleY=typeof s=="number"?s:s.y,this._baseScale={x:this._baseScaleX,y:this._baseScaleY},this._parallaxK=0,this._slices=[],this._rampTexture=null,this.sprite=null,this.mapSprite=null,typeof i.assetsBase!="string"){console.error("Map: сервис assetsBase недоступен — карта останется пустой. Объявите assetsBase в componentDependencies и запустите игру на vimp-engine >= 0.9.0");return}this._imageBase=`${i.assetsBase}img/`,t.type==="static"?(this._assetUrl=`${this._imageBase}${t.spriteSheet.img}`,this._baseTexturePromise=Pt.load(this._assetUrl),this._map=t.map,this._tiles=t.tiles,this._level=t.level||0,this._floor=t.floor||[],this._spriteSheetData=t.spriteSheet,this._step=t.step,this._layer=Number(t.layer)||1,this.zIndex=A(this._layer,this._level),this._parallaxK=this._level*F.shear,this._volume=Number(t.volume)||0,this._ramps=(t.ramps||[]).filter(o=>this._tiles.includes(o.tile)),this._extruding=this._volume>0||this._ramps.length>0,(this._level>=1||this._extruding)&&(this.onRender=()=>this._updateStatic()),this.createStatic()):t.type==="dynamic"&&(this.scale=t.scale,this._assetUrl=`${this._imageBase}${t.img}`,this._baseTexturePromise=Pt.load(this._assetUrl),this._level=t.level||0,this._layer=Number(t.layer)||2,this.zIndex=A(this._layer,this._level),this._rotation=Se(t.angle),this._width=t.width,this._height=t.height,this._x=t.position[0],this._y=t.position[1],this._worldX=this._x*this._baseScaleX,this._worldY=this._y*this._baseScaleY,this._levelView&&(this.onRender=()=>this._updateDynamicSeeThrough()),this.createDynamic())}async createDynamic(){try{const t=await this._baseTexturePromise;if(this.destroyed)return;this.sprite=new I(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.addChild(this.sprite)}catch(t){console.error(`Failed to create dynamic map with asset ${this._assetUrl}:`,t)}}async createStatic(){try{const t=await this._baseTexturePromise;if(this.destroyed)return;const e=await Vt({baseTexture:t,spriteSheetData:this._spriteSheetData,map:this._map,tiles:this._tiles,step:this._step,renderer:this._renderer});if(this.destroyed){e.destroy(!0);return}this.mapSprite=new I(e),N(this.mapSprite,null,this._parallaxK,this._baseScale),this.addChild(this.mapSprite),this._extruding&&await this._createExtrusion(t,e)}catch(t){console.error(`Failed to create static map with asset ${this._assetUrl}:`,t)}}async _createExtrusion(t,e){const i=it.slices,s=F.shear,o=[];if(this._volume>0){this._occluder=new D,this._occluder.zIndex=A(Math.max(this._layer,ti),this._level);for(let a=1;a<=i;a+=1){const l=new I(e);l.tint=a===i?16777215:it.sideTint,o.push({target:l,k:(this._level+this._volume*a/i)*s,occluder:!0})}}const r=this._ramps.length?Pe(this._map,this._ramps):[];if(r.length){const a=this._ramps.map(l=>l.tile);if(this._rampTexture=await Vt({baseTexture:t,spriteSheetData:this._spriteSheetData,map:this._map,tiles:a,step:this._step,renderer:this._renderer}),this.destroyed){const l=this._rampTexture;this._rampTexture=null,l.destroy(!0);return}o.push(...this._createRampMeshes(r,s))}if(!this.destroyed){o.sort((a,l)=>a.k-l.k);for(const a of o)a.base||N(a.target,null,a.k,this._baseScale),(a.occluder?this._occluder:this).addChild(a.target),this._slices.push(a)}}_createRampMeshes(t,e){const i=[],s=this._rampTexture,o=s.width||1,r=s.height||1,a=this._step,l=Math.max(1,Math.round(it.rampSegments)||1);for(const h of t){const c=h.axis===0,u=c?h.col1-h.col0:h.row1-h.row0,p=Math.max(1,u*l),g=h.col0*a,m=h.col1*a,f=h.row0*a,v=h.row1*a,w=p+1,y=this._level*e,x=new Float32Array(w*4),_=new Float32Array(w*4),S=new Float32Array(w*4),M=new Float32Array(w*2),b=new Uint32Array(p*6),Y=1;for(let T=0;T<w;T+=1){const P=T/p,V=h.sign>0?P:1-P,Lt=(this._level+h.rise*V)*e,Et=c?g:f,et=Et+((c?m:v)-Et)*P,ft=c?et:g,mt=c?f:et,gt=c?et:m,yt=c?v:et,X=T*4;x[X]=ft*this._baseScaleX,x[X+1]=mt*this._baseScaleY,x[X+2]=gt*this._baseScaleX,x[X+3]=yt*this._baseScaleY,_[X]=ft/o,_[X+1]=mt/r,_[X+2]=gt/o,_[X+3]=yt/r;const Ct=c?mt+Y:ft+Y,Dt=c?yt-Y:gt-Y,ht=Math.min(Math.max(et,(c?g:f)+Y),(c?m:v)-Y);S[X]=(c?ht:Ct)/o,S[X+1]=(c?Ct:ht)/r,S[X+2]=(c?ht:Dt)/o,S[X+3]=(c?Dt:ht)/r,M[T*2]=Lt,M[T*2+1]=Lt}for(let T=0;T<p;T+=1){const P=T*2,V=T*6;b[V]=P,b[V+1]=P+1,b[V+2]=P+3,b[V+3]=P,b[V+4]=P+3,b[V+5]=P+2}const K=new Rt({texture:s,vertices:x.slice(),uvs:_,indices:b});i.push(this._createRampSkirt({base:x,uvs:S,heights:M,points:w,texture:s,kBase:y,endIndex:h.sign>0?w-1:0})),i.push({target:K,k:(this._level+h.rise)*e,base:x,heights:M})}return i}_createRampSkirt(t){const{base:e,uvs:i,heights:s,points:o,texture:r,kBase:a,endIndex:l}=t,h=o*2+2,c=new Float32Array(h*4),u=new Float32Array(h*4),p=new Float32Array(h*2),g=(o-1)*2+1,m=new Uint32Array(g*6),f=y=>y<o?y*2:y<o*2?(y-o)*2+1:l*2+(y-o*2);for(let y=0;y<h;y+=1){const x=f(y),_=y*4,S=e[x*2],M=e[x*2+1];c[_]=S,c[_+1]=M,c[_+2]=S,c[_+3]=M,u[_]=i[x*2],u[_+1]=i[x*2+1],u[_+2]=i[x*2],u[_+3]=i[x*2+1],p[y*2]=s[x],p[y*2+1]=a}let v=0;for(let y=0;y<3;y+=1){const x=y===2?o*2:y*o,_=y===2?o*2+1:x+o-1;for(let S=x;S<_;S+=1){const M=S*2,b=v*6;m[b]=M,m[b+1]=M+1,m[b+2]=M+3,m[b+3]=M,m[b+4]=M+3,m[b+5]=M+2,v+=1}}const w=new Rt({texture:r,vertices:c.slice(),uvs:u,indices:m});return w.tint=it.sideTint,{target:w,k:a,base:c,heights:p}}_updateStatic(){if(this._attachOccluder(),(this._level>=1||this._occluder)&&this._updateSeeThrough(),!this._parallaxK&&!this._slices.length)return;const t=O(this.parent,this._renderer);if(t){this.mapSprite&&N(this.mapSprite,t,this._parallaxK,this._baseScale);for(let e=0;e<this._slices.length;e+=1){const i=this._slices[e];i.base?this._updateRampMesh(i,t):N(i.target,t,i.k,this._baseScale)}}}_attachOccluder(){const t=this.parent;!this._occluder||!t||this._occluder.parent===t||t.addChild(this._occluder)}_updateRampMesh(t,e){const{target:i,base:s,heights:o}=t,r=i.vertices;for(let a=0,l=o.length;a<l;a+=1){const h=s[a*2],c=s[a*2+1],u=o[a];r[a*2]=h+(h-e.x)*u,r[a*2+1]=c+(c-e.y)*u}i.vertices=r}_updateSeeThrough(){if(!this._levelView)return;const t=this._levelView.cfg,e=B.shared.deltaMS/1e3,i=Math.min(1,t.fadeRate*e);this.mapSprite&&this._updateLayerSeeThrough(t,i),this._occluder&&this._updateOccluderSeeThrough(t,i,O(this.parent,this._renderer))}_updateLayerSeeThrough(t,e){if(this._levelView.mode==="layer"){const s=this._levelView.level<this._level&&this._hasFloorAt(this._levelView.x,this._levelView.y);this._targetAlpha=s?t.layerAlpha:1,this.alpha+=(this._targetAlpha-this.alpha)*e;return}const i=this._levelView.level<this._level;this._hole.strength+=((i?1:0)-this._hole.strength)*e,this._applyHole(this,this._hole,t)}_updateOccluderSeeThrough(t,e,i){const s=this._level>this._levelView.level;if(this._levelView.mode==="layer"){const r=s?t.layerAlpha:1;this._occluder.alpha+=(r-this._occluder.alpha)*e;return}const o=s||this._volumeHidesPlayer(i);this._occluderHole.strength+=((o?1:0)-this._occluderHole.strength)*e,this._applyHole(this._occluder,this._occluderHole,t)}_volumeHidesPlayer(t){if(!t||!this._map)return!1;const e=this._levelView,i=F.shear,s=ot(e.x,e.y,t,e.z*i),o=it.slices;for(let r=1;r<=o;r+=1){const a=(this._level+this._volume*r/o)*i,l=1+a;if(this._hasLayerTileAt((s.x+t.x*a)/l,(s.y+t.y*a)/l))return!0}return!1}_applyHole(t,e,i){const s=this.parent;if(e.strength<Qe||!s){e.attached&&(t.filters=[],e.attached=!1);return}e.filter||(e.filter=Ee(i)),e.attached||(t.filters=[e.filter],e.attached=!0);const o=O(s,this._renderer),r=ot(this._levelView.x,this._levelView.y,o,this._levelView.z*F.shear);Ce(e.filter,{centerX:r.x*s.scale.x+s.position.x,centerY:r.y*s.scale.y+s.position.y,radius:i.radius*s.scale.x,softness:i.softness,minAlpha:1+(i.minAlpha-1)*e.strength})}_updateDynamicSeeThrough(){!this._levelView||!this.sprite||(this.alpha=this._levelView.alphaFor(this._level,this._worldX,this._worldY),this.tint=this._levelView.tintFor(this._level),this._level&&N(this,O(this.parent,this._renderer),this._level*F.shear,this._baseScale))}_hasLayerTileAt(t,e){const i=Math.floor(t/this._baseScaleX/this._step),s=Math.floor(e/this._baseScaleY/this._step),o=this._map?.[s]?.[i];return o!==void 0&&this._tiles.includes(o)}_hasFloorAt(t,e){const i=Math.floor(t/this._baseScaleX/this._step),s=Math.floor(e/this._baseScaleY/this._step),o=this._map?.[s]?.[i];return o!==void 0&&this._floor.includes(o)}update(t){this.sprite&&(this.sprite.x=t[$t]/this._baseScaleX,this.sprite.y=t[Zt]/this._baseScaleY,this.sprite.rotation=t[je]),this._worldX=t[$t],this._worldY=t[Zt];const e=t[Je]||0;e!==this._level&&(this._level=e,this.zIndex=A(this._layer,e),e||N(this,null,0,this._baseScale))}destroy(t){if(this._hole.filter&&(this.filters=[],this._hole.attached=!1,this._hole.filter.destroy(),this._hole.filter=null),this._occluder){const o=this._occluder;this._occluder=null,o.filters=[],this._occluderHole.attached=!1,this._occluderHole.filter&&(this._occluderHole.filter.destroy(),this._occluderHole.filter=null),o.parent?.removeChild(o),o.destroy({children:!0,texture:!1,textureSource:!1})}const e=this.mapSprite,i=this._rampTexture,s=this._slices;this.mapSprite=null,this._rampTexture=null,this._slices=[];for(const o of s)o.target.destroyed||(o.target.texture=he.EMPTY);e&&this.removeChild(e),super.destroy({children:!0,texture:!1,textureSource:!1,...t}),i&&i.destroy(!0),e&&e.destroy({children:!0,texture:!0,textureSource:!0}),this.sprite=null,this._baseTexturePromise=null,this._assetUrl=null,this._map=null,this._tiles=null,this._floor=null,this._ramps=null,this._spriteSheetData=null,this._renderer=null,this._levelView=null}};const Kt=[16777215,9418751,10477760,15783820,14721232,10541296,15773836,12632280],ie=n=>Kt[n]??Kt[0],ii=2,si=.35;class ri 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=A(ii,this._level),this.scale=t.scale,this._draws=this._tiles.some(s=>this._solid.includes(s)),this.radarGraphics=new C,this.addChild(this.radarGraphics),this._levelView=i.levelView||null,this._levelView&&this._draws&&(this.onRender=()=>{this.alpha=this._levelView.level===this._level?1:si}),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 s=0;s<i.length;s+=1){const o=i[s];this._solid.includes(o)&&t.rect(s*this._step,e*this._step,this._step/2,this._step/2)}}t.fill(ie(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 qt=2,ni=9,oi=1.5;class ai extends D{constructor(t,e){super(),this._level=t[Z]||0,this.zIndex=A(qt,this._level),this._textures=e.tankRadarTexture,this.body=new I,this.body.anchor.set(.5),this.levelRing=new C,this.addChild(this.levelRing,this.body),this._drawLevelRing(),this.x=t[U]||0,this.y=t[G]||0,this._condition=t[$],this._teamId=t[dt],this.scale.set(5,5),this.create()}_drawLevelRing(){this.levelRing.clear(),this._level>0&&this.levelRing.circle(0,0,ni).stroke({width:oi,color:ie(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[U],this.y=t[G];const e=t[Z]||0;e!==this._level&&(this._level=e,this.zIndex=A(qt,e),this._drawLevelRing());const i=t[$],s=t[dt];let o=!1;i!==void 0&&i!==this._condition&&(this._condition=i,o=!0),s!==void 0&&s!==this._teamId&&(this._teamId=s,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}}const vt=3,li=1,jt=1.15,hi=1.25,ci=.6,_i=1,ui=.015,di=2.5;function pi(n,t=0){const e=Number.isFinite(n)?n:0,i=ut(e,0,1),s=Math.max(0,e-1),o=R(li,jt,i)+(hi-jt)*s,r=R(ci,_i,i),a=1+ui*(1-i)*Math.sin(2*Math.PI*di*(t/1e3));return{rate:o*a,volumeFactor:r}}class fi extends D{constructor(t,e,i,s){super(),this.body=new I,this.gun=new I,this.wreck=new I,this.body.anchor.set(.5),this.wreck.anchor.set(.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[U]||0,this._worldY=t[G]||0,this.x=this._worldX,this.y=this._worldY,this.rotation=t[Q]||0,this.gun.rotation=t[Ot]||0,this._engineLoad=t[tt]||0,this._condition=t[$],this._size=t[It],this._teamId=t[dt],this._z=t[pt]||0,this._level=t[Z]||0,this.zIndex=A(vt,this._level),this._isLocal=()=>i.localPlayer?.is(s?.id)===!0,this._levelView=i.levelView||null,this.onRender=()=>this._updateView();const o=this._teamId===1?this._textures.liveTeamId1:this._textures.liveTeamId2,r=o?o.gunAnchor:null;r?this.gun.anchor.set(r.x,r.y):this.gun.anchor.set(.5);const a=10;this._scaleFactor=this._size/a,this.body.scale.set(this._scaleFactor),this.gun.scale.set(this._scaleFactor),this.wreck.scale.set(this._scaleFactor),this._soundManager=i.soundManager,this._soundId=null;const l=this._soundManager.getSoundConfig("tankEngine");this._baseEngineVolume=l?.volume||0,this._hasEngineSound=!!l,this.create()}_initSounds(){this._soundId||this._condition===0||!this._hasEngineSound||(this._soundId=this._soundManager.registerSound("tankEngine",this._getSoundData()))}_getSoundData(){const{rate:t,volumeFactor:e}=pi(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.gun.rotation=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()}}update(t){this._worldX=t[U],this._worldY=t[G],this.rotation=t[Q],this.gun.rotation=t[Ot],this._engineLoad=t[tt]||0;const e=t[Z]||0;this._z=t[pt]||0,e!==this._level&&(this._level=e,this.zIndex=A(vt,e));const i=1+this._z*F.shear,s=this._scaleFactor*i;this.body.scale.set(s,s),this.gun.scale.set(s,s),this.wreck.scale.set(s,s),this._levelView&&this._isLocal()&&this._levelView.set(e,this._worldX,this._worldY,this._z),this._condition>0&&(this._soundId===null?this._initSounds():this._soundManager.updateSoundData(this._soundId,this._getSoundData()));const o=t[$],r=t[dt];let a=!1;o!==void 0&&o!==this._condition&&(this._condition=o,a=!0),r!==void 0&&r!==this._teamId&&(this._teamId=r,a=!0),a&&this.create()}_updateView(){this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this._worldX,this._worldY),this.tint=this._levelView.tintFor(this._level));const t=O(this.parent,this._renderer),e=ot(this._worldX,this._worldY,t,this._z*F.shear);this.position.set(e.x,e.y),this._updateShadow()}_updateShadow(){if(!this._shadowAsset||!this.parent)return;if(!this._shadow){const{texture:i,contentSize:s}=this._shadowAsset;this._shadow=new I(i),this._shadow.anchor.set(.5),this._shadowScale=this._size*4*ct.sizeFactor/s,this.parent.addChild(this._shadow)}const t=this._shadow,e=this._condition!==0;t.visible=e,e&&(t.x=this._worldX,t.y=this._worldY,t.rotation=this.rotation,t.scale.set(this._shadowScale*(1+this._z*ct.scaleGain)),t.alpha=Math.max(0,ct.baseAlpha-this._z*ct.alphaFalloff)*this.alpha,t.zIndex=A(vt-1,Math.floor(this._z)))}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 mi=2;class gi extends D{constructor(t,e,i){super(),this._level=t[Ge]||0,this.zIndex=A(mi,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 I(e.bombTexture),this.body.anchor.set(.5),this._worldX=t[Wt],this._worldY=t[Ut],this.x=this._worldX,this.y=this._worldY,this.rotation=t[Gt],this._size=t[We],this._totalDurationMs=t[Ue],this._soundManager=i.soundManager,this._soundId=null;const s=e.bombTexture.width,o=this._size/s;this.body.scale.set(o);const r=64,a=this._size/1.2/r;this.text=new ce({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),B.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[Wt],this._worldY=t[Ut],this.x=this._worldX,this.y=this._worldY,this.rotation=t[Gt],this._soundId&&(this._soundManager.updateSoundData(this._soundId,{position:{x:this._worldX,y:this._worldY}})||(this._soundId=null))}_applyHeight(){const t=this._level*F.shear,e=O(this.parent,this._renderer),i=ot(this._worldX,this._worldY,e,t);this.position.set(i.x,i.y),this.scale.set(1+t)}_stopTimer(){this._tickListener&&(B.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 lt 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),B.shared.add(this._tickListener),this._onEffectStart(),this.isComplete||this._update(0))}_onEffectStart(){}_update(){}_completeEffect(){this.isComplete||(this.isComplete=!0,this._tickListener&&(B.shared.remove(this._tickListener),this._tickListener=null),typeof this.onComplete=="function"&&this.onComplete())}destroy(t){this.isComplete=!0,this._tickListener&&(B.shared.remove(this._tickListener),this._tickListener=null),this.parent&&this.parent.removeChild(this),super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class yi extends lt{constructor(t,e,i,s,o){super(s);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 I(r),this._mainBody.anchor.set(.5),this._mainBody.tint=11393254,this._mainBody.scale.set(this._baseScale),this._core=new I(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=s=>s*s;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 St=[],J={get(n){if(St.length>0){const t=St.pop();return t.texture=n,t.alpha=1,t.scaleX=1,t.scaleY=1,t.rotation=0,t.tint=16777215,t.anchorX=.5,t.anchorY=.5,t}return new _e({texture:n,anchorX:.5,anchorY:.5})},release(n){n&&St.push(n)}},At=50,xi=400,wi=800;class vi extends lt{constructor(t,e=At){super();const i=e/At;this._blastScale=i;const{texture:s,contentSize:o}=t.explosionTexture;this.explosionTexture=s,this._unitScale=1/o;const r=xi*i,a=wi*i;this._particleContainer=new te({texture:this.explosionTexture,boundsArea:new z(-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=J.get(this.explosionTexture),e=.2+Math.random()*.4,i=Math.floor(e*255);t.tint=i<<16|i<<8|i;const s=(this._minStartSize+Math.random()*(this._maxStartSize-this._minStartSize))*this._unitScale,o=.6+Math.random()*.8,r=.6+Math.random()*.8;t.scaleX=s*o,t.scaleY=s*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:s};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],s=i.view;if(i.life+=t,i.life>=i.maxLife)this._particleContainer.removeParticle(s),J.release(s),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;s.x+=(i.vx+r)*(t/16),s.y+=i.vy*(t/16),s.rotation+=i.rotationSpeed*(t/16);const a=1-Math.pow(1-o,3),l=i.startScale+(i.targetScale-i.startScale)*a;if(s.scaleX=l*i.aspectRatioX,s.scaleY=l*i.aspectRatioY,o<.1)s.alpha=o/.1*this._startAlpha;else if(o>.4){const h=(o-.4)/.6;s.alpha=this._startAlpha*(1-h)}else s.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)J.release(this._particles[e].view);this._particles=[],super.destroy(t)}}const Si=.168,bi=.225,Jt=.15,Ti=2e4,Mi=50,Ai=4e3,ki=4e3;class Ii extends lt{constructor(t,e,i,s,o){super(s),this._assets=o,this._radius=i,this.x=t,this.y=e,this._funnelDurationMs=Ti,this._funnelFadeInDurationMs=Mi,this._funnelFadeDurationMs=Ai,this._elapsedMs=0,this._smokeDurationMs=ki,this._smokeSpawningStopped=!1,this._funnel=this._createFunnelSprite(),this._smoke=new vi(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)],s=new I(i);s.anchor.set(.5),s.alpha=0,s.rotation=Math.random()*Math.PI*2;const o=this._radius*Si*E(1-Jt,1+Jt);return s.scale.set(o/e),s}_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,s=e/this._funnelFadeDurationMs;this._funnel.alpha=bi*ut(Math.min(i,s),0,1),e<=0&&this._completeEffect()}destroy(t){this._smoke&&(this._smoke.destroy(),this._smoke=null),this._funnel=null,super.destroy(t)}}const Li=4,Ei=2;class Ci extends D{constructor(t,e,i){super(),this.originX=t[$e],this.originY=t[Ze],this.radius=t[Ke]??At,this._level=t[qe]||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*F.shear,e=O(this.parent,this._renderer),i=ot(this.originX,this.originY,e,t);for(const s of[this.explosion,this.funnel])s&&(s.position.set(i.x,i.y),s.scale.set(1+t))}run(){if(!(this._isDestroyed||this._isStarted)){if(this._isStarted=!0,!this.parent){this.destroy();return}this.explosion=new yi(this.originX,this.originY,this.radius,this._onExplosionComplete.bind(this),this._assets),this.explosion.zIndex=A(Li,this._level),this.funnel=new Ii(this.originX,this.originY,this.radius,this._onFunnelComplete.bind(this),this._assets),this.funnel.zIndex=A(Ei,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 Qt=4,q=400,Di=0,Pi=0,Ri=8,k={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};class Fi extends D{constructor(t,e,i={}){super(),this._level=t[Z]||0,this.zIndex=A(Qt,this._level);const{texture:s,contentSize:o}=e.smokeTexture;this._smokeTexture=s,this._textureScale=Ri/o,this._emitterX=t[U],this._emitterY=t[G],this._emitterRotation=t[Q],this._emitterVX=t[Bt],this._emitterVY=t[Nt],this._engineLoad=t[tt],this._condition=t[$],this._z=t[pt]||0,this._size=t[It],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.tint=this._levelView.tintFor(this._level)),N(this,O(this.parent,this._renderer),this._z*F.shear,1)}),this._particleContainer=new te({texture:this._smokeTexture,boundsArea:new z(this._emitterX-q,this._emitterY-q,q*2,q*2),dynamicProperties:{position:!0,vertex:!0,rotation:!0,color:!0}}),this.addChild(this._particleContainer),this._timeSinceLastSpawn=0,this._tickListener=r=>this._updateParticles(r.deltaMS),B.shared.add(this._tickListener)}update(t){const e=this._condition,i=t[Z]||0;i!==this._level&&(this._level=i,this.zIndex=A(Qt,i)),this._emitterX=t[U],this._emitterY=t[G],this._emitterRotation=t[Q],this._emitterVX=t[Bt],this._emitterVY=t[Nt],this._engineLoad=t[tt],this._condition=t[$],this._z=t[pt]||0,this._particleContainer.boundsArea.x=this._emitterX-q,this._particleContainer.boundsArea.y=this._emitterY-q,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=k.burstParticleCount,i=Math.ceil(e/t);for(let s=0;s<i;s+=1)for(let o=0;o<t;o+=1)this.spawnParticle(o,t,!0)}}_updateParticles(t){if(t<=0)return;const e=t/1e3;this._timeSinceLastSpawn+=t;let i=0;this._condition===3?i=0:this._condition===1?i=2:(this._condition===2||this._condition===0)&&(i=1);const s=k.particleSpawnRate[this._condition]||0,o=s>0?1e3/s:1/0;if(i>0&&s>0)for(;this._timeSinceLastSpawn>=o;){for(let l=0;l<i;l+=1)this.spawnParticle(l,i);this._timeSinceLastSpawn-=o}else this._timeSinceLastSpawn=0;const a=1-Math.pow(k.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),J.release(h.view),this._particles.splice(l,1);continue}h.vx=h.vx+(Di-h.vx)*a,h.vy=h.vy+(Pi-h.vy)*a,h.x+=h.vx*e,h.y+=h.vy*e;const c=h.age/h.lifetime,u=1-(1-c)*(1-c),p=R(h.startSizeFactor,h.endSizeFactor,u),g=R(h.startAlpha,h.endAlpha,c),m=p*this._particleScaleMultiplier*this._textureScale,f=h.view;f.x=h.x,f.y=h.y,f.scaleX=m,f.scaleY=m,f.alpha=g,f.rotation+=h.rotSpeed*e}}spawnParticle(t,e,i=!1){const s=E(k.particleLifetime.min,k.particleLifetime.max);let o=k.particleStartSizeFactor[this._condition]||.3,r=k.particleEndSizeFactor[this._condition]||1,a=k.particleStartAlpha,l=1;i&&(o*=2,r*=2.5,a=.8,l=2);const h=this._emitterRotation,c=h+Math.PI,u=Math.cos(c),p=Math.sin(c),g=h+Math.PI/2,m=Math.cos(g),f=Math.sin(g);let v=0;const w=this._width/2*k.streamOffsetFactor;e===2?v=t===0?-w:w:e===3&&(v=(t-1)*w);const y=this._height*.22,x=this._emitterX+u*y+m*v,_=this._emitterY+p*y+f*v;let S=E(k.particleInitialVelocity.away.min,k.particleInitialVelocity.away.max),M=E(k.particleInitialVelocity.side.min,k.particleInitialVelocity.side.max);S*=l,M*=l;let b=u*S+m*M,Y=p*S+f*M;const K=k.particleVelocityVariance;b+=E(-K,K),Y+=E(-K,K),b+=this._emitterVX,Y+=this._emitterVY;const T=J.get(this._smokeTexture);T.tint=k.particleColor,T.x=x,T.y=_,T.alpha=a;const P=o*this._particleScaleMultiplier*this._textureScale;T.scaleX=P,T.scaleY=P,T.rotation=E(0,Math.PI*2);const V={view:T,x,y:_,vx:b,vy:Y,age:0,lifetime:s,startSizeFactor:o,endSizeFactor:r,startAlpha:a,endAlpha:k.particleEndAlpha,rotSpeed:E(-1,1)};this._particleContainer.addParticle(T),this._particles.push(V)}_stopTimer(){this._tickListener&&(B.shared.remove(this._tickListener),this._tickListener=null)}destroy(t){this._stopTimer();for(let e=0;e<this._particles.length;e+=1)J.release(this._particles[e].view);this._particles=[],super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class zi extends I{constructor(t,e,i,s,o,r,a){super(a),this.anchor.set(.5),this.x=t,this.y=e,this.rotation=i,this.width=o,this.height=s,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 bt=1;class Yi extends D{constructor(t,e,i={}){super(),this._levelView=i.levelView||null,this._renderer=i.renderer||null,this._level=t[Z]||0,this._markLayers=new Map,this.zIndex=A(bt,this._level),this._currentX=t[U]||0,this._currentY=t[G]||0,this._currentRotation=t[Q]||0,this._engineLoad=t[tt]||0,this._condition=t[$],this._size=t[It],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 s=this._size*3;this._trackOffset=s/2*.7,this._backwardOffset=s*.4,this._trackInitialAlpha=.4,this._tickListener=o=>this._internalUpdate(o.deltaMS),B.shared.add(this._tickListener),this._levelView&&(this.onRender=()=>this._updateLayers())}update(t){this._currentX=t[U],this._currentY=t[G],this._currentRotation=t[Q],this._engineLoad=t[tt],this._condition=t[$];const e=t[Z]||0;e!==this._level&&(this._level=e,this.zIndex=A(bt,e))}_markLayer(t){let e=this._markLayers.get(t);if(e)return e;e=new D,e.zIndex=A(bt,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 g of this._markLayers.values())for(let m=g.children.length-1;m>=0;m-=1){const f=g.children[m];f.update(t)&&f.destroy()}const e=this._currentX-this._prevX,i=this._currentY-this._prevY,s=Math.sqrt(e*e+i*i),o=be(this._currentRotation-this._prevRotation),r=Math.abs(o),a=s-this._prevSpeed,l=Math.abs(a),h=r-this._prevAngularSpeed,c=Math.abs(h),u=performance.now();let p=!1;this._condition!==0&&u-this._lastTrackMarkTime>this._trackMarkCooldown&&(l>this._minAbsAccelerationForMark&&(p=!0),s>this._minSpeedForRotationMarks&&(r>this._minAngularSpeedForMark||c>this._minRotationAccelerationForMark)&&(p=!0)),this._engineLoad>1&&(p=!0),p&&(this.createTrackMarksAtPreviousPosition(),this._lastTrackMarkTime=u),this._prevX=this._currentX,this._prevY=this._currentY,this._prevRotation=this._currentRotation,this._prevSpeed=s,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,s=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+s+r,h=new zi(a,l,this._prevRotation,this._trackWidth,this._trackLength,this._trackInitialAlpha,this._assets.trackMarkTexture);t.addChild(h)}}_updateLayers(){if(!this._markLayers.size)return;const t=O(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&&N(i,t,e*F.shear)}_stopTimer(){this._tickListener&&(B.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})}}class Xi extends lt{constructor(t,e,i,s,o){super(o),this.startPositionX=t,this.startPositionY=e,this.endPositionX=i,this.endPositionY=s,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 C,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,s,o){this.graphics.circle(t,e,i),this.graphics.fill({color:s,alpha:ut(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=R(this.startPositionX,this.endPositionX,e),s=R(this.startPositionY,this.endPositionY,e),o=R(this.config.alphaStart,this.config.alphaEnd,e),r=Math.sin(this.elapsedTime*this.config.alphaPulseFrequency)*this.config.alphaPulseAmplitude;let a=o+r;a=ut(a,0,this.config.alphaStart);const l=Math.pow(e,this.config.trailShrinkPower),h=R(this.config.trailLength,0,l),c=this.totalDist*e;if(c>=this.config.trailStartOffset){let u=c;this.totalDist>.001&&(u=Math.max(0,c-this.config.trailStartOffset));const p=Math.min(u,h);let g,m;this.totalDist>.001?(g=i-this.nx*p,m=s-this.ny*p):(g=i,m=s);const f=Math.hypot(i-g,s-m);if(f<this.config.segmentRadius*.5&&this.totalDist===0)this._drawSegment(i,s,this.config.segmentRadius,this.config.color,a);else if(f>=this.config.segmentRadius*.5){const v=Math.max(1,this.config.segmentCount);for(let w=0;w<v;w++){let y=.5;v>1&&(y=w/(v-1));const x=R(g,i,y),_=R(m,s,y),S=R(1,.8,y);this._drawSegment(x,_,this.config.segmentRadius,this.config.color,a*S)}}}}this.elapsedTime>=this.animationDuration&&(this.graphics.clear(),this._completeEffect())}destroy(t){this.graphics&&this.graphics.clear(),super.destroy(t)}}class Vi extends lt{constructor(t,e,i,s,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:E(2,4),particleMinSize:.8,particleMaxSize:2.4,minInitialSpeed:10,maxInitialSpeed:300,minLifetime:8e3,maxLifetime:15e3,color:[3355443,2236962,4473924],fadeOutStart:.8,impactDirectionX:i,impactDirectionY:s,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 s=0,o=this.config.particleCount;s<o;s+=1){let r;this.useOmnidirectionalSpread?r=Math.random()*Math.PI*2:r=t+E(-i,i);const a=E(this.config.minInitialSpeed,this.config.maxInitialSpeed),l=new I(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:E(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:E(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 s=0,o=this.particlesData.length;s<o;s+=1){const r=this.particlesData[s];if(!r.active)continue;if(i+=1,r.age+=t,r.isMoving){const c=Math.hypot(r.vx,r.vy);if(c>0){const p=c*this.config.dragCoefficient*e,g=Math.max(0,1-p/c);r.vx*=g,r.vy*=g}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 c=r.timeSinceStopped-this.config.lingerDuration,u=Math.min(500,r.lifetime*(1-this.config.fadeOutStart));r.alpha=R(1,0,Math.min(c/u,1))}else if(a>=this.config.fadeOutStart){const c=r.age-r.lifetime*this.config.fadeOutStart,u=r.lifetime*(1-this.config.fadeOutStart);r.alpha=u>0?R(1,0,Math.min(c/u,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 Oi=2;class Bi extends D{constructor(t,e,i){super(),this.startPositionX=t[Fe],this.startPositionY=t[ze],this.endPositionX=t[Ye],this.endPositionY=t[Xe],this.soundPositionX=t[Ve],this.soundPositionY=t[Oe],this.hit=t[Be],this.endLevel=t[He]||0,this.zIndex=A(Oi,this.endLevel),this.anchorKey=null,this.anchorLocalX=0,this.anchorLocalY=0,Array.isArray(t[Ht])&&([this.anchorKey,this.anchorLocalX,this.anchorLocalY]=t[Ht]),this._assets=e,this._soundManager=i.soundManager,this._isLocalShot=i.localPlayer?.is(t[Ne])===!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)),N(this,O(this.parent,this._renderer),this.endLevel*F.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 Xi(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,s=e-this.startPositionY,o=Math.hypot(i,s);let r=0,a=0;o>.001&&(r=-(i/o),a=-(s/o)),this.impact=new Vi(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 Ni={Map:ei,MapRadar:ri,TankRadar:ai,Tank:fi,Bomb:gi,ExplosionEffect:Ci,Smoke:Fi,Tracks:Yi,ShotEffect:Bi},Hi=4;function at(n){return Math.ceil(n*Hi)}function Tt(n,t){const{radius:e,blur:i,color:s,quality:o=40}=n,r=new C,a=(e+at(i))*2,l=a/2;r.circle(l,l,e),r.fill(s);const h=new kt({strength:i,quality:o});h.padding=at(i),r.filters=[h];const c=t.generateTexture({target:r,frame:new z(0,0,a,a)});return r.destroy(!0),{texture:c,contentSize:e*2}}function Wi(n,t){const{baseRadius:e,irregularity:i=0,blur:s=0,numPoints:o=20,colorFill:r,colorRim:a=r,rimWidth:l=0,variants:h=1}=n,c=Math.max(1,Math.floor(h)||1),u=(e+i+l)*2,p=u+at(s)*2,g=p/2,m=[];for(let f=0;f<c;f+=1){const v=new C,w=[];for(let x=0;x<o;x+=1){const _=x/o*Math.PI*2,S=e+E(-i,i);w.push(g+S*Math.cos(_),g+S*Math.sin(_))}v.poly(w).fill(r).stroke({width:l,color:a,alignment:1});const y=new kt({strength:s,quality:10});y.padding=at(s),v.filters=[y],m.push(t.generateTexture({target:v,frame:new z(0,0,p,p)})),v.destroy(!0)}return{textures:m,contentSize:u}}function Ui(n,t){const{colors:e}=n,i={},s=10,o=s*4,r=s*3,a=15658734,l=c=>{const u=new C,p=new C,g=o,m=r;u.rect(-g/2,-m/2,g,m).fill(5592405).rect(-g/2+1,-m/2+1,g-2,m-2).fill(10066329).rect(-g/2+2,-m/2+2,g-4,m-4).fill(13421772).rect(-g/2+3,-m/2+3,g-6,m-6).fill(a),p.moveTo(1.33*s,-.42*s).lineTo(.42*s,-1*s).lineTo(-.42*s,-1*s).lineTo(-1.33*s,-.42*s).lineTo(-1.33*s,.42*s).lineTo(-.42*s,1*s).lineTo(.42*s,1*s).lineTo(1.33*s,.42*s).closePath().fill(c).stroke({width:.17*s,color:11184810}).moveTo(2.33*s,-.25*s).lineTo(.25*s,-.25*s).lineTo(.25*s,.25*s).lineTo(2.33*s,.25*s).closePath().stroke({width:.17*s,color:11184810}).fill(c);const f=u.getBounds(),v=t.generateTexture({target:u,frame:new z(f.x,f.y,f.width,f.height)}),w=p.getBounds(),y=t.generateTexture({target:p,frame:new z(w.x,w.y,w.width,w.height)}),x={x:-w.x/w.width,y:-w.y/w.height};return u.destroy(!0),p.destroy(!0),{body:v,gun:y,gunAnchor:x}},h=()=>{const c=new D,u=new C,p=new C;c.addChild(u,p);const g=3815994,m=2434341,f=3158064,v=1579032,w=5263440,y=o,x=r,_=s;u.moveTo(-y/2-_*.1,-x/2+_*.2).lineTo(y/2+_*.2,-x/2-_*.1).lineTo(y/2-_*.1,x/2+_*.3).lineTo(-y/2+_*.3,x/2-_*.2).closePath().fill(g).stroke({width:_*.2,color:w,alignment:.5}),u.moveTo(-y/2+_*.4,-x/2+_*.5).lineTo(y/2-_*.3,-x/2+_*.2).lineTo(y/2-_*.4,x/2-_*.1).lineTo(-y/2+_*.2,x/2-_*.4).closePath().fill(m),u.circle(y*.15,x*.1,_*1.2).fill(v),u.circle(-y*.3,-x*.25,_*.5).fill(v),p.position.set(_*.3,-_*.2);const S=[_*1.1,-_*.7,_*.2,-_*1,-_*.6,-_*.9,-_*1.3,-_*.2,-_*1.1,_*.6,-_*.2,_*1,_*.7,_*.8,_*1.3,_*.1];p.poly(S).fill(f).stroke({width:_*.15,color:w,alignment:0});const M=[_*.8,-_*.25,_*1.5,-_*.4,_*1.4,_*.15,_*.7,_*.05];p.poly(M).fill(f).stroke({width:_*.1,color:w,alignment:0}),p.circle(_*.1,-_*.2,_*.4).fill(v);const b=c.getBounds(),Y=t.generateTexture({target:c,frame:new z(b.x,b.y,b.width,b.height)});return c.destroy({children:!0}),Y};return i.liveTeamId1=l(e.teamId1),i.liveTeamId2=l(e.teamId2),i.destroyed=h(),i}function Gi(n,t){const{radius:e,borderWidth:i,crossSize:s,crossThickness:o,colors:r}=n,a={},l=(e+i)*2,h=l/2,c=15658734,u=3355443,p=m=>{const f=new C;f.circle(h,h,e).fill(c),f.circle(h,h,e-i).fill(m);const v=t.generateTexture({target:f,frame:new z(0,0,l,l)});return f.destroy(!0),v},g=()=>{const m=new C,f=s/2;m.moveTo(h-f,h-f).lineTo(h+f,h+f).moveTo(h-f,h+f).lineTo(h+f,h-f).stroke({width:o,color:u});const v=t.generateTexture({target:m,frame:new z(0,0,l,l)});return m.destroy(!0),v};return a.liveTeamId1=p(r.teamId1),a.liveTeamId2=p(r.teamId2),a.destroyed=g(),a}function $i(n,t){const{colorOuter:e,colorInner:i}=n,s=new C,o=20,r=1;s.rect(0,0,o,o).fill(e),s.rect(r,r,o-r*2,o-r*2).fill(i);const a=t.generateTexture({target:s,frame:new z(0,0,o,o)});return s.destroy(!0),a}function Zi(n,t){const{width:e,length:i,color:s}=n,o=new C;o.rect(0,0,i,e).fill(s);const r=t.generateTexture({target:o,frame:new z(0,0,i,e)});return o.destroy(!0),r}function Ki(n,t){const{width:e,height:i,radius:s,blur:o,color:r,quality:a=20}=n,l=new C,h=at(o),c=e+h*2,u=i+h*2;l.roundRect(h,h,e,i,s),l.fill(r);const p=new kt({strength:o,quality:a});p.padding=h,l.filters=[p];const g=t.generateTexture({target:l,frame:new z(0,0,c,u)});return l.destroy(!0),{texture:g,contentSize:e}}const qi={explosionTexture:Tt,smokeTexture:Tt,impactParticleTexture:Tt,tankShadowTexture:Ki,funnelTexture:Wi,tankTexture:Ui,tankRadarTexture:Gi,bombTexture:$i,trackMarkTexture:Zi},ji=n=>(n??"").split(/[?#]/)[0].endsWith(".js"),Ji=n=>import(n);function Qi(n=Te){const t={level:0,x:0,y:0,z:0};return{set(e,i,s,o=0){t.level=e,t.x=i,t.y=s,t.z=o},alphaFor(e,i,s){return ke({viewLevel:t.level,viewX:t.x,viewY:t.y,level:e,x:i,y:s,cfg:n})},tintFor(e){return Ie(t.level,e,n)},get cfg(){return n},get mode(){return n.mode},get level(){return t.level},get x(){return t.x},get y(){return t.y},get z(){return t.z}}}const ss={id:"tanks",engineApi:ue,requires:["map.layers","map.levelsN"],async createClientCore(n,{wasmUrl:t}){if(ji(t)){const i=await Ji(t);return{core:new i.ClientCore(n),memory:null}}const e=await we({module_or_path:t});return{core:new Mt(n),memory:e.memory}},parts:Ni,bakers:qi,styles:ve,serviceNames:["levelView","mapDynamics"],hooks:{services(n){return{levelView:Qi(),mapDynamics:{toWorld(e,i,s){const o=n.map_dynamics_to_world(e,i,s);return o.length===0?null:{x:o[0],y:o[1]}}}}},onAuth(n,t){n.set_model(t.model)},onPanel(n,t){n.sync_panel(JSON.stringify(t))},onLocalAction(n,t,e,i){return t!=="down"?null:e==="fire"?n.try_fire(i)||null:((e==="nextWeapon"||e==="prevWeapon")&&n.cycle_weapon(e==="prevWeapon"),null)}}};export{ss as default};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
class Q{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_gamecore_free(e,0)}abi_describe(){let e,a;try{const r=s.gamecore_abi_describe(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}alive_players(){const e=s.gamecore_alive_players(this.__wbg_ptr);var a=se(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*4,4),a}apply_aim(e,a,r,n,o){s.gamecore_apply_aim(this.__wbg_ptr,e,a,r,n,o)}apply_input(e,a,r,n){const o=b(r,s.__wbindgen_malloc,s.__wbindgen_realloc),i=u,l=b(n,s.__wbindgen_malloc,s.__wbindgen_realloc),d=u;s.gamecore_apply_input(this.__wbg_ptr,e,a,o,i,l,d)}body_has_events(){return s.gamecore_body_has_events(this.__wbg_ptr)!==0}clear(){s.gamecore_clear(this.__wbg_ptr)}debug_json(){let e,a;try{const r=s.gamecore_debug_json(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}deserialize_state(e){const a=oe(e,s.__wbindgen_malloc),r=u,n=s.gamecore_deserialize_state(this.__wbg_ptr,a,r);if(n[1])throw k(n[0])}dispatch(e,a){const r=b(e,s.__wbindgen_malloc,s.__wbindgen_realloc),n=u,o=oe(a,s.__wbindgen_malloc),i=u,l=s.gamecore_dispatch(this.__wbg_ptr,r,n,o,i);var d=K(l[0],l[1]).slice();return s.__wbindgen_free(l[0],l[1]*1,1),d}frame_bytes(){const e=s.gamecore_frame_bytes(this.__wbg_ptr);var a=K(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),a}frame_ptr(){return s.gamecore_frame_ptr(this.__wbg_ptr)>>>0}is_alive(e){return s.gamecore_is_alive(this.__wbg_ptr,e)!==0}last_input_seq(e){return s.gamecore_last_input_seq(this.__wbg_ptr,e)>>>0}load_map(e){const a=b(e,s.__wbindgen_malloc,s.__wbindgen_realloc),r=u,n=s.gamecore_load_map(this.__wbg_ptr,a,r);if(n[1])throw k(n[0])}map_info(){let e,a;try{const r=s.gamecore_map_info(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}constructor(e){const a=b(e,s.__wbindgen_malloc,s.__wbindgen_realloc),r=u,n=s.gamecore_new(a,r);if(n[2])throw k(n[1]);return this.__wbg_ptr=n[0],ne.register(this,this.__wbg_ptr,this),this}pack_body(){const e=s.gamecore_pack_body(this.__wbg_ptr);if(e[1])throw k(e[0])}pack_frame(e,a,r,n,o,i,l,d){var c=we(l)?0:b(l,s.__wbindgen_malloc,s.__wbindgen_realloc),m=u;return s.gamecore_pack_frame(this.__wbg_ptr,e,a,r,n,o,i,c,m,d)>>>0}players_data(){let e,a;try{const r=s.gamecore_players_data(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}position_of(e){const a=s.gamecore_position_of(this.__wbg_ptr,e);var r=se(a[0],a[1]).slice();return s.__wbindgen_free(a[0],a[1]*4,4),r}remove_actor(e){s.gamecore_remove_actor(this.__wbg_ptr,e)}remove_players_and_shots(){let e,a;try{const r=s.gamecore_remove_players_and_shots(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}remove_scripted_actor(e){s.gamecore_remove_scripted_actor(this.__wbg_ptr,e)}reset_actor(e,a,r,n,o){s.gamecore_reset_actor(this.__wbg_ptr,e,a,r,n,o)}reset_all_vitals(){s.gamecore_reset_all_vitals(this.__wbg_ptr)}serialize_state(){const e=s.gamecore_serialize_state(this.__wbg_ptr);if(e[3])throw k(e[2]);var a=K(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),a}set_actor_level(e,a){s.gamecore_set_actor_level(this.__wbg_ptr,e,a)}spawn_actor(e,a,r,n,o,i){const l=b(a,s.__wbindgen_malloc,s.__wbindgen_realloc),d=u,c=s.gamecore_spawn_actor(this.__wbg_ptr,e,l,d,r,n,o,i);if(c[1])throw k(c[0])}spawn_scripted_actor(e,a,r,n,o,i){const l=b(a,s.__wbindgen_malloc,s.__wbindgen_realloc),d=u,c=s.gamecore_spawn_scripted_actor(this.__wbg_ptr,e,l,d,r,n,o,i);if(c[1])throw k(c[0])}step(e){s.gamecore_step(this.__wbg_ptr,e)}take_events(){let e,a;try{const r=s.gamecore_take_events(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}}Symbol.dispose&&(Q.prototype[Symbol.dispose]=Q.prototype.free);function ye(){return{__proto__:null,"./vimp_tanks_core_bg.js":{__proto__:null,__wbg_Error_92b29b0548f8b746:function(e,a){return Error(w(e,a))},__wbg___wbindgen_throw_344f42d3211c4765:function(e,a){throw new Error(w(e,a))},__wbindgen_init_externref_table:function(){const e=s.__wbindgen_externrefs,a=e.grow(4);e.set(0,void 0),e.set(a+0,void 0),e.set(a+1,null),e.set(a+2,!0),e.set(a+3,!1)}}}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(t=>s.__wbg_clientcore_free(t,1));const ne=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>s.__wbg_gamecore_free(t,1));function se(t,e){return t=t>>>0,be().subarray(t/4,t/4+e)}function K(t,e){return t=t>>>0,C().subarray(t/1,t/1+e)}let O=null;function be(){return(O===null||O.byteLength===0)&&(O=new Float32Array(s.memory.buffer)),O}function w(t,e){return Se(t>>>0,e)}let I=null;function C(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(s.memory.buffer)),I}function we(t){return t==null}function oe(t,e){const a=e(t.length*1,1)>>>0;return C().set(t,a/1),u=t.length,a}function b(t,e,a){if(a===void 0){const l=N.encode(t),d=e(l.length,1)>>>0;return C().subarray(d,d+l.length).set(l),u=l.length,d}let r=t.length,n=e(r,1)>>>0;const o=C();let i=0;for(;i<r;i++){const l=t.charCodeAt(i);if(l>127)break;o[n+i]=l}if(i!==r){i!==0&&(t=t.slice(i)),n=a(n,r,r=i+t.length*3,1)>>>0;const l=C().subarray(n+i,n+r),d=N.encodeInto(t,l);i+=d.written,n=a(n,r,i,1)>>>0}return u=i,n}function k(t){const e=s.__wbindgen_externrefs.get(t);return s.__externref_table_dealloc(t),e}let P=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});P.decode();const ve=2146435072;let J=0;function Se(t,e){return J+=e,J>=ve&&(P=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),P.decode(),J=e),P.decode(C().subarray(t,t+e))}const N=new TextEncoder;"encodeInto"in N||(N.encodeInto=function(t,e){const a=N.encode(t);return e.set(a),{read:t.length,written:a.length}});let u=0,s;function xe(t,e){return s=t.exports,O=null,I=null,s.__wbindgen_start(),s}async function Te(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(n){if(t.ok&&a(t.type)&&t.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 r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}else{const r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}function a(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}async function ke(t){if(s!==void 0)return s;t!==void 0&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),t===void 0&&(t=new URL("/assets/vimp_tanks_core_bg-DJG6soEC.wasm",import.meta.url));const e=ye();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:a,module:r}=await Te(await t,e);return xe(a)}const Me={setId:"c1",scale:.2,spriteSheet:{img:"tiles3.png",frames:[[0,64,32,32],[0,192,32,32],[96,64,32,32]]},layers:{1:[0,1],4:[2]},step:32,physicsStatic:[1],physicsDynamic:(function(){const r=[];for(let c=0;c<20;c+=1)for(let m=0;m<1;m+=1){const y=(104+m*3)*32+48,X=(45+c*3)*32+48;r.push({density:20,layer:3,position:[y,X],angle:0,width:96,height:96,img:"b1.png",linearDamping:8,angularDamping:16})}return r})(),respawns:{team1:[[448,1840,0],[256,2304,0],[448,2688,0],[256,3e3,0],[256,512,0],[448,832,0],[256,1152,0],[448,3648,0],[256,3968,0],[448,4288,0]],team2:[[6272,1840,180],[6464,2304,180],[6272,2688,180],[6464,3e3,180],[6464,512,180],[6272,832,180],[6464,1152,180],[6272,3648,180],[6464,3968,180],[6272,4288,180]]},map:(function(){const a={floor:0,wall:1,effect:2},r=Array.from({length:150},()=>Array(210).fill(a.floor));for(let o=0;o<150;o++)for(let i=0;i<210;i++)(o<2||o>=148||i<2||i>=208)&&(r[o][i]=a.wall);const n=(o,i,l,d)=>{for(let c=i;c<=d;c++)for(let m=o;m<=l;m++)m>=0&&m<210&&c>=0&&c<150&&(r[c][m]=a.wall)};n(50,0,51,30),n(50,119,51,149),n(158,0,159,30),n(158,119,159,149),n(80,30,130,31),n(80,118,130,119);for(let o=64;o<86;o++)for(let i=2;i<208;i++)(i+o)%2===0?r[o][i]=a.effect:r[o][i]=a.floor;return r})()},pe=[],D=32,T=(t,e,a,r)=>{for(let n=0;n<a;n+=1){const o=r?[t*D,(e+n)*D]:[(t+n)*D,e*D];pe.push({density:100,layer:3,position:o,angle:0,img:"b1.png",width:32,height:32,linearDamping:5,angularDamping:14})}};T(30,2,10,!0);T(2,30,10,!1);T(30,22,9,!0);T(22,30,9,!1);const x=120,H=30;T(x-H-1,x-12,10,!0);T(x-12,x-H-1,10,!1);T(x-H-1,x-31,9,!0);T(x-31,x-H-1,9,!1);const Ee={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:[...pe],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:(function(){const a={stone:0,grass:1,wall:2,water:3},r=Array.from({length:120},()=>Array(120).fill(a.grass)),n=()=>{for(let c=0;c<120;c+=1)for(let m=0;m<120;m+=1)(c===0||c===119||m===0||m===119)&&(r[c][m]=a.wall)},o=(c,m,y,X=.5)=>{for(let E=m-y;E<=m+y;E+=1)for(let R=c-y;R<=c+y;R+=1)R>0&&R<119&&E>0&&E<119&&Math.sqrt((R-c)**2+(E-m)**2)<=y&&Math.random()<X&&(r[E][R]=a.wall)};n();const i=Math.floor(120/2),l=Math.floor(120/2),d=22;for(let c=l-d;c<=l+d;c+=1)for(let m=i-d;m<=i+d;m+=1)Math.sqrt((m-i)**2+(c-l)**2)<=d&&(r[c][m]=a.stone);for(let c=l-10;c<=l+10;c+=1)for(let m=i-10;m<=i+10;m+=1)Math.sqrt((m-i)**2+(c-l)**2)<=10&&(r[c][m]=a.water);return o(35,85,12,.7),o(85,35,12,.7),o(20,60,8,.6),o(60,20,8,.6),o(100,60,8,.6),o(60,100,8,.6),r})()},G=80,Z=60,v=32,f={ground:0,wall:1,slab:2,railing:3,rampNorth:4,rampSouth:5},h={railNorth:27,slabTop:28,slabBottom:30,railSouth:31,left:2,right:G-3},A={x0:3,x1:5,y0:32,y1:34},B={x0:74,x1:76,y0:24,y1:26},ie={x0:30,x1:33},le={x0:48,x1:51},de=t=>Array.from({length:Z},()=>Array(G).fill(t)),F=(t,e,a)=>t>=e&&t<=a,Re=(function(){const t=de(f.ground);for(let e=0;e<Z;e+=1)for(let a=0;a<G;a+=1)(e<2||e>=Z-2||a<2||a>=G-2)&&(t[e][a]=f.wall);for(let e=A.y0;e<=A.y1;e+=1)for(let a=A.x0;a<=A.x1;a+=1)t[e][a]=f.rampNorth;for(let e=B.y0;e<=B.y1;e+=1)for(let a=B.x0;a<=B.x1;a+=1)t[e][a]=f.rampSouth;return t})(),Ae=(function(){const t=de(0);for(let e=h.left;e<=h.right;e+=1){for(let n=h.slabTop;n<=h.slabBottom;n+=1)t[n][e]=f.slab;const a=F(e,B.x0,B.x1)||F(e,ie.x0,ie.x1),r=F(e,A.x0,A.x1)||F(e,le.x0,le.x1);if(t[h.railNorth][e]=a?f.slab:f.railing,t[h.railSouth][e]=r?f.slab:f.railing,e===h.left||e===h.right)for(let n=h.slabTop;n<=h.slabBottom;n+=1)t[n][e]=f.railing}return t})(),fe=(t,e)=>[t*v+v/2,e*v+v/2],V=(t,e,a,r=64)=>({density:40,layer:3,position:[t*v,e*v+(v-r)/2],angle:0,width:r,height:r,img:"b1.png",linearDamping:6,angularDamping:14,level:a}),_=(t,e,a)=>[...fe(t,e),a],L=(t,e,a,r)=>[...fe(t,e),a,r],Be={setId:"c1",scale:.4,spriteSheet:{img:"tiles.png",frames:[[480,64,32,32],[128,224,32,32],[288,64,32,32],[352,96,32,32],[352,64,32,32],[384,64,32,32]]},layers:{1:[f.ground,f.rampNorth,f.rampSouth],2:[f.wall]},volumes:{2:1},step:v,physicsStatic:[f.wall],levels:{1:{map:Ae,floor:[f.slab,f.railing],walls:[f.railing],layers:{1:[f.slab],4:[f.railing]},volumes:{4:.35}}},ramps:[{tile:f.rampNorth,dir:"north",from:0,to:1},{tile:f.rampSouth,dir:"south",from:0,to:1}],physicsDynamic:[V(20,28,0),V(60,28,0),V(31,h.slabTop,1,32),V(49,h.slabBottom,1,32)],respawns:{team1:[_(3,38,270),_(9,38,0),_(6,6,0),_(12,6,0),_(6,14,0),_(12,14,0),_(6,22,0),_(12,22,0),L(10,29,0,1),L(16,29,0,1)],team2:[_(49,36,270),_(70,38,180),_(73,6,180),_(67,6,180),_(73,14,180),_(67,14,180),_(73,22,180),_(67,22,180),L(69,29,180,1),L(63,29,180,1)]},map:Re},Ce={setId:"c1",scale:.6,spriteSheet:{img:"tiles.png",frames:[[480,64,32,32],[128,224,32,32],[160,0,32,32],[0,64,32,32],[0,64,32,32]]},layers:{1:[0,2,4],2:[1],4:[3]},physicsStatic:[1],physicsDynamic:[],step:32,respawns:{team1:[[130,520,0],[130,620,0],[130,720,0],[130,820,0],[230,520,0],[230,620,0],[230,720,0],[230,820,0],[330,620,0],[330,720,0]],team2:[[1600,520,180],[1600,620,180],[1600,720,180],[1600,820,180],[1500,520,180],[1500,620,180],[1500,720,180],[1500,820,180],[1400,620,180],[1400,720,180]]},map:(function(){const t=[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,1,1,1,2,2,2,1,1,1,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,1,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,1,2,4,4,4,4,4,2,1,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,1,2,4,3,3,3,4,2,1,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,1,2,4,3,3,3,4,2,1,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,2,2,4,3,3,3,4,2,2,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,1,2,4,3,3,3,4,2,1,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,1,2,4,4,4,4,4,2,1,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,1,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,1,1,1,2,2,2,1,1,1,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],e=[];for(const a of t){const r=[],n=[];for(const o of a)r.push(o,o),n.push(o,o);e.push(r,n)}return e})()},ee=72,te=48,S=32,p={ground:0,wall:1,slab1:2,railing1:3,slab2:4,railing2:5,rampLong:6,rampSide:7,rampSteep:8,rampStep:9},z={x0:14,x1:46,y0:12,y1:30},W={x0:34,x1:52,y0:16,y1:26},Y={x0:5,x1:13,y:21},j={x:24,y0:31,y1:34},$={x0:53,x1:56,y:21},q={x0:31,x1:33,y:21},ce={x0:20,x1:22},me={x0:40,x1:42},Oe=[{x0:8,x1:11,y0:14,y1:17},{x0:60,x1:63,y0:30,y1:33}],re=t=>Array.from({length:te},()=>Array(ee).fill(t)),_e=(t,e,a)=>t>=e&&t<=a,Ie=(function(){const t=re(p.ground);for(let e=0;e<te;e+=1)for(let a=0;a<ee;a+=1)(e<2||e>=te-2||a<2||a>=ee-2)&&(t[e][a]=p.wall);for(const e of Oe)for(let a=e.y0;a<=e.y1;a+=1)for(let r=e.x0;r<=e.x1;r+=1)t[a][r]=p.wall;for(let e=Y.x0;e<=Y.x1;e+=1)t[Y.y][e]=p.rampLong;for(let e=j.y0;e<=j.y1;e+=1)t[e][j.x]=p.rampSide;for(let e=$.x0;e<=$.x1;e+=1)t[$.y][e]=p.rampSteep;return t})(),ue=(t,e,a,r,n)=>{for(let o=e.y0;o<=e.y1;o+=1)for(let i=e.x0;i<=e.x1;i+=1){const l=i===e.x0||i===e.x1||o===e.y0||o===e.y1;t[o][i]=l&&!n(i,o)?r:a}},Ne=(function(){const t=re(0);ue(t,z,p.slab1,p.railing1,(e,a)=>e===z.x0&&a===Y.y||a===z.y1&&e===j.x||a===z.y0&&_e(e,ce.x0,ce.x1));for(let e=q.x0;e<=q.x1;e+=1)t[q.y][e]=p.rampStep;return t})(),De=(function(){const t=re(0);return ue(t,W,p.slab2,p.railing2,(e,a)=>e===W.x0&&a===q.y||e===W.x1&&a===$.y||a===W.y1&&_e(e,me.x0,me.x1)),t})(),he=(t,e)=>[t*S+S/2,e*S+S/2],U=(t,e,a,r=64)=>({density:40,layer:3,position:[t*S,e*S+(S-r)/2],angle:0,width:r,height:r,img:"b1.png",linearDamping:6,angularDamping:14,level:a}),g=(t,e,a)=>[...he(t,e),a],M=(t,e,a,r)=>[...he(t,e),a,r],Fe={setId:"c1",scale:.4,spriteSheet:{img:"tiles.png",frames:[[480,64,32,32],[128,224,32,32],[288,64,32,32],[352,96,32,32],[96,0,32,32],[64,32,32,32],[352,64,32,32],[384,64,32,32],[416,64,32,32],[320,64,32,32]]},layers:{1:[p.ground,p.rampLong,p.rampSide,p.rampSteep],2:[p.wall]},volumes:{2:1},step:S,physicsStatic:[p.wall],levels:{1:{map:Ne,floor:[p.slab1,p.railing1,p.rampStep],walls:[p.railing1],layers:{1:[p.slab1,p.rampStep],4:[p.railing1]},volumes:{4:.35}},2:{map:De,floor:[p.slab2,p.railing2],walls:[p.railing2],layers:{1:[p.slab2],4:[p.railing2]},volumes:{4:.35}}},ramps:[{tile:p.rampLong,dir:"east",from:0,to:1},{tile:p.rampSide,dir:"north",from:0,to:1},{tile:p.rampSteep,dir:"west",from:0,to:2},{tile:p.rampStep,dir:"east",from:1,to:2}],physicsDynamic:[U(41,25,2,32),U(21,13,1,32),U(8,24,0),U(62,38,0)],respawns:{team1:[g(58,21,180),M(41,22,90,2),M(20,20,0,1),M(45,18,180,2),g(5,8,0),g(9,8,0),g(5,40,0),g(9,40,0)],team2:[M(24,28,90,0),g(20,33,0),M(21,15,270,1),M(50,21,180,2),M(40,28,180,1),g(60,8,180),g(64,8,180),g(60,40,180)]},map:Ie},Ve={canopy:Me,garden:Ee,overpass:Be,"pool mini":Ce,terraces:Fe},ae={m1:{constructor:"Tank",currentWeapon:"w1",size:2,accelerationFactor:1e3,brakingFactor:.3,maxForwardSpeed:260,maxReverseSpeed:-130,baseTurnTorqueFactor:215,damping:{linear:3,angular:100},fixture:{density:200,friction:.5,restitution:.1},lateralGrip:20,turnSpeedThreshold:10,baseTurnFactorRatio:.8,reverseTurnMultiplier:.7,throttleIncreaseRate:2,throttleDecreaseRate:2.5,strainFactor:1.5,maxGunAngle:1.4,gunRotationSpeed:3,gunCenterSpeed:10}},Le={w1:{type:"hitscan",impulseMagnitude:75e5,damage:40,range:1500,fireRate:.01,spread:0,consumption:1,cameraShake:{intensity:20,duration:200}},w2:{type:"explosive",constructor:"Bomb",time:300,shotOutcomeId:"w2e",size:8,fireRate:.1,damage:70,radius:50,impulseMagnitude:2e6,cameraShake:{intensity:30,duration:400}}},ze={m1:{id:1,kind:"indexed8",class:"hot",fields:[{name:"x",ty:"f32",interp:"lerp"},{name:"y",ty:"f32",interp:"lerp"},{name:"angle",ty:"f32",interp:"lerpAngle"},{name:"gunRotation",ty:"f32",interp:"lerpAngle"},{name:"vx",ty:"f32",interp:"lerp"},{name:"vy",ty:"f32",interp:"lerp"},{name:"engineLoad",ty:"f32",interp:"lerp"},{name:"condition",ty:"u8"},{name:"size",ty:"u8"},{name:"team",ty:"u8"},{name:"angvel",ty:"f32",interp:"lerp"},{name:"z",ty:"f32",interp:"lerp"},{name:"level",ty:"u8"}]},w1:{id:2,kind:"list16",class:"event",fields:[{name:"startX",ty:"f32"},{name:"startY",ty:"f32"},{name:"endX",ty:"f32"},{name:"endY",ty:"f32"},{name:"bodyX",ty:"f32"},{name:"bodyY",ty:"f32"},{name:"wasHit",ty:"u8"},{name:"shooterId",ty:"u8"},{name:"startLevel",ty:"u8"},{name:"endLevel",ty:"u8"}]},w2:{id:3,kind:"indexed32",class:"event",fields:[{name:"x",ty:"f32"},{name:"y",ty:"f32"},{name:"angle",ty:"f32"},{name:"size",ty:"u8"},{name:"time",ty:"u16"},{name:"ownerId",ty:"u8"},{name:"level",ty:"u8"}]},w2e:{id:4,kind:"list16",class:"event",fields:[{name:"x",ty:"f32"},{name:"y",ty:"f32"},{name:"radius",ty:"f32"},{name:"level",ty:"u8"}]},c1:{id:5,kind:"indexedNoNull8",class:"hot",optionalFrom:5,fields:[{name:"x",ty:"f32",interp:"lerp"},{name:"y",ty:"f32",interp:"lerp"},{name:"angle",ty:"f32",interp:"lerpAngle"},{name:"z",ty:"f32",interp:"lerp"},{name:"level",ty:"u8"},{name:"vx",ty:"f32",interp:"lerp"},{name:"vy",ty:"f32",interp:"lerp"},{name:"angvel",ty:"f32",interp:"lerp"}]},c2:{id:6,kind:"indexedNoNull8",class:"hot",optionalFrom:5,fields:[{name:"x",ty:"f32",interp:"lerp"},{name:"y",ty:"f32",interp:"lerp"},{name:"angle",ty:"f32",interp:"lerpAngle"},{name:"z",ty:"f32",interp:"lerp"},{name:"level",ty:"u8"},{name:"vx",ty:"f32",interp:"lerp"},{name:"vy",ty:"f32",interp:"lerp"},{name:"angvel",ty:"f32",interp:"lerp"}]}},We={parts:{models:ae,weapons:Le,mapConstructor:"Map",hitscanService:"HitscanService",friendlyFire:!1},snapshot:ze,soundCues:{roundStart:"roundStart",victory:"victory",defeat:"defeat",frag:"frag",death:"gameOver"},initialVote:"teamChange",maps:Ve,mapScale:.3,currentMap:"pool mini",mapsInVote:4,mapSetId:"c1",coreParams:{levels:{fallTime:.35,fallDamage:15,maxFallDamage:100,climbGravity:220,climbMaxSpeedFactor:.55}},roomDefaults:{maxPlayers:8},roomForm:[{name:"maxPlayers",control:"text",label:"Max players",numeric:!0},{name:"roundTime",control:"text",label:"Round time",unit:"s",numeric:!0},{name:"mapTime",control:"text",label:"Map time",unit:"s",numeric:!0},{name:"friendlyFire",control:"checkbox",label:"Friendly fire"},{name:"map",control:"select",label:"Map",source:"maps"}],stat:{name:{key:0,bodyMethod:"=",headSync:!0,headMethod:"#"},status:{key:1,bodyMethod:"=",bodyValue:"",headValue:""},score:{key:2,bodyMethod:"+",bodyValue:0,headMethod:"+",headValue:0},deaths:{key:3,bodyMethod:"+",bodyValue:0,headMethod:"+",headValue:0},latency:{key:4,bodyMethod:"="}},playerState:{defaultState:{}},panel:{fields:{health:{key:"h",value:100},w1:{key:"w1",value:200},w2:{key:"w2",value:100}},activeKey:"wa"},scripted:{namePrefix:"Bot",defaultModel:"m1"},spectatorTeam:"spectators",teams:{team1:1,team2:2,spectators:3},playerKeys:{forward:{key:1},back:{key:2},left:{key:4},right:{key:8},gunCenter:{key:16,type:1},gunLeft:{key:32},gunRight:{key:64},fire:{key:128,type:1},nextWeapon:{key:256,type:1},prevWeapon:{key:512,type:1}}},Ue={roundStart:{file:"round-start",priority:200,volume:.3},victory:{file:"victory",priority:200,volume:.3},defeat:{file:"defeat",priority:200,volume:.3},frag:{file:"frag",priority:150,volume:.3},hit:{file:"hit",priority:150,volume:.3},gameOver:{file:"game-over",priority:150,volume:.3},shot:{file:"shot",priority:100,volume:.4},explosion:{file:"explosion",priority:100,volume:.4},bombHasBeenPlanted:{file:"bomb-has-been-planted",priority:90,volume:.4},tankEngine:{file:"tank-engine",priority:50,loop:!0,volume:.5}},Pe={codecList:["webm","mp3"],path:"/sounds/",sounds:Ue},Ye={mode:"hole",radius:260,softness:.45,minAlpha:.12,layerAlpha:.4,fadeRate:6,lowerTint:11579584},je={enabled:!0,slices:4,shear:.22,sideTint:10133674},$e={parts:{gameSets:{c1:["Map","MapVolume","MapRadar"],c2:["Map","MapVolume"],m1:["Tank","TankRadar","Smoke","Tracks"],w1:["ShotEffect"],w2:["Bomb"],w2e:["ExplosionEffect"]},entitiesOnCanvas:{Map:"vimp",MapVolume:"vimp",MapRadar:"radar",TankRadar:"radar",Tank:"vimp",ShotEffect:"vimp",Bomb:"vimp",ExplosionEffect:"vimp",Smoke:"vimp",Tracks:"vimp"},bakedAssets:{vimp:[{name:"explosionTexture",component:"ExplosionEffect",params:{radius:50,blur:2,quality:40,color:16777215}},{name:"impactParticleTexture",component:"ShotEffect",params:{radius:4,blur:1,quality:10,color:16777215}},{name:"funnelTexture",component:"ExplosionEffect",params:{baseRadius:25,irregularity:4,blur:3,numPoints:20,colorFill:1842204,colorRim:11579568,rimWidth:4,variants:5}},{name:"smokeTexture",component:"Smoke",params:{radius:3,blur:1,quality:40,color:16777215}},{name:"tankTexture",component:"Tank",params:{colors:{teamId1:5579298,teamId2:2250018}}},{name:"bombTexture",component:"Bomb",params:{colorOuter:16777215,colorInner:986895}},{name:"tankShadowTexture",component:"Tank",params:{radius:12,blur:4,quality:20,color:0}},{name:"levelBadgeTexture",component:"Tank",params:{radius:7,fontSize:10,borderWidth:1.5,borderColor:1052688,textColor:1052688}},{name:"trackMarkTexture",component:"Tracks",params:{width:4,length:5,color:1710610}}],radar:[{name:"tankRadarTexture",component:"TankRadar",params:{radius:6,borderWidth:2,crossSize:9,crossThickness:1.5,colors:{teamId1:5579298,teamId2:2250018}}}]},componentDependencies:{renderer:["Map","MapVolume","Tank"],assetsBase:["Map","MapVolume"],soundManager:["ExplosionEffect","ShotEffect","Bomb","Tank"],mapDynamics:["ShotEffect"],levelView:["Tank","Map","MapVolume","MapRadar","Smoke","Bomb","ShotEffect","ExplosionEffect"],localPlayer:["Tank"]},seeThrough:Ye,volume:je,sounds:Pe},initIdList:["vimp","radar","panel","chat"],modules:{canvasManager:{canvases:{vimp:{width:960,height:600,aspectRatio:"16:9",baseScale:"5:1",dynamicCamera:!0,shakeCamera:!0},radar:{width:150,height:150,fixSize:"150",baseScale:"1:8"}}},controls:{keySetList:[{78:"nextPlayer",80:"prevPlayer"},{87:"forward",83:"back",65:"left",68:"right",85:"gunCenter",75:"gunLeft",76:"gunRight",74:"fire",78:"nextWeapon",80:"prevWeapon"}]},chat:{params:{messages:{s:["Team {0} is full. Your current team: {1}","Your team: {0}","Your new team: {0}","Your new status: spectator","⚔️ {0} killed {1}","⚡ {0} joined the game","👋 {0} left the game"],v:["A vote has been created","Voting has started","Your vote has been accepted","Voting is temporarily unavailable","Vote passed","Vote failed"],m:["Current map: {0}","Next map: {0}"],c:["Command not found","Your rank: {0}"],n:["Invalid name","{0} changed name to {1}"],b:["Only active players can use /bot","Invalid bot count","Invalid team name","{0} bot(s) created for {1}","All bots removed from {0}","{0} bot(s) created","All bots removed"]}}},panel:{keys:{t:"time",h:"health",wa:"activeWeapon",w1:"bullet",w2:"bomb"},fields:[{name:"health",elem:"panel-health",type:"bar",max:100,blocks:30},{name:"bullet",elem:"panel-bullet",type:"weapon"},{name:"bomb",elem:"panel-bomb",type:"weapon"},{name:"time",elem:"panel-time",type:"time"}]},stat:{params:{columns:["names","status","score","deaths","latency"],heads:{1:"team1",2:"team2"},bodies:{1:"team1",2:"team2",3:"spectators"},sortList:{team1:[[2,!0],[3,!1]],team2:[[2,!0],[3,!1]]}}},vote:{params:{templates:{teamChange:["Choose a team","teams",!0],mapChangeBySystem:["Choose the next map"],mapChangeByUser:["{0} suggested the map: {1}",["Yes","No"]],createBotsForTeam:["{0} suggests creating {1} bot(s) to {2}. Agree?",["Yes","No"]],removeBotsForTeam:["{0} suggests removing all bots from {1}. Agree?",["Yes","No"]],createBots:["{0} suggests creating {1} bot(s) to the game. Agree?",["Yes","No"]],removeBots:["{0} suggests removing all bots from the game. Agree?",["Yes","No"]]},menu:[["teamChange",["Switch team","teams"]],["mapChange",["Suggest map","maps"]]]}}},gameInform:{list:["{0} WINS!","ROUND START!","GAME OVER!"]}},qe={elems:{authId:"auth",errorId:"auth-error",enterId:"auth-enter",fieldsId:"auth-fields",titleId:"auth-title",informsId:"auth-informs"},texts:{title:"Tanks",sections:[{heading:"Controls",lines:[{keys:"w, a, s, d",text:"move the tank"},{keys:"k, l",text:"turn the gun"},{keys:"u",text:"center the gun"},{keys:"j",text:"fire"},{keys:"n, p",text:"switch weapon/player",last:!0},{keys:"c",text:"chat/command line"},{keys:"m",text:"menu"},{keys:"<Tab>",text:"stats",last:!0}]},{heading:"Command line",lines:[{keys:"/name <name>",text:"change nickname"},{keys:"/mapname",text:"show current map name"},{keys:"/timeleft",text:"map time left"},{separator:!0},{keys:"/bot <count>",text:"add bot(s)"},{keys:"/bot <count> <team>",text:"add to team"},{keys:"/bot 0",text:"remove all bots"},{keys:"/bot 0 <team>",text:"remove from team"}]}]},params:[{name:"model",value:"m1",options:{control:"select",label:"Model",options:Object.keys(ae),validator:"isValidModel",storage:"model"}}],validators:{isValidModel:t=>t in ae}};function ge(t,e,a){a?(t.scripted.removeScripted(a),e>0?(e=t.scripted.createScripted(e,a),t.chat.pushSystem("BOT_CREATED_FOR_TEAM",[e,a])):t.chat.pushSystem("BOT_REMOVED_FROM_TEAM",[a])):(t.scripted.removeScripted(),e>0?(e=t.scripted.createScripted(e,null),t.chat.pushSystem("BOT_CREATED",[e])):t.chat.pushSystem("BOT_REMOVED")),t.roundManager.initiateNewRound()}function Ge(t,e,a,r){const n=t.participants.get(e).name,o="botManagement";let i,l;if(!t.voteCoordinator.canCreateVote(o,e))return;r?a>0?(i="createBotsForTeam",l=[n,a,r]):(i="removeBotsForTeam",l=[n,r]):a>0?(i="createBots",l=[n,a]):(i="removeBots",l=[n]);const d={name:i,params:l},c=t.participants.getHumans().map(m=>m.gameId).filter(m=>m!==e);t.voteCoordinator.createVote({voteName:i,voteCategory:o,payload:d,resultFunc:m=>{m==="Yes"?(t.chat.pushSystem("VOTE_PASSED"),ge(t,a,r)):t.chat.pushSystem("VOTE_FAILED")},userList:c,gameId:e})}const He={name:"/bot",handler(t,e,a){if(t.participants.get(e).teamId===t.spectatorId){t.chat.pushSystemByUser(e,"BOT_PLAYERS_ONLY");return}const n=parseInt(a[0],10),o=a[1]||null;if(isNaN(n)||n<0){t.chat.pushSystemByUser(e,"BOT_INVALID_COUNT");return}if(o&&(!t.teams[o]||o===t.spectatorTeam)){t.chat.pushSystemByUser(e,"BOT_INVALID_TEAM");return}if(n===0){if(o&&t.scripted.getCountForTeam(o)===0){t.chat.pushSystemByUser(e,"BOT_REMOVED_FROM_TEAM",[o]);return}if(t.scripted.getCount()===0){t.chat.pushSystemByUser(e,"BOT_REMOVED");return}}t.participants.getHumans().filter(l=>l.teamId!==t.spectatorId).length<=1?ge(t,n,o):Ge(t,e,n,o)}};function Xe(t){const e=Math.floor(t/1e3),a=String(Math.floor(e/60)).padStart(2,"0"),r=String(e%60).padStart(2,"0");return`${a}:${r}`}const Ke={name:"/name",handler(t,e,a){t.roundManager.changeName(e,a.join(" "))}},Je={name:"/nr",handler(t,e){t.isDevMode?t.roundManager.initiateNewRound():t.chat.pushSystemByUser(e,"COMMANDS_NOT_FOUND")}},Qe={name:"/timeleft",handler(t,e){t.chat.pushSystemByUser(e,[Xe(t.timerManager.getMapTimeLeft())])}},Ze={name:"/mapname",handler(t,e){t.chat.pushSystemByUser(e,[t.roundManager.currentMap])}},et={name:"/rank",handler(t,e){t.chat.pushSystemByUser(e,"RANK",[t.playerDataSync.getRank(e)])}},tt={BOT_PLAYERS_ONLY:"b:0",BOT_INVALID_COUNT:"b:1",BOT_INVALID_TEAM:"b:2",BOT_CREATED_FOR_TEAM:"b:3",BOT_REMOVED_FROM_TEAM:"b:4",BOT_CREATED:"b:5",BOT_REMOVED:"b:6"};class at{constructor({participants:e,coreAdapter:a,panel:r,stat:n,scripted:o}){this._participants=e,this._coreAdapter=a,this._panel=r,this._stat=n,this._model=o.defaultModel,this._respawns=null}createMap(e){this._respawns=e.respawns}createScripted(e,a=null){if(!this._respawns)return 0;const r=this._participants.getPlayableTeams();let n=0;for(let o=0;o<e&&!this._participants.isFull;o+=1){let i=a;if(i||(i=r.sort((c,m)=>this._participants.getTeamSize(c)-this._participants.getTeamSize(m))[0]),!i||!this._respawns[i]||this._participants.getTeamSize(i)>=this._respawns[i].length)continue;const l=this._participants.createScripted({team:i,model:this._model}),d=this._participants.get(l);this._stat.addUser(l,d.teamId,{name:d.name,status:"dead",latency:"BOT"}),this._panel.addUser(l),n+=1}return n}removeScripted(e=null){(e?this._participants.getScripted().filter(r=>r.team===e):this._participants.getScripted()).forEach(r=>this._removeBotById(r.gameId))}removeOneForHuman(e){for(const a of this._participants.getScripted())if(a.team===e)return this._removeBotById(a.gameId),!0;return!1}_removeBotById(e){const a=this._participants.get(e);!a||!a.isScripted||(this._stat.removeUser(e,a.teamId),this._panel.removeUser(e),this._coreAdapter.removePlayer(e),this._participants.remove(e))}getBotById(e){const a=this._participants.get(e);return a&&a.isScripted?a:void 0}getBots(){return this._participants.getScripted()}getCount(){return this._participants.getScripted().length}getCountForTeam(e){return this._participants.getScripted().filter(a=>a.team===e).length}getCountsPerTeam(){const e={};for(const a of this._participants.getScripted())e[a.team]=(e[a.team]||0)+1;return e}}function rt(t){return{scripted:new at(t)}}const nt=t=>(t??"").split(/[?#]/)[0].endsWith(".js"),st=t=>import(t),ot={id:"tanks",engineApi:4,requires:["map.layers","map.levelsN"],async createCore(t,{wasmUrl:e}){if(nt(e)){const a=await st(e);return new a.GameCore(t)}return await ke({module_or_path:e}),new Q(t)},gameConfig:We,authSchema:qe,chatCommands:[He,Ke,Je,Qe,Ze,et],systemMessages:tt,createModules:rt,buildClientGameConfig:()=>$e};export{ot as default};
|
|
1
|
+
class Q{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_gamecore_free(e,0)}abi_describe(){let e,a;try{const r=s.gamecore_abi_describe(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}alive_players(){const e=s.gamecore_alive_players(this.__wbg_ptr);var a=se(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*4,4),a}apply_aim(e,a,r,n,o){s.gamecore_apply_aim(this.__wbg_ptr,e,a,r,n,o)}apply_input(e,a,r,n){const o=b(r,s.__wbindgen_malloc,s.__wbindgen_realloc),i=u,l=b(n,s.__wbindgen_malloc,s.__wbindgen_realloc),d=u;s.gamecore_apply_input(this.__wbg_ptr,e,a,o,i,l,d)}body_has_events(){return s.gamecore_body_has_events(this.__wbg_ptr)!==0}clear(){s.gamecore_clear(this.__wbg_ptr)}debug_json(){let e,a;try{const r=s.gamecore_debug_json(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}deserialize_state(e){const a=oe(e,s.__wbindgen_malloc),r=u,n=s.gamecore_deserialize_state(this.__wbg_ptr,a,r);if(n[1])throw k(n[0])}dispatch(e,a){const r=b(e,s.__wbindgen_malloc,s.__wbindgen_realloc),n=u,o=oe(a,s.__wbindgen_malloc),i=u,l=s.gamecore_dispatch(this.__wbg_ptr,r,n,o,i);var d=K(l[0],l[1]).slice();return s.__wbindgen_free(l[0],l[1]*1,1),d}frame_bytes(){const e=s.gamecore_frame_bytes(this.__wbg_ptr);var a=K(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),a}frame_ptr(){return s.gamecore_frame_ptr(this.__wbg_ptr)>>>0}is_alive(e){return s.gamecore_is_alive(this.__wbg_ptr,e)!==0}last_input_seq(e){return s.gamecore_last_input_seq(this.__wbg_ptr,e)>>>0}load_map(e){const a=b(e,s.__wbindgen_malloc,s.__wbindgen_realloc),r=u,n=s.gamecore_load_map(this.__wbg_ptr,a,r);if(n[1])throw k(n[0])}map_info(){let e,a;try{const r=s.gamecore_map_info(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}constructor(e){const a=b(e,s.__wbindgen_malloc,s.__wbindgen_realloc),r=u,n=s.gamecore_new(a,r);if(n[2])throw k(n[1]);return this.__wbg_ptr=n[0],ne.register(this,this.__wbg_ptr,this),this}pack_body(){const e=s.gamecore_pack_body(this.__wbg_ptr);if(e[1])throw k(e[0])}pack_frame(e,a,r,n,o,i,l,d){var c=we(l)?0:b(l,s.__wbindgen_malloc,s.__wbindgen_realloc),m=u;return s.gamecore_pack_frame(this.__wbg_ptr,e,a,r,n,o,i,c,m,d)>>>0}players_data(){let e,a;try{const r=s.gamecore_players_data(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}position_of(e){const a=s.gamecore_position_of(this.__wbg_ptr,e);var r=se(a[0],a[1]).slice();return s.__wbindgen_free(a[0],a[1]*4,4),r}remove_actor(e){s.gamecore_remove_actor(this.__wbg_ptr,e)}remove_players_and_shots(){let e,a;try{const r=s.gamecore_remove_players_and_shots(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}remove_scripted_actor(e){s.gamecore_remove_scripted_actor(this.__wbg_ptr,e)}reset_actor(e,a,r,n,o){s.gamecore_reset_actor(this.__wbg_ptr,e,a,r,n,o)}reset_all_vitals(){s.gamecore_reset_all_vitals(this.__wbg_ptr)}serialize_state(){const e=s.gamecore_serialize_state(this.__wbg_ptr);if(e[3])throw k(e[2]);var a=K(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),a}set_actor_level(e,a){s.gamecore_set_actor_level(this.__wbg_ptr,e,a)}spawn_actor(e,a,r,n,o,i){const l=b(a,s.__wbindgen_malloc,s.__wbindgen_realloc),d=u,c=s.gamecore_spawn_actor(this.__wbg_ptr,e,l,d,r,n,o,i);if(c[1])throw k(c[0])}spawn_scripted_actor(e,a,r,n,o,i){const l=b(a,s.__wbindgen_malloc,s.__wbindgen_realloc),d=u,c=s.gamecore_spawn_scripted_actor(this.__wbg_ptr,e,l,d,r,n,o,i);if(c[1])throw k(c[0])}step(e){s.gamecore_step(this.__wbg_ptr,e)}take_events(){let e,a;try{const r=s.gamecore_take_events(this.__wbg_ptr);return e=r[0],a=r[1],w(r[0],r[1])}finally{s.__wbindgen_free(e,a,1)}}}Symbol.dispose&&(Q.prototype[Symbol.dispose]=Q.prototype.free);function ye(){return{__proto__:null,"./vimp_tanks_core_bg.js":{__proto__:null,__wbg_Error_92b29b0548f8b746:function(e,a){return Error(w(e,a))},__wbg___wbindgen_throw_344f42d3211c4765:function(e,a){throw new Error(w(e,a))},__wbindgen_init_externref_table:function(){const e=s.__wbindgen_externrefs,a=e.grow(4);e.set(0,void 0),e.set(a+0,void 0),e.set(a+1,null),e.set(a+2,!0),e.set(a+3,!1)}}}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(t=>s.__wbg_clientcore_free(t,1));const ne=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>s.__wbg_gamecore_free(t,1));function se(t,e){return t=t>>>0,be().subarray(t/4,t/4+e)}function K(t,e){return t=t>>>0,O().subarray(t/1,t/1+e)}let C=null;function be(){return(C===null||C.byteLength===0)&&(C=new Float32Array(s.memory.buffer)),C}function w(t,e){return Se(t>>>0,e)}let I=null;function O(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(s.memory.buffer)),I}function we(t){return t==null}function oe(t,e){const a=e(t.length*1,1)>>>0;return O().set(t,a/1),u=t.length,a}function b(t,e,a){if(a===void 0){const l=N.encode(t),d=e(l.length,1)>>>0;return O().subarray(d,d+l.length).set(l),u=l.length,d}let r=t.length,n=e(r,1)>>>0;const o=O();let i=0;for(;i<r;i++){const l=t.charCodeAt(i);if(l>127)break;o[n+i]=l}if(i!==r){i!==0&&(t=t.slice(i)),n=a(n,r,r=i+t.length*3,1)>>>0;const l=O().subarray(n+i,n+r),d=N.encodeInto(t,l);i+=d.written,n=a(n,r,i,1)>>>0}return u=i,n}function k(t){const e=s.__wbindgen_externrefs.get(t);return s.__externref_table_dealloc(t),e}let Y=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Y.decode();const ve=2146435072;let Z=0;function Se(t,e){return Z+=e,Z>=ve&&(Y=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Y.decode(),Z=e),Y.decode(O().subarray(t,t+e))}const N=new TextEncoder;"encodeInto"in N||(N.encodeInto=function(t,e){const a=N.encode(t);return e.set(a),{read:t.length,written:a.length}});let u=0,s;function xe(t,e){return s=t.exports,C=null,I=null,s.__wbindgen_start(),s}async function Te(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(n){if(t.ok&&a(t.type)&&t.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 r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}else{const r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}function a(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}async function ke(t){if(s!==void 0)return s;t!==void 0&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),t===void 0&&(t=new URL("/assets/vimp_tanks_core_bg-EoY5gurr.wasm",import.meta.url));const e=ye();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:a,module:r}=await Te(await t,e);return xe(a)}const Me={setId:"c1",scale:.2,spriteSheet:{img:"tiles3.png",frames:[[0,64,32,32],[0,192,32,32],[96,64,32,32]]},layers:{1:[0,1],4:[2]},step:32,physicsStatic:[1],physicsDynamic:(function(){const r=[];for(let c=0;c<20;c+=1)for(let m=0;m<1;m+=1){const y=(104+m*3)*32+48,X=(45+c*3)*32+48;r.push({density:20,layer:3,position:[y,X],angle:0,width:96,height:96,img:"b1.png",linearDamping:8,angularDamping:16})}return r})(),respawns:{team1:[[448,1840,0],[256,2304,0],[448,2688,0],[256,3e3,0],[256,512,0],[448,832,0],[256,1152,0],[448,3648,0],[256,3968,0],[448,4288,0]],team2:[[6272,1840,180],[6464,2304,180],[6272,2688,180],[6464,3e3,180],[6464,512,180],[6272,832,180],[6464,1152,180],[6272,3648,180],[6464,3968,180],[6272,4288,180]]},map:(function(){const a={floor:0,wall:1,effect:2},r=Array.from({length:150},()=>Array(210).fill(a.floor));for(let o=0;o<150;o++)for(let i=0;i<210;i++)(o<2||o>=148||i<2||i>=208)&&(r[o][i]=a.wall);const n=(o,i,l,d)=>{for(let c=i;c<=d;c++)for(let m=o;m<=l;m++)m>=0&&m<210&&c>=0&&c<150&&(r[c][m]=a.wall)};n(50,0,51,30),n(50,119,51,149),n(158,0,159,30),n(158,119,159,149),n(80,30,130,31),n(80,118,130,119);for(let o=64;o<86;o++)for(let i=2;i<208;i++)(i+o)%2===0?r[o][i]=a.effect:r[o][i]=a.floor;return r})()},pe=[],D=32,T=(t,e,a,r)=>{for(let n=0;n<a;n+=1){const o=r?[t*D,(e+n)*D]:[(t+n)*D,e*D];pe.push({density:100,layer:3,position:o,angle:0,img:"b1.png",width:32,height:32,linearDamping:5,angularDamping:14})}};T(30,2,10,!0);T(2,30,10,!1);T(30,22,9,!0);T(22,30,9,!1);const x=120,H=30;T(x-H-1,x-12,10,!0);T(x-12,x-H-1,10,!1);T(x-H-1,x-31,9,!0);T(x-31,x-H-1,9,!1);const Ee={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:[...pe],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:(function(){const a={stone:0,grass:1,wall:2,water:3},r=Array.from({length:120},()=>Array(120).fill(a.grass)),n=()=>{for(let c=0;c<120;c+=1)for(let m=0;m<120;m+=1)(c===0||c===119||m===0||m===119)&&(r[c][m]=a.wall)},o=(c,m,y,X=.5)=>{for(let E=m-y;E<=m+y;E+=1)for(let R=c-y;R<=c+y;R+=1)R>0&&R<119&&E>0&&E<119&&Math.sqrt((R-c)**2+(E-m)**2)<=y&&Math.random()<X&&(r[E][R]=a.wall)};n();const i=Math.floor(120/2),l=Math.floor(120/2),d=22;for(let c=l-d;c<=l+d;c+=1)for(let m=i-d;m<=i+d;m+=1)Math.sqrt((m-i)**2+(c-l)**2)<=d&&(r[c][m]=a.stone);for(let c=l-10;c<=l+10;c+=1)for(let m=i-10;m<=i+10;m+=1)Math.sqrt((m-i)**2+(c-l)**2)<=10&&(r[c][m]=a.water);return o(35,85,12,.7),o(85,35,12,.7),o(20,60,8,.6),o(60,20,8,.6),o(100,60,8,.6),o(60,100,8,.6),r})()},G=80,J=60,v=32,f={ground:0,wall:1,slab:2,railing:3,rampNorth:4,rampSouth:5},h={railNorth:27,slabTop:28,slabBottom:30,railSouth:31,left:2,right:G-3},A={x0:3,x1:5,y0:32,y1:34},B={x0:74,x1:76,y0:24,y1:26},ie={x0:30,x1:33},le={x0:48,x1:51},de=t=>Array.from({length:J},()=>Array(G).fill(t)),F=(t,e,a)=>t>=e&&t<=a,Re=(function(){const t=de(f.ground);for(let e=0;e<J;e+=1)for(let a=0;a<G;a+=1)(e<2||e>=J-2||a<2||a>=G-2)&&(t[e][a]=f.wall);for(let e=A.y0;e<=A.y1;e+=1)for(let a=A.x0;a<=A.x1;a+=1)t[e][a]=f.rampNorth;for(let e=B.y0;e<=B.y1;e+=1)for(let a=B.x0;a<=B.x1;a+=1)t[e][a]=f.rampSouth;return t})(),Ae=(function(){const t=de(0);for(let e=h.left;e<=h.right;e+=1){for(let n=h.slabTop;n<=h.slabBottom;n+=1)t[n][e]=f.slab;const a=F(e,B.x0,B.x1)||F(e,ie.x0,ie.x1),r=F(e,A.x0,A.x1)||F(e,le.x0,le.x1);if(t[h.railNorth][e]=a?f.slab:f.railing,t[h.railSouth][e]=r?f.slab:f.railing,e===h.left||e===h.right)for(let n=h.slabTop;n<=h.slabBottom;n+=1)t[n][e]=f.railing}return t})(),fe=(t,e)=>[t*v+v/2,e*v+v/2],L=(t,e,a,r=64)=>({density:40,layer:3,position:[t*v,e*v+(v-r)/2],angle:0,width:r,height:r,img:"b1.png",linearDamping:6,angularDamping:14,level:a}),_=(t,e,a)=>[...fe(t,e),a],V=(t,e,a,r)=>[...fe(t,e),a,r],Be={setId:"c1",scale:.4,spriteSheet:{img:"tiles.png",frames:[[480,64,32,32],[128,224,32,32],[288,64,32,32],[352,96,32,32],[352,64,32,32],[384,64,32,32]]},layers:{1:[f.ground,f.rampNorth,f.rampSouth],2:[f.wall]},volumes:{2:1},step:v,physicsStatic:[f.wall],levels:{1:{map:Ae,floor:[f.slab,f.railing],walls:[f.railing],layers:{1:[f.slab],4:[f.railing]},volumes:{4:.35}}},ramps:[{tile:f.rampNorth,dir:"north",from:0,to:1},{tile:f.rampSouth,dir:"south",from:0,to:1}],physicsDynamic:[L(20,28,0),L(60,28,0),L(31,h.slabTop,1,32),L(49,h.slabBottom,1,32)],respawns:{team1:[_(3,38,270),_(9,38,0),_(6,6,0),_(12,6,0),_(6,14,0),_(12,14,0),_(6,22,0),_(12,22,0),V(10,29,0,1),V(16,29,0,1)],team2:[_(49,36,270),_(70,38,180),_(73,6,180),_(67,6,180),_(73,14,180),_(67,14,180),_(73,22,180),_(67,22,180),V(69,29,180,1),V(63,29,180,1)]},map:Re},Oe={setId:"c1",scale:.6,spriteSheet:{img:"tiles.png",frames:[[480,64,32,32],[128,224,32,32],[160,0,32,32],[0,64,32,32],[0,64,32,32]]},layers:{1:[0,2,4],2:[1],4:[3]},physicsStatic:[1],physicsDynamic:[],step:32,respawns:{team1:[[130,520,0],[130,620,0],[130,720,0],[130,820,0],[230,520,0],[230,620,0],[230,720,0],[230,820,0],[330,620,0],[330,720,0]],team2:[[1600,520,180],[1600,620,180],[1600,720,180],[1600,820,180],[1500,520,180],[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,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],e=[];for(const a of t){const r=[],n=[];for(const o of a)r.push(o,o),n.push(o,o);e.push(r,n)}return e})()},ee=72,te=48,S=32,p={ground:0,wall:1,slab1:2,railing1:3,slab2:4,railing2:5,rampLong:6,rampSide:7,rampSteep:8,rampStep:9},z={x0:14,x1:46,y0:12,y1:30},W={x0:34,x1:52,y0:16,y1:26},P={x0:5,x1:13,y:21},j={x:24,y0:31,y1:34},$={x0:53,x1:56,y:21},q={x0:31,x1:33,y:21},ce={x0:20,x1:22},me={x0:40,x1:42},Ce=[{x0:8,x1:11,y0:14,y1:17},{x0:60,x1:63,y0:30,y1:33}],re=t=>Array.from({length:te},()=>Array(ee).fill(t)),_e=(t,e,a)=>t>=e&&t<=a,Ie=(function(){const t=re(p.ground);for(let e=0;e<te;e+=1)for(let a=0;a<ee;a+=1)(e<2||e>=te-2||a<2||a>=ee-2)&&(t[e][a]=p.wall);for(const e of Ce)for(let a=e.y0;a<=e.y1;a+=1)for(let r=e.x0;r<=e.x1;r+=1)t[a][r]=p.wall;for(let e=P.x0;e<=P.x1;e+=1)t[P.y][e]=p.rampLong;for(let e=j.y0;e<=j.y1;e+=1)t[e][j.x]=p.rampSide;for(let e=$.x0;e<=$.x1;e+=1)t[$.y][e]=p.rampSteep;return t})(),ue=(t,e,a,r,n)=>{for(let o=e.y0;o<=e.y1;o+=1)for(let i=e.x0;i<=e.x1;i+=1){const l=i===e.x0||i===e.x1||o===e.y0||o===e.y1;t[o][i]=l&&!n(i,o)?r:a}},Ne=(function(){const t=re(0);ue(t,z,p.slab1,p.railing1,(e,a)=>e===z.x0&&a===P.y||a===z.y1&&e===j.x||a===z.y0&&_e(e,ce.x0,ce.x1));for(let e=q.x0;e<=q.x1;e+=1)t[q.y][e]=p.rampStep;return t})(),De=(function(){const t=re(0);return ue(t,W,p.slab2,p.railing2,(e,a)=>e===W.x0&&a===q.y||e===W.x1&&a===$.y||a===W.y1&&_e(e,me.x0,me.x1)),t})(),he=(t,e)=>[t*S+S/2,e*S+S/2],U=(t,e,a,r=64)=>({density:40,layer:3,position:[t*S,e*S+(S-r)/2],angle:0,width:r,height:r,img:"b1.png",linearDamping:6,angularDamping:14,level:a}),g=(t,e,a)=>[...he(t,e),a],M=(t,e,a,r)=>[...he(t,e),a,r],Fe={setId:"c1",scale:.4,spriteSheet:{img:"tiles.png",frames:[[480,64,32,32],[128,224,32,32],[288,64,32,32],[352,96,32,32],[96,0,32,32],[64,32,32,32],[352,64,32,32],[384,64,32,32],[416,64,32,32],[320,64,32,32]]},layers:{1:[p.ground,p.rampLong,p.rampSide,p.rampSteep],2:[p.wall]},volumes:{2:1},step:S,physicsStatic:[p.wall],levels:{1:{map:Ne,floor:[p.slab1,p.railing1,p.rampStep],walls:[p.railing1],layers:{1:[p.slab1,p.rampStep],4:[p.railing1]},volumes:{4:.35}},2:{map:De,floor:[p.slab2,p.railing2],walls:[p.railing2],layers:{1:[p.slab2],4:[p.railing2]},volumes:{4:.35}}},ramps:[{tile:p.rampLong,dir:"east",from:0,to:1},{tile:p.rampSide,dir:"north",from:0,to:1},{tile:p.rampSteep,dir:"west",from:0,to:2},{tile:p.rampStep,dir:"east",from:1,to:2}],physicsDynamic:[U(41,25,2,32),U(21,13,1,32),U(8,24,0),U(62,38,0)],respawns:{team1:[g(58,21,180),M(41,22,90,2),M(20,20,0,1),M(45,18,180,2),g(5,8,0),g(9,8,0),g(5,40,0),g(9,40,0)],team2:[M(24,28,90,0),g(20,33,0),M(21,15,270,1),M(50,21,180,2),M(40,28,180,1),g(60,8,180),g(64,8,180),g(60,40,180)]},map:Ie},Le={canopy:Me,garden:Ee,overpass:Be,"pool mini":Oe,terraces:Fe},ae={m1:{constructor:"Tank",currentWeapon:"w1",size:2,accelerationFactor:1e3,brakingFactor:.3,maxForwardSpeed:260,maxReverseSpeed:-130,baseTurnTorqueFactor:215,damping:{linear:3,angular:100},fixture:{density:200,friction:.5,restitution:.1},lateralGrip:20,turnSpeedThreshold:10,baseTurnFactorRatio:.8,reverseTurnMultiplier:.7,throttleIncreaseRate:2,throttleDecreaseRate:2.5,strainFactor:1.5,maxGunAngle:1.4,gunRotationSpeed:3,gunCenterSpeed:10}},Ve={w1:{type:"hitscan",impulseMagnitude:75e5,damage:40,range:1500,fireRate:.01,spread:0,consumption:1,cameraShake:{intensity:20,duration:200}},w2:{type:"explosive",constructor:"Bomb",time:300,shotOutcomeId:"w2e",size:8,fireRate:.1,damage:70,radius:50,impulseMagnitude:2e6,cameraShake:{intensity:30,duration:400}}},ze={m1:{id:1,kind:"indexed8",class:"hot",fields:[{name:"x",ty:"f32",interp:"lerp"},{name:"y",ty:"f32",interp:"lerp"},{name:"angle",ty:"f32",interp:"lerpAngle"},{name:"gunRotation",ty:"f32",interp:"lerpAngle"},{name:"vx",ty:"f32",interp:"lerp"},{name:"vy",ty:"f32",interp:"lerp"},{name:"engineLoad",ty:"f32",interp:"lerp"},{name:"condition",ty:"u8"},{name:"size",ty:"u8"},{name:"team",ty:"u8"},{name:"angvel",ty:"f32",interp:"lerp"},{name:"z",ty:"f32",interp:"lerp"},{name:"level",ty:"u8"}]},w1:{id:2,kind:"list16",class:"event",fields:[{name:"startX",ty:"f32"},{name:"startY",ty:"f32"},{name:"endX",ty:"f32"},{name:"endY",ty:"f32"},{name:"bodyX",ty:"f32"},{name:"bodyY",ty:"f32"},{name:"wasHit",ty:"u8"},{name:"shooterId",ty:"u8"},{name:"startLevel",ty:"u8"},{name:"endLevel",ty:"u8"}]},w2:{id:3,kind:"indexed32",class:"event",fields:[{name:"x",ty:"f32"},{name:"y",ty:"f32"},{name:"angle",ty:"f32"},{name:"size",ty:"u8"},{name:"time",ty:"u16"},{name:"ownerId",ty:"u8"},{name:"level",ty:"u8"}]},w2e:{id:4,kind:"list16",class:"event",fields:[{name:"x",ty:"f32"},{name:"y",ty:"f32"},{name:"radius",ty:"f32"},{name:"level",ty:"u8"}]},c1:{id:5,kind:"indexedNoNull8",class:"hot",optionalFrom:5,fields:[{name:"x",ty:"f32",interp:"lerp"},{name:"y",ty:"f32",interp:"lerp"},{name:"angle",ty:"f32",interp:"lerpAngle"},{name:"z",ty:"f32",interp:"lerp",role:"z"},{name:"level",ty:"u8",role:"level"},{name:"vx",ty:"f32",interp:"lerp"},{name:"vy",ty:"f32",interp:"lerp"},{name:"angvel",ty:"f32",interp:"lerp"}]},c2:{id:6,kind:"indexedNoNull8",class:"hot",optionalFrom:5,fields:[{name:"x",ty:"f32",interp:"lerp"},{name:"y",ty:"f32",interp:"lerp"},{name:"angle",ty:"f32",interp:"lerpAngle"},{name:"z",ty:"f32",interp:"lerp",role:"z"},{name:"level",ty:"u8",role:"level"},{name:"vx",ty:"f32",interp:"lerp"},{name:"vy",ty:"f32",interp:"lerp"},{name:"angvel",ty:"f32",interp:"lerp"}]}},We={parts:{models:ae,weapons:Ve,mapConstructor:"Map",hitscanService:"HitscanService",friendlyFire:!1},snapshot:ze,soundCues:{roundStart:"roundStart",victory:"victory",defeat:"defeat",frag:"frag",death:"gameOver"},initialVote:"teamChange",maps:Le,mapScale:.3,currentMap:"pool mini",mapsInVote:4,mapSetId:"c1",coreParams:{levels:{fallTime:.35,fallDamage:15,maxFallDamage:100,climbGravity:500,climbMaxSpeedFactor:.5}},roomDefaults:{maxPlayers:8},roomForm:[{name:"maxPlayers",control:"text",label:"Max players",numeric:!0},{name:"roundTime",control:"text",label:"Round time",unit:"s",numeric:!0},{name:"mapTime",control:"text",label:"Map time",unit:"s",numeric:!0},{name:"friendlyFire",control:"checkbox",label:"Friendly fire"},{name:"map",control:"select",label:"Map",source:"maps"}],stat:{name:{key:0,bodyMethod:"=",headSync:!0,headMethod:"#"},status:{key:1,bodyMethod:"=",bodyValue:"",headValue:""},score:{key:2,bodyMethod:"+",bodyValue:0,headMethod:"+",headValue:0},deaths:{key:3,bodyMethod:"+",bodyValue:0,headMethod:"+",headValue:0},latency:{key:4,bodyMethod:"="}},playerState:{defaultState:{}},panel:{fields:{health:{key:"h",value:100},w1:{key:"w1",value:200},w2:{key:"w2",value:100}},activeKey:"wa"},scripted:{namePrefix:"Bot",defaultModel:"m1"},spectatorTeam:"spectators",teams:{team1:1,team2:2,spectators:3},playerKeys:{forward:{key:1},back:{key:2},left:{key:4},right:{key:8},gunCenter:{key:16,type:1},gunLeft:{key:32},gunRight:{key:64},fire:{key:128,type:1},nextWeapon:{key:256,type:1},prevWeapon:{key:512,type:1}}},Ue={roundStart:{file:"round-start",priority:200,volume:.35},victory:{file:"victory",priority:200,volume:.38},defeat:{file:"defeat",priority:200,volume:.5},frag:{file:"frag",priority:150,volume:.26},hit:{file:"hit",priority:150,volume:.36},gameOver:{file:"game-over",priority:150,volume:.31},shot:{file:"shot",priority:100,volume:.51},explosion:{file:"explosion",priority:100,volume:.74},bombHasBeenPlanted:{file:"bomb-has-been-planted",priority:90,volume:.48},tankEngine:{file:"tank-engine",priority:50,loop:!0,volume:.5}},Ye={codecList:["webm","mp3"],path:"/sounds/",spatial:{mode:"topDown",virtualElevation:108,innerRadius:5},sounds:Ue},Pe={mode:"hole",radius:260,softness:.45,minAlpha:.12,layerAlpha:.4,fadeRate:6,lowerTint:11579584},je={shear:.22,levelZStride:100},$e={enabled:!0,slices:4,rampSegments:4,sideTint:10133674},qe={scaleGain:.1,baseAlpha:.4,alphaFalloff:.12,sizeFactor:1.05},Ge={parts:{gameSets:{c1:["Map","MapRadar"],c2:["Map"],m1:["Tank","TankRadar","Smoke","Tracks"],w1:["ShotEffect"],w2:["Bomb"],w2e:["ExplosionEffect"]},entitiesOnCanvas:{Map:"vimp",MapRadar:"radar",TankRadar:"radar",Tank:"vimp",ShotEffect:"vimp",Bomb:"vimp",ExplosionEffect:"vimp",Smoke:"vimp",Tracks:"vimp"},bakedAssets:{vimp:[{name:"explosionTexture",component:"ExplosionEffect",params:{radius:50,blur:2,quality:40,color:16777215}},{name:"impactParticleTexture",component:"ShotEffect",params:{radius:4,blur:1,quality:10,color:16777215}},{name:"funnelTexture",component:"ExplosionEffect",params:{baseRadius:25,irregularity:4,blur:3,numPoints:20,colorFill:1842204,colorRim:11579568,rimWidth:4,variants:5}},{name:"smokeTexture",component:"Smoke",params:{radius:3,blur:1,quality:40,color:16777215}},{name:"tankTexture",component:"Tank",params:{colors:{teamId1:5579298,teamId2:2250018}}},{name:"bombTexture",component:"Bomb",params:{colorOuter:16777215,colorInner:986895}},{name:"tankShadowTexture",component:"Tank",params:{width:40,height:30,radius:6,blur:2,quality:20,color:0}},{name:"trackMarkTexture",component:"Tracks",params:{width:4,length:5,color:1710610}}],radar:[{name:"tankRadarTexture",component:"TankRadar",params:{radius:6,borderWidth:2,crossSize:9,crossThickness:1.5,colors:{teamId1:5579298,teamId2:2250018}}}]},componentDependencies:{renderer:["Map","Tank","Tracks","Smoke","Bomb","ShotEffect","ExplosionEffect"],assetsBase:["Map"],soundManager:["ExplosionEffect","ShotEffect","Bomb","Tank"],mapDynamics:["ShotEffect"],levelView:["Tank","Map","MapRadar","Smoke","Bomb","ShotEffect","ExplosionEffect","Tracks"],localPlayer:["Tank","ShotEffect"]},seeThrough:Pe,parallax:je,volume:$e,shadow:qe,sounds:Ye},initIdList:["vimp","radar","panel","chat"],modules:{canvasManager:{canvases:{vimp:{width:960,height:600,aspectRatio:"16:9",baseScale:"5:1",dynamicCamera:!0,shakeCamera:!0},radar:{width:150,height:150,fixSize:"150",baseScale:"1:8"}}},controls:{keySetList:[{78:"nextPlayer",80:"prevPlayer"},{87:"forward",83:"back",65:"left",68:"right",85:"gunCenter",75:"gunLeft",76:"gunRight",74:"fire",78:"nextWeapon",80:"prevWeapon"}]},chat:{params:{messages:{s:["Team {0} is full. Your current team: {1}","Your team: {0}","Your new team: {0}","Your new status: spectator","⚔️ {0} killed {1}","⚡ {0} joined the game","👋 {0} left the game"],v:["A vote has been created","Voting has started","Your vote has been accepted","Voting is temporarily unavailable","Vote passed","Vote failed"],m:["Current map: {0}","Next map: {0}"],c:["Command not found","Your rank: {0}"],n:["Invalid name","{0} changed name to {1}"],b:["Only active players can use /bot","Invalid bot count","Invalid team name","{0} bot(s) created for {1}","All bots removed from {0}","{0} bot(s) created","All bots removed"]}}},panel:{keys:{t:"time",h:"health",wa:"activeWeapon",w1:"bullet",w2:"bomb"},fields:[{name:"health",elem:"panel-health",type:"bar",max:100,blocks:30},{name:"bullet",elem:"panel-bullet",type:"weapon"},{name:"bomb",elem:"panel-bomb",type:"weapon"},{name:"time",elem:"panel-time",type:"time"}]},stat:{params:{columns:["names","status","score","deaths","latency"],heads:{1:"team1",2:"team2"},bodies:{1:"team1",2:"team2",3:"spectators"},sortList:{team1:[[2,!0],[3,!1]],team2:[[2,!0],[3,!1]]}}},vote:{params:{templates:{teamChange:["Choose a team","teams",!0],mapChangeBySystem:["Choose the next map"],mapChangeByUser:["{0} suggested the map: {1}",["Yes","No"]],createBotsForTeam:["{0} suggests creating {1} bot(s) to {2}. Agree?",["Yes","No"]],removeBotsForTeam:["{0} suggests removing all bots from {1}. Agree?",["Yes","No"]],createBots:["{0} suggests creating {1} bot(s) to the game. Agree?",["Yes","No"]],removeBots:["{0} suggests removing all bots from the game. Agree?",["Yes","No"]]},menu:[["teamChange",["Switch team","teams"]],["mapChange",["Suggest map","maps"]]]}}},gameInform:{list:["{0} WINS!","ROUND START!","GAME OVER!"]}},He={elems:{authId:"auth",errorId:"auth-error",enterId:"auth-enter",fieldsId:"auth-fields",titleId:"auth-title",informsId:"auth-informs"},texts:{title:"Tanks",sections:[{heading:"Controls",lines:[{keys:"w, a, s, d",text:"move the tank"},{keys:"k, l",text:"turn the gun"},{keys:"u",text:"center the gun"},{keys:"j",text:"fire"},{keys:"n, p",text:"switch weapon/player",last:!0},{keys:"c",text:"chat/command line"},{keys:"m",text:"menu"},{keys:"<Tab>",text:"stats",last:!0}]},{heading:"Command line",lines:[{keys:"/name <name>",text:"change nickname"},{keys:"/mapname",text:"show current map name"},{keys:"/timeleft",text:"map time left"},{separator:!0},{keys:"/bot <count>",text:"add bot(s)"},{keys:"/bot <count> <team>",text:"add to team"},{keys:"/bot 0",text:"remove all bots"},{keys:"/bot 0 <team>",text:"remove from team"}]}]},params:[{name:"model",value:"m1",options:{control:"select",label:"Model",options:Object.keys(ae),validator:"isValidModel",storage:"model"}}],validators:{isValidModel:t=>t in ae}};function ge(t,e,a){a?(t.scripted.removeScripted(a),e>0?(e=t.scripted.createScripted(e,a),t.chat.pushSystem("BOT_CREATED_FOR_TEAM",[e,a])):t.chat.pushSystem("BOT_REMOVED_FROM_TEAM",[a])):(t.scripted.removeScripted(),e>0?(e=t.scripted.createScripted(e,null),t.chat.pushSystem("BOT_CREATED",[e])):t.chat.pushSystem("BOT_REMOVED")),t.roundManager.initiateNewRound()}function Xe(t,e,a,r){const n=t.participants.get(e).name,o="botManagement";let i,l;if(!t.voteCoordinator.canCreateVote(o,e))return;r?a>0?(i="createBotsForTeam",l=[n,a,r]):(i="removeBotsForTeam",l=[n,r]):a>0?(i="createBots",l=[n,a]):(i="removeBots",l=[n]);const d={name:i,params:l},c=t.participants.getHumans().map(m=>m.gameId).filter(m=>m!==e);t.voteCoordinator.createVote({voteName:i,voteCategory:o,payload:d,resultFunc:m=>{m==="Yes"?(t.chat.pushSystem("VOTE_PASSED"),ge(t,a,r)):t.chat.pushSystem("VOTE_FAILED")},userList:c,gameId:e})}const Ke={name:"/bot",handler(t,e,a){if(t.participants.get(e).teamId===t.spectatorId){t.chat.pushSystemByUser(e,"BOT_PLAYERS_ONLY");return}const n=parseInt(a[0],10),o=a[1]||null;if(isNaN(n)||n<0){t.chat.pushSystemByUser(e,"BOT_INVALID_COUNT");return}if(o&&(!t.teams[o]||o===t.spectatorTeam)){t.chat.pushSystemByUser(e,"BOT_INVALID_TEAM");return}if(n===0){if(o&&t.scripted.getCountForTeam(o)===0){t.chat.pushSystemByUser(e,"BOT_REMOVED_FROM_TEAM",[o]);return}if(t.scripted.getCount()===0){t.chat.pushSystemByUser(e,"BOT_REMOVED");return}}t.participants.getHumans().filter(l=>l.teamId!==t.spectatorId).length<=1?ge(t,n,o):Xe(t,e,n,o)}};function Ze(t){const e=Math.floor(t/1e3),a=String(Math.floor(e/60)).padStart(2,"0"),r=String(e%60).padStart(2,"0");return`${a}:${r}`}const Qe={name:"/name",handler(t,e,a){t.roundManager.changeName(e,a.join(" "))}},Je={name:"/nr",handler(t,e){t.isDevMode?t.roundManager.initiateNewRound():t.chat.pushSystemByUser(e,"COMMANDS_NOT_FOUND")}},et={name:"/timeleft",handler(t,e){t.chat.pushSystemByUser(e,[Ze(t.timerManager.getMapTimeLeft())])}},tt={name:"/mapname",handler(t,e){t.chat.pushSystemByUser(e,[t.roundManager.currentMap])}},at={name:"/rank",handler(t,e){t.chat.pushSystemByUser(e,"RANK",[t.playerDataSync.getRank(e)])}},rt={BOT_PLAYERS_ONLY:"b:0",BOT_INVALID_COUNT:"b:1",BOT_INVALID_TEAM:"b:2",BOT_CREATED_FOR_TEAM:"b:3",BOT_REMOVED_FROM_TEAM:"b:4",BOT_CREATED:"b:5",BOT_REMOVED:"b:6"};class nt{constructor({participants:e,coreAdapter:a,panel:r,stat:n,scripted:o}){this._participants=e,this._coreAdapter=a,this._panel=r,this._stat=n,this._model=o.defaultModel,this._respawns=null}createMap(e){this._respawns=e.respawns}createScripted(e,a=null){if(!this._respawns)return 0;const r=this._participants.getPlayableTeams();let n=0;for(let o=0;o<e&&!this._participants.isFull;o+=1){let i=a;if(i||(i=r.sort((c,m)=>this._participants.getTeamSize(c)-this._participants.getTeamSize(m))[0]),!i||!this._respawns[i]||this._participants.getTeamSize(i)>=this._respawns[i].length)continue;const l=this._participants.createScripted({team:i,model:this._model}),d=this._participants.get(l);this._stat.addUser(l,d.teamId,{name:d.name,status:"dead",latency:"BOT"}),this._panel.addUser(l),n+=1}return n}removeScripted(e=null){(e?this._participants.getScripted().filter(r=>r.team===e):this._participants.getScripted()).forEach(r=>this._removeBotById(r.gameId))}removeOneForHuman(e){for(const a of this._participants.getScripted())if(a.team===e)return this._removeBotById(a.gameId),!0;return!1}_removeBotById(e){const a=this._participants.get(e);!a||!a.isScripted||(this._stat.removeUser(e,a.teamId),this._panel.removeUser(e),this._coreAdapter.removePlayer(e),this._participants.remove(e))}getBotById(e){const a=this._participants.get(e);return a&&a.isScripted?a:void 0}getBots(){return this._participants.getScripted()}getCount(){return this._participants.getScripted().length}getCountForTeam(e){return this._participants.getScripted().filter(a=>a.team===e).length}getCountsPerTeam(){const e={};for(const a of this._participants.getScripted())e[a.team]=(e[a.team]||0)+1;return e}}function st(t){return{scripted:new nt(t)}}const ot=t=>(t??"").split(/[?#]/)[0].endsWith(".js"),it=t=>import(t),lt={id:"tanks",engineApi:4,requires:["map.layers","map.levelsN"],async createCore(t,{wasmUrl:e}){if(ot(e)){const a=await it(e);return new a.GameCore(t)}return await ke({module_or_path:e}),new Q(t)},gameConfig:We,authSchema:He,chatCommands:[Ke,Qe,Je,et,tt,at],systemMessages:rt,createModules:st,buildClientGameConfig:()=>Ge};export{lt 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": "957118e6aeaed6c9",
|
|
9
9
|
"title": "Tanks",
|
|
10
10
|
"entries": {
|
|
11
|
-
"client": "/games/tanks/client-
|
|
12
|
-
"host": "/games/tanks/host-
|
|
13
|
-
"wasm": "/games/tanks/assets/vimp_tanks_core_bg-
|
|
11
|
+
"client": "/games/tanks/client-BOXjbg0z.js",
|
|
12
|
+
"host": "/games/tanks/host-XM9vOGou.js",
|
|
13
|
+
"wasm": "/games/tanks/assets/vimp_tanks_core_bg-EoY5gurr.wasm",
|
|
14
14
|
"wasmNode": "./core-node/vimp_tanks_core.js"
|
|
15
15
|
},
|
|
16
16
|
"assetsBase": "/games/tanks/",
|
|
17
17
|
"maps": {
|
|
18
|
-
"version": "
|
|
18
|
+
"version": "5f8d4e5e9db94386",
|
|
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,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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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]]}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/sounds/defeat.mp3
CHANGED
|
Binary file
|
package/dist/sounds/defeat.webm
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/sounds/frag.mp3
CHANGED
|
Binary file
|
package/dist/sounds/frag.webm
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/sounds/hit.mp3
CHANGED
|
Binary file
|
package/dist/sounds/hit.webm
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/sounds/shot.mp3
CHANGED
|
Binary file
|
package/dist/sounds/shot.webm
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/sounds/victory.mp3
CHANGED
|
Binary file
|
package/dist/sounds/victory.webm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vimp-games/tanks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "VIMP Tanks — игра-плагин для движка VIMP",
|
|
5
5
|
"homepage": "https://github.com/lgick/vimp-tanks#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"check:pack": "node ./scripts/check-pack.js",
|
|
28
28
|
"prepack": "node ./scripts/check-pack.js",
|
|
29
29
|
"audio:process": "node ./scripts/process-audio.js",
|
|
30
|
+
"audio:check": "node ./scripts/check-audio-levels.js",
|
|
30
31
|
"core:build": "npm run core:build:web && npm run core:build:node",
|
|
31
32
|
"core:build:web": "wasm-pack build core --release --target web --out-dir pkg-web",
|
|
32
33
|
"core:build:node": "wasm-pack build core --release --target nodejs --out-dir pkg-node",
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
"globals": "^16.2.0",
|
|
50
51
|
"happy-dom": "^20.10.6",
|
|
51
52
|
"pixi.js": "8.19.0",
|
|
52
|
-
"vimp-engine": "^0.
|
|
53
|
+
"vimp-engine": "^0.33.0",
|
|
53
54
|
"vite": "^7.1.11",
|
|
54
55
|
"vitest": "^4.1.9"
|
|
55
56
|
}
|
|
Binary file
|
package/dist/client-BS_Gxxiz.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import{UniformGroup as Ut,Filter as Wt,GpuProgram as Gt,GlProgram as Zt,defaultFilterVert as $t,Spritesheet as qt,Container as A,Sprite as M,Rectangle as D,Assets as q,Ticker as L,MeshGeometry as Kt,Mesh as jt,Graphics as k,Text as Rt,Particle as Jt,ParticleContainer as zt,BlurFilter as Vt}from"pixi.js";const Qt=4;class ut{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,gt.unregister(this),t}free(){const t=this.__destroy_into_raw();c.__wbg_clientcore_free(t,0)}abi_describe(){let t,e;try{const i=c.clientcore_abi_describe(this.__wbg_ptr);return t=i[0],e=i[1],V(i[0],i[1])}finally{c.__wbindgen_free(t,e,1)}}apply_aim(t,e,i,s){c.clientcore_apply_aim(this.__wbg_ptr,t,e,i,s)}apply_input(t,e,i){const s=z(t,c.__wbindgen_malloc,c.__wbindgen_realloc),o=I,r=z(e,c.__wbindgen_malloc,c.__wbindgen_realloc),a=I;c.clientcore_apply_input(this.__wbg_ptr,s,o,r,a,i)}cycle_weapon(t){c.clientcore_cycle_weapon(this.__wbg_ptr,t)}debug_json(){let t,e;try{const i=c.clientcore_debug_json(this.__wbg_ptr);return t=i[0],e=i[1],V(i[0],i[1])}finally{c.__wbindgen_free(t,e,1)}}decode_frame(t){let e,i;try{const s=at(t,c.__wbindgen_malloc),o=I,r=c.clientcore_decode_frame(this.__wbg_ptr,s,o);return e=r[0],i=r[1],V(r[0],r[1])}finally{c.__wbindgen_free(e,i,1)}}dispatch(t,e){const i=z(t,c.__wbindgen_malloc,c.__wbindgen_realloc),s=I,o=at(e,c.__wbindgen_malloc),r=I,a=c.clientcore_dispatch(this.__wbg_ptr,i,s,o,r);var h=ee(a[0],a[1]).slice();return c.__wbindgen_free(a[0],a[1]*1,1),h}hot_ptr(){return c.clientcore_hot_ptr(this.__wbg_ptr)>>>0}hot_values(){const t=c.clientcore_hot_values(this.__wbg_ptr);var e=yt(t[0],t[1]).slice();return c.__wbindgen_free(t[0],t[1]*4,4),e}map_dynamics_to_world(t,e,i){const s=z(t,c.__wbindgen_malloc,c.__wbindgen_realloc),o=I,r=c.clientcore_map_dynamics_to_world(this.__wbg_ptr,s,o,e,i);var a=yt(r[0],r[1]).slice();return c.__wbindgen_free(r[0],r[1]*4,4),a}my_game_id(){return c.clientcore_my_game_id(this.__wbg_ptr)}constructor(t){const e=z(t,c.__wbindgen_malloc,c.__wbindgen_realloc),i=I,s=c.clientcore_new(e,i);if(s[2])throw xt(s[1]);return this.__wbg_ptr=s[0],gt.register(this,this.__wbg_ptr,this),this}offset(){return c.clientcore_offset(this.__wbg_ptr)}push_frame(t,e){const i=at(t,c.__wbindgen_malloc),s=I;return c.clientcore_push_frame(this.__wbg_ptr,i,s,e)!==0}reset(){c.clientcore_reset(this.__wbg_ptr)}resync(){c.clientcore_resync(this.__wbg_ptr)}sample(t){return c.clientcore_sample(this.__wbg_ptr,t)>>>0}set_active(t){c.clientcore_set_active(this.__wbg_ptr,t)}set_map(t){const e=z(t,c.__wbindgen_malloc,c.__wbindgen_realloc),i=I,s=c.clientcore_set_map(this.__wbg_ptr,e,i);if(s[1])throw xt(s[0])}set_model(t){const e=z(t,c.__wbindgen_malloc,c.__wbindgen_realloc),i=I;c.clientcore_set_model(this.__wbg_ptr,e,i)}sync_panel(t){const e=z(t,c.__wbindgen_malloc,c.__wbindgen_realloc),i=I;c.clientcore_sync_panel(this.__wbg_ptr,e,i)}take_divergence(){let t,e;try{const i=c.clientcore_take_divergence(this.__wbg_ptr);return t=i[0],e=i[1],V(i[0],i[1])}finally{c.__wbindgen_free(t,e,1)}}take_frames(){let t,e;try{const i=c.clientcore_take_frames(this.__wbg_ptr);return t=i[0],e=i[1],V(i[0],i[1])}finally{c.__wbindgen_free(t,e,1)}}try_fire(t){const e=c.clientcore_try_fire(this.__wbg_ptr,t);let i;return e[0]!==0&&(i=V(e[0],e[1]).slice(),c.__wbindgen_free(e[0],e[1]*1,1)),i}}Symbol.dispose&&(ut.prototype[Symbol.dispose]=ut.prototype.free);function te(){return{__proto__:null,"./vimp_tanks_core_bg.js":{__proto__:null,__wbg_Error_92b29b0548f8b746:function(t,e){return Error(V(t,e))},__wbg___wbindgen_throw_344f42d3211c4765:function(t,e){throw new Error(V(t,e))},__wbindgen_init_externref_table:function(){const t=c.__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 gt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>c.__wbg_clientcore_free(n,1));typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>c.__wbg_gamecore_free(n,1));function yt(n,t){return n=n>>>0,ie().subarray(n/4,n/4+t)}function ee(n,t){return n=n>>>0,U().subarray(n/1,n/1+t)}let K=null;function ie(){return(K===null||K.byteLength===0)&&(K=new Float32Array(c.memory.buffer)),K}function V(n,t){return ne(n>>>0,t)}let j=null;function U(){return(j===null||j.byteLength===0)&&(j=new Uint8Array(c.memory.buffer)),j}function at(n,t){const e=t(n.length*1,1)>>>0;return U().set(n,e/1),I=n.length,e}function z(n,t,e){if(e===void 0){const a=J.encode(n),h=t(a.length,1)>>>0;return U().subarray(h,h+a.length).set(a),I=a.length,h}let i=n.length,s=t(i,1)>>>0;const o=U();let r=0;for(;r<i;r++){const a=n.charCodeAt(r);if(a>127)break;o[s+r]=a}if(r!==i){r!==0&&(n=n.slice(r)),s=e(s,i,i=r+n.length*3,1)>>>0;const a=U().subarray(s+r,s+i),h=J.encodeInto(n,a);r+=h.written,s=e(s,i,r,1)>>>0}return I=r,s}function xt(n){const t=c.__wbindgen_externrefs.get(n);return c.__externref_table_dealloc(n),t}let st=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});st.decode();const se=2146435072;let ht=0;function ne(n,t){return ht+=t,ht>=se&&(st=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),st.decode(),ht=t),st.decode(U().subarray(n,n+t))}const J=new TextEncoder;"encodeInto"in J||(J.encodeInto=function(n,t){const e=J.encode(n);return t.set(e),{read:n.length,written:e.length}});let I=0,c;function re(n,t){return c=n.exports,K=null,j=null,c.__wbindgen_start(),c}async function oe(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(s){if(n.ok&&e(n.type)&&n.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",s);else throw s}const i=await n.arrayBuffer();return await WebAssembly.instantiate(i,t)}else{const i=await WebAssembly.instantiate(n,t);return i instanceof WebAssembly.Instance?{instance:i,module:n}:i}function e(i){switch(i){case"basic":case"cors":case"default":return!0}return!1}}async function ae(n){if(c!==void 0)return c;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),n===void 0&&(n=new URL("/assets/vimp_tanks_core_bg-DJG6soEC.wasm",import.meta.url));const t=te();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:i}=await oe(await n,t);return re(e)}const he='@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}',C=(n,t,e)=>n+(t-n)*e,Q=(n,t,e)=>Math.min(e,Math.max(t,n)),le=n=>n*(Math.PI/180),ce=n=>{for(;n>Math.PI;)n-=Math.PI*2;for(;n<-Math.PI;)n+=Math.PI*2;return n},v=(n,t)=>Math.random()*(t-n)+n,_e=100,b=(n,t)=>n+_e*(t||0),Ot=n=>n.radius*(1-n.softness),ue=(n,t,e)=>{if(t<=n)return e<t?0:1;const i=Math.min(1,Math.max(0,(e-n)/(t-n)));return i*i*(3-2*i)};function de({viewLevel:n,viewX:t,viewY:e,level:i,x:s,y:o,cfg:r}){if((i||0)<=(n||0))return 1;if(r.mode==="layer")return r.layerAlpha;const a=s-t,h=o-e,l=Math.sqrt(a*a+h*h),_=ue(Ot(r),r.radius,l);return r.minAlpha+(1-r.minAlpha)*_}function pe(n,t,e){return(t||0)<(n||0)?e.lowerTint:16777215}const fe=`
|
|
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
|
-
`,wt=`
|
|
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 me(n){const t=new Ut({uHoleCenter:{value:new Float32Array([0,0]),type:"vec2<f32>"},uHoleParams:{value:new Float32Array([n.radius,Ot(n),n.minAlpha]),type:"vec3<f32>"}});return new Wt({glProgram:Zt.from({vertex:$t,fragment:fe,name:"see-through-hole-filter"}),gpuProgram:Gt.from({vertex:{source:wt,entryPoint:"mainVertex"},fragment:{source:wt,entryPoint:"mainFragment"}}),resources:{holeUniforms:t}})}function ge(n,{centerX:t,centerY:e,radius:i,softness:s,minAlpha:o}){const r=n.resources.holeUniforms.uniforms;r.uHoleCenter[0]=t,r.uHoleCenter[1]=e,r.uHoleParams[0]=i,r.uHoleParams[1]=i*(1-s),r.uHoleParams[2]=o}async function Xt({baseTexture:n,spriteSheetData:t,map:e,tiles:i,step:s,renderer:o}){const r={};t.frames.forEach((p,m)=>{const[f,w,y,x]=p;r[`frame${m}`]={frame:{x:f,y:w,w:y,h:x}}});const a={frames:r,meta:{scale:"1"}},h=new qt(n,a);await h.parse();const l=e[0].length*s,_=e.length*s,d=new A;for(let p=0,m=e.length;p<m;p+=1)for(let f=0,w=e[p].length;f<w;f+=1){const y=e[p][f];if(i.includes(y)){const x=`frame${y}`,S=h.textures[x];if(S){const u=new M(S);u.x=f*s,u.y=p*s,d.addChild(u)}else console.warn(`Texture not found. Tile: ${y}, sprite: ${x}`)}}const g=o.generateTexture({target:d,frame:new D(0,0,l,_)});return d.destroy({children:!0}),g}const O=0,X=1,W=2,St=3,vt=4,bt=5,G=6,Y=7,ft=8,nt=9,rt=11,B=12,ye=0,xe=1,we=2,Se=3,ve=4,be=5,Te=6,Me=9,Tt=10,Mt=0,At=1,It=2,Ae=3,Ie=4,ke=6,Ce=0,De=1,Ee=2,Pe=3,kt=0,Ct=1,Le=2,Fe=4,Re=.01;let ze=class extends A{constructor(t,e,i){if(super(),this._baseTexturePromise=null,this._assetUrl=null,this._renderer=i.renderer,this._imageBase=null,this._levelView=i.levelView||null,this._level=0,this._targetAlpha=1,this._holeFilter=null,this._holeStrength=0,this._holeAttached=!1,this._worldX=0,this._worldY=0,this.scale=t.scale,this.sprite=null,this.mapSprite=null,typeof i.assetsBase!="string"){console.error("Map: сервис assetsBase недоступен — карта останется пустой. Объявите assetsBase в componentDependencies и запустите игру на vimp-engine >= 0.9.0");return}this._imageBase=`${i.assetsBase}img/`,t.type==="static"?(this._assetUrl=`${this._imageBase}${t.spriteSheet.img}`,this._baseTexturePromise=q.load(this._assetUrl),this._map=t.map,this._tiles=t.tiles,this._level=t.level||0,this._floor=t.floor||[],this._spriteSheetData=t.spriteSheet,this._step=t.step,this.zIndex=b(Number(t.layer)||1,this._level),this._level>=1&&(this._levelView?.markLayered(),this.onRender=()=>this._updateSeeThrough()),this.createStatic()):t.type==="dynamic"&&(this._assetUrl=`${this._imageBase}${t.img}`,this._baseTexturePromise=q.load(this._assetUrl),this._level=t.level||0,this._layer=Number(t.layer)||2,this.zIndex=b(this._layer,this._level),this._rotation=le(t.angle),this._width=t.width,this._height=t.height,this._x=t.position[0],this._y=t.position[1],this._worldX=this._x*this.scale.x,this._worldY=this._y*this.scale.y,this._levelView&&(this.onRender=()=>this._updateDynamicSeeThrough()),this.createDynamic())}async createDynamic(){try{const t=await this._baseTexturePromise;this.sprite=new M(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.addChild(this.sprite)}catch(t){console.error(`Failed to create dynamic map with asset ${this._assetUrl}:`,t)}}async createStatic(){try{const t=await Xt({baseTexture:await this._baseTexturePromise,spriteSheetData:this._spriteSheetData,map:this._map,tiles:this._tiles,step:this._step,renderer:this._renderer});this.mapSprite=new M(t),this.addChild(this.mapSprite)}catch(t){console.error(`Failed to create static map with asset ${this._assetUrl}:`,t)}}_updateSeeThrough(){if(!this._levelView||!this.mapSprite)return;const t=this._levelView.cfg,e=L.shared.deltaMS/1e3,i=Math.min(1,t.fadeRate*e);if(this._levelView.mode==="layer"){const o=this._levelView.level<this._level&&this._hasFloorAt(this._levelView.x,this._levelView.y);this._targetAlpha=o?t.layerAlpha:1,this.alpha+=(this._targetAlpha-this.alpha)*i;return}const s=this._levelView.level<this._level;this._holeStrength+=((s?1:0)-this._holeStrength)*i,this._updateHole(t)}_updateHole(t){const e=this.parent;if(this._holeStrength<Re||!e){this._holeAttached&&(this.filters=[],this._holeAttached=!1);return}this._holeFilter||(this._holeFilter=me(t)),this._holeAttached||(this.filters=[this._holeFilter],this._holeAttached=!0),ge(this._holeFilter,{centerX:this._levelView.x*e.scale.x+e.position.x,centerY:this._levelView.y*e.scale.y+e.position.y,radius:t.radius*e.scale.x,softness:t.softness,minAlpha:1+(t.minAlpha-1)*this._holeStrength})}_updateDynamicSeeThrough(){!this._levelView||!this.sprite||(this.alpha=this._levelView.alphaFor(this._level,this._worldX,this._worldY),this.tint=this._levelView.tintFor(this._level))}_hasFloorAt(t,e){const i=Math.floor(t/this.scale.x/this._step),s=Math.floor(e/this.scale.y/this._step),o=this._map?.[s]?.[i];return o!==void 0&&this._floor.includes(o)}update(t){this.sprite&&(this.sprite.x=t[kt]/this.scale.x,this.sprite.y=t[Ct]/this.scale.y,this.sprite.rotation=t[Le]),this._worldX=t[kt],this._worldY=t[Ct];const e=t[Fe]||0;e!==this._level&&(this._level=e,this.zIndex=b(this._layer,e))}destroy(t){this._holeFilter&&(this.filters=[],this._holeAttached=!1,this._holeFilter.destroy(),this._holeFilter=null),this.mapSprite&&(this.mapSprite.destroy({children:!0,texture:!0,textureSource:!0}),this.mapSprite=null),super.destroy({children:!0,texture:!1,textureSource:!1,...t}),this._assetUrl&&q.cache.has(this._assetUrl)&&q.unload(this._assetUrl).catch(e=>console.warn(`Failed to unload asset ${this._assetUrl} (was in cache):`,e)),this.sprite=null,this._baseTexturePromise=null,this._assetUrl=null,this._map=null,this._tiles=null,this._floor=null,this._spriteSheetData=null,this._renderer=null,this._levelView=null}};function Yt(n,t){const e=t?.screen;return!n||!e||!n.scale.x||!n.scale.y?null:{x:(e.width/2-n.position.x)/n.scale.x,y:(e.height/2-n.position.y)/n.scale.y,scaleX:n.scale.x,scaleY:n.scale.y}}const Ve={mode:"hole",radius:260,softness:.45,minAlpha:.12,layerAlpha:.4,fadeRate:6,lowerTint:11579584},Oe={enabled:!0,slices:4,shear:.22,sideTint:10133674},Dt=.01;class Xe extends A{constructor(t,e,i){if(super(),this._renderer=i.renderer,this._cfg=Oe,this._volume=Number(t.volume)||0,this._slices=[],this._basePositions=null,this._texture=null,this._camX=null,this._camY=null,!(t.type!=="static"||this._volume<=0||!this._cfg.enabled||this._cfg.slices<1)){if(typeof i.assetsBase!="string"){console.error("MapVolume: сервис assetsBase недоступен — объём не построен.");return}this.scale=t.scale,this._map=t.map,this._tiles=t.tiles,this._step=t.step,this._spriteSheetData=t.spriteSheet,this._level=t.level||0,this.zIndex=b(Number(t.layer)||1,this._level)+.5,this._assetUrl=`${i.assetsBase}img/${t.spriteSheet.img}`,this._baseTexturePromise=q.load(this._assetUrl),this.onRender=()=>this._updateSlices(),this.createSlices()}}async createSlices(){try{this._texture=await Xt({baseTexture:await this._baseTexturePromise,spriteSheetData:this._spriteSheetData,map:this._map,tiles:this._tiles,step:this._step,renderer:this._renderer});const t=this._map[0].length,e=this._map.length,i=this._step,s=[],o=[],r=[];for(let l=0;l<=e;l+=1)for(let _=0;_<=t;_+=1)s.push(_*i,l*i),o.push(_/t,l/e);for(let l=0;l<e;l+=1)for(let _=0;_<t;_+=1){const d=l*(t+1)+_,g=d+1,p=d+t+1,m=p+1;r.push(d,g,p,g,m,p)}this._basePositions=Float32Array.from(s);const a=Float32Array.from(o),h=Uint32Array.from(r);for(let l=1;l<=this._cfg.slices;l+=1){const _=new Kt({positions:Float32Array.from(s),uvs:a,indices:h}),d=new jt({geometry:_,texture:this._texture});d.tint=l===this._cfg.slices?16777215:this._cfg.sideTint,this._slices.push({mesh:d,factor:l/this._cfg.slices}),this.addChild(d)}this._camX=null,this._updateSlices()}catch(t){console.error(`Failed to create map volume with asset ${this._assetUrl}:`,t)}}_updateSlices(){if(!this._basePositions||!this.parent)return;const t=Yt(this.parent,this._renderer);if(!t)return;const e=t.x/this.scale.x,i=t.y/this.scale.y;if(this._camX!==null&&Math.abs(e-this._camX)<Dt&&Math.abs(i-this._camY)<Dt)return;this._camX=e,this._camY=i;const s=this._basePositions;for(let o=0;o<this._slices.length;o+=1){const{mesh:r,factor:a}=this._slices[o],h=this._volume*this._cfg.shear*a,l=r.geometry.positions;for(let _=0;_<s.length;_+=2)l[_]=s[_]+(s[_]-e)*h,l[_+1]=s[_+1]+(s[_+1]-i)*h;r.geometry.getBuffer("aPosition").update()}}update(){}destroy(t){this._texture&&(this._texture.destroy(!0),this._texture=null),super.destroy({children:!0,texture:!1,textureSource:!1,...t}),this._slices=[],this._basePositions=null,this._map=null,this._tiles=null,this._spriteSheetData=null,this._renderer=null,this._baseTexturePromise=null}}const dt=[16777215,9418751,10477760,15783820,14721232,10541296,15773836,12632280],Bt=n=>dt[n]??dt[0],Ye=2,Be=.35;class Ne extends A{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=b(Ye,this._level),this.scale=t.scale,this._draws=this._tiles.some(s=>this._solid.includes(s)),this.radarGraphics=new k,this.addChild(this.radarGraphics),this._levelView=i.levelView||null,this._levelView&&this._draws&&(this.onRender=()=>{this.alpha=this._levelView.level===this._level?1:Be}),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 s=0;s<i.length;s+=1){const o=i[s];this._solid.includes(o)&&t.rect(s*this._step,e*this._step,this._step/2,this._step/2)}}t.fill(Bt(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 Et=2,He=9,Ue=1.5;class We extends A{constructor(t,e){super(),this._level=t[B]||0,this.zIndex=b(Et,this._level),this._textures=e.tankRadarTexture,this.body=new M,this.body.anchor.set(.5),this.levelRing=new k,this.addChild(this.levelRing,this.body),this._drawLevelRing(),this.x=t[O]||0,this.y=t[X]||0,this._condition=t[Y],this._teamId=t[nt],this.scale.set(5,5),this.create()}_drawLevelRing(){this.levelRing.clear(),this._level>0&&this.levelRing.circle(0,0,He).stroke({width:Ue,color:Bt(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[O],this.y=t[X];const e=t[B]||0;e!==this._level&&(this._level=e,this.zIndex=b(Et,e),this._drawLevelRing());const i=t[Y],s=t[nt];let o=!1;i!==void 0&&i!==this._condition&&(this._condition=i,o=!0),s!==void 0&&s!==this._teamId&&(this._teamId=s,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}}const Ge=.2,Ze=.01;function Nt(){let n=0,t=!1,e=0,i=0,s=0;return{update(o,r,a){if(!t)return t=!0,e=o,i=r,s=a,n;const h=o-e,l=r-i,_=Math.sqrt(h*h+l*l),d=_>Ze?(a-s)/_:0;return e=o,i=r,s=a,n+=(d-n)*Ge,n},get value(){return n}}}const lt=3,$e=.06,qe=.07,Ke=.1,je=.4,Je=.12,Qe=1.3,ti=.35,ei=3.4,ii=1.4,si=1,Pt=1.1,ni=1.18,ri=.9,oi=1;function ai(n){const t=Q(n,0,1),e=Math.max(0,n-1),i=C(si,Pt,t)+(ni-Pt)*e,s=C(ri,oi,t);return{rate:i,volumeFactor:s}}class hi extends A{constructor(t,e,i,s){super(),this.body=new M,this.gun=new M,this.wreck=new M,this.body.anchor.set(.5),this.wreck.anchor.set(.5),this.addChild(this.body,this.gun,this.wreck),this._textures=e.tankTexture,this._shadowAsset=e.tankShadowTexture||null,this._badgeTextures=e.levelBadgeTexture||null,this._renderer=i.renderer||null,this._shadow=null,this._grade=Nt(),this.x=t[O]||0,this.y=t[X]||0,this.rotation=t[W]||0,this.gun.rotation=t[St]||0,this._engineLoad=t[G]||0,this._condition=t[Y],this._size=t[ft],this._teamId=t[nt],this._z=t[rt]||0,this._level=t[B]||0,this.zIndex=b(lt,this._level),this._isLocal=()=>i.localPlayer?.is(s?.id)===!0,this._levelView=i.levelView||null,this._badge=null,this._badgeTextures&&(this._badge=new M,this._badge.anchor.set(.5),this._badge.visible=!1,this.addChild(this._badge)),this.onRender=()=>this._updateView();const o=this._teamId===1?this._textures.liveTeamId1:this._textures.liveTeamId2,r=o?o.gunAnchor:null;r?this.gun.anchor.set(r.x,r.y):this.gun.anchor.set(.5);const a=10;this._scaleFactor=this._size/a,this.body.scale.set(this._scaleFactor),this.gun.scale.set(this._scaleFactor),this.wreck.scale.set(this._scaleFactor),this._badge&&this._badge.scale.set(this._scaleFactor*ii),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}=ai(this._engineLoad);return{position:{x:this.x,y:this.y},rate:t,volume:this._baseEngineVolume*e}}create(){if(this._condition===0)this.body.visible=!1,this.gun.visible=!1,this.wreck.texture=this._textures.destroyed,this.wreck.visible=!0,this.gun.rotation=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()}}update(t){this.x=t[O],this.y=t[X],this.rotation=t[W],this.gun.rotation=t[St],this._engineLoad=t[G];const e=t[B]||0;this._z=t[rt]||0,e!==this._level&&(this._level=e,this.zIndex=b(lt,e));const i=1+this._z*$e,s=this._grade.update(this.x,this.y,this._z),o=1-Q(Math.abs(s),0,1)*ti;this.body.scale.set(this._scaleFactor*i*o,this._scaleFactor*i),this.gun.scale.set(this._scaleFactor*i*o,this._scaleFactor*i),this._levelView&&this._isLocal()&&this._levelView.set(e,this.x,this.y,this._z),this._condition>0&&(this._soundId===null?this._initSounds():this._soundManager.updateSoundData(this._soundId,this._getSoundData()));const r=t[Y],a=t[nt];let h=!1;r!==void 0&&r!==this._condition&&(this._condition=r,h=!0),a!==void 0&&a!==this._teamId&&(this._teamId=a,h=!0),h&&this.create()}_updateView(){this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this.x,this.y),this.tint=this._levelView.tintFor(this._level)),this._updateShadow(),this._updateBadge()}_updateShadow(){if(!this._shadowAsset||!this.parent)return;if(!this._shadow){const{texture:o,contentSize:r}=this._shadowAsset;this._shadow=new M(o),this._shadow.anchor.set(.5),this._shadowScale=this._size*Qe/r,this.parent.addChild(this._shadow)}const t=this._shadow,e=this._condition!==0;if(t.visible=e,!e)return;const i=Yt(this.parent,this._renderer),s=qe*this._z;t.x=i?this.x+(this.x-i.x)*s:this.x,t.y=i?this.y+(this.y-i.y)*s:this.y,t.rotation=this.rotation,t.scale.set(this._shadowScale*(1+this._z*Ke)),t.alpha=Math.max(0,je-this._z*Je)*this.alpha,t.zIndex=b(lt-1,Math.floor(this._z))}_updateBadge(){if(!this._badge)return;const t=!!this._levelView?.layered&&this._isLocal();if(this._badge.visible=t,!t)return;const e=this._badgeTextures[this._level];e&&this._badge.texture!==e&&(this._badge.texture=e);const i=this._size*ei;this._badge.x=i*Math.sin(this.rotation),this._badge.y=i*Math.cos(this.rotation),this._badge.rotation=-this.rotation}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 li=2;class ci extends A{constructor(t,e,i){super(),this._level=t[ke]||0,this.zIndex=b(li,this._level),this._levelView=i.levelView||null,this._levelView&&(this.onRender=()=>{this.alpha=this._levelView.alphaFor(this._level,this.x,this.y),this.tint=this._levelView.tintFor(this._level)}),this.body=new M(e.bombTexture),this.body.anchor.set(.5),this.x=t[Mt],this.y=t[At],this.rotation=t[It],this._size=t[Ae],this._totalDurationMs=t[Ie],this._soundManager=i.soundManager,this._soundId=null;const s=e.bombTexture.width,o=this._size/s;this.body.scale.set(o);const r=64,a=this._size/1.2/r;this.text=new Rt({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=h=>this._updateTimer(h.deltaMS),L.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.x=t[Mt],this.y=t[At],this.rotation=t[It],this._soundId&&(this._soundManager.updateSoundData(this._soundId,{position:{x:this.x,y:this.y}})||(this._soundId=null))}_stopTimer(){this._tickListener&&(L.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 tt extends A{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),L.shared.add(this._tickListener),this._onEffectStart(),this.isComplete||this._update(0))}_onEffectStart(){}_update(){}_completeEffect(){this.isComplete||(this.isComplete=!0,this._tickListener&&(L.shared.remove(this._tickListener),this._tickListener=null),typeof this.onComplete=="function"&&this.onComplete())}destroy(t){this.isComplete=!0,this._tickListener&&(L.shared.remove(this._tickListener),this._tickListener=null),this.parent&&this.parent.removeChild(this),super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class _i extends tt{constructor(t,e,i,s,o){super(s);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 M(r),this._mainBody.anchor.set(.5),this._mainBody.tint=11393254,this._mainBody.scale.set(this._baseScale),this._core=new M(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=s=>s*s;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 ct=[],N={get(n){if(ct.length>0){const t=ct.pop();return t.texture=n,t.alpha=1,t.scaleX=1,t.scaleY=1,t.rotation=0,t.tint=16777215,t.anchorX=.5,t.anchorY=.5,t}return new Jt({texture:n,anchorX:.5,anchorY:.5})},release(n){n&&ct.push(n)}},pt=50,ui=400,di=800;class pi extends tt{constructor(t,e=pt){super();const i=e/pt;this._blastScale=i;const{texture:s,contentSize:o}=t.explosionTexture;this.explosionTexture=s,this._unitScale=1/o;const r=ui*i,a=di*i;this._particleContainer=new zt({texture:this.explosionTexture,boundsArea:new D(-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 h=0;h<30;h+=1)this._createParticle()}stopSpawning(){this._isSpawning=!1}_createParticle(){const t=N.get(this.explosionTexture),e=.2+Math.random()*.4,i=Math.floor(e*255);t.tint=i<<16|i<<8|i;const s=(this._minStartSize+Math.random()*(this._maxStartSize-this._minStartSize))*this._unitScale,o=.6+Math.random()*.8,r=.6+Math.random()*.8;t.scaleX=s*o,t.scaleY=s*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:s};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],s=i.view;if(i.life+=t,i.life>=i.maxLife)this._particleContainer.removeParticle(s),N.release(s),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;s.x+=(i.vx+r)*(t/16),s.y+=i.vy*(t/16),s.rotation+=i.rotationSpeed*(t/16);const a=1-Math.pow(1-o,3),h=i.startScale+(i.targetScale-i.startScale)*a;if(s.scaleX=h*i.aspectRatioX,s.scaleY=h*i.aspectRatioY,o<.1)s.alpha=o/.1*this._startAlpha;else if(o>.4){const l=(o-.4)/.6;s.alpha=this._startAlpha*(1-l)}else s.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)N.release(this._particles[e].view);this._particles=[],super.destroy(t)}}const fi=.168,mi=.225,Lt=.15,gi=2e4,yi=50,xi=4e3,wi=4e3;class Si extends tt{constructor(t,e,i,s,o){super(s),this._assets=o,this._radius=i,this.x=t,this.y=e,this._funnelDurationMs=gi,this._funnelFadeInDurationMs=yi,this._funnelFadeDurationMs=xi,this._elapsedMs=0,this._smokeDurationMs=wi,this._smokeSpawningStopped=!1,this._funnel=this._createFunnelSprite(),this._smoke=new pi(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)],s=new M(i);s.anchor.set(.5),s.alpha=0,s.rotation=Math.random()*Math.PI*2;const o=this._radius*fi*v(1-Lt,1+Lt);return s.scale.set(o/e),s}_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,s=e/this._funnelFadeDurationMs;this._funnel.alpha=mi*Q(Math.min(i,s),0,1),e<=0&&this._completeEffect()}destroy(t){this._smoke&&(this._smoke.destroy(),this._smoke=null),this._funnel=null,super.destroy(t)}}const vi=4,bi=2;class Ti extends A{constructor(t,e,i){super(),this.originX=t[Ce],this.originY=t[De],this.radius=t[Ee]??pt,this._level=t[Pe]||0,this._assets=e,this._soundManager=i.soundManager,this._levelView=i.levelView||null,this._levelView&&(this.onRender=()=>this._updateSeeThrough()),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)}run(){if(!(this._isDestroyed||this._isStarted)){if(this._isStarted=!0,!this.parent){this.destroy();return}this.explosion=new _i(this.originX,this.originY,this.radius,this._onExplosionComplete.bind(this),this._assets),this.explosion.zIndex=b(vi,this._level),this.funnel=new Si(this.originX,this.originY,this.radius,this._onFunnelComplete.bind(this),this._assets),this.funnel.zIndex=b(bi,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 Ft=4,H=400,Mi=0,Ai=0,Ii=8,T={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},E={minGrade:.05,spawnRate:45,lifetime:{min:300,max:700},startAlpha:.22,startSizeFactor:.5,endSizeFactor:1.6,color:12562068,sideSpeed:40};class ki extends A{constructor(t,e,i={}){super(),this._level=t[B]||0,this.zIndex=b(Ft,this._level);const{texture:s,contentSize:o}=e.smokeTexture;this._smokeTexture=s,this._textureScale=Ii/o,this._emitterX=t[O],this._emitterY=t[X],this._emitterRotation=t[W],this._emitterVX=t[vt],this._emitterVY=t[bt],this._engineLoad=t[G],this._condition=t[Y],this._size=t[ft],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._grade=Nt(),this._gradeValue=0,this._dustTimeSinceSpawn=0,this._grade.update(this._emitterX,this._emitterY,t[rt]||0),this._levelView=i.levelView||null,this._levelView&&(this.onRender=()=>{this.alpha=this._levelView.alphaFor(this._level,this._emitterX,this._emitterY),this.tint=this._levelView.tintFor(this._level)}),this._particleContainer=new zt({texture:this._smokeTexture,boundsArea:new D(this._emitterX-H,this._emitterY-H,H*2,H*2),dynamicProperties:{position:!0,vertex:!0,rotation:!0,color:!0}}),this.addChild(this._particleContainer),this._timeSinceLastSpawn=0,this._tickListener=r=>this._updateParticles(r.deltaMS),L.shared.add(this._tickListener)}update(t){const e=this._condition,i=t[B]||0;i!==this._level&&(this._level=i,this.zIndex=b(Ft,i)),this._emitterX=t[O],this._emitterY=t[X],this._emitterRotation=t[W],this._emitterVX=t[vt],this._emitterVY=t[bt],this._engineLoad=t[G],this._condition=t[Y],this._gradeValue=this._grade.update(this._emitterX,this._emitterY,t[rt]||0),this._particleContainer.boundsArea.x=this._emitterX-H,this._particleContainer.boundsArea.y=this._emitterY-H,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=T.burstParticleCount,i=Math.ceil(e/t);for(let s=0;s<i;s+=1)for(let o=0;o<t;o+=1)this.spawnParticle(o,t,!0)}}_updateParticles(t){if(t<=0)return;const e=t/1e3;this._timeSinceLastSpawn+=t;let i=0;this._condition===3?i=0:this._condition===1?i=2:(this._condition===2||this._condition===0)&&(i=1);const s=T.particleSpawnRate[this._condition]||0,o=s>0?1e3/s:1/0;if(i>0&&s>0)for(;this._timeSinceLastSpawn>=o;){for(let h=0;h<i;h+=1)this.spawnParticle(h,i);this._timeSinceLastSpawn-=o}else this._timeSinceLastSpawn=0;this._updateDust(t);const a=1-Math.pow(T.airResistance,t/16);for(let h=this._particles.length-1;h>=0;h-=1){const l=this._particles[h];if(l.age+=t,l.age>=l.lifetime){this._particleContainer.removeParticle(l.view),N.release(l.view),this._particles.splice(h,1);continue}l.vx=l.vx+(Mi-l.vx)*a,l.vy=l.vy+(Ai-l.vy)*a,l.x+=l.vx*e,l.y+=l.vy*e;const _=l.age/l.lifetime,d=1-(1-_)*(1-_),g=C(l.startSizeFactor,l.endSizeFactor,d),p=C(l.startAlpha,l.endAlpha,_),m=g*this._particleScaleMultiplier*this._textureScale,f=l.view;f.x=l.x,f.y=l.y,f.scaleX=m,f.scaleY=m,f.alpha=p,f.rotation+=l.rotSpeed*e}}_updateDust(t){if(this._condition===0||this._gradeValue<=E.minGrade){this._dustTimeSinceSpawn=0;return}this._dustTimeSinceSpawn+=t;const e=1e3/E.spawnRate;for(;this._dustTimeSinceSpawn>=e;)this._spawnDust(),this._dustTimeSinceSpawn-=e}_spawnDust(){const t=this._emitterRotation,e=Math.cos(t+Math.PI),i=Math.sin(t+Math.PI),s=this._emitterX+e*this._height*.3,o=this._emitterY+i*this._height*.3,r=E.sideSpeed,a=N.get(this._smokeTexture),h=E.startSizeFactor*this._particleScaleMultiplier*this._textureScale;a.tint=E.color,a.x=s,a.y=o,a.alpha=E.startAlpha,a.scaleX=h,a.scaleY=h,a.rotation=v(0,Math.PI*2),this._particles.push({view:a,x:s,y:o,vx:e*r+v(-r,r),vy:i*r+v(-r,r),age:0,lifetime:v(E.lifetime.min,E.lifetime.max),startSizeFactor:E.startSizeFactor,endSizeFactor:E.endSizeFactor,startAlpha:E.startAlpha,endAlpha:T.particleEndAlpha,rotSpeed:v(-1,1)}),this._particleContainer.addParticle(a)}spawnParticle(t,e,i=!1){const s=v(T.particleLifetime.min,T.particleLifetime.max);let o=T.particleStartSizeFactor[this._condition]||.3,r=T.particleEndSizeFactor[this._condition]||1,a=T.particleStartAlpha,h=1;i&&(o*=2,r*=2.5,a=.8,h=2);const l=this._emitterRotation,_=l+Math.PI,d=Math.cos(_),g=Math.sin(_),p=l+Math.PI/2,m=Math.cos(p),f=Math.sin(p);let w=0;const y=this._width/2*T.streamOffsetFactor;e===2?w=t===0?-y:y:e===3&&(w=(t-1)*y);const x=this._height*.22,S=this._emitterX+d*x+m*w,u=this._emitterY+g*x+f*w;let P=v(T.particleInitialVelocity.away.min,T.particleInitialVelocity.away.max),Z=v(T.particleInitialVelocity.side.min,T.particleInitialVelocity.side.max);P*=h,Z*=h;let R=d*P+m*Z,$=g*P+f*Z;const et=T.particleVelocityVariance;R+=v(-et,et),$+=v(-et,et),R+=this._emitterVX,$+=this._emitterVY;const F=N.get(this._smokeTexture);F.tint=T.particleColor,F.x=S,F.y=u,F.alpha=a;const mt=o*this._particleScaleMultiplier*this._textureScale;F.scaleX=mt,F.scaleY=mt,F.rotation=v(0,Math.PI*2);const Ht={view:F,x:S,y:u,vx:R,vy:$,age:0,lifetime:s,startSizeFactor:o,endSizeFactor:r,startAlpha:a,endAlpha:T.particleEndAlpha,rotSpeed:v(-1,1)};this._particleContainer.addParticle(F),this._particles.push(Ht)}_stopTimer(){this._tickListener&&(L.shared.remove(this._tickListener),this._tickListener=null)}destroy(t){this._stopTimer();for(let e=0;e<this._particles.length;e+=1)N.release(this._particles[e].view);this._particles=[],super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class Ci extends M{constructor(t,e,i,s,o,r,a){super(a),this.anchor.set(.5),this.x=t,this.y=e,this.rotation=i,this.width=o,this.height=s,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 _t=1;class Di extends A{constructor(t,e){super(),this._level=t[B]||0,this._markLayers=new Map,this.zIndex=b(_t,this._level),this._currentX=t[O]||0,this._currentY=t[X]||0,this._currentRotation=t[W]||0,this._engineLoad=t[G]||0,this._condition=t[Y],this._size=t[ft],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 i=this._size*3;this._trackOffset=i/2*.7,this._backwardOffset=i*.4,this._trackInitialAlpha=.4,this._tickListener=s=>this._internalUpdate(s.deltaMS),L.shared.add(this._tickListener)}update(t){this._currentX=t[O],this._currentY=t[X],this._currentRotation=t[W],this._engineLoad=t[G],this._condition=t[Y];const e=t[B]||0;e!==this._level&&(this._level=e,this.zIndex=b(_t,e))}_markLayer(t){let e=this._markLayers.get(t);if(e)return e;e=new A,e.zIndex=b(_t,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 p of this._markLayers.values())for(let m=p.children.length-1;m>=0;m-=1){const f=p.children[m];f.update(t)&&f.destroy()}const e=this._currentX-this._prevX,i=this._currentY-this._prevY,s=Math.sqrt(e*e+i*i),o=ce(this._currentRotation-this._prevRotation),r=Math.abs(o),a=s-this._prevSpeed,h=Math.abs(a),l=r-this._prevAngularSpeed,_=Math.abs(l),d=performance.now();let g=!1;this._condition!==0&&d-this._lastTrackMarkTime>this._trackMarkCooldown&&(h>this._minAbsAccelerationForMark&&(g=!0),s>this._minSpeedForRotationMarks&&(r>this._minAngularSpeedForMark||_>this._minRotationAccelerationForMark)&&(g=!0)),this._engineLoad>1&&(g=!0),g&&(this.createTrackMarksAtPreviousPosition(),this._lastTrackMarkTime=d),this._prevX=this._currentX,this._prevY=this._currentY,this._prevRotation=this._currentRotation,this._prevSpeed=s,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,s=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,h=this._prevY+s+r,l=new Ci(a,h,this._prevRotation,this._trackWidth,this._trackLength,this._trackInitialAlpha,this._assets.trackMarkTexture);t.addChild(l)}}_stopTimer(){this._tickListener&&(L.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})}}class Ei extends tt{constructor(t,e,i,s,o){super(o),this.startPositionX=t,this.startPositionY=e,this.endPositionX=i,this.endPositionY=s,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 k,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,s,o){this.graphics.circle(t,e,i),this.graphics.fill({color:s,alpha:Q(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=C(this.startPositionX,this.endPositionX,e),s=C(this.startPositionY,this.endPositionY,e),o=C(this.config.alphaStart,this.config.alphaEnd,e),r=Math.sin(this.elapsedTime*this.config.alphaPulseFrequency)*this.config.alphaPulseAmplitude;let a=o+r;a=Q(a,0,this.config.alphaStart);const h=Math.pow(e,this.config.trailShrinkPower),l=C(this.config.trailLength,0,h),_=this.totalDist*e;if(_>=this.config.trailStartOffset){let d=_;this.totalDist>.001&&(d=Math.max(0,_-this.config.trailStartOffset));const g=Math.min(d,l);let p,m;this.totalDist>.001?(p=i-this.nx*g,m=s-this.ny*g):(p=i,m=s);const f=Math.hypot(i-p,s-m);if(f<this.config.segmentRadius*.5&&this.totalDist===0)this._drawSegment(i,s,this.config.segmentRadius,this.config.color,a);else if(f>=this.config.segmentRadius*.5){const w=Math.max(1,this.config.segmentCount);for(let y=0;y<w;y++){let x=.5;w>1&&(x=y/(w-1));const S=C(p,i,x),u=C(m,s,x),P=C(1,.8,x);this._drawSegment(S,u,this.config.segmentRadius,this.config.color,a*P)}}}}this.elapsedTime>=this.animationDuration&&(this.graphics.clear(),this._completeEffect())}destroy(t){this.graphics&&this.graphics.clear(),super.destroy(t)}}class Pi extends tt{constructor(t,e,i,s,o,r){super(o),this.x=t,this.y=e,this._assets=r;const{texture:a,contentSize:h}=this._assets.impactParticleTexture;this._particleTexture=a,this._textureContentSize=h,this.config={particleCount:v(2,4),particleMinSize:.8,particleMaxSize:2.4,minInitialSpeed:10,maxInitialSpeed:300,minLifetime:8e3,maxLifetime:15e3,color:[3355443,2236962,4473924],fadeOutStart:.8,impactDirectionX:i,impactDirectionY:s,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 s=0,o=this.config.particleCount;s<o;s+=1){let r;this.useOmnidirectionalSpread?r=Math.random()*Math.PI*2:r=t+v(-i,i);const a=v(this.config.minInitialSpeed,this.config.maxInitialSpeed),h=new M(this._particleTexture);h.anchor.set(.5);const l={sprite:h,x:0,y:0,vx:Math.cos(r)*a,vy:Math.sin(r)*a,size:v(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:v(this.config.minLifetime,this.config.maxLifetime),age:0,alpha:1,active:!0,isMoving:!0,timeSinceStopped:0};h.tint=l.color,this.particlesData.push(l),this.addChild(h)}}_update(t){if(this.isComplete)return;this.elapsedTime+=t;const e=t/1e3;let i=0;for(let s=0,o=this.particlesData.length;s<o;s+=1){const r=this.particlesData[s];if(!r.active)continue;if(i+=1,r.age+=t,r.isMoving){const _=Math.hypot(r.vx,r.vy);if(_>0){const g=_*this.config.dragCoefficient*e,p=Math.max(0,1-g/_);r.vx*=p,r.vy*=p}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,d=Math.min(500,r.lifetime*(1-this.config.fadeOutStart));r.alpha=C(1,0,Math.min(_/d,1))}else if(a>=this.config.fadeOutStart){const _=r.age-r.lifetime*this.config.fadeOutStart,d=r.lifetime*(1-this.config.fadeOutStart);r.alpha=d>0?C(1,0,Math.min(_/d,1)):0}(r.age>=r.lifetime||r.alpha<.01)&&(r.active=!1,r.alpha=0);const h=r.sprite;h.position.set(r.x,r.y),h.alpha=r.alpha,h.visible=r.active;const l=r.size/this._textureContentSize;h.scale.set(l)}i===0&&this._isStarted&&this._completeEffect()}destroy(t){this.particlesData=[],super.destroy(t)}}const Li=2;class Fi extends A{constructor(t,e,i){super(),this.startPositionX=t[ye],this.startPositionY=t[xe],this.endPositionX=t[we],this.endPositionY=t[Se],this.soundPositionX=t[ve],this.soundPositionY=t[be],this.hit=t[Te],this.endLevel=t[Me]||0,this.zIndex=b(Li,this.endLevel),this.anchorKey=null,this.anchorLocalX=0,this.anchorLocalY=0,Array.isArray(t[Tt])&&([this.anchorKey,this.anchorLocalX,this.anchorLocalY]=t[Tt]),this._assets=e,this._soundManager=i.soundManager,this._mapDynamics=i.mapDynamics||null,this._levelView=i.levelView||null,this._levelView&&(this.onRender=()=>{this.alpha=this._levelView.alphaFor(this.endLevel,this.endPositionX,this.endPositionY),this.tint=this._levelView.tintFor(this.endLevel)}),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}},()=>{this._soundComplete=!0,this._soundId=null,this._tryDestroy()}),this._soundId||(this._soundComplete=!0)}run(){this._isDestroyed||(this.tracer=new Ei(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 h=this._mapDynamics.toWorld(this.anchorKey,this.anchorLocalX,this.anchorLocalY);h&&(t=h.x,e=h.y)}const i=t-this.startPositionX,s=e-this.startPositionY,o=Math.hypot(i,s);let r=0,a=0;o>.001&&(r=-(i/o),a=-(s/o)),this.impact=new Pi(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 Ri={Map:ze,MapVolume:Xe,MapRadar:Ne,TankRadar:We,Tank:hi,Bomb:ci,ExplosionEffect:Ti,Smoke:ki,Tracks:Di,ShotEffect:Fi},zi=4;function ot(n){return Math.ceil(n*zi)}function it(n,t){const{radius:e,blur:i,color:s,quality:o=40}=n,r=new k,a=(e+ot(i))*2,h=a/2;r.circle(h,h,e),r.fill(s);const l=new Vt({strength:i,quality:o});l.padding=ot(i),r.filters=[l];const _=t.generateTexture({target:r,frame:new D(0,0,a,a)});return r.destroy(!0),{texture:_,contentSize:e*2}}function Vi(n,t){const{baseRadius:e,irregularity:i=0,blur:s=0,numPoints:o=20,colorFill:r,colorRim:a=r,rimWidth:h=0,variants:l=1}=n,_=Math.max(1,Math.floor(l)||1),d=(e+i+h)*2,g=d+ot(s)*2,p=g/2,m=[];for(let f=0;f<_;f+=1){const w=new k,y=[];for(let S=0;S<o;S+=1){const u=S/o*Math.PI*2,P=e+v(-i,i);y.push(p+P*Math.cos(u),p+P*Math.sin(u))}w.poly(y).fill(r).stroke({width:h,color:a,alignment:1});const x=new Vt({strength:s,quality:10});x.padding=ot(s),w.filters=[x],m.push(t.generateTexture({target:w,frame:new D(0,0,g,g)})),w.destroy(!0)}return{textures:m,contentSize:d}}function Oi(n,t){const{colors:e}=n,i={},s=10,o=s*4,r=s*3,a=15658734,h=_=>{const d=new k,g=new k,p=o,m=r;d.rect(-p/2,-m/2,p,m).fill(5592405).rect(-p/2+1,-m/2+1,p-2,m-2).fill(10066329).rect(-p/2+2,-m/2+2,p-4,m-4).fill(13421772).rect(-p/2+3,-m/2+3,p-6,m-6).fill(a),g.moveTo(1.33*s,-.42*s).lineTo(.42*s,-1*s).lineTo(-.42*s,-1*s).lineTo(-1.33*s,-.42*s).lineTo(-1.33*s,.42*s).lineTo(-.42*s,1*s).lineTo(.42*s,1*s).lineTo(1.33*s,.42*s).closePath().fill(_).stroke({width:.17*s,color:11184810}).moveTo(2.33*s,-.25*s).lineTo(.25*s,-.25*s).lineTo(.25*s,.25*s).lineTo(2.33*s,.25*s).closePath().stroke({width:.17*s,color:11184810}).fill(_);const f=d.getBounds(),w=t.generateTexture({target:d,frame:new D(f.x,f.y,f.width,f.height)}),y=g.getBounds(),x=t.generateTexture({target:g,frame:new D(y.x,y.y,y.width,y.height)}),S={x:-y.x/y.width,y:-y.y/y.height};return d.destroy(!0),g.destroy(!0),{body:w,gun:x,gunAnchor:S}},l=()=>{const _=new A,d=new k,g=new k;_.addChild(d,g);const p=3815994,m=2434341,f=3158064,w=1579032,y=5263440,x=o,S=r,u=s;d.moveTo(-x/2-u*.1,-S/2+u*.2).lineTo(x/2+u*.2,-S/2-u*.1).lineTo(x/2-u*.1,S/2+u*.3).lineTo(-x/2+u*.3,S/2-u*.2).closePath().fill(p).stroke({width:u*.2,color:y,alignment:.5}),d.moveTo(-x/2+u*.4,-S/2+u*.5).lineTo(x/2-u*.3,-S/2+u*.2).lineTo(x/2-u*.4,S/2-u*.1).lineTo(-x/2+u*.2,S/2-u*.4).closePath().fill(m),d.circle(x*.15,S*.1,u*1.2).fill(w),d.circle(-x*.3,-S*.25,u*.5).fill(w),g.position.set(u*.3,-u*.2);const P=[u*1.1,-u*.7,u*.2,-u*1,-u*.6,-u*.9,-u*1.3,-u*.2,-u*1.1,u*.6,-u*.2,u*1,u*.7,u*.8,u*1.3,u*.1];g.poly(P).fill(f).stroke({width:u*.15,color:y,alignment:0});const Z=[u*.8,-u*.25,u*1.5,-u*.4,u*1.4,u*.15,u*.7,u*.05];g.poly(Z).fill(f).stroke({width:u*.1,color:y,alignment:0}),g.circle(u*.1,-u*.2,u*.4).fill(w);const R=_.getBounds(),$=t.generateTexture({target:_,frame:new D(R.x,R.y,R.width,R.height)});return _.destroy({children:!0}),$};return i.liveTeamId1=h(e.teamId1),i.liveTeamId2=h(e.teamId2),i.destroyed=l(),i}function Xi(n,t){const{radius:e,borderWidth:i,crossSize:s,crossThickness:o,colors:r}=n,a={},h=(e+i)*2,l=h/2,_=15658734,d=3355443,g=m=>{const f=new k;f.circle(l,l,e).fill(_),f.circle(l,l,e-i).fill(m);const w=t.generateTexture({target:f,frame:new D(0,0,h,h)});return f.destroy(!0),w},p=()=>{const m=new k,f=s/2;m.moveTo(l-f,l-f).lineTo(l+f,l+f).moveTo(l-f,l+f).lineTo(l+f,l-f).stroke({width:o,color:d});const w=t.generateTexture({target:m,frame:new D(0,0,h,h)});return m.destroy(!0),w};return a.liveTeamId1=g(r.teamId1),a.liveTeamId2=g(r.teamId2),a.destroyed=p(),a}function Yi(n,t){const{colorOuter:e,colorInner:i}=n,s=new k,o=20,r=1;s.rect(0,0,o,o).fill(e),s.rect(r,r,o-r*2,o-r*2).fill(i);const a=t.generateTexture({target:s,frame:new D(0,0,o,o)});return s.destroy(!0),a}function Bi(n,t){const{width:e,length:i,color:s}=n,o=new k;o.rect(0,0,i,e).fill(s);const r=t.generateTexture({target:o,frame:new D(0,0,i,e)});return o.destroy(!0),r}function Ni(n,t){const{radius:e,fontSize:i,borderWidth:s,borderColor:o,textColor:r}=n,a=(e+s)*2,h=a/2;return dt.map((l,_)=>{const d=new A,g=new k;g.circle(h,h,e).fill(l).stroke({width:s,color:o});const p=new Rt({text:`${_}`,style:{fontFamily:"Arial",fontSize:i,fill:r}});p.anchor.set(.5),p.x=h,p.y=h,d.addChild(g,p);const m=t.generateTexture({target:d,frame:new D(0,0,a,a)});return d.destroy({children:!0}),m})}const Hi={explosionTexture:it,smokeTexture:it,impactParticleTexture:it,tankShadowTexture:it,funnelTexture:Vi,tankTexture:Oi,tankRadarTexture:Xi,bombTexture:Yi,trackMarkTexture:Bi,levelBadgeTexture:Ni},Ui=n=>(n??"").split(/[?#]/)[0].endsWith(".js"),Wi=n=>import(n);function Gi(n=Ve){const t={level:0,x:0,y:0,z:0,layered:!1};return{set(e,i,s,o=0){t.level=e,t.x=i,t.y=s,t.z=o},markLayered(){t.layered=!0},alphaFor(e,i,s){return de({viewLevel:t.level,viewX:t.x,viewY:t.y,level:e,x:i,y:s,cfg:n})},tintFor(e){return pe(t.level,e,n)},get cfg(){return n},get mode(){return n.mode},get layered(){return t.layered},get level(){return t.level},get x(){return t.x},get y(){return t.y},get z(){return t.z}}}const qi={id:"tanks",engineApi:Qt,requires:["map.layers","map.levelsN"],async createClientCore(n,{wasmUrl:t}){if(Ui(t)){const i=await Wi(t);return{core:new i.ClientCore(n),memory:null}}const e=await ae({module_or_path:t});return{core:new ut(n),memory:e.memory}},parts:Ri,bakers:Hi,styles:he,serviceNames:["levelView","mapDynamics"],hooks:{services(n){return{levelView:Gi(),mapDynamics:{toWorld(e,i,s){const o=n.map_dynamics_to_world(e,i,s);return o.length===0?null:{x:o[0],y:o[1]}}}}},onAuth(n,t){n.set_model(t.model)},onPanel(n,t){n.sync_panel(JSON.stringify(t))},onLocalAction(n,t,e,i){return t!=="down"?null:e==="fire"?n.try_fire(i)||null:((e==="nextWeapon"||e==="prevWeapon")&&n.cycle_weapon(e==="prevWeapon"),null)}}};export{qi as default};
|