Update: CC - SnailRunner - Before Render (94xi7aitax.js) 13 bytes modified
parent
f7024f79b2
commit
ce12baec6b
|
@ -12,11 +12,11 @@ if (!this.initialized) {
|
|||
|
||||
this.time = 0;
|
||||
|
||||
// this.spawnCloud = function() {
|
||||
// this.cloud.position.x = 5;
|
||||
// this.cloud.position.z = (Math.random() * 0.2) - 0.1
|
||||
// this.cloud.updateInstance('position');
|
||||
// }
|
||||
this.spawnCloud = function() {
|
||||
this.cloud.position.x = 20;
|
||||
this.cloud.position.z = (Math.random() * 10) - 5;
|
||||
this.cloud.updateInstance('position');
|
||||
}
|
||||
|
||||
this.initialized = true;
|
||||
}
|
||||
|
@ -25,13 +25,13 @@ if (!this.initialized) {
|
|||
//this.road.rotation.z += 0.004 * data.delta;
|
||||
//this.road.updateInstance('rotation');
|
||||
|
||||
//this.cloud.position.x -= data.delta;
|
||||
//this.cloud.updateInstance('position');
|
||||
this.cloud.position.x += data.delta * 2;
|
||||
this.cloud.updateInstance('position');
|
||||
|
||||
this.time += data.delta;
|
||||
|
||||
if (this.time > 5) {
|
||||
// this.spawnCloud();
|
||||
this.spawnCloud();
|
||||
this.time = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue