Update: entity_loaded (2c1eswtjvb.js) 58 bytes modified
parent
3acfb5b196
commit
34c17e9691
|
@ -13,12 +13,19 @@ this.outerCircle = R3.EntityManager.Instance.findComponentById('zx8oaonomw');
|
||||||
|
|
||||||
this.beforeRender.entityLoaded = this;
|
this.beforeRender.entityLoaded = this;
|
||||||
|
|
||||||
|
this.y = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
R3.CustomCode.prototype.render = function(delta) {
|
R3.CustomCode.prototype.render = function(delta) {
|
||||||
|
|
||||||
this.innerCircle.rotation.y += delta;
|
this.y += delta;
|
||||||
|
|
||||||
|
this.innerCircle.rotation.y += Math.sin(this.y);
|
||||||
this.innerCircle.updateInstance('rotation');
|
this.innerCircle.updateInstance('rotation');
|
||||||
|
|
||||||
this.outerCircle.rotation.y -= delta;
|
|
||||||
|
this.outerCircle.rotation.y -= Math.sin(delta);
|
||||||
this.outerCircle.updateInstance('rotation');
|
this.outerCircle.updateInstance('rotation');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue