Files
smc-luanti-ide-helper/classes/ValueNoise.lua
Van 5d3804168b Position edits (#7)
* Moving annotations for vector classes and positions: `core_namespace.lua` -> `classes/vector.lua`. Rethinking position annotations

* Replacing float positions with integer positions where required (voxel manipulator, node coordinates, etc.). Adding missing annotations to the position parameters of core methods

* Fix position annotations in noises classes

* remove alias `MapPosition2d`

* Review fixes
2026-02-13 12:09:24 +03:00

26 lines
873 B
Lua

--- @meta
--- 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 IntegerPosition2d
--- @return number
function ValueNoise:get_2d(pos) end
--- Returns 3D noise value at `pos={x=,y=,z=}`
--- @param pos IntegerPosition
--- @return number
function ValueNoise:get_3d(pos) end