we are stable

This commit is contained in:
HF 2024-01-21 22:59:07 +01:00
parent 50d28b0f17
commit f20f5852aa

View File

@ -222,6 +222,8 @@ class Renderer3D extends Renderer {
destructor() { destructor() {
// TODO is still leaking memory // TODO is still leaking memory
// eslint-disable-next-line max-len
// https://threejs.org/docs/#manual/en/introduction/How-to-dispose-of-objects
window.removeEventListener('resize', this.onWindowResize, false); window.removeEventListener('resize', this.onWindowResize, false);
this.controls.dispose(); this.controls.dispose();
this.oobGeometry.dispose(); this.oobGeometry.dispose();
@ -345,7 +347,6 @@ class Renderer3D extends Renderer {
z + renderDistance, z + renderDistance,
); );
const chunkMaxXY = canvasSize / THREE_TILE_SIZE; const chunkMaxXY = canvasSize / THREE_TILE_SIZE;
// console.log(`Get ${xcMin} - ${xcMax} - ${zcMin} - ${zcMax}`);
const curLoadedChunks = []; const curLoadedChunks = [];
for (let zc = zcMin; zc <= zcMax; ++zc) { for (let zc = zcMin; zc <= zcMax; ++zc) {
for (let xc = xcMin; xc <= xcMax; ++xc) { for (let xc = xcMin; xc <= xcMax; ++xc) {