From 0d323289d148cb7fe96b6b97a911241edc0abbf3 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Wed, 7 Mar 2018 17:35:12 +0100 Subject: [PATCH] Update: CC - SnailRunner - Before Render (rlley2ki2i.js) 87 bytes modified --- rlley2ki2i.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rlley2ki2i.js b/rlley2ki2i.js index 6853a80..32831c4 100644 --- a/rlley2ki2i.js +++ b/rlley2ki2i.js @@ -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; }