From 74af7335a84c8826bd2d87bd98a8e321cd20cb07 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 9 Mar 2018 00:36:40 +0100 Subject: [PATCH] Initial Commit: CC - SnailRunner - Before Render (94xi7aitax.js) --- 94xi7aitax.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 94xi7aitax.js diff --git a/94xi7aitax.js b/94xi7aitax.js new file mode 100644 index 0000000..eedefa6 --- /dev/null +++ b/94xi7aitax.js @@ -0,0 +1,38 @@ +if (!this.entityLoaded) { + return; +} + +if (!this.initialized) { + + /** + * Meshes + */ + this.road = this.entityLoaded.road; + this.cloud = this.entityLoaded.cloud; + + 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.initialized = true; +} + + +//this.road.rotation.z += 0.004 * data.delta; +//this.road.updateInstance('rotation'); + +//this.cloud.position.x -= data.delta; +//this.cloud.updateInstance('position'); + +this.time += data.delta; + +if (this.time > 5) { +// this.spawnCloud(); + this.time = 0; +} + +//@ sourceURL=beforeRender.js \ No newline at end of file