Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 6 bytes modified
parent
da3c2c3b36
commit
7d1a0dc34f
|
@ -83,18 +83,22 @@ GameLib.CustomCode.prototype.visualizeGrid = function (color) {
|
|||
|
||||
this.starsGeometry = new THREE.Geometry();
|
||||
|
||||
for (var y = 0; y < this.grid.length; y++) {
|
||||
for (var x = 0; x < this.grid[y].length; x++) {
|
||||
this.starsGeometry.vertices.push(
|
||||
new THREE.Vector3(
|
||||
x + GameLib.CustomCode.GRID_OFFSET_X,
|
||||
y + GameLib.CustomCode.GRID_OFFSET_Y,
|
||||
5
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
this.grid.map(
|
||||
function(x) {
|
||||
this.grid[x].map(
|
||||
function(y) {
|
||||
this.starsGeometry.vertices.push(
|
||||
new THREE.Vector3(
|
||||
x + GameLib.CustomCode.GRID_OFFSET_X,
|
||||
y + GameLib.CustomCode.GRID_OFFSET_Y,
|
||||
5
|
||||
)
|
||||
);
|
||||
}.bind(this)
|
||||
)
|
||||
}.bind(this)
|
||||
);
|
||||
|
||||
var starsMaterial = new THREE.PointsMaterial({color: color, size: 0.1});
|
||||
|
||||
this.starsMesh = new THREE.Points(this.starsGeometry, starsMaterial);
|
||||
|
|
Loading…
Reference in New Issue