ClockRange.js 1.2 KB

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