📅  最后修改于: 2022-03-11 14:45:02.518000             🧑  作者: Mango
# Instantiate
var noise = OpenSimplexNoise.new()
# Configure
noise.seed = randi()
noise.octaves = 4
noise.period = 20.0
noise.persistence = 0.8
# Sample
print(noise.get_noise_2d(1.0, 1.0))
print(noise.get_noise_3d(0.5, 3.0, 15.0))
print(noise.get_noise_3d(0.5, 1.9, 4.7, 0.0))