lerp.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. return {
  2. summary = 'Moves this vector some amount towards another one.',
  3. description = [[
  4. Performs a linear interpolation between this vector and another one, which can be used to
  5. smoothly animate between two vectors, based on a parameter value. A parameter value of `0` will
  6. leave the vector unchanged, a parameter value of `1` will set the vector to be equal to the
  7. input vector, and a value of `.5` will set the components to be halfway between the two vectors.
  8. ]],
  9. arguments = {
  10. u = {
  11. type = 'Vec3',
  12. description = 'The vector to lerp towards.'
  13. },
  14. x = {
  15. type = 'number',
  16. description = 'A value of x component to lerp towards.'
  17. },
  18. y = {
  19. type = 'number',
  20. description = 'A value of y component to lerp towards.'
  21. },
  22. z = {
  23. type = 'number',
  24. description = 'A value of z component to lerp towards.'
  25. },
  26. t = {
  27. type = 'number',
  28. description = 'The lerping parameter.'
  29. }
  30. },
  31. returns = {
  32. self = {
  33. type = 'Vec3',
  34. description = 'The interpolated vector.'
  35. }
  36. },
  37. variants = {
  38. {
  39. arguments = { 'u', 't' },
  40. returns = { 'self' }
  41. },
  42. {
  43. arguments = { 'x', 'y', 'z', 't' },
  44. returns = { 'self' }
  45. }
  46. },
  47. related = {
  48. 'Quat:slerp'
  49. }
  50. }