temporarily disable lod

This commit is contained in:
Evert Prants 2022-04-12 22:15:58 +03:00
parent 8232dcebd2
commit d7937fc7e5
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
2 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,7 @@ export class QuadtreeMesher {
public root!: QuadtreeNode;
public container = new Object3D();
public actionsLeft = 1;
public maxDepth = 3;
public maxDepth = 1;
constructor(
public size: number,

View File

@ -87,6 +87,7 @@ export class QuadtreeNode {
if (abs.distanceTo(camera) > size) {
this._merge();
this.root.actionsLeft -= 1;
return;
}
if (
@ -265,9 +266,9 @@ export class QuadtreeNode {
private _createMesh() {
if (this._mesh) {
this.root.container.remove(this._mesh);
this._mesh = null;
this._destroyMesh();
}
const geometry = this._createGeometry();
const mesh = new Mesh(geometry, this.root.material);
mesh.position.set(this.position.x, 0, this.position.y);