minetest.get_perlin

From Minetest Developer Wiki
(Redirected from EnvRef:get perlin)
Jump to: navigation, search

Contents

Syntax

minetest.get_perlin(seeddiff, octaves, persistence, scale)

Description

Constructs a PerlinNoise object with seed derived from the world's seed value. This function must not be called until after the world is finished initializing, so it must be called during some kind of callback rather than at the top level mod initialization code. The PerlinNoise constructor, on the other hand, may be called at any time since it does not depend on the world's seed.

Example

local perlin = minetest.get_perlin(354, 3, 0.7, 100)

See Also

Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox