perf: cache static walls, fast-path sprite draws, cache canvas rect (0.9.1, v57)
This commit is contained in:
1 parent
6cc8132046
commit
d60baa6b29
8 files changed
+84
-47
No files matched your search
+1
-1
@@ -111,7 +111,7 @@ const SfxBank = {
|
||||
if (this.buffers.has(name) || this.pending.has(name) || this.failed.has(name)) return;
|
||||
const file = this.FILES[name];
|
||||
if (!file || !this.ctx || typeof fetch !== 'function') return;
|
||||
const job = fetch('/assets/sfx/' + encodeURIComponent(file) + '?v=56')
|
||||
const job = fetch('/assets/sfx/' + encodeURIComponent(file) + '?v=57')
|
||||
.then(r => { if (!r.ok) throw new Error('HTTP ' + r.status); return r.arrayBuffer(); })
|
||||
.then(bytes => this.ctx.decodeAudioData(bytes))
|
||||
.then(buffer => this.buffers.set(name, this.trim(buffer)))
|
||||
|
||||
Reference in new issue
Block a user