Initial Commit: CC - Moorcow Start Scene, rotate ball (g6xexa5e4c.js)

beta.r3js.org
-=yb4f310 2017-11-23 09:32:25 +01:00
parent e7dedfbc41
commit ffb8a5f693
1 changed files with 21 additions and 0 deletions

21
g6xexa5e4c.js Normal file
View File

@ -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