getAnimationDuration.lua 867 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. return {
  2. summary = 'Get the duration of an animation in the Model.',
  3. description = 'Returns the duration of an animation in the Model, in seconds.',
  4. arguments = {
  5. name = {
  6. type = 'string',
  7. description = 'The name of the animation.'
  8. },
  9. index = {
  10. type = 'number',
  11. description = 'The animation index.'
  12. }
  13. },
  14. returns = {
  15. duration = {
  16. type = 'number',
  17. description = 'The duration of the animation, in seconds.'
  18. }
  19. },
  20. variants = {
  21. {
  22. arguments = { 'index' },
  23. returns = { 'duration' }
  24. },
  25. {
  26. arguments = { 'name' },
  27. returns = { 'duration' }
  28. }
  29. },
  30. notes = [[
  31. The duration of an animation is calculated as the largest timestamp of all of its keyframes.
  32. ]],
  33. related = {
  34. 'Model:getAnimationCount',
  35. 'Model:getAnimationName',
  36. 'Model:animate'
  37. }
  38. }