TypeScriptSpinner.js 797 B

1234567891011121314151617181920212223
  1. // TypeScript inheritance Component
  2. 'atomic component';
  3. var __extends = (this && this.__extends) || function (d, b) {
  4. for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  5. function __() { this.constructor = d; }
  6. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  7. };
  8. /// <reference path="../TypeScript/Atomic.d.ts" />
  9. var Spinner = (function (_super) {
  10. __extends(Spinner, _super);
  11. function Spinner() {
  12. _super.apply(this, arguments);
  13. this.speed = 1;
  14. this.inspectorFields = {
  15. speed: 1.0
  16. };
  17. }
  18. Spinner.prototype.update = function (timeStep) {
  19. this.node.yaw(timeStep * 75 * this.speed);
  20. };
  21. return Spinner;
  22. })(Atomic.JSComponent);
  23. module.exports = Spinner;