@matchomag/cs2-replay 0.0.0-stage → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/bin/demo-replay-darwin-amd64 +0 -0
- package/bin/demo-replay-darwin-arm64 +0 -0
- package/bin/demo-replay-linux-amd64 +0 -0
- package/bin/demo-replay-linux-arm64 +0 -0
- package/bin/demo-replay-windows-amd64.exe +0 -0
- package/bin/demo-replay.js +22 -0
- package/dist/2d/index.js +1 -0
- package/dist/3d/index.js +11 -0
- package/dist/chunks/actors-EZRYEB4I.js +177 -0
- package/dist/chunks/chunk-5BFKVD63.js +1 -0
- package/dist/chunks/chunk-D5ST2XVO.js +106 -0
- package/dist/chunks/chunk-DQPOBPMK.js +1 -0
- package/dist/chunks/chunk-FBSLUYGT.js +1 -0
- package/dist/chunks/chunk-Q37CWKZX.js +12 -0
- package/dist/chunks/chunk-VSIECNZM.js +1 -0
- package/dist/chunks/chunk-YJG3LSSB.js +1 -0
- package/dist/chunks/chunk-YO73RW3Y.js +1 -0
- package/dist/chunks/look-2WBUGHMJ.js +669 -0
- package/dist/index.js +1 -0
- package/dist/maps/index.js +1 -0
- package/dist/parse/index.js +1 -0
- package/dist/parse/wasm/replay.wasm +0 -0
- package/dist/parse/worker.js +1 -0
- package/dist/types/2d/index.d.ts +17 -0
- package/dist/types/2d/radar.d.ts +35 -0
- package/dist/types/3d/actors.d.ts +90 -0
- package/dist/types/3d/characters/anim.d.ts +93 -0
- package/dist/types/3d/characters/ao.d.ts +3 -0
- package/dist/types/3d/characters/body.d.ts +37 -0
- package/dist/types/3d/characters/builder.d.ts +82 -0
- package/dist/types/3d/characters/index.d.ts +74 -0
- package/dist/types/3d/characters/rig.d.ts +73 -0
- package/dist/types/3d/characters/textures.d.ts +4 -0
- package/dist/types/3d/characters/viewmodel.d.ts +51 -0
- package/dist/types/3d/characters/weapons.d.ts +25 -0
- package/dist/types/3d/follow.d.ts +43 -0
- package/dist/types/3d/fx/batch.d.ts +87 -0
- package/dist/types/3d/fx/context.d.ts +34 -0
- package/dist/types/3d/fx/explosion.d.ts +14 -0
- package/dist/types/3d/fx/fire.d.ts +11 -0
- package/dist/types/3d/fx/index.d.ts +84 -0
- package/dist/types/3d/fx/lights.d.ts +25 -0
- package/dist/types/3d/fx/meshes.d.ts +18 -0
- package/dist/types/3d/fx/misc.d.ts +15 -0
- package/dist/types/3d/fx/random.d.ts +21 -0
- package/dist/types/3d/fx/smoke.d.ts +10 -0
- package/dist/types/3d/fx/textures.d.ts +29 -0
- package/dist/types/3d/fx/types.d.ts +117 -0
- package/dist/types/3d/greybox.d.ts +22 -0
- package/dist/types/3d/index.d.ts +127 -0
- package/dist/types/3d/look.d.ts +49 -0
- package/dist/types/3d/markers.d.ts +23 -0
- package/dist/types/3d/smoke/volume.d.ts +95 -0
- package/dist/types/3d/smoke/voxels.d.ts +87 -0
- package/dist/types/3d/world/index.d.ts +179 -0
- package/dist/types/3d/world/look.d.ts +16 -0
- package/dist/types/3d/world/material.d.ts +128 -0
- package/dist/types/3d/world/post.d.ts +75 -0
- package/dist/types/3d/world/probes.d.ts +39 -0
- package/dist/types/3d/world/release.d.ts +28 -0
- package/dist/types/3d/world/stage.d.ts +84 -0
- package/dist/types/core/format.d.ts +163 -0
- package/dist/types/core/live.d.ts +115 -0
- package/dist/types/core/model.d.ts +164 -0
- package/dist/types/core/playback.d.ts +82 -0
- package/dist/types/core/theme.d.ts +46 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/maps/index.d.ts +258 -0
- package/dist/types/parse/index.d.ts +108 -0
- package/dist/types/ui/shell.d.ts +131 -0
- package/dist/types/ui/styles.d.ts +1 -0
- package/package.json +68 -4
package/README.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @matchomag/cs2-replay
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
CS2 demo replay viewers (a 2D radar and a 3D view), an in-browser demo parser
|
|
4
|
+
and the `demo-replay` CLI.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
npm install @matchomag/cs2-replay
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Unlicensed (all rights reserved). The package contains no Valve assets.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// `npx demo-replay [-hz 16] [-json] in.dem out.replay`: runs the build of the
|
|
3
|
+
// demo-replay CLI next to this file that matches this machine.
|
|
4
|
+
import { spawnSync } from "node:child_process";
|
|
5
|
+
import { existsSync } from "node:fs";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
|
|
8
|
+
const os = { linux: "linux", darwin: "darwin", win32: "windows" }[process.platform];
|
|
9
|
+
const arch = { x64: "amd64", arm64: "arm64" }[process.arch];
|
|
10
|
+
const exe = fileURLToPath(new URL(`./demo-replay-${os}-${arch}${os === "windows" ? ".exe" : ""}`, import.meta.url));
|
|
11
|
+
|
|
12
|
+
if (!os || !arch || !existsSync(exe)) {
|
|
13
|
+
console.error(`demo-replay: this package has no build for ${process.platform}-${process.arch}`);
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
const run = spawnSync(exe, process.argv.slice(2), { stdio: "inherit" });
|
|
17
|
+
if (run.error) {
|
|
18
|
+
console.error("demo-replay:", run.error.message);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
if (run.signal) process.kill(process.pid, run.signal);
|
|
22
|
+
process.exit(run.status ?? 1);
|
package/dist/2d/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as S}from"../chunks/chunk-D5ST2XVO.js";import{a as ie,b as ne,c as oe,e as w}from"../chunks/chunk-5BFKVD63.js";import{a as G,b as N,c as X,d as J,e as Q,f as Z,g as ee,h as te}from"../chunks/chunk-FBSLUYGT.js";import{a as $,b as q,c as Y,d as B,e as F}from"../chunks/chunk-VSIECNZM.js";import{a as W,b as j,c as O,d as V,e as D,f as L,g as H,h as U,i as K,j as _}from"../chunks/chunk-YJG3LSSB.js";function k(f,a,r,s){let n=f.size??1024;return{level:f.lower&&s<f.lower.below?1:0,u:(a-f.x)/f.scale/n,v:(f.y-r)/f.scale/n}}var M=f=>f.scale*(f.size??1024);function he(f,a){return S(f,a.replay,a,{rosterLayout:"sides",createRenderer:r=>new P(r,a)})}var T=144,I=120,E=175,z=80,C=28,v="rgba(5, 7, 12, 0.9)",A=28*Math.PI/180,P=class{constructor(a,r){this.ctx=a;this.options=r;let s=document.createElement("canvas");s.setAttribute("aria-label",`${r.replay.map} radar`),this.element=s,this.c=s.getContext("2d");let n=r.radar,o=n.crop??[0,0,100,100];this.crop=[o[0]/100,o[1]/100,o[2]/100,o[3]/100];let e=d=>{let c=new Image;return c.decoding="async",c.onload=()=>a.invalidate(),c.src=d,c};this.levels=[n.image,...n.lower?[n.lower.image]:[]].map(d=>({image:e(d),x:0,y:0,w:0,h:0})),this.listen()}ctx;options;element;c;width=0;height=0;levels;crop;view={k:1,ox:0,oy:0};follow=-1;pointers=new Map;pinch=null;cleanups=[];resize(a,r){this.width=a,this.height=r;let s=devicePixelRatio||1;this.element.width=Math.round(a*s),this.element.height=Math.round(r*s),this.layout(),this.clampView()}layout(){let s=Math.max(1,this.width-16),n=Math.max(1,this.height-16),o=this.crop[2]/this.crop[3]||1,e=this.levels.length,d=(b,u)=>Math.min(b/o,u),c=d((s-8*(e-1))/e,n),m=d(s,(n-8*(e-1))/e),h=e>1&&c>=m,y=Math.max(1,h?c:m),t=y*o,i=h?t*e+8*(e-1):t,l=h?y:y*e+8*(e-1),p=8+(s-i)/2,x=8+(n-l)/2;for(let b of this.levels)Object.assign(b,{x:p,y:x,w:t,h:y}),h?p+=t+8:x+=y+8}get unit(){return this.levels[0].w/(this.crop[2]*M(this.options.radar))}project(a,r,s){let n=k(this.options.radar,a,r,s),o=this.levels[Math.min(n.level,this.levels.length-1)];return{level:n.level,x:o.x+(n.u-this.crop[0])/this.crop[2]*o.w,y:o.y+(n.v-this.crop[1])/this.crop[3]*o.h}}clampView(){let a=this.view;a.k=Math.max(1,Math.min(10,a.k)),a.ox=Math.min(0,Math.max(this.width-this.width*a.k,a.ox)),a.oy=Math.min(0,Math.max(this.height-this.height*a.k,a.oy))}zoomAt(a,r,s){let n=this.view,o=Math.max(1,Math.min(10,s));n.ox=a-(a-n.ox)*o/n.k,n.oy=r-(r-n.oy)*o/n.k,n.k=o,this.clampView(),this.ctx.invalidate()}listen(){let a=this.element,r=(n,o,e)=>{a.addEventListener(n,o,e),this.cleanups.push(()=>a.removeEventListener(n,o))};r("wheel",n=>{n.preventDefault(),this.follow=-1,this.zoomAt(n.offsetX,n.offsetY,this.view.k*Math.exp(-n.deltaY*(n.deltaMode?.05:.0015)))},{passive:!1}),r("dblclick",()=>{this.follow=-1,this.view={k:1,ox:0,oy:0},this.ctx.invalidate()}),r("pointerdown",n=>{if(a.setPointerCapture(n.pointerId),this.pointers.set(n.pointerId,{x:n.offsetX,y:n.offsetY}),this.pointers.size===2){let[o,e]=[...this.pointers.values()];this.pinch={dist:Math.hypot(o.x-e.x,o.y-e.y)||1,k:this.view.k,mx:(o.x+e.x)/2,my:(o.y+e.y)/2}}}),r("pointermove",n=>{let o=this.pointers.get(n.pointerId);if(!o)return;let e={x:n.offsetX,y:n.offsetY};if(this.pointers.set(n.pointerId,e),this.pinch&&this.pointers.size===2){let[d,c]=[...this.pointers.values()],m=this.pinch.k*(Math.hypot(d.x-c.x,d.y-c.y)/this.pinch.dist);this.follow=-1,this.zoomAt(this.pinch.mx,this.pinch.my,m)}else this.pointers.size===1&&this.view.k>1&&(this.follow=-1,this.view.ox+=e.x-o.x,this.view.oy+=e.y-o.y,this.clampView(),this.ctx.invalidate())});let s=n=>{this.pointers.delete(n.pointerId),this.pointers.size<2&&(this.pinch=null)};r("pointerup",s),r("pointercancel",s)}focusPlayer(a){this.follow=this.follow===a?-1:a,this.follow>=0?this.view.k=Math.max(this.view.k,2.5):this.view={k:1,ox:0,oy:0},this.ctx.invalidate()}handleKey(a){return a.code==="Escape"&&(this.follow>=0||this.view.k>1)?(this.follow=-1,this.view={k:1,ox:0,oy:0},this.ctx.invalidate(),!0):!1}render({snapshot:a,theme:r}){let s=this.c,n=devicePixelRatio||1;if(s.setTransform(n,0,0,n,0,0),s.fillStyle=r.background,s.fillRect(0,0,this.width,this.height),!this.width||!a)return;if(this.follow>=0){let h=a.players[this.follow],y=h&&(h.alive?h:h.death);if(y){let t=this.project(y.x,y.y,y.z);this.view.ox=this.width/2-t.x*this.view.k,this.view.oy=this.height/2-t.y*this.view.k,this.clampView()}}let{k:o,ox:e,oy:d}=this.view;s.setTransform(n*o,0,0,n*o,n*e,n*d);let c=1/Math.sqrt(o),m=Math.max(4,Math.min(10,this.levels[0].w*.011))*c;this.levels.forEach((h,y)=>{s.save(),s.beginPath(),s.rect(h.x,h.y,h.w,h.h),s.clip();let t=h.image;if(t.complete&&t.naturalWidth){let i=t.naturalWidth,l=t.naturalHeight;s.drawImage(t,this.crop[0]*i,this.crop[1]*l,this.crop[2]*i,this.crop[3]*l,h.x,h.y,h.w,h.h)}else s.fillStyle=r.track,s.fillRect(h.x,h.y,h.w,h.h);this.drawLevel(y,a,r,m,c),s.restore(),this.levels.length>1&&(s.font=`700 ${11*c}px ${r.font}`,s.fillStyle=r.muted,s.fillText(y===0?"UPPER":"LOWER",h.x+6*c,h.y+14*c))})}drawLevel(a,r,s,n,o){let e=this.c,d=this.unit,c=(t,i,l)=>{let p=this.project(t,i,l);return p.level===a?p:null};for(let[t,i]of Object.entries(this.options.radar.sites??{})){let l=c(i[0],i[1],i[2]);l&&(e.font=`700 ${18*o}px ${s.font}`,e.textAlign="center",e.textBaseline="middle",e.fillStyle="rgba(255,255,255,0.5)",e.fillText(t.toUpperCase(),l.x,l.y))}e.textAlign="left",e.textBaseline="alphabetic";for(let t of r.grenades){let i=t.effect;if(!i)continue;let l=c(i.x,i.y,i.z);if(!l)continue;let p=R(s,i.kind);if(e.beginPath(),i.kind==="smoke"){let x=Math.min(1,i.age/1.2);e.arc(l.x,l.y,T*d*x,0,Math.PI*2),e.globalAlpha=.62*Math.min(1,i.remaining/2),e.fillStyle=p,e.fill(),e.globalAlpha*=.9,e.lineWidth=1.5*o,e.strokeStyle=w(s,t.throwerSide),e.stroke()}else if(i.kind==="fire"){let x=Math.min(1,i.age/1.5);e.arc(l.x,l.y,I*d*x,0,Math.PI*2),e.globalAlpha=.42*Math.min(1,i.remaining),e.fillStyle=p,e.fill(),e.globalAlpha=.8*Math.min(1,i.remaining),e.lineWidth=1.5*o,e.strokeStyle=p,e.stroke()}else if(i.kind==="he"||i.kind==="flash"){let x=(i.kind==="he"?E:z)*d*Math.sqrt(Math.max(.02,i.burst));e.arc(l.x,l.y,x,0,Math.PI*2),e.globalAlpha=.5*(1-i.burst),e.fillStyle=p,e.fill(),e.globalAlpha=1-i.burst,e.lineWidth=2*o,e.strokeStyle=p,e.stroke()}else e.arc(l.x,l.y,C*d,0,Math.PI*2),e.globalAlpha=.45,e.fillStyle=p,e.fill();e.globalAlpha=1}e.lineCap="round",e.lineJoin="round";for(let t of r.grenades){let i=R(s,t.kind);if(t.trail&&t.trail.count>0){let{path:l,count:p,fade:x}=t.trail;e.beginPath();let b=!1;for(let u=0;u<p;u++){let g=c(l[u*3],l[u*3+1],l[u*3+2]);if(!g){b=!1;continue}b?e.lineTo(g.x,g.y):e.moveTo(g.x,g.y),b=!0}if(t.projectile&&b){let u=c(t.projectile.x,t.projectile.y,t.projectile.z);u&&e.lineTo(u.x,u.y)}e.globalAlpha=.85*x,e.lineWidth=1.5*o,e.strokeStyle=i,e.stroke(),e.globalAlpha=1}if(t.projectile){let l=c(t.projectile.x,t.projectile.y,t.projectile.z);if(!l)continue;e.beginPath(),e.arc(l.x,l.y,2.8*o,0,Math.PI*2),e.fillStyle=i,e.fill(),e.lineWidth=1*o,e.strokeStyle=v,e.stroke()}}let m=this.options.killLines??3;if(m>0&&r.round){e.setLineDash([4*o,3*o]);for(let t of r.kills){if(!t.killerPos||t.age>m||t.f<r.round.start)continue;let i=c(t.killerPos.x,t.killerPos.y,t.killerPos.z),l=c(t.victimPos.x,t.victimPos.y,t.victimPos.z);!i||!l||(e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(l.x,l.y),e.globalAlpha=.9*(1-t.age/m),e.lineWidth=1.5*o,e.strokeStyle=w(s,t.killerSide),e.stroke())}e.setLineDash([]),e.globalAlpha=1}for(let t of r.players){if(!t.death)continue;let i=c(t.death.x,t.death.y,t.death.z);if(!i)continue;let l=n*.75;e.beginPath(),e.moveTo(i.x-l,i.y-l),e.lineTo(i.x+l,i.y+l),e.moveTo(i.x+l,i.y-l),e.lineTo(i.x-l,i.y+l),e.lineWidth=4*o,e.strokeStyle=v,e.stroke(),e.lineWidth=2*o,e.strokeStyle=w(s,t.death.side),e.stroke()}let h=r.bomb;if(h.state!=="hidden"&&h.state!=="carried"){let t=c(h.x,h.y,h.z);if(t){if(h.state==="planted"){let p=h.sincePlant%1;e.beginPath(),e.arc(t.x,t.y,n*(1+2.6*p),0,Math.PI*2),e.globalAlpha=.9*(1-p),e.lineWidth=2*o,e.strokeStyle=s.bomb,e.stroke(),e.globalAlpha=1}let i=n*1.1;e.beginPath(),e.rect(t.x-i/2,t.y-i/2,i,i);let l=h.state==="planted"&&Math.floor(h.sincePlant*4)%2===1;e.fillStyle=h.state==="defused"?s.ct:l?"#ffffff":s.bomb,e.globalAlpha=h.state==="exploded"?.5:1,e.fill(),e.lineWidth=1.5*o,e.strokeStyle=v,e.stroke(),e.globalAlpha=1}}let y=this.options.names!==!1&&this.levels[0].w*this.view.k>=420;for(let t of r.players){if(!t.alive)continue;let i=c(t.x,t.y,t.z);if(!i)continue;let l=w(s,t.side),p=-t.yaw*Math.PI/180;e.beginPath(),e.moveTo(i.x,i.y),e.arc(i.x,i.y,n*3.4,p-A,p+A),e.closePath(),e.globalAlpha=.3,e.fillStyle=l,e.fill(),e.globalAlpha=1,e.beginPath(),e.arc(i.x,i.y,n,0,Math.PI*2),e.fillStyle=t.blind?"#ffffff":l,e.fill(),e.lineWidth=(this.follow===t.index?3:1.5)*o,e.strokeStyle=this.follow===t.index?s.accent:v,e.stroke(),e.beginPath(),e.moveTo(i.x+Math.cos(p)*n*.35,i.y+Math.sin(p)*n*.35),e.lineTo(i.x+Math.cos(p)*n*1.5,i.y+Math.sin(p)*n*1.5),e.lineWidth=2*o,e.strokeStyle=v,e.stroke(),t.hasBomb&&(e.beginPath(),e.arc(i.x+n*.8,i.y-n*.8,n*.45,0,Math.PI*2),e.fillStyle=s.bomb,e.fill(),e.lineWidth=1*o,e.strokeStyle=v,e.stroke()),t.defusing&&(e.beginPath(),e.setLineDash([2*o,2*o]),e.arc(i.x,i.y,n*1.7,0,Math.PI*2),e.lineWidth=1.5*o,e.strokeStyle=s.ct,e.stroke(),e.setLineDash([])),y&&(e.font=`600 ${10.5*o}px ${s.font}`,e.textAlign="center",e.lineWidth=3*o,e.strokeStyle=v,e.strokeText(t.name,i.x,i.y+n+11*o),e.fillStyle="#ffffff",e.fillText(t.name,i.x,i.y+n+11*o),e.textAlign="left")}}destroy(){this.cleanups.forEach(a=>a())}};function R(f,a){switch(a){case"smoke":return f.smoke;case"flash":return f.flash;case"he":return f.he;case"fire":return f.fire;case"decoy":return f.decoy;default:return f.muted}}export{N as DEFAULT_SPEEDS,G as Emitter,W as FLAG,j as FORMAT_VERSION,te as LiveReplay,X as Playback,O as ReplayFormatError,J as UPDATE_VERSION,F as createModel,he as createRadarViewer,ie as defaultTheme,ee as emptyReplay,B as formatClock,q as grenadeKind,U as gunzip,D as isDemoFile,L as isGzip,Q as isLiveUpdate,V as isReplayFile,Y as lerpAngle,_ as loadReplay,k as radarPoint,M as radarUnits,H as readReplay,K as readSource,Z as readUpdate,oe as resolveTheme,$ as roundEnd,ne as themeVars};
|
package/dist/3d/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{a as K,b as z}from"../chunks/chunk-D5ST2XVO.js";import{a as Te,b as Se,c as He,f as D}from"../chunks/chunk-5BFKVD63.js";import{a as ge,b as Ee,c as we,d as ve,e as be,f as Me,g as Re,h as xe}from"../chunks/chunk-FBSLUYGT.js";import{a as M,b as F,c as W,d as V,e as O}from"../chunks/chunk-DQPOBPMK.js";import{a as Ve,b as ke,c as Ce,d as Pe,e as Le,f as De,g as Ke,h as ze,i as Fe,j as We,k as Oe}from"../chunks/chunk-YO73RW3Y.js";import{a as me,b as L,c as ue,d as fe,e as ye}from"../chunks/chunk-VSIECNZM.js";import{a as ae,b as re,c as se,d as oe,e as ne,f as le,g as ce,h as he,i as de,j as pe}from"../chunks/chunk-YJG3LSSB.js";import*as o from"three";import{OrbitControls as N}from"three/addons/controls/OrbitControls.js";import{CSS2DObject as j,CSS2DRenderer as U}from"three/addons/renderers/CSS2DRenderer.js";import*as h from"three";import{MeshoptDecoder as Y}from"three/addons/libs/meshopt_decoder.module.js";import{GLTFLoader as B}from"three/addons/loaders/GLTFLoader.js";var H=class{constructor(e,a,t){this.gl=e;this.scene=a;this.camera=t;this.sun.position.set(.5,1,.3),a.add(this.fill,this.sun),e.toneMapping=h.ACESFilmicToneMapping,e.toneMappingExposure=_}gl;scene;camera;prepareFirst=!1;game=null;fill=new h.HemisphereLight(14542591,5588019,1.2);sun=new h.DirectionalLight(16777215,1.6);root=null;async load(e,a,t){let i=await fetch(e);if(!i.ok)throw new Error(`cs2-replay: ${e}: HTTP ${i.status}`);let r=await i.arrayBuffer();t?.();let l=(await new B().setMeshoptDecoder(Y).parseAsync(r,h.LoaderUtils.extractUrlBase(e))).scene,n=new Map,c=0,u=0,y=new h.Box3().setFromObject(l),T={value:new h.Vector2(y.min.y,y.max.y)},g=[];return l.traverse(m=>m.isLight&&g.push(m)),g.forEach(m=>m.removeFromParent()),l.traverse(m=>{let f=m;if(!f.isMesh)return;u++;let w=f.geometry;c+=(w.index?w.index.count:w.attributes.position.count)/3*(m.isInstancedMesh?m.count:1);let p=f.material,v=m.userData.category??m.parent?.userData?.category??p.userData?.category??p.name??"mesh";n.has(v)||n.set(v,[]),n.get(v).push(f);let S=new h.MeshLambertMaterial({color:p.color??new h.Color(.8,.8,.8),flatShading:!0,side:h.DoubleSide,transparent:p.transparent,opacity:p.opacity,depthWrite:!p.transparent});S.name=p.name,S.toneMapped=!1,p.transparent&&(f.renderOrder=1),S.onBeforeCompile=b=>{b.uniforms.heightRange=T,b.vertexShader=b.vertexShader.replace("#include <common>",`#include <common>
|
|
2
|
+
varying float vWorldY;`).replace("#include <worldpos_vertex>",`#include <worldpos_vertex>
|
|
3
|
+
vWorldY = (modelMatrix * vec4(transformed, 1.0)).y;`),b.fragmentShader=b.fragmentShader.replace("#include <common>",`#include <common>
|
|
4
|
+
varying float vWorldY;
|
|
5
|
+
uniform vec2 heightRange;`).replace("#include <color_fragment>",`#include <color_fragment>
|
|
6
|
+
float h = clamp((vWorldY - heightRange.x) / (heightRange.y - heightRange.x), 0.0, 1.0);
|
|
7
|
+
diffuseColor.rgb *= mix(0.65, 1.0, h);`)},f.material=S}),this.root&&this.scene.remove(this.root),this.root=l,this.scene.add(l),{root:l,drawCalls:u,triangles:Math.round(c),categories:n,actors:{lighting:{sun:this.sun,hemi:this.fill,ambient:new h.Color(0),smokeBrightness:q},blobShadows:!0}}}render(){this.gl.render(this.scene,this.camera)}setSize(){}dispose(){this.root?.traverse(e=>{let a=e;a.isMesh&&(a.geometry.dispose(),a.material.dispose())})}},_=1.25,q=.4;function Ue(d,e){let a,t=z(d,e.replay??null,e,{rosterLayout:"overlay",createRenderer:i=>a=new P(i,e)});return Object.defineProperties(t,{loaded:{get:()=>a.loaded},scene:{get:()=>a.scene},camera:{get:()=>a.camera},gameStage:{get:()=>a.gameStage},view:{get:()=>a.view},followed:{get:()=>a.followed},setView:{value:(i,r)=>a.setView(i,r)},setFollow:{value:(i,r=!1)=>a.setView(i===null?"free":r?"first":"third",i??void 0)},setCamera:{value:(i,r,s,l=0,n=0)=>a.setCamera(i,r,s,l,n)},setMode:{value:i=>a.setMode(i)}})}var x=.0254,R=(d,e,a,t=new o.Vector3)=>t.set(e*x,a*x,d*x),X=new Set(["KeyW","KeyA","KeyS","KeyD","KeyE","KeyQ","KeyC","Space","ShiftLeft","ShiftRight"]),Q=new Set(["KeyW","KeyA","KeyS","KeyD"]),A=64*x,Z=46*x,k=.2,G=4.5,$=.65,J=.45,ee={first:["1st","First person"],third:["3rd","Third person"],free:["Free","Free camera"]},te=1.5,P=class{constructor(e,a){this.ctx=e;this.options=a;let t=document.createElement("div");t.className="cs2r-layer",this.element=t;let i=a.look==="game";this.gl=new o.WebGLRenderer({antialias:!i,powerPreference:"high-performance"});let r=devicePixelRatio||1;if(this.gl.setPixelRatio(a.pixelRatio??(i?Math.min(r,a.quality==="low"?1:1.5):r)),this.maxFps=i?60:0,this.settle=i?te:0,this.gl.domElement.style.cssText="position:absolute;inset:0;width:100%;height:100%;display:block",t.append(this.gl.domElement),Object.assign(this.labels.domElement.style,{position:"absolute",top:"0",left:"0",pointerEvents:"none"}),t.append(this.labels.domElement),this.scene.background=new o.Color(a.sky??"#9fb4c7"),this.camera.rotation.order="YXZ",this.orbit=new N(this.camera,this.gl.domElement),this.orbit.addEventListener("change",()=>e.invalidate()),this.mode=a.mode??"fly",this.replayRoot.name="replay",this.scene.add(this.replayRoot),this.bombRing=new o.Mesh(new o.RingGeometry(.85,1,40).rotateX(-Math.PI/2),new o.MeshBasicMaterial({color:16719904,transparent:!0,depthWrite:!1,depthTest:!1,side:o.DoubleSide,toneMapped:!1})),this.bombRing.renderOrder=10,this.replayRoot.add(this.bombRing),e.model){this.buildLabels(),this.aim=new O(e.model.replay),this.rosterControls=this.buildViewSwitch();let s=e.model,l={quality:a.quality==="low"?"low":"high",players:a.players,wait:async()=>{await this.parsing}};this.actorsReady=import("../chunks/actors-EZRYEB4I.js").then(({GameActors:n})=>n.create(s,l)),this.actorsReady.catch(()=>{})}this.listen(),a.help&&(this.helpEl=document.createElement("div"),this.helpEl.className="cs2r-panel cs2r-help",e.stage.append(this.helpEl)),this.setMode(this.mode),this.loaded=this.loadMap()}ctx;options;element;maxFps;settle;scene=new o.Scene;camera=new o.PerspectiveCamera(70,1,.05,5e3);loaded;gl;labels=new U;orbit;mode;speed=8;keys=new Set;groups=new Map;toggles=[];helpEl=null;cleanups=[];replayRoot=new o.Group;players=[];trails=new Map;themeKey="";bombRing;va=new o.Vector3;look=null;get gameStage(){return this.look?.game??null}actorsReady=null;actors=null;parsing=null;size=null;destroyed=!1;texturesPending=!1;followMoving=!1;get continuous(){return this.keys.size>0||this.texturesPending||this.followMoving}cameraView="free";follow=null;lastFollowed=null;pov=-1;aim=null;thirdDist=3;drag=null;rosterControls;viewButtons=new Map;followPos=new o.Vector3;applyTheme(e){let a=`${e.t}|${e.ct}|${e.bomb}|${e.smoke}|${e.flash}|${e.he}|${e.fire}|${e.decoy}|${e.muted}`;if(a!==this.themeKey){this.themeKey=a,this.bombRing.material.color.copy(C(e.bomb));for(let t of this.players)t.key="";for(let t of this.trails.values())t.removeFromParent(),t.geometry.dispose(),t.material.dispose();this.trails.clear()}}buildLabels(){let e=this.ctx.model.replay.players;for(let a=this.players.length;a<e.length;a++){let t=document.createElement("div");t.className="cs2r-plabel",t.innerHTML='<span class="n"></span><span class="cs2r-plabel-hp"><i></i></span>';let i=new j(t);i.visible=!1,this.replayRoot.add(i),this.players.push({label:i,name:t.querySelector(".n"),hp:t.querySelector("i"),key:""})}}replayChanged(){this.buildLabels(),this.aim?.sync(),this.actors?.sync(),this.ctx.invalidate()}trail(e,a){let t=this.trails.get(e),i=this.ctx.model.replay.grenades[e];if(t&&t.userData.points===i.path.length)return t;t&&(t.removeFromParent(),t.geometry.dispose(),t.material.dispose());let r=new Float32Array(i.path.length);for(let n=0;n<i.path.length;n+=3)R(i.path[n],i.path[n+1],i.path[n+2],this.va),r[n]=this.va.x,r[n+1]=this.va.y,r[n+2]=this.va.z;let s=new o.BufferGeometry;s.setAttribute("position",new o.BufferAttribute(r,3));let l=C(ie(a,L(i.type)));return t=new o.Line(s,new o.LineBasicMaterial({color:l,transparent:!0,opacity:.7,depthWrite:!1,toneMapped:!1})),t.frustumCulled=!1,t.renderOrder=20,t.userData.points=i.path.length,this.replayRoot.add(t),this.trails.set(e,t),t}async createStage(){let e=this.options;if(e.look!=="game")return new H(this.gl,this.scene,this.camera);let{GameLook:a}=await import("../chunks/look-2WBUGHMJ.js"),t=e.quality==="low";return new a(this.gl,this.scene,this.camera,{transcoderPath:e.transcoderPath,samples:t?0:4,shadowMapSize:t?1024:2048,quality:t?"low":"high",tier:e.tier,lightmaps:e.lightmaps,store:e.store,onProgress:e.onProgress,keepCpuCopies:e.keepCpuCopies},this.ctx.model?.replay??null)}async loadMap(){let e=performance.now(),a=await this.createStage();if(this.destroyed)throw a.dispose(),new Error("cs2-replay: the viewer was destroyed while the map loaded");this.look=a,this.size&&a.setSize(...this.size);let t=async n=>{let c=await this.actorsReady;!c||this.destroyed||(c.setStage(n.actors),c!==this.actors&&(this.actors=c,c.sync(),c.setPov(this.pov),this.scene.add(c.object)),this.ctx.invalidate())},i=()=>{},r=()=>{this.parsing=new Promise(n=>i=n)},s=await a.load(this.options.map,a.prepareFirst?t:null,a.prepareFirst?void 0:r).finally(()=>{i(),this.parsing=null});if(a.prepareFirst||t(s).catch(n=>console.warn(`cs2-replay: players and effects didn't load: ${n}`)),s.textures&&(this.texturesPending=!0,s.textures.finally(()=>{this.texturesPending=!1,this.ctx.invalidate()})),s.categories){this.groups=s.categories;let n=new Set(this.options.hide??[]);for(let[c,u]of this.groups)u.forEach(y=>y.visible=!n.has(c));this.options.categories&&this.buildCategories(n)}let l=new o.Box3().setFromObject(s.root);return this.placeCamera(l),this.ctx.invalidate(),{url:this.options.map,drawCalls:s.drawCalls,triangles:s.triangles,size:l.getSize(new o.Vector3).toArray(),loadMs:performance.now()-e,textures:s.textures,...s.tier?{tier:s.tier,lightmapMode:s.lightmapMode,bytes:s.bytes}:{}}}placeCamera(e){if(this.cameraView!=="free")return;let a=e.getSize(new o.Vector3),t=e.getCenter(new o.Vector3),i=this.options.camera;i?this.setCamera(i[0],i[1],i[2],i[3]??0,i[4]??0):this.options.view==="top"?this.setCamera(t.x,t.y+Math.max(a.x,a.z)*.9,t.z,0,-89.9):(this.camera.position.set(t.x+a.x*.45,t.y+a.y*4,t.z+a.z*.7),this.camera.lookAt(t)),this.setMode(this.mode),this.mode==="orbit"&&!i&&(this.orbit.target.copy(t),this.orbit.update())}buildCategories(e){let a=document.createElement("div");a.className="cs2r-panel cs2r-categories";for(let[t,i]of this.groups){let r=document.createElement("label"),s=document.createElement("input");s.type="checkbox",s.checked=!e.has(t),s.addEventListener("change",()=>{i.forEach(c=>c.visible=s.checked),this.ctx.invalidate()});let l=document.createElement("span");l.className="cs2r-swatch",l.style.background="#"+i[0].material.color.getHexString();let n=i.reduce((c,u)=>c+(u.geometry.index?.count??0)/3,0);r.append(s,l,`${this.toggles.length+1} ${t}`),r.title=`${Math.round(n).toLocaleString()} triangles`,a.append(r),this.toggles.push(s)}this.ctx.stage.append(a)}buildViewSwitch(){let e=document.createElement("div");e.className="cs2r-seg",e.setAttribute("role","group"),e.setAttribute("aria-label","Camera view");for(let a of M){let[t,i]=ee[a],r=document.createElement("button");r.type="button",r.className="cs2r-btn",r.textContent=t,r.title=`${i} (V cycles)`,r.setAttribute("aria-label",i),r.addEventListener("click",()=>this.setView(a)),e.append(r),this.viewButtons.set(a,r)}return this.updateSwitch(),e}updateSwitch(){for(let[e,a]of this.viewButtons)a.setAttribute("aria-pressed",String(e===this.cameraView))}get view(){return this.cameraView}get followed(){return this.follow?.index??null}setView(e,a){let t={view:this.cameraView,player:this.followed};if(e==="free")this.follow=null;else{let i=this.ctx.snapshot(),r=a??this.follow?.index??(i?W(i.players,this.lastFollowed):null);if(r===null||!this.ctx.model?.replay.players[r])return;this.follow?.index!==r&&(this.follow={index:r,target:new o.Vector3,yaw:0,dist:this.thirdDist,elev:k,eye:A,lookYaw:0,lookPitch:0,snap:!0,t:0}),this.lastFollowed=r}this.cameraView=e,!(t.view===e&&t.player===this.followed)&&(this.keys.clear(),this.drag=null,document.pointerLockElement===this.gl.domElement&&document.exitPointerLock(),e==="free"?this.setMode(this.mode):this.orbit.enabled=!1,this.updateSwitch(),this.updateHelp(),this.ctx.invalidate(),this.ctx.emit("view",{view:e,player:this.followed}))}cycle(e){let a=this.ctx.snapshot();if(!a||!this.follow)return;let t=F(a.players,this.follow.index,e);t!==null&&this.setView(this.cameraView,t)}setMode(e){if(this.mode=e,this.ctx.invalidate(),this.cameraView!=="free")return this.setView("free");if(this.orbit.enabled=e==="orbit",e==="orbit"){document.exitPointerLock?.();let a=this.camera.getWorldDirection(new o.Vector3);this.orbit.target.copy(this.camera.position).addScaledVector(a,30),this.orbit.update()}this.updateHelp()}setCamera(e,a,t,i=0,r=0){this.camera.position.set(e,a,t),this.camera.rotation.set(o.MathUtils.degToRad(r),o.MathUtils.degToRad(i),0),this.cameraView!=="free"?this.setView("free"):this.mode==="orbit"&&this.setMode("orbit"),this.ctx.invalidate()}updateHelp(){if(!this.helpEl)return;let e=this.cameraView;this.helpEl.textContent=e!=="free"?`${e==="first"?"FIRST":"THIRD"} PERSON click / right click or Tab / Shift+Tab: next / previous player
|
|
8
|
+
drag: look around${e==="third"?" wheel: distance":""} WASD/Esc: free camera`:this.mode==="fly"?`FLY click = mouse look (Esc releases) WASD move Space/E up C/Q down
|
|
9
|
+
Shift \xD74 wheel = speed (${this.speed.toFixed(1)} m/s) O = orbit 1\u20139 categories`:"ORBIT drag rotate right-drag pan wheel zoom F = fly 1\u20139 categories",this.ctx.model&&(this.helpEl.textContent+=`
|
|
10
|
+
DEMO K play/pause \u2190/\u2192 \xB15 s (Shift \xB11 s) [ / ] round \u2212/= speed`,this.helpEl.textContent+=`
|
|
11
|
+
VIEW V: 1st \u2192 3rd \u2192 free (Shift+V back) click a player in the list to follow them`)}listen(){let e=this.gl.domElement,a=this.ctx.root,t=(r,s,l,n)=>{r.addEventListener(s,l,n),this.cleanups.push(()=>r.removeEventListener(s,l))};t(e,"click",()=>{this.cameraView==="free"&&this.mode==="fly"&&e.requestPointerLock()}),t(document,"mousemove",r=>{this.cameraView!=="free"||this.mode!=="fly"||document.pointerLockElement!==e||(this.ctx.invalidate(),this.camera.rotation.y-=r.movementX*.0022,this.camera.rotation.x=Math.max(-1.55,Math.min(1.55,this.camera.rotation.x-r.movementY*.0022)))}),t(e,"pointerdown",r=>{this.cameraView==="free"||r.button!==0&&r.button!==2||(this.drag={id:r.pointerId,x:r.clientX,y:r.clientY,button:r.button,moved:!1},e.setPointerCapture?.(r.pointerId))}),t(e,"pointermove",r=>{let s=this.drag,l=this.follow;if(!s||!l||r.pointerId!==s.id)return;let n=r.clientX-s.x,c=r.clientY-s.y;!s.moved&&n*n+c*c<25||(s.moved=!0,s.x=r.clientX,s.y=r.clientY,l.lookYaw-=n*.005,l.lookPitch=Math.max(-1.2,Math.min(1.2,l.lookPitch-c*.005)),this.ctx.invalidate())});let i=r=>{let s=this.drag;!s||r.pointerId!==s.id||(this.drag=null,this.ctx.invalidate(),r.type==="pointerup"&&!s.moved&&this.cycle(s.button===2?-1:1))};t(e,"pointerup",i),t(e,"pointercancel",i),t(e,"contextmenu",r=>this.cameraView!=="free"&&r.preventDefault()),t(e,"wheel",r=>{if(this.cameraView==="third"){r.preventDefault(),this.thirdDist=Math.max(1.2,Math.min(12,this.thirdDist*(r.deltaY<0?1/1.15:1.15))),this.ctx.invalidate();return}this.cameraView!=="free"||this.mode!=="fly"||(r.preventDefault(),this.speed=Math.max(.5,Math.min(200,this.speed*(r.deltaY<0?1.2:1/1.2))),this.updateHelp())},{passive:!1}),t(a,"keyup",r=>this.keys.delete(r.code)),t(a,"focusout",()=>this.keys.clear()),t(window,"blur",()=>this.keys.clear())}handleKey(e){let a=this.cameraView!=="free";if(e.code==="KeyV"&&this.ctx.model){let i=M.length;return this.setView(M[(M.indexOf(this.cameraView)+(e.shiftKey?i-1:1))%i]),!0}if(a&&e.code==="Tab"&&e.target===this.ctx.root)return this.cycle(e.shiftKey?-1:1),e.preventDefault(),!0;if(a&&e.code==="Escape")return this.setView("free"),!0;if(a&&!e.repeat&&Q.has(e.code)&&this.setView("free"),e.code==="KeyO")return this.setMode("orbit"),!0;if(e.code==="KeyF")return this.setMode("fly"),!0;let t=Number(e.key);return t>=1&&t<=9&&this.toggles[t-1]?(this.toggles[t-1].click(),!0):this.cameraView==="free"&&this.mode==="fly"&&X.has(e.code)?(this.keys.add(e.code),e.preventDefault(),!0):!1}fly(e){let a=this.keys,t=new o.Vector3((a.has("KeyD")?1:0)-(a.has("KeyA")?1:0),(a.has("Space")||a.has("KeyE")?1:0)-(a.has("KeyC")||a.has("KeyQ")?1:0),(a.has("KeyS")?1:0)-(a.has("KeyW")?1:0));if(!t.lengthSq())return;let i=this.speed*(a.has("ShiftLeft")||a.has("ShiftRight")?4:1)*e,r=this.camera.getWorldDirection(new o.Vector3),s=new o.Vector3().crossVectors(r,this.camera.up).normalize();this.camera.position.addScaledVector(r,-t.z*i).addScaledVector(s,t.x*i),this.camera.position.y+=t.y*i}resize(e,a){this.camera.aspect=e/a,this.camera.updateProjectionMatrix(),this.gl.setSize(e,a,!1),this.size=[e,a],this.look?.setSize(e,a),this.labels.setSize(e,a)}updateFollow(e,a){let t=this.follow,i=e.players[t.index],r=(e.t-t.t)/this.ctx.model.replay.hz;t.t=e.t;let s=i?.present?i.alive?R(i.x,i.y,i.z,this.va):i.death?R(i.death.x,i.death.y,i.death.z,this.va):null:null;if(!s)return;let l=t.snap||r<0||r>1;t.snap=!1;let n=r>0?r:a,c=p=>l?1:1-Math.exp(-n/p);if(!this.drag?.moved){let p=Math.exp(-a/.3);t.lookYaw*=p,t.lookPitch*=p}let u=i.ducking?Z:A;i.alive&&(t.eye+=(u-t.eye)*c(.08));let y=o.MathUtils.degToRad(i.yaw),T=Math.abs(t.lookYaw)>1e-4||Math.abs(t.lookPitch)>1e-4;if(this.cameraView==="first"&&i.alive){let p=o.MathUtils.degToRad(this.aim?.pitch(t.index,e.t)??0),v=o.MathUtils.degToRad(J)*(this.aim?.recoil(t.index,e.t)??0);this.camera.position.set(s.x,s.y+t.eye,s.z),this.camera.rotation.set(Math.max(-1.55,Math.min(1.55,p+v+t.lookPitch)),y+Math.PI+t.lookYaw,0),t.target.copy(this.camera.position),t.yaw=y,t.dist=0,t.elev=-p,this.followMoving=T||Math.abs(u-t.eye)>.001;return}let g=this.followPos.copy(s);g.y+=i.alive?t.eye+.15:.35,t.target.distanceToSquared(g)>25&&(l=!0),(i.alive||l)&&(t.yaw+=V(y,t.yaw)*c(.3)),t.dist+=((i.alive?this.thirdDist:G)-t.dist)*c(.25),t.elev+=((i.alive?k:$)-t.elev)*c(.25),t.target.lerp(g,c(.05)),this.followMoving=T||i.alive&&(Math.abs(V(y,t.yaw))>1e-4||Math.abs(u-t.eye)>.001)||Math.abs((i.alive?this.thirdDist:G)-t.dist)>.001||Math.abs((i.alive?k:$)-t.elev)>1e-4||t.target.distanceToSquared(g)>1e-6;let m=Math.max(-.4,Math.min(1.4,t.elev-t.lookPitch)),f=t.yaw+t.lookYaw,w=Math.cos(m)*t.dist;this.camera.position.set(t.target.x-Math.sin(f)*w,t.target.y+Math.sin(m)*t.dist,t.target.z-Math.cos(f)*w),this.camera.rotation.set(-m,f+Math.PI,0)}setPov(e){e!==this.pov&&(this.actors?.setPov(e),this.pov=e)}focusPlayer(e){this.setView(this.cameraView==="free"?"third":this.cameraView,e)}render({snapshot:e,theme:a,dt:t}){if(this.cameraView==="free"&&(this.mode==="fly"?this.fly(t):this.orbit.update()),e){this.followMoving=!1,this.follow&&this.updateFollow(e,t);let i=this.follow;this.setPov(i&&this.cameraView==="first"&&e.players[i.index]?.alive?i.index:-1),this.applyTheme(a),this.updateReplay(e,a)}this.look?this.look.render():this.gl.render(this.scene,this.camera),this.labels.render(this.scene,this.camera)}updateReplay(e,a){this.actors?.update(e,this.camera,a,C);for(let i of e.players){let r=this.players[i.index];r.label.visible=i.alive&&i.index!==this.pov,r.label.visible&&(R(i.x,i.y,i.z,r.label.position).y+=i.ducking?1.75:2.15);let s=`${i.side}${i.hp}${i.hasBomb}${i.defusing}${i.blind}`;s!==r.key&&(r.key=s,r.name.innerHTML=(i.hasBomb?"[C4] ":"")+K(i.name)+(i.defusing?" \u2702":"")+(i.blind?" \u2736":""),r.name.style.color=i.side==="CT"?a.ct:a.t,r.hp.style.width=`${i.hp}%`,r.hp.style.background=D(a,i.hp))}let t=e.bomb;if(this.bombRing.visible=t.state==="planted",this.bombRing.visible){let i=t.sincePlant%1;R(t.x,t.y,t.z,this.bombRing.position).y+=.08,this.bombRing.scale.setScalar(.5+2.5*i),this.bombRing.material.opacity=.9*(1-i)}for(let i of this.trails.values())i.visible=!1;for(let i of e.grenades){if(!i.trail)continue;let r=this.trail(i.index,a);r.visible=!0,r.geometry.setDrawRange(0,i.trail.count),r.material.opacity=.7*i.trail.fade}}destroy(){this.destroyed=!0,this.actors?.dispose(),this.actors||this.actorsReady?.then(e=>e.dispose(),()=>{}),this.cleanups.forEach(e=>e()),document.pointerLockElement===this.gl.domElement&&document.exitPointerLock(),this.orbit.dispose(),this.look?.dispose(),this.gl.dispose()}};function ie(d,e){return{smoke:d.smoke,flash:d.flash,he:d.he,fire:d.fire,decoy:d.decoy,other:d.muted}[e]}var I=new Map,E=null;function C(d){let e=I.get(d);if(e)return e;if(E??=Object.assign(document.createElement("canvas"),{width:1,height:1}).getContext("2d",{willReadFrequently:!0}),e=new o.Color(16777215),E){E.clearRect(0,0,1,1),E.fillStyle="#fff",E.fillStyle=d,E.fillRect(0,0,1,1);let[a,t,i]=E.getImageData(0,0,1,1).data;e.setRGB(a/255,t/255,i/255,o.SRGBColorSpace)}return I.set(d,e),e}export{Ee as DEFAULT_SPEEDS,ge as Emitter,ae as FLAG,re as FORMAT_VERSION,Ve as GAME_MAP_TIERS,Fe as GameMapStore,xe as LiveReplay,we as Playback,se as ReplayFormatError,ve as UPDATE_VERSION,ye as createModel,Ue as createWorldViewer,Te as defaultTheme,ze as detectGameMapSupport,Re as emptyReplay,ke as fetchGameMapIndex,De as fetchGameMapManifest,Oe as formatBytes,fe as formatClock,Ke as gameMapFiles,Pe as gameMapManifestUrl,L as grenadeKind,Le as greyboxMapUrl,he as gunzip,ne as isDemoFile,le as isGzip,be as isLiveUpdate,oe as isReplayFile,ue as lerpAngle,pe as loadReplay,Ce as pickMapBuild,We as readBody,ce as readReplay,de as readSource,Me as readUpdate,He as resolveTheme,me as roundEnd,Se as themeVars,R as toWorld};
|