animationRange.ts 791 B

123456789101112131415161718192021222324252627
  1. /**
  2. * Represents the range of an animation
  3. */
  4. export class AnimationRange {
  5. /**
  6. * Initializes the range of an animation
  7. * @param name The name of the animation range
  8. * @param from The starting frame of the animation
  9. * @param to The ending frame of the animation
  10. */
  11. constructor(
  12. /**The name of the animation range**/
  13. public name: string,
  14. /**The starting frame of the animation */
  15. public from: number,
  16. /**The ending frame of the animation*/
  17. public to: number) {
  18. }
  19. /**
  20. * Makes a copy of the animation range
  21. * @returns A copy of the animation range
  22. */
  23. public clone(): AnimationRange {
  24. return new AnimationRange(this.name, this.from, this.to);
  25. }
  26. }