newCylinderShape.lua 772 B

123456789101112131415161718192021222324252627282930313233
  1. return {
  2. tag = 'shapes',
  3. summary = 'Create a new CylinderShape.',
  4. description = 'Creates a new CylinderShape.',
  5. arguments = {
  6. {
  7. name = 'radius',
  8. type = 'number',
  9. default = '1',
  10. description = 'The radius of the cylinder, in meters.'
  11. },
  12. {
  13. name = 'length',
  14. type = 'number',
  15. default = '1',
  16. description = 'The length of the cylinder, in meters.'
  17. }
  18. },
  19. returns = {
  20. {
  21. name = 'cylinder',
  22. type = 'CylinderShape',
  23. description = 'The new CylinderShape.'
  24. }
  25. },
  26. notes = 'A Shape can be attached to a Collider using `Collider:addShape`.',
  27. related = {
  28. 'CylinderShape',
  29. 'lovr.physics.newBoxShape',
  30. 'lovr.physics.newCapsuleShape',
  31. 'lovr.physics.newSphereShape'
  32. }
  33. }