translate.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. return {
  2. tag = 'graphicsTransforms',
  3. summary = 'Translate the coordinate system.',
  4. description = [[
  5. Translates the coordinate system in three dimensions. All graphics operations that use
  6. coordinates will behave as if they are offset by the translation value.
  7. The translation will last until `lovr.draw` returns or the transformation is popped off the
  8. transformation stack.
  9. ]],
  10. arguments = {
  11. {
  12. name = 'x',
  13. type = 'number',
  14. default = '0',
  15. description = 'The amount to translate on the x axis.'
  16. },
  17. {
  18. name = 'y',
  19. type = 'number',
  20. default = '0',
  21. description = 'The amount to translate on the y axis.'
  22. },
  23. {
  24. name = 'z',
  25. type = 'number',
  26. default = '0',
  27. description = 'The amount to translate on the z axis.'
  28. }
  29. },
  30. returns = {},
  31. notes = 'Order matters when scaling, translating, and rotating the coordinate system.',
  32. related = {
  33. 'lovr.graphics.rotate',
  34. 'lovr.graphics.scale',
  35. 'lovr.graphics.transform'
  36. }
  37. }