render.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. return {
  2. summary = 'Get a list of points on the Curve.',
  3. description = [[
  4. Returns a list of points on the Curve. The number of points can be specified to get a more or
  5. less detailed representation, and it is also possible to render a subsection of the Curve.
  6. ]],
  7. arguments = {
  8. {
  9. name = 'n',
  10. type = 'number',
  11. default = '32',
  12. description = 'The number of points to use.'
  13. },
  14. {
  15. name = 't1',
  16. type = 'number',
  17. default = '0',
  18. description = 'How far along the curve to start rendering.'
  19. },
  20. {
  21. name = 't2',
  22. type = 'number',
  23. default = '1',
  24. description = 'How far along the curve to stop rendering.'
  25. }
  26. },
  27. returns = {
  28. {
  29. name = 't',
  30. type = 'table',
  31. description = 'A (flat) table of 3D points along the curve.'
  32. }
  33. },
  34. notes = [[
  35. This function will always return 2 points if the Curve is a line with only 2 control points.
  36. ]],
  37. related = {
  38. 'Curve:evaluate',
  39. 'Curve:slice',
  40. 'lovr.graphics.points',
  41. 'lovr.graphics.line'
  42. }
  43. }