ClockStep.js 846 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Constants to determine how much time advances with each call
  3. * to {@link Clock#tick}.
  4. *
  5. * @enum {number}
  6. *
  7. * @see Clock
  8. * @see ClockRange
  9. */
  10. const ClockStep = {
  11. /**
  12. * {@link Clock#tick} advances the current time by a fixed step,
  13. * which is the number of seconds specified by {@link Clock#multiplier}.
  14. *
  15. * @type {number}
  16. * @constant
  17. */
  18. TICK_DEPENDENT: 0,
  19. /**
  20. * {@link Clock#tick} advances the current time by the amount of system
  21. * time elapsed since the previous call multiplied by {@link Clock#multiplier}.
  22. *
  23. * @type {number}
  24. * @constant
  25. */
  26. SYSTEM_CLOCK_MULTIPLIER: 1,
  27. /**
  28. * {@link Clock#tick} sets the clock to the current system time;
  29. * ignoring all other settings.
  30. *
  31. * @type {number}
  32. * @constant
  33. */
  34. SYSTEM_CLOCK: 2,
  35. };
  36. export default Object.freeze(ClockStep);