Update: CC - SnailRunner - Before Render (rlley2ki2i.js) 87 bytes modified
parent
05c4d037d6
commit
0d323289d1
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue