hasJoints.lua 805 B

123456789101112131415161718192021222324
  1. return {
  2. summary = 'Check if a Model has joints.',
  3. description = [[
  4. Returns whether the Model has any nodes associated with animated joints. This can be used to
  5. approximately determine whether an animated shader needs to be used with an arbitrary Model.
  6. ]],
  7. arguments = {},
  8. returns = {
  9. {
  10. name = 'skeletal',
  11. type = 'boolean',
  12. description = 'Whether the Model has any nodes that use skeletal animation.'
  13. }
  14. },
  15. notes = [[
  16. A model can still be animated even if this function returns false, since node transforms can
  17. still be animated with keyframes without skinning. These types of animations don't need to use
  18. a Shader with the `animated = true` flag, though.
  19. ]],
  20. related = {
  21. 'Model:getAnimationCount',
  22. 'lovr.graphics.newShader'
  23. }
  24. }