@vimp-games/tanks 0.22.12 → 0.22.13

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.
@@ -1,4 +1,4 @@
1
- import{UniformGroup as Ne,Filter as Ln,GpuProgram as Pn,GlProgram as xs,defaultFilterVert as zn,Ticker as Q,Container as $,Sprite as J,Rectangle as rt,Spritesheet as Cn,MeshSimple as En,Text as Ci,BlurFilter as ys,Assets as as,Texture as Ue,Graphics as U,Shader as Ei,Geometry as In,Mesh as Ii,AlphaFilter as Ri,PerspectiveMesh as Rn,Particle as Fn,ParticleContainer as Ke,MeshGeometry as Xn}from"pixi.js";const Yn=4;class ls{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Is.unregister(this),t}free(){const t=this.__destroy_into_raw();C.__wbg_clientcore_free(t,0)}abi_describe(){let t,e;try{const s=C.clientcore_abi_describe(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}apply_aim(t,e,s,n){C.clientcore_apply_aim(this.__wbg_ptr,t,e,s,n)}apply_input(t,e,s){const n=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),o=_t,r=Vt(e,C.__wbindgen_malloc,C.__wbindgen_realloc),a=_t;C.clientcore_apply_input(this.__wbg_ptr,n,o,r,a,s)}cycle_weapon(t){C.clientcore_cycle_weapon(this.__wbg_ptr,t)}debug_json(){let t,e;try{const s=C.clientcore_debug_json(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}decode_frame(t){let e,s;try{const n=je(t,C.__wbindgen_malloc),o=_t,r=C.clientcore_decode_frame(this.__wbg_ptr,n,o);return e=r[0],s=r[1],Lt(r[0],r[1])}finally{C.__wbindgen_free(e,s,1)}}dispatch(t,e){const s=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),n=_t,o=je(e,C.__wbindgen_malloc),r=_t,a=C.clientcore_dispatch(this.__wbg_ptr,s,n,o,r);var l=Vn(a[0],a[1]).slice();return C.__wbindgen_free(a[0],a[1]*1,1),l}floor_level(t,e,s){return C.clientcore_floor_level(this.__wbg_ptr,t,e,s)}hot_ptr(){return C.clientcore_hot_ptr(this.__wbg_ptr)>>>0}hot_values(){const t=C.clientcore_hot_values(this.__wbg_ptr);var e=Ze(t[0],t[1]).slice();return C.__wbindgen_free(t[0],t[1]*4,4),e}map_dynamics_to_world(t,e,s){const n=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),o=_t,r=C.clientcore_map_dynamics_to_world(this.__wbg_ptr,n,o,e,s);var a=Ze(r[0],r[1]).slice();return C.__wbindgen_free(r[0],r[1]*4,4),a}map_generation(){return C.clientcore_map_generation(this.__wbg_ptr)>>>0}my_game_id(){return C.clientcore_my_game_id(this.__wbg_ptr)}constructor(t){const e=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),s=_t,n=C.clientcore_new(e,s);if(n[2])throw Rs(n[1]);return this.__wbg_ptr=n[0],Is.register(this,this.__wbg_ptr,this),this}offset(){return C.clientcore_offset(this.__wbg_ptr)}push_frame(t,e){const s=je(t,C.__wbindgen_malloc),n=_t;return C.clientcore_push_frame(this.__wbg_ptr,s,n,e)!==0}ramp_runs(){let t,e;try{const s=C.clientcore_ramp_runs(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}reset(){C.clientcore_reset(this.__wbg_ptr)}resync(){C.clientcore_resync(this.__wbg_ptr)}sample(t){return C.clientcore_sample(this.__wbg_ptr,t)>>>0}set_active(t){C.clientcore_set_active(this.__wbg_ptr,t)}set_map(t){const e=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),s=_t,n=C.clientcore_set_map(this.__wbg_ptr,e,s);if(n[1])throw Rs(n[0])}set_model(t){const e=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),s=_t;C.clientcore_set_model(this.__wbg_ptr,e,s)}shot_segments(t,e,s,n,o,r){const a=C.clientcore_shot_segments(this.__wbg_ptr,t,e,s,n,o,r);var l=Ze(a[0],a[1]).slice();return C.__wbindgen_free(a[0],a[1]*4,4),l}surface_at(t,e,s){return C.clientcore_surface_at(this.__wbg_ptr,t,e,s)}surface_dir_at(t,e,s){return C.clientcore_surface_dir_at(this.__wbg_ptr,t,e,s)}surface_types(){let t,e;try{const s=C.clientcore_surface_types(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}sync_panel(t){const e=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),s=_t;C.clientcore_sync_panel(this.__wbg_ptr,e,s)}take_divergence(){let t,e;try{const s=C.clientcore_take_divergence(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}take_frames(){let t,e;try{const s=C.clientcore_take_frames(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}try_fire(t){const e=C.clientcore_try_fire(this.__wbg_ptr,t);let s;return e[0]!==0&&(s=Lt(e[0],e[1]).slice(),C.__wbindgen_free(e[0],e[1]*1,1)),s}}Symbol.dispose&&(ls.prototype[Symbol.dispose]=ls.prototype.free);function Dn(){return{__proto__:null,"./vimp_tanks_core_bg.js":{__proto__:null,__wbg_Error_92b29b0548f8b746:function(t,e){return Error(Lt(t,e))},__wbg___wbindgen_throw_344f42d3211c4765:function(t,e){throw new Error(Lt(t,e))},__wbindgen_init_externref_table:function(){const t=C.__wbindgen_externrefs,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)}}}}const Is=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(i=>C.__wbg_clientcore_free(i,1));typeof FinalizationRegistry>"u"||new FinalizationRegistry(i=>C.__wbg_gamecore_free(i,1));function Ze(i,t){return i=i>>>0,On().subarray(i/4,i/4+t)}function Vn(i,t){return i=i>>>0,le().subarray(i/1,i/1+t)}let we=null;function On(){return(we===null||we.byteLength===0)&&(we=new Float32Array(C.memory.buffer)),we}function Lt(i,t){return Nn(i>>>0,t)}let ve=null;function le(){return(ve===null||ve.byteLength===0)&&(ve=new Uint8Array(C.memory.buffer)),ve}function je(i,t){const e=t(i.length*1,1)>>>0;return le().set(i,e/1),_t=i.length,e}function Vt(i,t,e){if(e===void 0){const a=be.encode(i),l=t(a.length,1)>>>0;return le().subarray(l,l+a.length).set(a),_t=a.length,l}let s=i.length,n=t(s,1)>>>0;const o=le();let r=0;for(;r<s;r++){const a=i.charCodeAt(r);if(a>127)break;o[n+r]=a}if(r!==s){r!==0&&(i=i.slice(r)),n=e(n,s,s=r+i.length*3,1)>>>0;const a=le().subarray(n+r,n+s),l=be.encodeInto(i,a);r+=l.written,n=e(n,s,r,1)>>>0}return _t=r,n}function Rs(i){const t=C.__wbindgen_externrefs.get(i);return C.__externref_table_dealloc(i),t}let Ye=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Ye.decode();const Bn=2146435072;let qe=0;function Nn(i,t){return qe+=t,qe>=Bn&&(Ye=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Ye.decode(),qe=t),Ye.decode(le().subarray(i,i+t))}const be=new TextEncoder;"encodeInto"in be||(be.encodeInto=function(i,t){const e=be.encode(i);return t.set(e),{read:i.length,written:e.length}});let _t=0,C;function Un(i,t){return C=i.exports,we=null,ve=null,C.__wbindgen_start(),C}async function Wn(i,t){if(typeof Response=="function"&&i instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(i,t)}catch(n){if(i.ok&&e(i.type)&&i.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 s=await i.arrayBuffer();return await WebAssembly.instantiate(s,t)}else{const s=await WebAssembly.instantiate(i,t);return s instanceof WebAssembly.Instance?{instance:s,module:i}:s}function e(s){switch(s){case"basic":case"cors":case"default":return!0}return!1}}async function Hn(i){if(C!==void 0)return C;i!==void 0&&(Object.getPrototypeOf(i)===Object.prototype?{module_or_path:i}=i:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),i===void 0&&(i=new URL("/assets/vimp_tanks_core_bg-GriiC3GE.wasm",import.meta.url));const t=Dn();(typeof i=="string"||typeof Request=="function"&&i instanceof Request||typeof URL=="function"&&i instanceof URL)&&(i=fetch(i));const{instance:e,module:s}=await Wn(await i,t);return Un(e)}const Gn='@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}',$n={mode:"hole",radius:260,softness:.45,minAlpha:.12,layerAlpha:.4,fadeRate:6,roofMargin:0,lowerTint:11579584},B={shear:.22,levelZStride:100},Rt={faceTilesPerLevel:3,faceSegments:4,faceBleedPx:2,rampSegments:4,sideTint:10133674},At={scaleGain:.1,baseAlpha:.4,alphaFalloff:.12,sizeFactor:1.05,groundOffset:3,groundAlpha:.3},It={lift:.35,vertices:6,shading:.28,lightDir:[-.7,-.7]},jt={ambient:.55,diffuse:.6,lightZ:1},Kt={duration:150,attack:.15,gunKick:1,bodyKick:0,rock:.1},Mt={enabled:!0,trackHeight:5,hullBase:2,hullTop:6,turretBase:6,turretTop:10,barrelHeight:8,barrelRadius:1.5,brakeRadius:2,levelHeight:12.8,leanGain:.3,maxLean:.6,shadowBlur:1},de={rock:.22,wobbleHz:5,decay:180,duration:700,hop:.3,hopDuration:420,underShare:.5,shake:1.2,shakeDuration:220},K={referenceSize:3,maxFire:64,maxSmoke:80,wind:{x:5,y:-3},joltRadius:18,sound:"tankExplosion",flash:{duration:180,startSize:12,endSize:40,alpha:1,color:16773576},fireball:{count:14,speed:{min:15,max:50},drag:4,size:{min:4,max:7},grow:2.2,lifetime:{min:450,max:850},rise:.5,alpha:.95},sparks:{count:12,speed:{min:70,max:160},drag:3,length:2.4,width:.5,lifetime:{min:300,max:700},colors:[16770728,16738842]},fire:{duration:9e3,fadeOut:5e3,rate:36,points:[[-.3,0],[.05,0]],spread:.4,size:{min:2.5,max:4.5},grow:1.6,lifetime:{min:300,max:650},jitter:4,rise:.35,alpha:.85,ramp:[[0,16774344],[.2,16761418],[.5,15885850],[.8,9184266],[1,2361348]]},glow:{size:28,alpha:.3,color:16747056,flicker:.35},smoke:{rate:12,tailRate:7,tail:15e3,burst:{count:12,speed:{min:12,max:30},alpha:.55},size:{min:3,max:5},grow:3.8,lifetime:{min:2600,max:4200},speed:6,drag:1.5,rise:1.4,alpha:.42,tailAlpha:.2,burning:[1315344,2762274],cooling:[4867908,6446682]},scorch:{size:26,alpha:.55,fadeIn:400}},De={speed:19e3,minDuration:45,maxDuration:80,trailLength:55,trailShare:.4,color:16751178,coreColor:16774368,coreWidth:.3,glowWidth:1.2,glowAlpha:.2,alphaStart:1,alphaEnd:.6,height:.19,fadeSteps:8},Kn={duration:35,spikes:5,length:6,width:1.6,spread:.35,jitter:.5,sideLength:2.2,sideWidth:.9,layers:[{scale:1.35,alpha:.18},{scale:1,alpha:.45},{scale:.55,alpha:.95,core:!0}],shrink:.4,color:16751178,coreColor:16774368},Pt={sand:{color:14205834,rate:24,fullSpeed:60,minSpeed:4,lifetime:{min:350,max:750},sizeFactor:1,alpha:.35},mud:{color:3878430,rate:14,fullSpeed:60,minSpeed:4,lifetime:{min:180,max:380},sizeFactor:1.8,alpha:.6},water:{color:10474751,rate:20,fullSpeed:60,minSpeed:4,lifetime:{min:250,max:550},sizeFactor:1.1,alpha:.5,sideSpeed:{min:25,max:60},entryBurst:10,entryMinSpeed:20,sound:{minVolume:.25,fullSpeed:120,rate:{min:.9,max:1.1}}},boost:{color:16765024,burst:16,lifetime:{min:200,max:420},sizeFactor:1.4,alpha:.8,tailSpeed:{min:60,max:140},boostMinSpeed:20,resetDistance:40},tracks:{oil:{alpha:2,lifetime:3,tint:2105384,trail:1.5},mud:{alpha:1.5,lifetime:1,tint:5917242},noMarks:["water"]}},Zt={fullImpact:6,squash:.14,duration:260,minImpact:1.5},Zn={maxFps:30},St={enabled:!0,resolution:.5,maxLights:96,headlights:{length:90,spread:.55,intensity:.9,color:16773572,offset:.5,occlusion:{enabled:!0,rays:64},bounce:{intensity:.35,radius:30,maxDistance:80},wash:{height:.6,intensity:1}},rampSpill:1,tankGlow:{radius:26,intensity:.35,color:12570879},flash:{explosion:{radius:140,intensity:1,duration:260,color:16756832},shot:{radius:40,intensity:.6,duration:70,color:16773280},wreck:{radius:150,intensity:1.1,duration:320,color:16752720}},wreckFire:{radius:70,intensity:.75,color:16748608,flicker:.45},glints:{enabled:!0,intensity:.8,size:1.2},shafts:{enabled:!0,rays:14,length:1.3,intensity:.35,shadows:!0,maxShadowCasters:4}},jn=B.levelZStride,W=(i,t)=>i+jn*(t||0),Fi=5,Te=(i,t)=>Math.min(i||0,Math.round(t));function ut(i,t){const e=t?.screen;return!i||i.destroyed||!e||!i.scale.x||!i.scale.y?null:{x:(e.width/2-i.position.x)/i.scale.x,y:(e.height/2-i.position.y)/i.scale.y,scaleX:i.scale.x,scaleY:i.scale.y}}function mt(i,t,e,s){return!e||!s?{x:i,y:t}:{x:i+(i-e.x)*s,y:t+(t-e.y)*s}}function gt(i,t,e,s=1){const n=typeof s=="number"?s:s.x,o=typeof s=="number"?s:s.y;if(!t||!e){i.scale.set(n,o),i.position.set(0,0);return}i.scale.set(n*(1+e),o*(1+e)),i.position.set(-t.x*e,-t.y*e)}function ke(i,t,e,s,n){if(!e)return{x:i,y:t,scale:1};const o=(1+(n||0))/(1+(s||0));return{x:e.x+(i-e.x)*o,y:e.y+(t-e.y)*o,scale:o}}function Le(i){const t=typeof i=="number"?i:i.x,e=typeof i=="number"?i:i.y;return{x:t,y:e}}function he(i,t,e){return Math.floor(i/t/e)}function qn(i,t,e){return Math.round(i/t/e)}function Jn(i,t,e){return{map:i,scale:t,step:e}}function Xi(i,t,e,s){const n=he(t,i.scale.x,i.step),o=he(e,i.scale.y,i.step),r=i.map?.[o]?.[n];return r!==void 0&&s.has(r)}function Yi(i,t,e,s,n){if(!e||!t)return!1;const o=n>0?[[0,0],[n,0],[-n,0],[0,n],[0,-n]]:[[0,0]];for(const r of s){const a=1+r;for(const[l,h]of o)if(i((t.x+l+e.x*r)/a,(t.y+h+e.y*r)/a))return!0}return!1}function Qn(i,t,e,s,n,o){return i?.map?Yi((r,a)=>Xi(i,r,a,t),e,s,n,o):!1}function to(i,t,e,s,n,o,r){return!i||i.size===0?!1:Yi((a,l)=>i.has(`${he(a,e.x,t)},${he(l,e.y,t)}`),s,n,o,r)}const Di=i=>i.radius*(1-i.softness),eo=(i,t,e)=>{if(t<=i)return e<t?0:1;const s=Math.min(1,Math.max(0,(e-i)/(t-i)));return s*s*(3-2*s)};function so({viewLevel:i,viewX:t,viewY:e,level:s,x:n,y:o,cfg:r}){if((s||0)<=(i||0))return 1;if(r.mode==="layer")return r.layerAlpha;const a=n-t,l=o-e,h=Math.sqrt(a*a+l*l),u=eo(Di(r),r.radius,h);return r.minAlpha+(1-r.minAlpha)*u}function io(i,t,e){return(t||0)<(i||0)?e.lowerTint:16777215}const no=`
1
+ import{UniformGroup as Ne,Filter as Ln,GpuProgram as Pn,GlProgram as xs,defaultFilterVert as zn,Ticker as Q,Container as $,Sprite as J,Rectangle as rt,Spritesheet as Cn,MeshSimple as En,Text as Ci,BlurFilter as ys,Assets as as,Texture as Ue,Graphics as U,Shader as Ei,Geometry as In,Mesh as Ii,AlphaFilter as Ri,PerspectiveMesh as Rn,Particle as Fn,ParticleContainer as Ke,MeshGeometry as Xn}from"pixi.js";const Yn=4;class ls{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Is.unregister(this),t}free(){const t=this.__destroy_into_raw();C.__wbg_clientcore_free(t,0)}abi_describe(){let t,e;try{const s=C.clientcore_abi_describe(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}apply_aim(t,e,s,n){C.clientcore_apply_aim(this.__wbg_ptr,t,e,s,n)}apply_input(t,e,s){const n=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),o=_t,r=Vt(e,C.__wbindgen_malloc,C.__wbindgen_realloc),a=_t;C.clientcore_apply_input(this.__wbg_ptr,n,o,r,a,s)}cycle_weapon(t){C.clientcore_cycle_weapon(this.__wbg_ptr,t)}debug_json(){let t,e;try{const s=C.clientcore_debug_json(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}decode_frame(t){let e,s;try{const n=je(t,C.__wbindgen_malloc),o=_t,r=C.clientcore_decode_frame(this.__wbg_ptr,n,o);return e=r[0],s=r[1],Lt(r[0],r[1])}finally{C.__wbindgen_free(e,s,1)}}dispatch(t,e){const s=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),n=_t,o=je(e,C.__wbindgen_malloc),r=_t,a=C.clientcore_dispatch(this.__wbg_ptr,s,n,o,r);var l=Vn(a[0],a[1]).slice();return C.__wbindgen_free(a[0],a[1]*1,1),l}floor_level(t,e,s){return C.clientcore_floor_level(this.__wbg_ptr,t,e,s)}hot_ptr(){return C.clientcore_hot_ptr(this.__wbg_ptr)>>>0}hot_values(){const t=C.clientcore_hot_values(this.__wbg_ptr);var e=Ze(t[0],t[1]).slice();return C.__wbindgen_free(t[0],t[1]*4,4),e}map_dynamics_to_world(t,e,s){const n=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),o=_t,r=C.clientcore_map_dynamics_to_world(this.__wbg_ptr,n,o,e,s);var a=Ze(r[0],r[1]).slice();return C.__wbindgen_free(r[0],r[1]*4,4),a}map_generation(){return C.clientcore_map_generation(this.__wbg_ptr)>>>0}my_game_id(){return C.clientcore_my_game_id(this.__wbg_ptr)}constructor(t){const e=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),s=_t,n=C.clientcore_new(e,s);if(n[2])throw Rs(n[1]);return this.__wbg_ptr=n[0],Is.register(this,this.__wbg_ptr,this),this}offset(){return C.clientcore_offset(this.__wbg_ptr)}push_frame(t,e){const s=je(t,C.__wbindgen_malloc),n=_t;return C.clientcore_push_frame(this.__wbg_ptr,s,n,e)!==0}ramp_runs(){let t,e;try{const s=C.clientcore_ramp_runs(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}reset(){C.clientcore_reset(this.__wbg_ptr)}resync(){C.clientcore_resync(this.__wbg_ptr)}sample(t){return C.clientcore_sample(this.__wbg_ptr,t)>>>0}set_active(t){C.clientcore_set_active(this.__wbg_ptr,t)}set_map(t){const e=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),s=_t,n=C.clientcore_set_map(this.__wbg_ptr,e,s);if(n[1])throw Rs(n[0])}set_model(t){const e=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),s=_t;C.clientcore_set_model(this.__wbg_ptr,e,s)}shot_segments(t,e,s,n,o,r){const a=C.clientcore_shot_segments(this.__wbg_ptr,t,e,s,n,o,r);var l=Ze(a[0],a[1]).slice();return C.__wbindgen_free(a[0],a[1]*4,4),l}surface_at(t,e,s){return C.clientcore_surface_at(this.__wbg_ptr,t,e,s)}surface_dir_at(t,e,s){return C.clientcore_surface_dir_at(this.__wbg_ptr,t,e,s)}surface_types(){let t,e;try{const s=C.clientcore_surface_types(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}sync_panel(t){const e=Vt(t,C.__wbindgen_malloc,C.__wbindgen_realloc),s=_t;C.clientcore_sync_panel(this.__wbg_ptr,e,s)}take_divergence(){let t,e;try{const s=C.clientcore_take_divergence(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}take_frames(){let t,e;try{const s=C.clientcore_take_frames(this.__wbg_ptr);return t=s[0],e=s[1],Lt(s[0],s[1])}finally{C.__wbindgen_free(t,e,1)}}try_fire(t){const e=C.clientcore_try_fire(this.__wbg_ptr,t);let s;return e[0]!==0&&(s=Lt(e[0],e[1]).slice(),C.__wbindgen_free(e[0],e[1]*1,1)),s}}Symbol.dispose&&(ls.prototype[Symbol.dispose]=ls.prototype.free);function Dn(){return{__proto__:null,"./vimp_tanks_core_bg.js":{__proto__:null,__wbg_Error_92b29b0548f8b746:function(t,e){return Error(Lt(t,e))},__wbg___wbindgen_throw_344f42d3211c4765:function(t,e){throw new Error(Lt(t,e))},__wbindgen_init_externref_table:function(){const t=C.__wbindgen_externrefs,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)}}}}const Is=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(i=>C.__wbg_clientcore_free(i,1));typeof FinalizationRegistry>"u"||new FinalizationRegistry(i=>C.__wbg_gamecore_free(i,1));function Ze(i,t){return i=i>>>0,On().subarray(i/4,i/4+t)}function Vn(i,t){return i=i>>>0,le().subarray(i/1,i/1+t)}let we=null;function On(){return(we===null||we.byteLength===0)&&(we=new Float32Array(C.memory.buffer)),we}function Lt(i,t){return Nn(i>>>0,t)}let ve=null;function le(){return(ve===null||ve.byteLength===0)&&(ve=new Uint8Array(C.memory.buffer)),ve}function je(i,t){const e=t(i.length*1,1)>>>0;return le().set(i,e/1),_t=i.length,e}function Vt(i,t,e){if(e===void 0){const a=be.encode(i),l=t(a.length,1)>>>0;return le().subarray(l,l+a.length).set(a),_t=a.length,l}let s=i.length,n=t(s,1)>>>0;const o=le();let r=0;for(;r<s;r++){const a=i.charCodeAt(r);if(a>127)break;o[n+r]=a}if(r!==s){r!==0&&(i=i.slice(r)),n=e(n,s,s=r+i.length*3,1)>>>0;const a=le().subarray(n+r,n+s),l=be.encodeInto(i,a);r+=l.written,n=e(n,s,r,1)>>>0}return _t=r,n}function Rs(i){const t=C.__wbindgen_externrefs.get(i);return C.__externref_table_dealloc(i),t}let Ye=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Ye.decode();const Bn=2146435072;let qe=0;function Nn(i,t){return qe+=t,qe>=Bn&&(Ye=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Ye.decode(),qe=t),Ye.decode(le().subarray(i,i+t))}const be=new TextEncoder;"encodeInto"in be||(be.encodeInto=function(i,t){const e=be.encode(i);return t.set(e),{read:i.length,written:e.length}});let _t=0,C;function Un(i,t){return C=i.exports,we=null,ve=null,C.__wbindgen_start(),C}async function Wn(i,t){if(typeof Response=="function"&&i instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(i,t)}catch(n){if(i.ok&&e(i.type)&&i.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 s=await i.arrayBuffer();return await WebAssembly.instantiate(s,t)}else{const s=await WebAssembly.instantiate(i,t);return s instanceof WebAssembly.Instance?{instance:s,module:i}:s}function e(s){switch(s){case"basic":case"cors":case"default":return!0}return!1}}async function Hn(i){if(C!==void 0)return C;i!==void 0&&(Object.getPrototypeOf(i)===Object.prototype?{module_or_path:i}=i:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),i===void 0&&(i=new URL("/assets/vimp_tanks_core_bg-D2Of1rBe.wasm",import.meta.url));const t=Dn();(typeof i=="string"||typeof Request=="function"&&i instanceof Request||typeof URL=="function"&&i instanceof URL)&&(i=fetch(i));const{instance:e,module:s}=await Wn(await i,t);return Un(e)}const Gn='@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}',$n={mode:"hole",radius:260,softness:.45,minAlpha:.12,layerAlpha:.4,fadeRate:6,roofMargin:0,lowerTint:11579584},B={shear:.22,levelZStride:100},Rt={faceTilesPerLevel:3,faceSegments:4,faceBleedPx:2,rampSegments:4,sideTint:10133674},At={scaleGain:.1,baseAlpha:.4,alphaFalloff:.12,sizeFactor:1.05,groundOffset:3,groundAlpha:.3},It={lift:.35,vertices:6,shading:.28,lightDir:[-.7,-.7]},jt={ambient:.55,diffuse:.6,lightZ:1},Kt={duration:150,attack:.15,gunKick:1,bodyKick:0,rock:.1},Mt={enabled:!0,trackHeight:5,hullBase:2,hullTop:6,turretBase:6,turretTop:10,barrelHeight:8,barrelRadius:1.5,brakeRadius:2,levelHeight:12.8,leanGain:.3,maxLean:.6,shadowBlur:1},de={rock:.22,wobbleHz:5,decay:180,duration:700,hop:.3,hopDuration:420,underShare:.5,shake:1.2,shakeDuration:220},K={referenceSize:3,maxFire:64,maxSmoke:80,wind:{x:5,y:-3},joltRadius:18,sound:"tankExplosion",flash:{duration:180,startSize:12,endSize:40,alpha:1,color:16773576},fireball:{count:14,speed:{min:15,max:50},drag:4,size:{min:4,max:7},grow:2.2,lifetime:{min:450,max:850},rise:.5,alpha:.95},sparks:{count:12,speed:{min:70,max:160},drag:3,length:2.4,width:.5,lifetime:{min:300,max:700},colors:[16770728,16738842]},fire:{duration:9e3,fadeOut:5e3,rate:36,points:[[-.3,0],[.05,0]],spread:.4,size:{min:2.5,max:4.5},grow:1.6,lifetime:{min:300,max:650},jitter:4,rise:.35,alpha:.85,ramp:[[0,16774344],[.2,16761418],[.5,15885850],[.8,9184266],[1,2361348]]},glow:{size:28,alpha:.3,color:16747056,flicker:.35},smoke:{rate:12,tailRate:7,tail:15e3,burst:{count:12,speed:{min:12,max:30},alpha:.55},size:{min:3,max:5},grow:3.8,lifetime:{min:2600,max:4200},speed:6,drag:1.5,rise:1.4,alpha:.42,tailAlpha:.2,burning:[1315344,2762274],cooling:[4867908,6446682]},scorch:{size:26,alpha:.55,fadeIn:400}},De={speed:19e3,minDuration:45,maxDuration:80,trailLength:55,trailShare:.4,color:16751178,coreColor:16774368,coreWidth:.3,glowWidth:1.2,glowAlpha:.2,alphaStart:1,alphaEnd:.6,height:.19,fadeSteps:8},Kn={duration:35,spikes:5,length:6,width:1.6,spread:.35,jitter:.5,sideLength:2.2,sideWidth:.9,layers:[{scale:1.35,alpha:.18},{scale:1,alpha:.45},{scale:.55,alpha:.95,core:!0}],shrink:.4,color:16751178,coreColor:16774368},Pt={sand:{color:14205834,rate:24,fullSpeed:60,minSpeed:4,lifetime:{min:350,max:750},sizeFactor:1,alpha:.35},mud:{color:3878430,rate:14,fullSpeed:60,minSpeed:4,lifetime:{min:180,max:380},sizeFactor:1.8,alpha:.6},water:{color:10474751,rate:20,fullSpeed:60,minSpeed:4,lifetime:{min:250,max:550},sizeFactor:1.1,alpha:.5,sideSpeed:{min:25,max:60},entryBurst:10,entryMinSpeed:20,sound:{minVolume:.25,fullSpeed:120,rate:{min:.9,max:1.1}}},boost:{color:16765024,burst:16,lifetime:{min:200,max:420},sizeFactor:1.4,alpha:.8,tailSpeed:{min:60,max:140},boostMinSpeed:20,resetDistance:40},tracks:{oil:{alpha:2,lifetime:3,tint:2105384,trail:1.5},mud:{alpha:1.5,lifetime:1,tint:5917242},noMarks:["water"]}},Zt={fullImpact:6,squash:.14,duration:260,minImpact:1.5},Zn={maxFps:30},St={enabled:!0,resolution:.5,maxLights:96,headlights:{length:90,spread:.55,intensity:.9,color:16773572,offset:.5,occlusion:{enabled:!0,rays:64},bounce:{intensity:.35,radius:30,maxDistance:80},wash:{height:.6,intensity:1}},rampSpill:1,tankGlow:{radius:26,intensity:.35,color:12570879},flash:{explosion:{radius:140,intensity:1,duration:260,color:16756832},shot:{radius:40,intensity:.6,duration:70,color:16773280},wreck:{radius:150,intensity:1.1,duration:320,color:16752720}},wreckFire:{radius:70,intensity:.75,color:16748608,flicker:.45},glints:{enabled:!0,intensity:.8,size:1.2},shafts:{enabled:!0,rays:14,length:1.3,intensity:.35,shadows:!0,maxShadowCasters:4}},jn=B.levelZStride,W=(i,t)=>i+jn*(t||0),Fi=5,Te=(i,t)=>Math.min(i||0,Math.round(t));function ut(i,t){const e=t?.screen;return!i||i.destroyed||!e||!i.scale.x||!i.scale.y?null:{x:(e.width/2-i.position.x)/i.scale.x,y:(e.height/2-i.position.y)/i.scale.y,scaleX:i.scale.x,scaleY:i.scale.y}}function mt(i,t,e,s){return!e||!s?{x:i,y:t}:{x:i+(i-e.x)*s,y:t+(t-e.y)*s}}function gt(i,t,e,s=1){const n=typeof s=="number"?s:s.x,o=typeof s=="number"?s:s.y;if(!t||!e){i.scale.set(n,o),i.position.set(0,0);return}i.scale.set(n*(1+e),o*(1+e)),i.position.set(-t.x*e,-t.y*e)}function ke(i,t,e,s,n){if(!e)return{x:i,y:t,scale:1};const o=(1+(n||0))/(1+(s||0));return{x:e.x+(i-e.x)*o,y:e.y+(t-e.y)*o,scale:o}}function Le(i){const t=typeof i=="number"?i:i.x,e=typeof i=="number"?i:i.y;return{x:t,y:e}}function he(i,t,e){return Math.floor(i/t/e)}function qn(i,t,e){return Math.round(i/t/e)}function Jn(i,t,e){return{map:i,scale:t,step:e}}function Xi(i,t,e,s){const n=he(t,i.scale.x,i.step),o=he(e,i.scale.y,i.step),r=i.map?.[o]?.[n];return r!==void 0&&s.has(r)}function Yi(i,t,e,s,n){if(!e||!t)return!1;const o=n>0?[[0,0],[n,0],[-n,0],[0,n],[0,-n]]:[[0,0]];for(const r of s){const a=1+r;for(const[l,h]of o)if(i((t.x+l+e.x*r)/a,(t.y+h+e.y*r)/a))return!0}return!1}function Qn(i,t,e,s,n,o){return i?.map?Yi((r,a)=>Xi(i,r,a,t),e,s,n,o):!1}function to(i,t,e,s,n,o,r){return!i||i.size===0?!1:Yi((a,l)=>i.has(`${he(a,e.x,t)},${he(l,e.y,t)}`),s,n,o,r)}const Di=i=>i.radius*(1-i.softness),eo=(i,t,e)=>{if(t<=i)return e<t?0:1;const s=Math.min(1,Math.max(0,(e-i)/(t-i)));return s*s*(3-2*s)};function so({viewLevel:i,viewX:t,viewY:e,level:s,x:n,y:o,cfg:r}){if((s||0)<=(i||0))return 1;if(r.mode==="layer")return r.layerAlpha;const a=n-t,l=o-e,h=Math.sqrt(a*a+l*l),u=eo(Di(r),r.radius,h);return r.minAlpha+(1-r.minAlpha)*u}function io(i,t,e){return(t||0)<(i||0)?e.lowerTint:16777215}const no=`
2
2
  precision highp float;
3
3
 
4
4
  in vec2 vTextureCoord;