Skip to content

Simplex ​

class · pocketmine\world\generator\noise\Simplex · source

Extends Noise

Generates simplex-based noise.

This is a modified version of the freely published version in the paper by Stefan Gustavson at http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf

Constants ​

F2 protected ​

php
protected const F2 = 0.5 * (\M_SQRT3 - 1)

F3 protected ​

php
protected const F3 = 1.0 / 3.0

G2 protected ​

php
protected const G2 = (3 - \M_SQRT3) / 6

G22 protected ​

php
protected const G22 = self::G2 * 2.0 - 1

G3 protected ​

php
protected const G3 = 1.0 / 6.0

grad3 protected ​

php
protected const grad3 = [[1, 1, 0], [-1, 1, 0], [1, -1, 0], [-1, -1, 0], [1, 0, 1], [-1, 0, 1], [1, 0, -1], [-1, 0, -1], [0, 1, 1], [0, -1, 1], [0, 1, -1], [0, -1, -1]]

Properties ​

$offsetX protected ​

php
protected float $offsetX

$offsetY protected ​

php
protected float $offsetY

$offsetZ protected ​

php
protected float $offsetZ

$perm protected ​

php
protected array $perm

Methods ​

__construct() ​

php
public function __construct(\pocketmine\utils\Random $random, int $octaves, float $persistence, float $expansion)

getNoise2D() ​

php
public function getNoise2D($x, $y)

getNoise3D() ​

php
public function getNoise3D($x, $y, $z)

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.