init.lua 786 B

12345678910111213141516171819
  1. return {
  2. summary = 'A Bézier curve.',
  3. description = [[
  4. A Curve is an object that represents a Bézier curve in three dimensions. Curves are defined by
  5. an arbitrary number of control points (note that the curve only passes through the first and
  6. last control point).
  7. Once a Curve is created with `lovr.math.newCurve`, you can use `Curve:evaluate` to get a point
  8. on the curve or `Curve:render` to get a list of all of the points on the curve. These points
  9. can be passed directly to `Pass:points` or `Pass:line` to render the curve.
  10. Note that for longer or more complicated curves (like in a drawing application) it can be easier
  11. to store the path as several Curve objects.
  12. ]],
  13. constructors = {
  14. 'lovr.math.newCurve',
  15. 'Curve:slice'
  16. }
  17. }