ClockRange.js 951 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Constants used by {@link Clock#tick} to determine behavior
  3. * when {@link Clock#startTime} or {@link Clock#stopTime} is reached.
  4. *
  5. * @enum {number}
  6. *
  7. * @see Clock
  8. * @see ClockStep
  9. */
  10. const ClockRange = {
  11. /**
  12. * {@link Clock#tick} will always advances the clock in its current direction.
  13. *
  14. * @type {number}
  15. * @constant
  16. */
  17. UNBOUNDED: 0,
  18. /**
  19. * When {@link Clock#startTime} or {@link Clock#stopTime} is reached,
  20. * {@link Clock#tick} will not advance {@link Clock#currentTime} any further.
  21. *
  22. * @type {number}
  23. * @constant
  24. */
  25. CLAMPED: 1,
  26. /**
  27. * When {@link Clock#stopTime} is reached, {@link Clock#tick} will advance
  28. * {@link Clock#currentTime} to the opposite end of the interval. When
  29. * time is moving backwards, {@link Clock#tick} will not advance past
  30. * {@link Clock#startTime}
  31. *
  32. * @type {number}
  33. * @constant
  34. */
  35. LOOP_STOP: 2,
  36. };
  37. export default Object.freeze(ClockRange);