aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Gilfanov <inkelyad@gmail.com>2012-03-31 23:52:25 +0400
committerPerttu Ahola <celeron55@gmail.com>2012-04-07 13:39:01 +0300
commit5608f12f9b4e77936436048abf01b4d7edc74871 (patch)
tree2f3f40ef4f297f1ef9ed4f9b5ac04684bc259206 /doc
parent18d8e3acec44a60a0ee1bbf0b515654fa2102ee9 (diff)
downloadminetest-5608f12f9b4e77936436048abf01b4d7edc74871.tar.gz
minetest-5608f12f9b4e77936436048abf01b4d7edc74871.tar.bz2
minetest-5608f12f9b4e77936436048abf01b4d7edc74871.zip
PerlinNoise for Lua.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index afcee1843..25653dd0f 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -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: