From ffb8a5f6934068b2a7ea75fd0559845e87676dae Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Thu, 23 Nov 2017 09:32:25 +0100 Subject: [PATCH] Initial Commit: CC - Moorcow Start Scene, rotate ball (g6xexa5e4c.js) --- g6xexa5e4c.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 g6xexa5e4c.js diff --git a/g6xexa5e4c.js b/g6xexa5e4c.js new file mode 100644 index 0000000..3dc2257 --- /dev/null +++ b/g6xexa5e4c.js @@ -0,0 +1,21 @@ +this.topBall = GameLib.EntityManager.Instance.findComponentById('695azmtv94'); +this.bottomBall = GameLib.EntityManager.Instance.findComponentById('rseer60cqb'); + +if (!this.initialized) { + this.initialized = true; + this.time = 0; +} + +if (this.topBall) { + this.time += data.delta; + this.topBall.rotation.y = Math.sin(this.time); + this.topBall.updateInstance('rotation'); +} + +if (this.bottomBall) { + this.time += data.delta; + this.bottomBall.rotation.y = Math.cos(this.time); + this.bottomBall.updateInstance('rotation'); +} + +//@ sourceURL=CustomCode (g6xexa5e4c).js \ No newline at end of file