38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
|
this.topBall = GameLib.EntityManager.Instance.findComponentById('gh1x1h7rot');
|
||
|
this.bottomBall = GameLib.EntityManager.Instance.findComponentById('796eyo44j8');
|
||
|
|
||
|
|
||
|
this.text0 = GameLib.EntityManager.Instance.findComponentById('hzr8jx7485');
|
||
|
this.text1 = GameLib.EntityManager.Instance.findComponentById('rlx2sebygk');
|
||
|
|
||
|
if (!this.initialized) {
|
||
|
this.initialized = true;
|
||
|
this.time = 0;
|
||
|
}
|
||
|
|
||
|
this.time += data.delta;
|
||
|
|
||
|
if (this.text1) {
|
||
|
this.text0.scale.x = 0.08 + Math.sin(2 * this.time) * 0.01;
|
||
|
this.text0.scale.y = 0.08 + Math.sin(2 * this.time) * 0.01;
|
||
|
this.text0.scale.z = 0.08 + Math.sin(2 * this.time) * 0.01;
|
||
|
this.text0.updateInstance('scale');
|
||
|
|
||
|
this.text1.scale.x = 0.09 + Math.cos(2 * this.time) * 0.01;
|
||
|
this.text1.scale.y = 0.09 + Math.cos(2 * this.time) * 0.01;
|
||
|
this.text1.scale.z = 0.09 + Math.cos(2 * this.time) * 0.01;
|
||
|
this.text1.updateInstance('scale');
|
||
|
}
|
||
|
|
||
|
if (this.topBall) {
|
||
|
|
||
|
this.topBall.rotation.y = Math.sin(this.time);
|
||
|
this.topBall.updateInstance('rotation');
|
||
|
}
|
||
|
|
||
|
if (this.bottomBall) {
|
||
|
this.bottomBall.rotation.y = Math.cos(this.time);
|
||
|
this.bottomBall.updateInstance('rotation');
|
||
|
}
|
||
|
|
||
|
//@ sourceURL=CustomCode (ds7xhwnsao).js
|