newBoxShape.lua 877 B

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