diff --git a/8ia8dlk7l5.js b/8ia8dlk7l5.js index 43480d0..b3859f0 100644 --- a/8ia8dlk7l5.js +++ b/8ia8dlk7l5.js @@ -115,7 +115,7 @@ GameLib.CustomCode.prototype.visualizeGrid = function (color) { }.bind(this) -GameLib.CustomCode.prototype.startAnimation = function (index) { +GameLib.CustomCode.prototype.startAnimation = function (index, lines) { for (var x = 0; x < GameLib.CustomCode.TETRIS_GRID_WIDTH; x++) { @@ -170,7 +170,7 @@ GameLib.CustomCode.prototype.startAnimation = function (index) { return function (data) { __animationObject.time += data.delta * 4; - this.burnLight.intensity = 4 * Math.sin(__animationObject.time); + this.burnLight.intensity = lines * Math.sin(__animationObject.time); this.burnLight.updateInstance('intensity'); this.tile_glowMaterial.opacity = Math.sin(__animationObject.time); @@ -451,7 +451,7 @@ GameLib.CustomCode.prototype.removeLines = function () { for (var x = 0; x < GameLib.CustomCode.TETRIS_GRID_WIDTH; x++) { this.grid[index][x].value = GameLib.CustomCode.TETRIS_GRID_DISAPPEARING; } - this.startAnimation(index); + this.startAnimation(index, indices.length); }.bind(this) );