RotationComponent.re.ts 295 B

1234567891011121314151617181920
  1. import * as RE from 'rogue-engine';
  2. export default class RotationComponent extends RE.Component {
  3. @RE.props.num() rotationSpeed = -1
  4. awake() {
  5. }
  6. start() {
  7. }
  8. update() {
  9. this.object3d.rotateY(this.rotationSpeed / 1000)
  10. }
  11. }
  12. RE.registerComponent(RotationComponent);