PerlinNoiseGenerator
基本信息
| 属性 |
值 |
| 路径 |
mrtjp.core.math.PerlinNoiseGenerator |
| 源码 |
src/main/scala/mrtjp/core/math/PerlinNoiseGenerator.scala(166 行) |
1D / 2D / 3D Perlin 噪声实现,独立于 Minecraft 自带的 PerlinNoise。
构造
| 签名 |
说明 |
PerlinNoiseGenerator(rand: Random) |
主构造 |
this() |
用 new Random |
this(w: World) |
用 w.rand(与世界同种子) |
this(seed: Long) |
用指定种子 |
方法
| 方法 |
说明 |
noise(x) |
1D |
noise(x, y) |
2D |
noise(x, y, z) |
3D |
noise(...) (重载) |
带附加参数版本 |
缺陷
object PerlinNoiseGenerator extends PerlinNoiseGenerator(第 12 行)——单例对象继承自
带 Random 参数的类,该类有 this() 无参重载故可编译,但单例使用的随机源
与 this() 构造的 new Random 绑定,不随世界种子变化。易被误用。
相关条目