orthographic.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. return {
  2. summary = 'Turn the matrix into an orthographic projection.',
  3. description = [[
  4. Sets this matrix to represent an orthographic projection, useful for 2D/isometric rendering.
  5. This can be used with `lovr.graphics.setProjection`, or it can be sent to a `Shader` for use in
  6. GLSL.
  7. ]],
  8. arguments = {
  9. {
  10. name = 'left',
  11. type = 'number',
  12. description = 'The left edge of the projection.'
  13. },
  14. {
  15. name = 'right',
  16. type = 'number',
  17. description = 'The right edge of the projection.'
  18. },
  19. {
  20. name = 'top',
  21. type = 'number',
  22. description = 'The top edge of the projection.'
  23. },
  24. {
  25. name = 'bottom',
  26. type = 'number',
  27. description = 'The bottom edge of the projection.'
  28. },
  29. {
  30. name = 'near',
  31. type = 'number',
  32. description = 'The position of the near clipping plane.'
  33. },
  34. {
  35. name = 'far',
  36. type = 'number',
  37. description = 'The position of the far clipping plane.'
  38. }
  39. },
  40. returns = {
  41. {
  42. name = 'm',
  43. type = 'Mat4',
  44. description = 'The original matrix.'
  45. }
  46. },
  47. related = {
  48. 'Mat4:perspective',
  49. 'Mat4:fov',
  50. 'lovr.graphics.setProjection'
  51. }
  52. }