persistence in database
only maybe a little bit shitty but it works very well still needs chunk unloading
This commit is contained in:
parent
2594afcc1b
commit
70e979057c
16 changed files with 970 additions and 273 deletions
|
@ -90,10 +90,6 @@ class CanvasRenderer extends HTMLElement {
|
|||
this.ctx.globalCompositeOperation = "source-over";
|
||||
this.ctx.drawImage(chunk.canvas, x, y);
|
||||
}
|
||||
|
||||
this.ctx.globalCompositeOperation = "difference";
|
||||
this.ctx.fillStyle = "white";
|
||||
this.ctx.fillText(`${chunkX}, ${chunkY}`, x, y + 12);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,6 @@ reticleRenderer.connectViewport(canvasRenderer.viewport);
|
|||
let sendViewportUpdate = debounce(updateInterval, () => {
|
||||
let visibleRect = canvasRenderer.getVisibleChunkRect();
|
||||
session.sendViewport(visibleRect);
|
||||
console.log("visibleRect", visibleRect);
|
||||
});
|
||||
canvasRenderer.addEventListener(".viewportUpdate", sendViewportUpdate);
|
||||
sendViewportUpdate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue