2019-06-23 10:48:14 +02:00
|
|
|
if (data.entity === this.parentEntity) {
|
|
|
|
console.log('cyber-security.berlin entity loaded');
|
|
|
|
} else {
|
|
|
|
return;
|
|
|
|
}
|
2019-06-23 10:42:01 +02:00
|
|
|
|
2019-06-23 10:48:14 +02:00
|
|
|
/**
|
|
|
|
* Code Components
|
|
|
|
*/
|
|
|
|
this.beforeRender = R3.EntityManager.Instance.findComponentById('y2q95ipdcf');
|
2019-06-23 10:55:27 +02:00
|
|
|
this.innerCircle = R3.EntityManager.Instance.findComponentById('ix41c5pelj');
|
|
|
|
this.outerCircle = R3.EntityManager.Instance.findComponentById('zx8oaonomw');
|
2019-06-23 10:42:01 +02:00
|
|
|
|
2019-06-23 10:53:27 +02:00
|
|
|
this.beforeRender.entityLoaded = this;
|
2019-06-23 10:50:07 +02:00
|
|
|
|
2019-06-23 11:01:37 +02:00
|
|
|
this.y = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-23 10:51:43 +02:00
|
|
|
R3.CustomCode.prototype.render = function(delta) {
|
2019-06-23 10:55:27 +02:00
|
|
|
|
2019-06-23 11:01:37 +02:00
|
|
|
this.y += delta;
|
|
|
|
|
2019-06-23 11:11:39 +02:00
|
|
|
this.innerCircle.rotation.y += Math.sin(this.y) * 0.15 * Math.random(10);
|
2019-06-23 10:55:49 +02:00
|
|
|
this.innerCircle.updateInstance('rotation');
|
2019-06-23 10:55:27 +02:00
|
|
|
|
2019-06-23 11:01:37 +02:00
|
|
|
|
2019-06-23 11:03:30 +02:00
|
|
|
this.outerCircle.rotation.y -= Math.cos(this.y) * 0.15;
|
2019-06-23 10:56:16 +02:00
|
|
|
this.outerCircle.updateInstance('rotation');
|
2019-06-23 10:50:07 +02:00
|
|
|
}
|
|
|
|
|
2019-06-23 10:42:01 +02:00
|
|
|
return null;
|
2019-06-23 10:57:54 +02:00
|
|
|
//@ sourceURL=entityLoaded.js
|