addPoint.lua 1013 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. {
  6. name = 'x',
  7. type = 'number',
  8. description = 'The x coordinate of the control point.'
  9. },
  10. {
  11. name = 'y',
  12. type = 'number',
  13. description = 'The y coordinate of the control point.'
  14. },
  15. {
  16. name = 'z',
  17. type = 'number',
  18. description = 'The z coordinate of the control point.'
  19. },
  20. {
  21. name = 'index',
  22. type = 'number',
  23. default = 'nil',
  24. description = [[
  25. The index to insert the control point at. If nil, the control point is added to the end of
  26. the list of control points.
  27. ]]
  28. }
  29. },
  30. returns = {},
  31. notes = [[
  32. An error will be thrown if the index is less than one or more than the number of control points.
  33. ]],
  34. related = {
  35. 'Curve:getPointCount',
  36. 'Curve:getPoint',
  37. 'Curve:setPoint',
  38. 'Curve:removePoint'
  39. }
  40. }