addPoint.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. return {
  2. summary = 'Add a new control point to the Curve.',
  3. description = 'Inserts a new control point into the Curve at the specified index.',
  4. arguments = {
  5. x = {
  6. type = 'number',
  7. description = 'The x coordinate of the control point.'
  8. },
  9. y = {
  10. type = 'number',
  11. description = 'The y coordinate of the control point.'
  12. },
  13. z = {
  14. type = 'number',
  15. description = 'The z coordinate of the control point.'
  16. },
  17. index = {
  18. type = 'number',
  19. default = 'nil',
  20. description = [[
  21. The index to insert the control point at. If nil, the control point is added to the end of
  22. the list of control points.
  23. ]]
  24. }
  25. },
  26. returns = {},
  27. variants = {
  28. {
  29. arguments = { 'x', 'y', 'z', 'index' },
  30. returns = {}
  31. }
  32. },
  33. notes = [[
  34. An error will be thrown if the index is less than one or more than the number of control points.
  35. ]],
  36. related = {
  37. 'Curve:getPointCount',
  38. 'Curve:getPoint',
  39. 'Curve:setPoint',
  40. 'Curve:removePoint'
  41. }
  42. }