animationEvent.js 925 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * Composed of a frame, and an action function
  3. */
  4. export class AnimationEvent {
  5. /**
  6. * Initializes the animation event
  7. * @param frame The frame for which the event is triggered
  8. * @param action The event to perform when triggered
  9. * @param onlyOnce Specifies if the event should be triggered only once
  10. */
  11. constructor(
  12. /** The frame for which the event is triggered **/
  13. frame,
  14. /** The event to perform when triggered **/
  15. action,
  16. /** Specifies if the event should be triggered only once**/
  17. onlyOnce) {
  18. this.frame = frame;
  19. this.action = action;
  20. this.onlyOnce = onlyOnce;
  21. /**
  22. * Specifies if the animation event is done
  23. */
  24. this.isDone = false;
  25. }
  26. /** @internal */
  27. _clone() {
  28. return new AnimationEvent(this.frame, this.action, this.onlyOnce);
  29. }
  30. }
  31. //# sourceMappingURL=animationEvent.js.map