Update: CC - SnailRunner - Before Render (rlley2ki2i.js) 87 bytes modified

beta.r3js.org
-=yb4f310 2018-03-07 17:35:12 +01:00
parent 05c4d037d6
commit 0d323289d1
1 changed files with 6 additions and 4 deletions

View File

@ -13,7 +13,8 @@ if (!this.initialized) {
this.time = 0;
this.spawnCloud = function() {
this.cloud.position.x = 3;
this.cloud.position.x = 5;
this.cloud.position.z = (Math.random() * 0.2) - 0.1
this.cloud.updateInstance('position');
}
@ -24,12 +25,13 @@ if (!this.initialized) {
this.road.rotation.z += 0.004 * data.delta;
this.road.updateInstance('rotation');
this.cloud.position.x -= data.delta * 2;
this.cloud.position.x -= data.delta;
this.cloud.updateInstance('position');
this.time += data.delta;
if (this.time > 3) {
//this.spawnCloud();
if (this.time > 5) {
this.spawnCloud();
this.time = 0;
}