points.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. return {
  2. tag = 'drawing',
  3. summary = 'Draw points.',
  4. description = 'Draws points. `Pass:mesh` can also be used to draw points using a `Buffer`.',
  5. arguments = {
  6. x = {
  7. type = 'number',
  8. description = 'The x coordinate of the first point.'
  9. },
  10. y = {
  11. type = 'number',
  12. description = 'The y coordinate of the first point.'
  13. },
  14. z = {
  15. type = 'number',
  16. description = 'The z coordinate of the first point.'
  17. },
  18. t = {
  19. type = 'table',
  20. description = 'A table of numbers or Vec3 objects (not both) representing point positions.'
  21. },
  22. v = {
  23. type = 'Vec3',
  24. description = 'A vector containing the position of the first point to draw.'
  25. },
  26. ['...'] = {
  27. type = '*',
  28. description = 'More points.'
  29. }
  30. },
  31. returns = {},
  32. variants = {
  33. {
  34. arguments = { 'x', 'y', 'z', '...' },
  35. returns = {}
  36. },
  37. {
  38. arguments = { 't' },
  39. returns = {}
  40. },
  41. {
  42. arguments = { 'v', '...' },
  43. returns = {}
  44. }
  45. },
  46. notes = [[
  47. To change the size of points, set the `pointSize` shader flag in `lovr.graphics.newShader` or
  48. write to the `PointSize` variable in the vertex shader. Points are always the same size on the screen, regardless of distance, and the units are in pixels.
  49. ]]
  50. }