Skip to content

Commit 66364ed

Browse files
committed
give variables more descriptive name
1 parent dc54039 commit 66364ed

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/client/scripts/World/ChunkMesher.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -442,28 +442,28 @@ class ChunkMesher {
442442
this.chunkTerrain.getBlock(...pos).boundingBox === "block"
443443
) {
444444
for (let l in this.neighbours) {
445-
let m = this.neighbours[l];
445+
let offset = this.neighbours[l];
446446
if (this.chunkTerrain.getBlock(...pos).transparent) {
447447
if (
448448
this.chunkTerrain.getBlock(
449-
pos[0] + m[0],
450-
pos[1] + m[1],
451-
pos[2] + m[2]
449+
pos[0] + offset[0],
450+
pos[1] + offset[1],
451+
pos[2] + offset[2]
452452
).boundingBox !== "block"
453453
) {
454454
this.addFace(t_positions, t_normals, t_uvs, t_colors, positions, normals, uvs, colors, l, pos);
455455
}
456456
} else {
457457
if (
458458
this.chunkTerrain.getBlock(
459-
pos[0] + m[0],
460-
pos[1] + m[1],
461-
pos[2] + m[2]
459+
pos[0] + offset[0],
460+
pos[1] + offset[1],
461+
pos[2] + offset[2]
462462
).boundingBox !== "block" ||
463463
this.chunkTerrain.getBlock(
464-
pos[0] + m[0],
465-
pos[1] + m[1],
466-
pos[2] + m[2]
464+
pos[0] + offset[0],
465+
pos[1] + offset[1],
466+
pos[2] + offset[2]
467467
).transparent
468468
) {
469469
this.addFace(t_positions, t_normals, t_uvs, t_colors, positions, normals, uvs, colors, l, pos);
@@ -475,12 +475,12 @@ class ChunkMesher {
475475
this.chunkTerrain.getBlock(...pos).name === "lava"
476476
) {
477477
for (var l in this.neighbours) {
478-
let m = this.neighbours[l];
478+
const offset = this.neighbours[l];
479479
if (
480480
this.chunkTerrain.getBlock(
481-
pos[0] + m[0],
482-
pos[1] + m[1],
483-
pos[2] + m[2]
481+
pos[0] + offset[0],
482+
pos[1] + offset[1],
483+
pos[2] + offset[2]
484484
).name === "air"
485485
) {
486486
this.addFace(t_positions, t_normals, t_uvs, t_colors, positions, normals, uvs, colors, l, pos);

0 commit comments

Comments
 (0)