Update: CC - Bacon - Entity Loaded (2xswm1bwq8.js) 24 bytes modified

beta.r3js.org
-=yb4f310 2018-02-13 15:42:48 +01:00
parent db30526353
commit 49047271de
1 changed files with 6 additions and 8 deletions

View File

@ -579,20 +579,18 @@ GameLib.CustomCode.prototype.drawGrid = function () {
this.gridMaterial.color.fromHex('#a79f99');
this.gridMaterial.color.updateInstance('color');
var geometry = new THREE.Geometry();
var geometry = new THREE.BufferGeometry();
var points = [];
for (var y = 0; y < (GameLib.CustomCode.TETRIS_GRID_HEIGHT - GameLib.CustomCode.TETRIS_GRID_HEADSPACE); y++) {
for (var x = 0; x < GameLib.CustomCode.TETRIS_GRID_WIDTH; x++) {
geometry.vertices.push(
new THREE.Vector3(
x,
y,
0.17
)
)
points.push(x, y, 0.17);
}
}
geometry.addAttribute('position', new THREE.Float32BufferAttribute(points, 3));
this.scene.instance.add(new THREE.Points(geometry, this.gridMaterial.instance));
geometry = new THREE.Geometry();