noise.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. return {
  2. tag = 'random',
  3. summary = 'Generate simplex noise.',
  4. description = [[
  5. Returns a 1D, 2D, 3D, or 4D simplex noise value. The number will be between 0 and 1.
  6. ]],
  7. arguments = {
  8. x = {
  9. type = 'number',
  10. description = 'The x coordinate of the input.'
  11. },
  12. y = {
  13. type = 'number',
  14. description = 'The y coordinate of the input.'
  15. },
  16. z = {
  17. type = 'number',
  18. description = 'The z coordinate of the input.'
  19. },
  20. w = {
  21. type = 'number',
  22. description = 'The w coordinate of the input.'
  23. }
  24. },
  25. returns = {
  26. noise = {
  27. type = 'number',
  28. description = 'The noise value, between 0 and 1.'
  29. }
  30. },
  31. variants = {
  32. {
  33. arguments = { 'x' },
  34. returns = { 'noise' }
  35. },
  36. {
  37. arguments = { 'x', 'y' },
  38. returns = { 'noise' }
  39. },
  40. {
  41. arguments = { 'x', 'y', 'z' },
  42. returns = { 'noise' }
  43. },
  44. {
  45. arguments = { 'x', 'y', 'z', 'w' },
  46. returns = { 'noise' }
  47. }
  48. },
  49. related = {
  50. 'lovr.math.random'
  51. }
  52. }