Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 220 bytes modified

beta.r3js.org
-=yb4f310 2018-03-21 12:08:10 +01:00
parent 4e6179589d
commit 0f87248120
1 changed files with 7 additions and 0 deletions

View File

@ -214,9 +214,16 @@ GameLib.CustomCode.prototype.createFood = function(delta) {
mesh.position.x = (positionX * GameLib.CustomCode.BODY_SCALE_X) + GameLib.CustomCode.GRID_OFFSET_X;
mesh.position.y = (positionY * GameLib.CustomCode.BODY_SCALE_Y) + GameLib.CustomCode.GRID_OFFSET_Y;
/**
* We apply the scale to the mesh too - since they appear too big when normal
*/
mesh.scale.x = GameLib.CustomCode.BODY_SCALE_X;
mesh.scale.y = GameLib.CustomCode.BODY_SCALE_Y;
mesh.visible = true;
mesh.updateInstance('position');
mesh.updateInstance('scale');
mesh.updateInstance('visible');
}.bind(this);