newSphereShape.lua 619 B

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