newCylinderShape.lua 904 B

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