Star.js 590 B

1234567891011121314151617
  1. var __extends = (this && this.__extends) || function (d, b) {for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];function __() { this.constructor = d; };__.prototype = b.prototype;d.prototype = new __();};
  2. "atomic component";
  3. var Star = (function(_super) {
  4. __extends(Star, _super);
  5. function Star() {
  6. Atomic.JSComponent.call(this);
  7. this.speed = 1;
  8. };
  9. Star.prototype.speed = null;
  10. Star.prototype.update = function(timeStep) {
  11. this.node.rotate2D(this.speed);
  12. this.node.rotateAround2D([1,1],timeStep * 50,Atomic.TS_WORLD);
  13. };
  14. ;
  15. return Star;
  16. })(Atomic.JSComponent);
  17. module.exports = Star;