mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-26 18:21:04 +00:00
PerlinNoise for Lua.
This commit is contained in:
parent
18d8e3acec
commit
5608f12f9b
2 changed files with 149 additions and 0 deletions
|
@ -648,6 +648,8 @@ methods:
|
|||
- get_timeofday()
|
||||
- find_node_near(pos, radius, nodenames) -> pos or nil
|
||||
^ nodenames: eg. {"ignore", "group:tree"} or "default:dirt"
|
||||
- get_perlin(seeddiff, octaves, persistence, scale)
|
||||
^ Return world-specific perlin noise (int(worldseed)+seeddiff)
|
||||
Deprecated:
|
||||
- add_rat(pos): Add C++ rat object (no-op)
|
||||
- add_firefly(pos): Add C++ firefly object (no-op)
|
||||
|
@ -768,6 +770,13 @@ methods:
|
|||
(max - min) must be 32767 or <= 6553 due to the simple
|
||||
implementation making bad distribution otherwise.
|
||||
|
||||
PerlinNoise: A perlin noise generator
|
||||
- Can be created via PerlinNoise(seed, octaves, persistence, scale)
|
||||
- Also minetest.env:get_perlin(seeddiff, octaves, persistence, scale)
|
||||
methods:
|
||||
- get2d(pos) -> 2d noise value at pos={x=,y=}
|
||||
- get3d(pos) -> 3d noise value at pos={x=,y=,z=}
|
||||
|
||||
Registered entities
|
||||
--------------------
|
||||
- Functions receive a "luaentity" as self:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue