mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 17:15:21 +02:00
SAPI/Noise: Add PerlinNoiseMap:getMapSlice() function
This adds the ability to grab 'slices' of noise calculated by PerlinNoiseMap. Retrieving smaller slices of noise from the computation result as needed optimizes memory usage while maintaining a reasonable amount of CPU overhead.
This commit is contained in:
@@ -74,6 +74,10 @@ class LuaPerlinNoiseMap : public ModApiBase {
|
||||
static int l_get3dMap(lua_State *L);
|
||||
static int l_get3dMap_flat(lua_State *L);
|
||||
|
||||
static int l_calc2dMap(lua_State *L);
|
||||
static int l_calc3dMap(lua_State *L);
|
||||
static int l_getMapSlice(lua_State *L);
|
||||
|
||||
public:
|
||||
LuaPerlinNoiseMap(NoiseParams *np, int seed, v3s16 size);
|
||||
|
||||
|
Reference in New Issue
Block a user