Update: CC - SnailRunner - Before Render (rlley2ki2i.js) 1 bytes modified
parent
8cb2397773
commit
05c4d037d6
|
@ -13,22 +13,23 @@ if (!this.initialized) {
|
||||||
this.time = 0;
|
this.time = 0;
|
||||||
|
|
||||||
this.spawnCloud = function() {
|
this.spawnCloud = function() {
|
||||||
this.cloud.position.x = -3;
|
this.cloud.position.x = 3;
|
||||||
this.cloud.updateInstance('position');
|
this.cloud.updateInstance('position');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initialized = true;
|
this.initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.road.rotation.z += 0.004 * data.delta;
|
this.road.rotation.z += 0.004 * data.delta;
|
||||||
this.road.updateInstance('rotation');
|
this.road.updateInstance('rotation');
|
||||||
|
|
||||||
this.cloud.position.x -= 0.1 * data.delta;
|
this.cloud.position.x -= data.delta * 2;
|
||||||
|
|
||||||
this.time += data.delta;
|
this.time += data.delta;
|
||||||
|
|
||||||
if (this.time > 3) {
|
if (this.time > 3) {
|
||||||
this.spawnCloud();
|
//this.spawnCloud();
|
||||||
this.time = 0;
|
this.time = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue