Adding missing noise descriptions: ValueNoise, ValueNoiseMap, NoiseParams. Close #2

This commit is contained in:
Van
2025-10-05 14:38:22 +03:00
parent d0df13bfb4
commit cb8cb067bd
3 changed files with 228 additions and 0 deletions

24
classes/ValueNoise.lua Normal file
View File

@@ -0,0 +1,24 @@
--- @diagnostic disable: missing-return
--- A value noise generator. It can be created via ValueNoise() or core.get_value_noise().
--- For core.get_value_noise(), the actual seed used is the noiseparams seed plus the world
--- seed, to create world-specific noise.
---
--- **Important**: These require the mapgen environment to be initalized, do not use at load time.
---
--- * `ValueNoise(noiseparams)`
--- * `ValueNoise(seed, octaves, persistence, spread)` (deprecated)
--- * `core.get_value_noise(noiseparams)`
--- * `core.get_value_noise(seeddiff, octaves, persistence, spread)` (deprecated)
--- @class ValueNoise
ValueNoise = {}
--- Returns 2D noise value at `pos={x=,y=}`
--- @param pos vector
--- @return number
function ValueNoise:get_2d(pos) end
--- Returns 3D noise value at `pos={x=,y=,z=}`
--- @param pos vector
--- @return number
function ValueNoise:get_3d(pos) end