Update: CC - Before Render - Moorcow (72d6a2a3kc.js) 173 bytes modified

beta.r3js.org
-=yb4f310 2017-11-13 19:02:02 +01:00
parent 462080ebcc
commit c18d929985
1 changed files with 11 additions and 5 deletions

View File

@ -48,29 +48,35 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
var y = GameLib.Utils.GetRandomIntInclusive(2, 10);
var apiBox = new GameLib.D3.API.Mesh();
apiBox.materials = [this.boxMaterial];
var speed = 1;
var speed = 1;
var material = null;
var mesh = null;
if (meshType === 1) {
mesh = this.bull.clone();
material = this.bull.materials[0].clone();
speed = 0.2;
} else if (meshType === 2) {
mesh = this.star.clone();
material = this.star.materials[0].clone();
speed = 0.3;
} else if (meshType === 3) {
mesh = this.burger.clone();
material = this.burger.materials[0].clone();
speed = 0.4;
} else if (meshType === 4) {
mesh = this.parcel.clone();
material = this.parcel.materials[0].clone();
speed = 0.5;
} else {
console.log('unknown mesh type : ' + meshType);
}
mesh.materials = [material];
mesh.updateInstance();
mesh.instance.visible = true;
var velocity = null;