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

beta.r3js.org
-=yb4f310 2018-02-18 18:02:24 +01:00
parent c0bbf96976
commit c2d055acb1
1 changed files with 7 additions and 3 deletions

View File

@ -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
*/