orthographic.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 `Pass:setProjection`, or it can be sent to a `Shader` for use in
  6. GLSL.
  7. ]],
  8. arguments = {
  9. left = {
  10. type = 'number',
  11. description = 'The left edge of the projection.'
  12. },
  13. right = {
  14. type = 'number',
  15. description = 'The right edge of the projection.'
  16. },
  17. bottom = {
  18. type = 'number',
  19. description = 'The bottom edge of the projection.'
  20. },
  21. top = {
  22. type = 'number',
  23. description = 'The top edge of the projection.'
  24. },
  25. width = {
  26. type = 'number',
  27. description = 'The width of the projection.'
  28. },
  29. height = {
  30. type = 'number',
  31. description = 'The height of the projection.'
  32. },
  33. near = {
  34. type = 'number',
  35. description = 'The position of the near clipping plane.'
  36. },
  37. far = {
  38. type = 'number',
  39. description = 'The position of the far clipping plane.'
  40. }
  41. },
  42. returns = {
  43. self = {
  44. type = 'Mat4',
  45. description = 'The modified matrix.'
  46. }
  47. },
  48. variants = {
  49. {
  50. arguments = { 'left', 'right', 'bottom', 'top', 'near', 'far' },
  51. returns = { 'self' }
  52. },
  53. {
  54. arguments = { 'width', 'height', 'near', 'far' },
  55. returns = { 'self' }
  56. }
  57. },
  58. related = {
  59. 'Mat4:perspective',
  60. 'Mat4:fov',
  61. 'Pass:setProjection'
  62. }
  63. }