Source: Core/ClockRange.js

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