slice.lua 813 B

1234567891011121314151617181920212223242526272829303132333435
  1. return {
  2. summary = 'Get a new Curve from a slice of an existing one.',
  3. description = [[
  4. Returns a new Curve created by slicing the Curve at the specified start and end points.
  5. ]],
  6. arguments = {
  7. {
  8. name = 't1',
  9. type = 'number',
  10. description = 'The starting point to slice at.'
  11. },
  12. {
  13. name = 't2',
  14. type = 'number',
  15. description = 'The ending point to slice at.'
  16. }
  17. },
  18. returns = {
  19. {
  20. name = 'curve',
  21. type = 'Curve',
  22. description = 'A new Curve.'
  23. }
  24. },
  25. notes = [[
  26. The new Curve will have the same number of control points as the existing curve.
  27. An error will be thrown if t1 or t2 are not between 0 and 1, or if the Curve has less than two
  28. points.
  29. ]],
  30. related = {
  31. 'Curve:evaluate',
  32. 'Curve:render'
  33. }
  34. }