slice.lua 865 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. t1 = {
  8. type = 'number',
  9. description = 'The starting point to slice at.'
  10. },
  11. t2 = {
  12. type = 'number',
  13. description = 'The ending point to slice at.'
  14. }
  15. },
  16. returns = {
  17. curve = {
  18. type = 'Curve',
  19. description = 'A new Curve.'
  20. }
  21. },
  22. variants = {
  23. {
  24. arguments = { 't1', 't2' },
  25. returns = { 'curve' }
  26. }
  27. },
  28. notes = [[
  29. The new Curve will have the same number of control points as the existing curve.
  30. An error will be thrown if t1 or t2 are not between 0 and 1, or if the Curve has less than two
  31. points.
  32. ]],
  33. related = {
  34. 'Curve:evaluate',
  35. 'Curve:render'
  36. }
  37. }