I’m trying to render a world with very many blocks, but the performance has become very bad.
So I was wondering if there is a possibility to only render objects / object faces that are visible for the camera.
Here is the code I use for creating the world
for (let x = 0 ; x < this.worldWidth; x++){
for (let z = 0; z < this.worldWidth; z++){
let y = this.getNoiseY(x, z)
let grassblock = new Block(BlockID.GRASS_BLOCK)
grassblock.setPosition(x - this.worldWidth / 2, y, z - this.worldWidth / 2)
}
}
Every block has a BoxBufferGeometry and a MeshStandardMaterial.
Are there any ways to optimize those performance issues?