@vimp-games/tanks 0.19.1 → 0.20.0
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-BQfcyQdY.wasm +0 -0
- package/dist/client-BIQr8QFW.js +84 -0
- package/dist/core-node/vimp_tanks_core.d.ts +11 -0
- package/dist/core-node/vimp_tanks_core.js +23 -0
- package/dist/core-node/vimp_tanks_core_bg.wasm +0 -0
- package/dist/core-node/vimp_tanks_core_bg.wasm.d.ts +1 -0
- package/dist/{host-XM9vOGou.js → host-D9wFbY8G.js} +1 -1
- package/dist/manifest.json +5 -5
- package/dist/maps/garden.json +1 -1
- package/package.json +2 -2
- package/dist/assets/vimp_tanks_core_bg-EoY5gurr.wasm +0 -0
- package/dist/client-BOXjbg0z.js +0 -84
|
Binary file
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import{Spritesheet as _e,Container as D,Sprite as k,Rectangle as z,UniformGroup as ue,Filter as de,GpuProgram as pe,GlProgram as fe,defaultFilterVert as me,MeshSimple as re,Assets as oe,Ticker as N,Texture as ge,Graphics as P,Text as ye,Particle as xe,ParticleContainer as ae,BlurFilter as Ct}from"pixi.js";const we=4;class It{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ft.unregister(this),t}free(){const t=this.__destroy_into_raw();_.__wbg_clientcore_free(t,0)}abi_describe(){let t,e;try{const i=_.clientcore_abi_describe(this.__wbg_ptr);return t=i[0],e=i[1],H(i[0],i[1])}finally{_.__wbindgen_free(t,e,1)}}apply_aim(t,e,i,s){_.clientcore_apply_aim(this.__wbg_ptr,t,e,i,s)}apply_input(t,e,i){const s=Z(t,_.__wbindgen_malloc,_.__wbindgen_realloc),o=C,r=Z(e,_.__wbindgen_malloc,_.__wbindgen_realloc),a=C;_.clientcore_apply_input(this.__wbg_ptr,s,o,r,a,i)}cycle_weapon(t){_.clientcore_cycle_weapon(this.__wbg_ptr,t)}debug_json(){let t,e;try{const i=_.clientcore_debug_json(this.__wbg_ptr);return t=i[0],e=i[1],H(i[0],i[1])}finally{_.__wbindgen_free(t,e,1)}}decode_frame(t){let e,i;try{const s=St(t,_.__wbindgen_malloc),o=C,r=_.clientcore_decode_frame(this.__wbg_ptr,s,o);return e=r[0],i=r[1],H(r[0],r[1])}finally{_.__wbindgen_free(e,i,1)}}dispatch(t,e){const i=Z(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=C,o=St(e,_.__wbindgen_malloc),r=C,a=_.clientcore_dispatch(this.__wbg_ptr,i,s,o,r);var l=Se(a[0],a[1]).slice();return _.__wbindgen_free(a[0],a[1]*1,1),l}hot_ptr(){return _.clientcore_hot_ptr(this.__wbg_ptr)>>>0}hot_values(){const t=_.clientcore_hot_values(this.__wbg_ptr);var e=Vt(t[0],t[1]).slice();return _.__wbindgen_free(t[0],t[1]*4,4),e}map_dynamics_to_world(t,e,i){const s=Z(t,_.__wbindgen_malloc,_.__wbindgen_realloc),o=C,r=_.clientcore_map_dynamics_to_world(this.__wbg_ptr,s,o,e,i);var a=Vt(r[0],r[1]).slice();return _.__wbindgen_free(r[0],r[1]*4,4),a}my_game_id(){return _.clientcore_my_game_id(this.__wbg_ptr)}constructor(t){const e=Z(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=C,s=_.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 _.clientcore_offset(this.__wbg_ptr)}push_frame(t,e){const i=St(t,_.__wbindgen_malloc),s=C;return _.clientcore_push_frame(this.__wbg_ptr,i,s,e)!==0}ramp_runs(){let t,e;try{const i=_.clientcore_ramp_runs(this.__wbg_ptr);return t=i[0],e=i[1],H(i[0],i[1])}finally{_.__wbindgen_free(t,e,1)}}reset(){_.clientcore_reset(this.__wbg_ptr)}resync(){_.clientcore_resync(this.__wbg_ptr)}sample(t){return _.clientcore_sample(this.__wbg_ptr,t)>>>0}set_active(t){_.clientcore_set_active(this.__wbg_ptr,t)}set_map(t){const e=Z(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=C,s=_.clientcore_set_map(this.__wbg_ptr,e,i);if(s[1])throw Yt(s[0])}set_model(t){const e=Z(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=C;_.clientcore_set_model(this.__wbg_ptr,e,i)}sync_panel(t){const e=Z(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=C;_.clientcore_sync_panel(this.__wbg_ptr,e,i)}take_divergence(){let t,e;try{const i=_.clientcore_take_divergence(this.__wbg_ptr);return t=i[0],e=i[1],H(i[0],i[1])}finally{_.__wbindgen_free(t,e,1)}}take_frames(){let t,e;try{const i=_.clientcore_take_frames(this.__wbg_ptr);return t=i[0],e=i[1],H(i[0],i[1])}finally{_.__wbindgen_free(t,e,1)}}try_fire(t){const e=_.clientcore_try_fire(this.__wbg_ptr,t);let i;return e[0]!==0&&(i=H(e[0],e[1]).slice(),_.__wbindgen_free(e[0],e[1]*1,1)),i}}Symbol.dispose&&(It.prototype[Symbol.dispose]=It.prototype.free);function ve(){return{__proto__:null,"./vimp_tanks_core_bg.js":{__proto__:null,__wbg_Error_92b29b0548f8b746:function(t,e){return Error(H(t,e))},__wbg___wbindgen_throw_344f42d3211c4765:function(t,e){throw new Error(H(t,e))},__wbindgen_init_externref_table:function(){const t=_.__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=>_.__wbg_clientcore_free(n,1));typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>_.__wbg_gamecore_free(n,1));function Vt(n,t){return n=n>>>0,be().subarray(n/4,n/4+t)}function Se(n,t){return n=n>>>0,et().subarray(n/1,n/1+t)}let at=null;function be(){return(at===null||at.byteLength===0)&&(at=new Float32Array(_.memory.buffer)),at}function H(n,t){return Me(n>>>0,t)}let lt=null;function et(){return(lt===null||lt.byteLength===0)&&(lt=new Uint8Array(_.memory.buffer)),lt}function St(n,t){const e=t(n.length*1,1)>>>0;return et().set(n,e/1),C=n.length,e}function Z(n,t,e){if(e===void 0){const a=ht.encode(n),l=t(a.length,1)>>>0;return et().subarray(l,l+a.length).set(a),C=a.length,l}let i=n.length,s=t(i,1)>>>0;const o=et();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=et().subarray(s+r,s+i),l=ht.encodeInto(n,a);r+=l.written,s=e(s,i,r,1)>>>0}return C=r,s}function Yt(n){const t=_.__wbindgen_externrefs.get(n);return _.__externref_table_dealloc(n),t}let pt=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});pt.decode();const Te=2146435072;let bt=0;function Me(n,t){return bt+=t,bt>=Te&&(pt=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),pt.decode(),bt=t),pt.decode(et().subarray(n,n+t))}const ht=new TextEncoder;"encodeInto"in ht||(ht.encodeInto=function(n,t){const e=ht.encode(n);return t.set(e),{read:n.length,written:e.length}});let C=0,_;function Ae(n,t){return _=n.exports,at=null,lt=null,_.__wbindgen_start(),_}async function ke(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 Ie(n){if(_!==void 0)return _;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-BQfcyQdY.wasm",import.meta.url));const t=ve();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:i}=await ke(await n,t);return Ae(e)}const Le='@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}',Ce={mode:"hole",radius:260,softness:.45,minAlpha:.12,layerAlpha:.4,fadeRate:6,lowerTint:11579584},I={shear:.22,levelZStride:100},ot={slices:4,rampSegments:4,sideTint:10133674},dt={scaleGain:.1,baseAlpha:.4,alphaFalloff:.12,sizeFactor:1.05},Ee=I.levelZStride,T=(n,t)=>n+Ee*(t||0);function Q(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 J(n,t,e,i){return!e||!i?{x:n,y:t}:{x:n+(n-e.x)*i,y:t+(t-e.y)*i}}function W(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)}async function Xt({baseTexture:n,spriteSheetData:t,map:e,tiles:i,step:s,renderer:o}){const r={};t.frames.forEach((y,m)=>{const[p,v,w,g]=y;r[`frame${m}`]={frame:{x:p,y:v,w,h:g}}});const a={frames:r,meta:{scale:"1"}},l=new _e(n,a);await l.parse();const h=e[0].length*s,f=e.length*s,u=new D;for(let y=0,m=e.length;y<m;y+=1)for(let p=0,v=e[y].length;p<v;p+=1){const w=e[y][p];if(i.includes(w)){const g=`frame${w}`,x=l.textures[g];if(x){const c=new k(x);c.x=p*s,c.y=y*s,u.addChild(c)}else console.warn(`Texture not found. Tile: ${w}, sprite: ${g}`)}}const d=o.generateTexture({target:u,frame:new z(0,0,h,f)});return u.destroy({children:!0}),l.destroy(),d}function Pe(n,t){const e=[];if(!Array.isArray(n))return e;for(const i of n){const s=i.axis===0?0:1,o=s===0?1:0,r=t(i.min,s),a=t(i.max,s),l=t(i.crossMin,o),h=t(i.crossMax,o);e.push({axis:i.axis,sign:i.sign,from:i.from,to:i.to,block:i.block,col0:s===0?r:l,col1:s===0?a:h,row0:s===0?l:r,row1:s===0?h:a})}return De(e)}function De(n){const t=new Map;for(const i of n){const s=t.get(i.block);s?s.push(i):t.set(i.block,[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 le=n=>n.radius*(1-n.softness),Re=(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 ze({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),f=Re(le(r),r.radius,h);return r.minAlpha+(1-r.minAlpha)*f}function Fe(n,t,e){return(t||0)<(n||0)?e.lowerTint:16777215}const Ve=`
|
|
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
|
+
`,Ot=`
|
|
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 Ye(n){const t=new ue({uHoleCenter:{value:new Float32Array([0,0]),type:"vec2<f32>"},uHoleParams:{value:new Float32Array([n.radius,le(n),n.minAlpha]),type:"vec3<f32>"}});return new de({glProgram:fe.from({vertex:me,fragment:Ve,name:"see-through-hole-filter"}),gpuProgram:pe.from({vertex:{source:Ot,entryPoint:"mainVertex"},fragment:{source:Ot,entryPoint:"mainFragment"}}),resources:{holeUniforms:t}})}function Xe(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}const Oe=.01;function Bt(){return{strength:0,filter:null,attached:!1}}function Nt(n,t,e){return n.strength+=((t?1:0)-n.strength)*e,n.strength}function Ht(n,t,e,i,s,o){if(t.strength<Oe||!s){t.attached&&(n.filters=[],t.attached=!1);return}t.filter||(t.filter=Ye(e)),t.attached||(n.filters=[t.filter],t.attached=!0);const r=J(i.x,i.y,o,i.z*I.shear);Xe(t.filter,{centerX:r.x*s.scale.x+s.position.x,centerY:r.y*s.scale.y+s.position.y,radius:e.radius*s.scale.x,softness:e.softness,minAlpha:1+(e.minAlpha-1)*t.strength})}function Wt(n,t){if(!n.filter){n.attached=!1;return}t.filters=[],n.attached=!1,n.filter.destroy(),n.filter=null}function Be({bakedTexture:n,level:t,volume:e,shear:i,count:s,sideTint:o}){const r=[];for(let a=1;a<=s;a+=1){const l=new k(n);l.tint=a===s?16777215:o,r.push({target:l,k:(t+e*a/s)*i,occluder:!0})}return r}function Ne({runs:n,texture:t,step:e,shear:i,baseScale:s,segments:o,sideTint:r}){const a=[],l=t.width||1,h=t.height||1,f=Math.max(1,Math.round(o)||1);for(const u of n){const d=u.axis===0,y=d?u.col1-u.col0:u.row1-u.row0,m=Math.max(1,y*f),p=u.col0*e,v=u.col1*e,w=u.row0*e,g=u.row1*e,x=m+1,c=Math.min(u.from,u.to),b=Math.max(u.from,u.to),M=c*i,S=new Float32Array(x*4),V=new Float32Array(x*4),X=new Float32Array(x*4),L=new Float32Array(x*2),O=new Uint32Array(m*6),U=1;for(let Y=0;Y<x;Y+=1){const B=Y/m,G=u.sign>0?B:1-B,Pt=(u.from+(u.to-u.from)*G)*i,Dt=d?p:w,rt=Dt+((d?v:g)-Dt)*B,yt=d?rt:p,xt=d?w:rt,wt=d?rt:v,vt=d?g:rt,F=Y*4;S[F]=yt*s.x,S[F+1]=xt*s.y,S[F+2]=wt*s.x,S[F+3]=vt*s.y,V[F]=yt/l,V[F+1]=xt/h,V[F+2]=wt/l,V[F+3]=vt/h;const Rt=d?xt+U:yt+U,zt=d?vt-U:wt-U,ut=Math.min(Math.max(rt,(d?p:w)+U),(d?v:g)-U);X[F]=(d?ut:Rt)/l,X[F+1]=(d?Rt:ut)/h,X[F+2]=(d?ut:zt)/l,X[F+3]=(d?zt:ut)/h,L[Y*2]=Pt,L[Y*2+1]=Pt}for(let Y=0;Y<m;Y+=1){const B=Y*2,G=Y*6;O[G]=B,O[G+1]=B+1,O[G+2]=B+3,O[G+3]=B,O[G+4]=B+3,O[G+5]=B+2}const ce=new re({texture:t,vertices:S.slice(),uvs:V,indices:O});a.push(He({base:S,uvs:X,heights:L,points:x,texture:t,kBase:M,sideTint:r,endIndex:u.sign>0?x-1:0})),a.push({target:ce,k:b*i,base:S,heights:L})}return a}function He(n){const{base:t,uvs:e,heights:i,points:s,texture:o,kBase:r,endIndex:a,sideTint:l}=n,h=s*2+2,f=new Float32Array(h*4),u=new Float32Array(h*4),d=new Float32Array(h*2),y=(s-1)*2+1,m=new Uint32Array(y*6),p=g=>g<s?g*2:g<s*2?(g-s)*2+1:a*2+(g-s*2);for(let g=0;g<h;g+=1){const x=p(g),c=g*4,b=t[x*2],M=t[x*2+1];f[c]=b,f[c+1]=M,f[c+2]=b,f[c+3]=M,u[c]=e[x*2],u[c+1]=e[x*2+1],u[c+2]=e[x*2],u[c+3]=e[x*2+1],d[g*2]=i[x],d[g*2+1]=r}let v=0;for(let g=0;g<3;g+=1){const x=g===2?s*2:g*s,c=g===2?s*2+1:x+s-1;for(let b=x;b<c;b+=1){const M=b*2,S=v*6;m[S]=M,m[S+1]=M+1,m[S+2]=M+3,m[S+3]=M,m[S+4]=M+3,m[S+5]=M+2,v+=1}}const w=new re({texture:o,vertices:f.slice(),uvs:u,indices:m});return w.tint=l,{target:w,k:r,base:f,heights:d}}function We(n,t){const{target:e,base:i,heights:s}=n,o=e.vertices;for(let r=0,a=s.length;r<a;r+=1){const l=i[r*2],h=i[r*2+1],f=s[r];o[r*2]=l+(l-t.x)*f,o[r*2+1]=h+(h-t.y)*f}e.vertices=o}const Ue=5;class Ge{constructor(t,e,i,s){this._container=t,this._renderer=i.renderer,this._levelView=i.levelView||null,this._rampRuns=i.rampRuns||null,this._targetAlpha=1,this._hole=Bt(),this._occluderHole=Bt(),this._occluder=null;const o=e.scale;this._baseScaleX=typeof o=="number"?o:o.x,this._baseScaleY=typeof o=="number"?o:o.y,this._baseScale={x:this._baseScaleX,y:this._baseScaleY},this._slices=[],this._rampTexture=null,this.mapSprite=null,this._assetUrl=`${s}${e.spriteSheet.img}`,this._baseTexturePromise=oe.load(this._assetUrl),this._map=e.map,this._tiles=e.tiles,this._level=e.level||0,this._floor=e.floor||[],this._tileSet=new Set(this._tiles),this._floorSet=new Set(this._floor),this._spriteSheetData=e.spriteSheet,this._step=e.step,this._layer=Number(e.layer)||1,t.zIndex=T(this._layer,this._level),this._parallaxK=this._level*I.shear,this._volume=Number(e.volume)||0,this._ramps=(e.ramps||[]).filter(r=>this._tiles.includes(r.tile)),this._extruding=this._volume>0||this._ramps.length>0,this.needsRender=this._level>=1||this._extruding,this._create()}async _create(){try{const t=await this._baseTexturePromise;if(this._container.destroyed)return;const e=await Xt({baseTexture:t,spriteSheetData:this._spriteSheetData,map:this._map,tiles:this._tiles,step:this._step,renderer:this._renderer});if(this._container.destroyed){e.destroy(!0);return}this.mapSprite=new k(e),W(this.mapSprite,null,this._parallaxK,this._baseScale),this._container.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=ot.slices,s=I.shear,o=[];this._volume>0&&(this._occluder=new D,this._occluder.zIndex=T(Math.max(this._layer,Ue),this._level),o.push(...Be({bakedTexture:e,level:this._level,volume:this._volume,shear:s,count:i,sideTint:ot.sideTint})));const r=this._rampLanes();if(r.length){const a=this._ramps.map(l=>l.tile);if(this._rampTexture=await Xt({baseTexture:t,spriteSheetData:this._spriteSheetData,map:this._map,tiles:a,step:this._step,renderer:this._renderer}),this._container.destroyed){const l=this._rampTexture;this._rampTexture=null,l.destroy(!0);return}o.push(...Ne({runs:r,texture:this._rampTexture,step:this._step,shear:s,baseScale:this._baseScale,segments:ot.rampSegments,sideTint:ot.sideTint}))}if(!this._container.destroyed){o.sort((a,l)=>a.k-l.k);for(const a of o)a.base||W(a.target,null,a.k,this._baseScale),(a.occluder?this._occluder:this._container).addChild(a.target),this._slices.push(a)}}_rampLanes(){if(!this._ramps?.length||!this._rampRuns)return[];const t=new Set(this._ramps.map(s=>`${s.from}:${s.to}`)),e=this._rampRuns.forLevel(this._level).filter(s=>t.has(`${s.from}:${s.to}`));return Pe(e,(s,o)=>{const r=o===0?this._baseScaleX:this._baseScaleY;return Math.round(s/r/this._step)})}render(){this._attachOccluder();const t=Q(this._container.parent,this._renderer);if((this._level>=1||this._occluder)&&this._updateSeeThrough(t),!(!this._parallaxK&&!this._slices.length)&&t){this.mapSprite&&W(this.mapSprite,t,this._parallaxK,this._baseScale);for(let e=0;e<this._slices.length;e+=1){const i=this._slices[e];i.base?We(i,t):W(i.target,t,i.k,this._baseScale)}}}_attachOccluder(){const t=this._container.parent;!this._occluder||!t||this._occluder.parent===t||t.addChild(this._occluder)}_updateSeeThrough(t){if(!this._levelView)return;const e=this._levelView.cfg,i=N.shared.deltaMS/1e3,s=Math.min(1,e.fadeRate*i);this.mapSprite&&this._updateLayerSeeThrough(e,s,t),this._occluder&&this._updateOccluderSeeThrough(e,s,t)}_updateLayerSeeThrough(t,e,i){if(this._levelView.mode==="layer"){const o=this._levelView.level<this._level&&this._hasTileAt(this._levelView.x,this._levelView.y,this._floorSet);this._targetAlpha=o?t.layerAlpha:1,this._container.alpha+=(this._targetAlpha-this._container.alpha)*e;return}const s=this._levelView.level<this._level;Nt(this._hole,s,e),Ht(this._container,this._hole,t,this._levelView,this._container.parent,i)}_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);Nt(this._occluderHole,o,e),Ht(this._occluder,this._occluderHole,t,this._levelView,this._container.parent,i)}_volumeHidesPlayer(t){if(!t||!this._map)return!1;const e=this._levelView,i=I.shear,s=J(e.x,e.y,t,e.z*i),o=ot.slices;for(let r=1;r<=o;r+=1){const a=(this._level+this._volume*r/o)*i,l=1+a;if(this._hasTileAt((s.x+t.x*a)/l,(s.y+t.y*a)/l,this._tileSet))return!0}return!1}_hasTileAt(t,e,i){const s=Math.floor(t/this._baseScaleX/this._step),o=Math.floor(e/this._baseScaleY/this._step),r=this._map?.[o]?.[s];return r!==void 0&&i.has(r)}destroy(){const t=this._container;if(Wt(this._hole,t),this._occluder){const o=this._occluder;this._occluder=null,o.filters=[],Wt(this._occluderHole,o),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=ge.EMPTY);return e&&t.removeChild(e),this._baseTexturePromise=null,this._assetUrl=null,this._map=null,this._tiles=null,this._floor=null,this._tileSet=null,this._floorSet=null,this._ramps=null,this._spriteSheetData=null,this._renderer=null,this._levelView=null,()=>{i&&i.destroy(!0),e&&e.destroy({children:!0,texture:!0,textureSource:!0})}}}const R=(n,t,e)=>n+(t-n)*e,ft=(n,t,e)=>Math.min(e,Math.max(t,n)),Ze=n=>n*(Math.PI/180),$e=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,$=0,K=1,st=2,Ut=3,Gt=4,Zt=5,nt=6,q=7,Et=8,mt=9,gt=11,j=12,Ke=0,qe=1,je=2,Qe=3,Je=4,ti=5,ei=6,ii=7,si=9,$t=10,Kt=0,qt=1,jt=2,ni=3,ri=4,oi=6,ai=0,li=1,hi=2,ci=3,Qt=0,Jt=1,_i=2,ui=4;class di{constructor(t,e,i,s){this._container=t,this._renderer=i.renderer,this._levelView=i.levelView||null;const o=e.scale;this._baseScaleX=typeof o=="number"?o:o.x,this._baseScaleY=typeof o=="number"?o:o.y,this._baseScale={x:this._baseScaleX,y:this._baseScaleY},t.scale=e.scale,this._assetUrl=`${s}${e.img}`,this._baseTexturePromise=oe.load(this._assetUrl),this._level=e.level||0,this._layer=Number(e.layer)||2,t.zIndex=T(this._layer,this._level),this._rotation=Ze(e.angle),this._width=e.width,this._height=e.height,this._x=e.position[0],this._y=e.position[1],this._worldX=this._x*this._baseScaleX,this._worldY=this._y*this._baseScaleY,this.sprite=null,this.needsRender=!!this._levelView,this._create()}async _create(){try{const t=await this._baseTexturePromise;if(this._container.destroyed)return;this.sprite=new k(t),this.sprite.x=this._x,this.sprite.y=this._y,this.sprite.width=this._width,this.sprite.height=this._height,this.sprite.rotation=this._rotation,this._container.addChild(this.sprite)}catch(t){console.error(`Failed to create dynamic map with asset ${this._assetUrl}:`,t)}}render(){if(!this._levelView||!this.sprite)return;const t=this._container;t.alpha=this._levelView.alphaFor(this._level,this._worldX,this._worldY),t.tint=this._levelView.tintFor(this._level),this._level&&W(t,Q(t.parent,this._renderer),this._level*I.shear,this._baseScale)}update(t){this.sprite&&(this.sprite.x=t[Qt]/this._baseScaleX,this.sprite.y=t[Jt]/this._baseScaleY,this.sprite.rotation=t[_i]),this._worldX=t[Qt],this._worldY=t[Jt];const e=t[ui]||0;e!==this._level&&(this._level=e,this._container.zIndex=T(this._layer,e),e||W(this._container,null,0,this._baseScale))}destroy(){this.sprite=null,this._baseTexturePromise=null,this._assetUrl=null,this._renderer=null,this._levelView=null}}let pi=class extends D{constructor(t,e,i){if(super(),this._mode=null,typeof i.assetsBase!="string"){console.error("Map: сервис assetsBase недоступен — карта останется пустой. Объявите assetsBase в componentDependencies и запустите игру на vimp-engine >= 0.9.0");return}const s=`${i.assetsBase}img/`;this._mode=t.type==="dynamic"?new di(this,t,i,s):new Ge(this,t,i,s),this._mode.needsRender&&(this.onRender=()=>this._mode.render())}update(t){this._mode?.update?.(t)}destroy(t){const e=this._mode?.destroy();this._mode=null,super.destroy({children:!0,texture:!1,textureSource:!1,...t}),e?.()}};const te=[16777215,9418751,10477760,15783820,14721232,10541296,15773836,12632280],he=n=>te[n]??te[0],fi=2,mi=.35;class gi extends D{constructor(t,e,i={}){super(),this._map=t.map,this._level=t.level||0,this._solid=t.solid||t.physicsStatic||[],this._tiles=t.tiles||[],this._step=t.step,this.zIndex=T(fi,this._level),this.scale=t.scale,this._draws=this._tiles.some(s=>this._solid.includes(s)),this.radarGraphics=new P,this.addChild(this.radarGraphics),this._levelView=i.levelView||null,this._levelView&&this._draws&&(this.onRender=()=>{this.alpha=this._levelView.level===this._level?1:mi}),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(he(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 ee=2,yi=9,xi=1.5;class wi extends D{constructor(t,e){super(),this._level=t[j]||0,this.zIndex=T(ee,this._level),this._textures=e.tankRadarTexture,this.body=new k,this.body.anchor.set(.5),this.levelRing=new P,this.addChild(this.levelRing,this.body),this._drawLevelRing(),this.x=t[$]||0,this.y=t[K]||0,this._condition=t[q],this._teamId=t[mt],this.scale.set(5,5),this.create()}_drawLevelRing(){this.levelRing.clear(),this._level>0&&this.levelRing.circle(0,0,yi).stroke({width:xi,color:he(this._level)})}create(){this._condition===0?this.body.texture=this._textures.destroyed:this._teamId===1?this.body.texture=this._textures.liveTeamId1:this._teamId===2&&(this.body.texture=this._textures.liveTeamId2)}update(t){this.x=t[$],this.y=t[K];const e=t[j]||0;e!==this._level&&(this._level=e,this.zIndex=T(ee,e),this._drawLevelRing());const i=t[q],s=t[mt];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 Tt=3,vi=1,ie=1.15,Si=1.25,bi=.6,Ti=1,Mi=.015,Ai=2.5;function ki(n,t=0){const e=Number.isFinite(n)?n:0,i=ft(e,0,1),s=Math.max(0,e-1),o=R(vi,ie,i)+(Si-ie)*s,r=R(bi,Ti,i),a=1+Mi*(1-i)*Math.sin(2*Math.PI*Ai*(t/1e3));return{rate:o*a,volumeFactor:r}}class Ii extends D{constructor(t,e,i,s){super(),this.body=new k,this.gun=new k,this.wreck=new k,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[$]||0,this._worldY=t[K]||0,this.x=this._worldX,this.y=this._worldY,this.rotation=t[st]||0,this.gun.rotation=t[Ut]||0,this._engineLoad=t[nt]||0,this._condition=t[q],this._size=t[Et],this._teamId=t[mt],this._z=t[gt]||0,this._level=Math.min(t[j]||0,Math.round(this._z)),this.zIndex=T(Tt,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}=ki(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[$],this._worldY=t[K],this.rotation=t[st],this.gun.rotation=t[Ut],this._engineLoad=t[nt]||0,this._z=t[gt]||0;const e=Math.min(t[j]||0,Math.round(this._z));e!==this._level&&(this._level=e,this.zIndex=T(Tt,e));const i=1+this._z*I.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[q],r=t[mt];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(){const t=Q(this.parent,this._renderer);this._levelView&&this._isLocal()&&this._levelView.setCamera(t),this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this._worldX,this._worldY,this._z),this.tint=this._levelView.tintFor(this._level));const e=J(this._worldX,this._worldY,t,this._z*I.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 k(i),this._shadow.anchor.set(.5),this._shadowScale=this._size*4*dt.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*dt.scaleGain)),t.alpha=Math.max(0,dt.baseAlpha-this._z*dt.alphaFalloff)*this.alpha,t.zIndex=T(Tt-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 Li=2;class Ci extends D{constructor(t,e,i){super(),this._level=t[oi]||0,this.zIndex=T(Li,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 k(e.bombTexture),this.body.anchor.set(.5),this._worldX=t[Kt],this._worldY=t[qt],this.x=this._worldX,this.y=this._worldY,this.rotation=t[jt],this._size=t[ni],this._totalDurationMs=t[ri],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 ye({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),N.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[Kt],this._worldY=t[qt],this.x=this._worldX,this.y=this._worldY,this.rotation=t[jt],this._soundId&&(this._soundManager.updateSoundData(this._soundId,{position:{x:this._worldX,y:this._worldY}})||(this._soundId=null))}_applyHeight(){const t=this._level*I.shear,e=Q(this.parent,this._renderer),i=J(this._worldX,this._worldY,e,t);this.position.set(i.x,i.y),this.scale.set(1+t)}_stopTimer(){this._tickListener&&(N.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 _t 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),N.shared.add(this._tickListener),this._onEffectStart(),this.isComplete||this._update(0))}_onEffectStart(){}_update(){}_completeEffect(){this.isComplete||(this.isComplete=!0,this._tickListener&&(N.shared.remove(this._tickListener),this._tickListener=null),typeof this.onComplete=="function"&&this.onComplete())}destroy(t){this.isComplete=!0,this._tickListener&&(N.shared.remove(this._tickListener),this._tickListener=null),this.parent&&this.parent.removeChild(this),super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class Ei extends _t{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 k(r),this._mainBody.anchor.set(.5),this._mainBody.tint=11393254,this._mainBody.scale.set(this._baseScale),this._core=new k(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 Mt=[],it={get(n){if(Mt.length>0){const t=Mt.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 xe({texture:n,anchorX:.5,anchorY:.5})},release(n){n&&Mt.push(n)}},Lt=50,Pi=400,Di=800;class Ri extends _t{constructor(t,e=Lt){super();const i=e/Lt;this._blastScale=i;const{texture:s,contentSize:o}=t.explosionTexture;this.explosionTexture=s,this._unitScale=1/o;const r=Pi*i,a=Di*i;this._particleContainer=new ae({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=it.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),it.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)it.release(this._particles[e].view);this._particles=[],super.destroy(t)}}const zi=.168,Fi=.225,se=.15,Vi=2e4,Yi=50,Xi=4e3,Oi=4e3;class Bi extends _t{constructor(t,e,i,s,o){super(s),this._assets=o,this._radius=i,this.x=t,this.y=e,this._funnelDurationMs=Vi,this._funnelFadeInDurationMs=Yi,this._funnelFadeDurationMs=Xi,this._elapsedMs=0,this._smokeDurationMs=Oi,this._smokeSpawningStopped=!1,this._funnel=this._createFunnelSprite(),this._smoke=new Ri(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 k(i);s.anchor.set(.5),s.alpha=0,s.rotation=Math.random()*Math.PI*2;const o=this._radius*zi*E(1-se,1+se);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=Fi*ft(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 Ni=4,Hi=2;class Wi extends D{constructor(t,e,i){super(),this.originX=t[ai],this.originY=t[li],this.radius=t[hi]??Lt,this._level=t[ci]||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*I.shear,e=Q(this.parent,this._renderer),i=J(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 Ei(this.originX,this.originY,this.radius,this._onExplosionComplete.bind(this),this._assets),this.explosion.zIndex=T(Ni,this._level),this.funnel=new Bi(this.originX,this.originY,this.radius,this._onFunnelComplete.bind(this),this._assets),this.funnel.zIndex=T(Hi,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 ne=4,tt=400,Ui=0,Gi=0,Zi=8,A={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 $i extends D{constructor(t,e,i={}){super(),this._level=t[j]||0,this.zIndex=T(ne,this._level);const{texture:s,contentSize:o}=e.smokeTexture;this._smokeTexture=s,this._textureScale=Zi/o,this._emitterX=t[$],this._emitterY=t[K],this._emitterRotation=t[st],this._emitterVX=t[Gt],this._emitterVY=t[Zt],this._engineLoad=t[nt],this._condition=t[q],this._z=t[gt]||0,this._size=t[Et],this._width=this._size*4,this._height=this._size*3,this._particleScaleMultiplier=Math.max(.5,Math.sqrt(this._width*this._height*.001)),this._particles=[],this._levelView=i.levelView||null,this._renderer=i.renderer||null,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&(this.alpha=this._levelView.alphaFor(this._level,this._emitterX,this._emitterY,this._z),this.tint=this._levelView.tintFor(this._level)),W(this,Q(this.parent,this._renderer),this._z*I.shear,1)}),this._particleContainer=new ae({texture:this._smokeTexture,boundsArea:new z(this._emitterX-tt,this._emitterY-tt,tt*2,tt*2),dynamicProperties:{position:!0,vertex:!0,rotation:!0,color:!0}}),this.addChild(this._particleContainer),this._timeSinceLastSpawn=0,this._tickListener=r=>this._updateParticles(r.deltaMS),N.shared.add(this._tickListener)}update(t){const e=this._condition,i=t[j]||0;i!==this._level&&(this._level=i,this.zIndex=T(ne,i)),this._emitterX=t[$],this._emitterY=t[K],this._emitterRotation=t[st],this._emitterVX=t[Gt],this._emitterVY=t[Zt],this._engineLoad=t[nt],this._condition=t[q],this._z=t[gt]||0,this._particleContainer.boundsArea.x=this._emitterX-tt,this._particleContainer.boundsArea.y=this._emitterY-tt,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=A.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=A.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(A.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),it.release(h.view),this._particles.splice(l,1);continue}h.vx=h.vx+(Ui-h.vx)*a,h.vy=h.vy+(Gi-h.vy)*a,h.x+=h.vx*e,h.y+=h.vy*e;const f=h.age/h.lifetime,u=1-(1-f)*(1-f),d=R(h.startSizeFactor,h.endSizeFactor,u),y=R(h.startAlpha,h.endAlpha,f),m=d*this._particleScaleMultiplier*this._textureScale,p=h.view;p.x=h.x,p.y=h.y,p.scaleX=m,p.scaleY=m,p.alpha=y,p.rotation+=h.rotSpeed*e}}spawnParticle(t,e,i=!1){const s=E(A.particleLifetime.min,A.particleLifetime.max);let o=A.particleStartSizeFactor[this._condition]||.3,r=A.particleEndSizeFactor[this._condition]||1,a=A.particleStartAlpha,l=1;i&&(o*=2,r*=2.5,a=.8,l=2);const h=this._emitterRotation,f=h+Math.PI,u=Math.cos(f),d=Math.sin(f),y=h+Math.PI/2,m=Math.cos(y),p=Math.sin(y);let v=0;const w=this._width/2*A.streamOffsetFactor;e===2?v=t===0?-w:w:e===3&&(v=(t-1)*w);const g=this._height*.22,x=this._emitterX+u*g+m*v,c=this._emitterY+d*g+p*v;let b=E(A.particleInitialVelocity.away.min,A.particleInitialVelocity.away.max),M=E(A.particleInitialVelocity.side.min,A.particleInitialVelocity.side.max);b*=l,M*=l;let S=u*b+m*M,V=d*b+p*M;const X=A.particleVelocityVariance;S+=E(-X,X),V+=E(-X,X),S+=this._emitterVX,V+=this._emitterVY;const L=it.get(this._smokeTexture);L.tint=A.particleColor,L.x=x,L.y=c,L.alpha=a;const O=o*this._particleScaleMultiplier*this._textureScale;L.scaleX=O,L.scaleY=O,L.rotation=E(0,Math.PI*2);const U={view:L,x,y:c,vx:S,vy:V,age:0,lifetime:s,startSizeFactor:o,endSizeFactor:r,startAlpha:a,endAlpha:A.particleEndAlpha,rotSpeed:E(-1,1)};this._particleContainer.addParticle(L),this._particles.push(U)}_stopTimer(){this._tickListener&&(N.shared.remove(this._tickListener),this._tickListener=null)}destroy(t){this._stopTimer();for(let e=0;e<this._particles.length;e+=1)it.release(this._particles[e].view);this._particles=[],super.destroy({texture:!1,textureSource:!1,...t,children:!0})}}class Ki extends k{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 At=1;class qi extends D{constructor(t,e,i={}){super(),this._levelView=i.levelView||null,this._renderer=i.renderer||null,this._level=t[j]||0,this._markLayers=new Map,this.zIndex=T(At,this._level),this._currentX=t[$]||0,this._currentY=t[K]||0,this._currentRotation=t[st]||0,this._engineLoad=t[nt]||0,this._condition=t[q],this._size=t[Et],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),N.shared.add(this._tickListener),this._levelView&&(this.onRender=()=>this._updateLayers())}update(t){this._currentX=t[$],this._currentY=t[K],this._currentRotation=t[st],this._engineLoad=t[nt],this._condition=t[q];const e=t[j]||0;e!==this._level&&(this._level=e,this.zIndex=T(At,e))}_markLayer(t){let e=this._markLayers.get(t);if(e)return e;e=new D,e.zIndex=T(At,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 y of this._markLayers.values())for(let m=y.children.length-1;m>=0;m-=1){const p=y.children[m];p.update(t)&&p.destroy()}const e=this._currentX-this._prevX,i=this._currentY-this._prevY,s=Math.sqrt(e*e+i*i),o=$e(this._currentRotation-this._prevRotation),r=Math.abs(o),a=s-this._prevSpeed,l=Math.abs(a),h=r-this._prevAngularSpeed,f=Math.abs(h),u=performance.now();let d=!1;this._condition!==0&&u-this._lastTrackMarkTime>this._trackMarkCooldown&&(l>this._minAbsAccelerationForMark&&(d=!0),s>this._minSpeedForRotationMarks&&(r>this._minAngularSpeedForMark||f>this._minRotationAccelerationForMark)&&(d=!0)),this._engineLoad>1&&(d=!0),d&&(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 Ki(a,l,this._prevRotation,this._trackWidth,this._trackLength,this._trackInitialAlpha,this._assets.trackMarkTexture);t.addChild(h)}}_updateLayers(){if(!this._markLayers.size)return;const t=Q(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&&W(i,t,e*I.shear)}_stopTimer(){this._tickListener&&(N.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 ji extends _t{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 P,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:ft(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=ft(a,0,this.config.alphaStart);const l=Math.pow(e,this.config.trailShrinkPower),h=R(this.config.trailLength,0,l),f=this.totalDist*e;if(f>=this.config.trailStartOffset){let u=f;this.totalDist>.001&&(u=Math.max(0,f-this.config.trailStartOffset));const d=Math.min(u,h);let y,m;this.totalDist>.001?(y=i-this.nx*d,m=s-this.ny*d):(y=i,m=s);const p=Math.hypot(i-y,s-m);if(p<this.config.segmentRadius*.5&&this.totalDist===0)this._drawSegment(i,s,this.config.segmentRadius,this.config.color,a);else if(p>=this.config.segmentRadius*.5){const v=Math.max(1,this.config.segmentCount);for(let w=0;w<v;w++){let g=.5;v>1&&(g=w/(v-1));const x=R(y,i,g),c=R(m,s,g),b=R(1,.8,g);this._drawSegment(x,c,this.config.segmentRadius,this.config.color,a*b)}}}}this.elapsedTime>=this.animationDuration&&(this.graphics.clear(),this._completeEffect())}destroy(t){this.graphics&&this.graphics.clear(),super.destroy(t)}}class Qi extends _t{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 k(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 f=Math.hypot(r.vx,r.vy);if(f>0){const d=f*this.config.dragCoefficient*e,y=Math.max(0,1-d/f);r.vx*=y,r.vy*=y}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 f=r.timeSinceStopped-this.config.lingerDuration,u=Math.min(500,r.lifetime*(1-this.config.fadeOutStart));r.alpha=R(1,0,Math.min(f/u,1))}else if(a>=this.config.fadeOutStart){const f=r.age-r.lifetime*this.config.fadeOutStart,u=r.lifetime*(1-this.config.fadeOutStart);r.alpha=u>0?R(1,0,Math.min(f/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 Ji=2;class ts extends D{constructor(t,e,i){super(),this.startPositionX=t[Ke],this.startPositionY=t[qe],this.endPositionX=t[je],this.endPositionY=t[Qe],this.soundPositionX=t[Je],this.soundPositionY=t[ti],this.hit=t[ei],this.endLevel=t[si]||0,this.zIndex=T(Ji,this.endLevel),this.anchorKey=null,this.anchorLocalX=0,this.anchorLocalY=0,Array.isArray(t[$t])&&([this.anchorKey,this.anchorLocalX,this.anchorLocalY]=t[$t]),this._assets=e,this._soundManager=i.soundManager,this._isLocalShot=i.localPlayer?.is(t[ii])===!0,this._mapDynamics=i.mapDynamics||null,this._levelView=i.levelView||null,this._renderer=i.renderer||null,(this._levelView||this._renderer)&&(this.onRender=()=>{this._levelView&&(this.alpha=this._levelView.alphaFor(this.endLevel,this.endPositionX,this.endPositionY),this.tint=this._levelView.tintFor(this.endLevel)),W(this,Q(this.parent,this._renderer),this.endLevel*I.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 ji(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 Qi(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 es={Map:pi,MapRadar:gi,TankRadar:wi,Tank:Ii,Bomb:Ci,ExplosionEffect:Wi,Smoke:$i,Tracks:qi,ShotEffect:ts},is=4;function ct(n){return Math.ceil(n*is)}function kt(n,t){const{radius:e,blur:i,color:s,quality:o=40}=n,r=new P,a=(e+ct(i))*2,l=a/2;r.circle(l,l,e),r.fill(s);const h=new Ct({strength:i,quality:o});h.padding=ct(i),r.filters=[h];const f=t.generateTexture({target:r,frame:new z(0,0,a,a)});return r.destroy(!0),{texture:f,contentSize:e*2}}function ss(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,f=Math.max(1,Math.floor(h)||1),u=(e+i+l)*2,d=u+ct(s)*2,y=d/2,m=[];for(let p=0;p<f;p+=1){const v=new P,w=[];for(let x=0;x<o;x+=1){const c=x/o*Math.PI*2,b=e+E(-i,i);w.push(y+b*Math.cos(c),y+b*Math.sin(c))}v.poly(w).fill(r).stroke({width:l,color:a,alignment:1});const g=new Ct({strength:s,quality:10});g.padding=ct(s),v.filters=[g],m.push(t.generateTexture({target:v,frame:new z(0,0,d,d)})),v.destroy(!0)}return{textures:m,contentSize:u}}function ns(n,t){const{colors:e}=n,i={},s=10,o=s*4,r=s*3,a=15658734,l=f=>{const u=new P,d=new P,y=o,m=r;u.rect(-y/2,-m/2,y,m).fill(5592405).rect(-y/2+1,-m/2+1,y-2,m-2).fill(10066329).rect(-y/2+2,-m/2+2,y-4,m-4).fill(13421772).rect(-y/2+3,-m/2+3,y-6,m-6).fill(a),d.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(f).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(f);const p=u.getBounds(),v=t.generateTexture({target:u,frame:new z(p.x,p.y,p.width,p.height)}),w=d.getBounds(),g=t.generateTexture({target:d,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),d.destroy(!0),{body:v,gun:g,gunAnchor:x}},h=()=>{const f=new D,u=new P,d=new P;f.addChild(u,d);const y=3815994,m=2434341,p=3158064,v=1579032,w=5263440,g=o,x=r,c=s;u.moveTo(-g/2-c*.1,-x/2+c*.2).lineTo(g/2+c*.2,-x/2-c*.1).lineTo(g/2-c*.1,x/2+c*.3).lineTo(-g/2+c*.3,x/2-c*.2).closePath().fill(y).stroke({width:c*.2,color:w,alignment:.5}),u.moveTo(-g/2+c*.4,-x/2+c*.5).lineTo(g/2-c*.3,-x/2+c*.2).lineTo(g/2-c*.4,x/2-c*.1).lineTo(-g/2+c*.2,x/2-c*.4).closePath().fill(m),u.circle(g*.15,x*.1,c*1.2).fill(v),u.circle(-g*.3,-x*.25,c*.5).fill(v),d.position.set(c*.3,-c*.2);const b=[c*1.1,-c*.7,c*.2,-c*1,-c*.6,-c*.9,-c*1.3,-c*.2,-c*1.1,c*.6,-c*.2,c*1,c*.7,c*.8,c*1.3,c*.1];d.poly(b).fill(p).stroke({width:c*.15,color:w,alignment:0});const M=[c*.8,-c*.25,c*1.5,-c*.4,c*1.4,c*.15,c*.7,c*.05];d.poly(M).fill(p).stroke({width:c*.1,color:w,alignment:0}),d.circle(c*.1,-c*.2,c*.4).fill(v);const S=f.getBounds(),V=t.generateTexture({target:f,frame:new z(S.x,S.y,S.width,S.height)});return f.destroy({children:!0}),V};return i.liveTeamId1=l(e.teamId1),i.liveTeamId2=l(e.teamId2),i.destroyed=h(),i}function rs(n,t){const{radius:e,borderWidth:i,crossSize:s,crossThickness:o,colors:r}=n,a={},l=(e+i)*2,h=l/2,f=15658734,u=3355443,d=m=>{const p=new P;p.circle(h,h,e).fill(f),p.circle(h,h,e-i).fill(m);const v=t.generateTexture({target:p,frame:new z(0,0,l,l)});return p.destroy(!0),v},y=()=>{const m=new P,p=s/2;m.moveTo(h-p,h-p).lineTo(h+p,h+p).moveTo(h-p,h+p).lineTo(h+p,h-p).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=d(r.teamId1),a.liveTeamId2=d(r.teamId2),a.destroyed=y(),a}function os(n,t){const{colorOuter:e,colorInner:i}=n,s=new P,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 as(n,t){const{width:e,length:i,color:s}=n,o=new P;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 ls(n,t){const{width:e,height:i,radius:s,blur:o,color:r,quality:a=20}=n,l=new P,h=ct(o),f=e+h*2,u=i+h*2;l.roundRect(h,h,e,i,s),l.fill(r);const d=new Ct({strength:o,quality:a});d.padding=h,l.filters=[d];const y=t.generateTexture({target:l,frame:new z(0,0,f,u)});return l.destroy(!0),{texture:y,contentSize:e}}const hs={explosionTexture:kt,smokeTexture:kt,impactParticleTexture:kt,tankShadowTexture:ls,funnelTexture:ss,tankTexture:ns,tankRadarTexture:rs,bombTexture:os,trackMarkTexture:as},cs=n=>(n??"").split(/[?#]/)[0].endsWith(".js"),_s=n=>import(n);function us(n=Ce){const t={level:0,x:0,y:0,z:0,camera:null};return{set(e,i,s,o=0){t.level=e,t.x=i,t.y=s,t.z=o},setCamera(e){t.camera=e},alphaFor(e,i,s,o=e){const r=t.camera,a=J(t.x,t.y,r,t.z*I.shear),l=J(i,s,r,o*I.shear);return ze({viewLevel:t.level,viewX:a.x,viewY:a.y,level:e,x:l.x,y:l.y,cfg:n})},tintFor(e){return Fe(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},get camera(){return t.camera}}}const ms={id:"tanks",engineApi:we,requires:["map.layers","map.levelsN"],async createClientCore(n,{wasmUrl:t}){if(cs(t)){const i=await _s(t);return{core:new i.ClientCore(n),memory:null}}const e=await Ie({module_or_path:t});return{core:new It(n),memory:e.memory}},parts:es,bakers:hs,styles:Le,serviceNames:["levelView","mapDynamics","rampRuns"],hooks:{services(n){return{levelView:us(),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]}}},rampRuns:{forLevel(e){return JSON.parse(n.ramp_runs()).filter(i=>i.from===e)}}}},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{ms as default};
|
|
@@ -86,6 +86,17 @@ export class ClientCore {
|
|
|
86
86
|
* повреждён).
|
|
87
87
|
*/
|
|
88
88
|
push_frame(data: Uint8Array, local_now: number): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Прогоны рамп текущей карты для РЕНДЕРА клина: тот же
|
|
91
|
+
* `MapLevels::runs`, по которому физика ставит стражей. Второй обход
|
|
92
|
+
* грида на JS расходился бы с ядром молча — горка, которую видно и
|
|
93
|
+
* нельзя проехать.
|
|
94
|
+
* Формат: JSON-массив
|
|
95
|
+
* `{ axis, sign, from, to, min, max, crossMin, crossMax, block }`,
|
|
96
|
+
* координаты — МИРОВЫЕ (уже масштабированные), как в `RampRun`.
|
|
97
|
+
* Пустой массив — карты нет или она одноуровневая.
|
|
98
|
+
*/
|
|
99
|
+
ramp_runs(): string;
|
|
89
100
|
/**
|
|
90
101
|
* Полный сброс (порт CLEAR).
|
|
91
102
|
*/
|
|
@@ -210,6 +210,29 @@ class ClientCore {
|
|
|
210
210
|
const ret = wasm.clientcore_push_frame(this.__wbg_ptr, ptr0, len0, local_now);
|
|
211
211
|
return ret !== 0;
|
|
212
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* Прогоны рамп текущей карты для РЕНДЕРА клина: тот же
|
|
215
|
+
* `MapLevels::runs`, по которому физика ставит стражей. Второй обход
|
|
216
|
+
* грида на JS расходился бы с ядром молча — горка, которую видно и
|
|
217
|
+
* нельзя проехать.
|
|
218
|
+
* Формат: JSON-массив
|
|
219
|
+
* `{ axis, sign, from, to, min, max, crossMin, crossMax, block }`,
|
|
220
|
+
* координаты — МИРОВЫЕ (уже масштабированные), как в `RampRun`.
|
|
221
|
+
* Пустой массив — карты нет или она одноуровневая.
|
|
222
|
+
* @returns {string}
|
|
223
|
+
*/
|
|
224
|
+
ramp_runs() {
|
|
225
|
+
let deferred1_0;
|
|
226
|
+
let deferred1_1;
|
|
227
|
+
try {
|
|
228
|
+
const ret = wasm.clientcore_ramp_runs(this.__wbg_ptr);
|
|
229
|
+
deferred1_0 = ret[0];
|
|
230
|
+
deferred1_1 = ret[1];
|
|
231
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
232
|
+
} finally {
|
|
233
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
213
236
|
/**
|
|
214
237
|
* Полный сброс (порт CLEAR).
|
|
215
238
|
*/
|
|
Binary file
|
|
@@ -17,6 +17,7 @@ export const clientcore_my_game_id: (a: number) => number;
|
|
|
17
17
|
export const clientcore_new: (a: number, b: number) => [number, number, number];
|
|
18
18
|
export const clientcore_offset: (a: number) => number;
|
|
19
19
|
export const clientcore_push_frame: (a: number, b: number, c: number, d: number) => number;
|
|
20
|
+
export const clientcore_ramp_runs: (a: number) => [number, number];
|
|
20
21
|
export const clientcore_reset: (a: number) => void;
|
|
21
22
|
export const clientcore_resync: (a: number) => void;
|
|
22
23
|
export const clientcore_sample: (a: number, b: number) => number;
|
|
@@ -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,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],[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},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};
|
|
1
|
+
class Z{__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&&(Z.prototype[Symbol.dispose]=Z.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 Q=0;function Se(t,e){return Q+=e,Q>=ve&&(Y=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Y.decode(),Q=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-BQfcyQdY.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],[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},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"],rampRuns:["Map"],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 Qe(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 Ze={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,[Qe(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 Z(t)},gameConfig:We,authSchema:He,chatCommands:[Ke,Ze,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": "059aa1e8df043115",
|
|
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-BIQr8QFW.js",
|
|
12
|
+
"host": "/games/tanks/host-D9wFbY8G.js",
|
|
13
|
+
"wasm": "/games/tanks/assets/vimp_tanks_core_bg-BQfcyQdY.wasm",
|
|
14
14
|
"wasmNode": "./core-node/vimp_tanks_core.js"
|
|
15
15
|
},
|
|
16
16
|
"assetsBase": "/games/tanks/",
|
|
17
17
|
"maps": {
|
|
18
|
-
"version": "
|
|
18
|
+
"version": "ad6325c2d82b5d91",
|
|
19
19
|
"list": [
|
|
20
20
|
"canopy",
|
|
21
21
|
"garden",
|
package/dist/maps/garden.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"setId":"c1","spriteSheet":{"img":"tiles3.png","frames":[[96,0,32,32],[32,32,32,32],[64,32,32,32],[0,96,32,32]]},"layers":{"1":[0,1,2],"4":[3]},"step":32,"physicsStatic":[2],"physicsDynamic":[{"density":100,"layer":3,"position":[960,64],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,96],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,128],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,160],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,192],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,224],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,256],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,288],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,320],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,352],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[64,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[96,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[128,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[160,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[192,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[224,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[256,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[288,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[320,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[352,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,704],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,736],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,768],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,800],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,832],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,864],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,896],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,928],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[704,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[736,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[768,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[800,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[832,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[864,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[896,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[928,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3456],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3488],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3520],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3552],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3584],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3616],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3648],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3680],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3712],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3744],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3456,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3488,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3520,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3552,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3584,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3616,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3648,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3680,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3712,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3744,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2880],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2912],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2944],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2976],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3008],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3040],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3072],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3104],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2880,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2912,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2944,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2976,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3008,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3040,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3072,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3104,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14}],"respawns":{"team1":[[320,320,45],[320,480,45],[320,640,45],[480,320,45],[480,480,45],[480,640,45],[640,320,45],[640,480,45],[640,640,45],[800,400,45]],"team2":[[3520,3520,225],[3520,3360,225],[3520,3200,225],[3360,3520,225],[3360,3360,225],[3360,3200,225],[3200,3520,225],[3200,3360,225],[3200,3200,225],[3040,3440,225]]},"map":[[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2],[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1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,1,1,1,1,2],[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2],[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2],[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]]}
|
|
1
|
+
{"setId":"c1","spriteSheet":{"img":"tiles3.png","frames":[[96,0,32,32],[32,32,32,32],[64,32,32,32],[0,96,32,32]]},"layers":{"1":[0,1,2],"4":[3]},"step":32,"physicsStatic":[2],"physicsDynamic":[{"density":100,"layer":3,"position":[960,64],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,96],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,128],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,160],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,192],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,224],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,256],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,288],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,320],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,352],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[64,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[96,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[128,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[160,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[192,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[224,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[256,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[288,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[320,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[352,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,704],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,736],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,768],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,800],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,832],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,864],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,896],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,928],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[704,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[736,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[768,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[800,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[832,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[864,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[896,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[928,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[960,960],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3456],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3488],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3520],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3552],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3584],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3616],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3648],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3680],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3712],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3744],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3456,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3488,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3520,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3552,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3584,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3616,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3648,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3680,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3712,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3744,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2880],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2912],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2944],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2976],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3008],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3040],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3072],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,3104],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2848,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2880,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2912,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2944,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[2976,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3008,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3040,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3072,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14},{"density":100,"layer":3,"position":[3104,2848],"angle":0,"img":"b1.png","width":32,"height":32,"linearDamping":5,"angularDamping":14}],"respawns":{"team1":[[320,320,45],[320,480,45],[320,640,45],[480,320,45],[480,480,45],[480,640,45],[640,320,45],[640,480,45],[640,640,45],[800,400,45]],"team2":[[3520,3520,225],[3520,3360,225],[3520,3200,225],[3360,3520,225],[3360,3360,225],[3360,3200,225],[3200,3520,225],[3200,3360,225],[3200,3200,225],[3040,3440,225]]},"map":[[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1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"name": "@vimp-games/tanks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "VIMP Tanks — игра-плагин для движка VIMP",
|
|
5
5
|
"homepage": "https://github.com/lgick/vimp-tanks#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"globals": "^16.2.0",
|
|
51
51
|
"happy-dom": "^20.10.6",
|
|
52
52
|
"pixi.js": "8.19.0",
|
|
53
|
-
"vimp-engine": "^0.33.
|
|
53
|
+
"vimp-engine": "^0.33.1",
|
|
54
54
|
"vite": "^7.1.11",
|
|
55
55
|
"vitest": "^4.1.9"
|
|
56
56
|
}
|
|
Binary file
|
package/dist/client-BOXjbg0z.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
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};
|