Update: CC - Bacon - Entity Loaded (2xswm1bwq8.js) 24 bytes modified
parent
db30526353
commit
49047271de
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue