newBoxShape.lua 998 B

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