newSphereShape.lua 753 B

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