From c2d055acb1f67b11277d44ea34e644704eb6e0eb Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sun, 18 Feb 2018 18:02:24 +0100 Subject: [PATCH] Update: CC - Bacon - Entity Loaded (2xswm1bwq8.js) 118 bytes modified --- 2xswm1bwq8.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/2xswm1bwq8.js b/2xswm1bwq8.js index d83a6a2..4f53db6 100644 --- a/2xswm1bwq8.js +++ b/2xswm1bwq8.js @@ -1297,13 +1297,12 @@ GameLib.CustomCode.prototype.spawnBigBlock = function () { block.center.position.x = 0; block.center.position.y = 0; block.center.position.z = 2.5; - block.center.updateInstance('position'); - this.moveBlock(block, {up: true}, (GameLib.CustomCode.TETRIS_GRID_HEIGHT - GameLib.CustomCode.TETRIS_GRID_HEADSPACE), false); this.moveBlock(block, {right: true}, GameLib.CustomCode.TETRIS_GRID_WIDTH / 2, false); this.moveBlock(block, {left: true}, block.offset.x, false); this.moveBlock(block, {down: true}, block.offset.y, false); - + block.center.updateInstance('position'); + this.nextBlock = this.spawnNextBlock(); return block; @@ -1454,6 +1453,11 @@ GameLib.CustomCode.prototype.stopBlock = function() { this.block.center.updateInstance('position'); this.block.center.updateInstance('rotation'); + /** + * Apply our matrix world to the instance + */ + this.block.center.instance.updateMatrixWorld(); + /** * Now we unlink the meshes from the controlling center block */