temporarily disable lod
This commit is contained in:
parent
8232dcebd2
commit
d7937fc7e5
@ -7,7 +7,7 @@ export class QuadtreeMesher {
|
|||||||
public root!: QuadtreeNode;
|
public root!: QuadtreeNode;
|
||||||
public container = new Object3D();
|
public container = new Object3D();
|
||||||
public actionsLeft = 1;
|
public actionsLeft = 1;
|
||||||
public maxDepth = 3;
|
public maxDepth = 1;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public size: number,
|
public size: number,
|
||||||
|
@ -87,6 +87,7 @@ export class QuadtreeNode {
|
|||||||
if (abs.distanceTo(camera) > size) {
|
if (abs.distanceTo(camera) > size) {
|
||||||
this._merge();
|
this._merge();
|
||||||
this.root.actionsLeft -= 1;
|
this.root.actionsLeft -= 1;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@ -265,9 +266,9 @@ export class QuadtreeNode {
|
|||||||
|
|
||||||
private _createMesh() {
|
private _createMesh() {
|
||||||
if (this._mesh) {
|
if (this._mesh) {
|
||||||
this.root.container.remove(this._mesh);
|
this._destroyMesh();
|
||||||
this._mesh = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const geometry = this._createGeometry();
|
const geometry = this._createGeometry();
|
||||||
const mesh = new Mesh(geometry, this.root.material);
|
const mesh = new Mesh(geometry, this.root.material);
|
||||||
mesh.position.set(this.position.x, 0, this.position.y);
|
mesh.position.set(this.position.x, 0, this.position.y);
|
||||||
|
Loading…
Reference in New Issue
Block a user