We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c054984 commit 129de77Copy full SHA for 129de77
src/scripts/world/World.js
@@ -9,7 +9,6 @@ import { ChunkManager } from './ChunkManager.js'
9
const World = class World {
10
constructor (game) {
11
this.game = game
12
- this.cellMesh = {}
13
this.blocksDef = this.game.al.get('blocksDef')
14
this.models = {}
15
this.chunkTerrain = new ChunkTerrain({
@@ -46,9 +45,9 @@ const World = class World {
46
45
}
47
48
updateRenderOrder (cell) {
49
- for (const i in this.cellMesh) {
50
- const x = vec3(this.chunkTerrain.strToVec(i))
51
- this.cellMesh[i].renderOrder = -vec3(...cell).distanceTo(x)
+ for (const [k,v] of this.chunkManager.cellMesh) {
+ const x = vec3(this.chunkTerrain.strToVec(k))
+ v.renderOrder=-vec3(...cell).distanceTo(x)
52
53
54
0 commit comments