Cellular Noise Smoothing

Demonstrates the difference between standard and smoothed 2D cellular noise using different render modes and smoothing values to create organic patterns.

Cellular Noise Smoothing, running
1280 × 720
GitHub
class Example extends Phaser.Scene
{
    create()
    {
        const { width, height } = this.scale;

        this.add.noisecell2d({
            noiseCells: [ 8, 9 ],
            noiseColorStart: 0xffcc66,
            noiseColorEnd: 0x442288
        }, width / 4, height / 2, width / 2, height);

        this.add.noisecell2d({
            noiseCells: [ 8, 9 ],
            noiseColorStart: 0xccff66,
            noiseColorEnd: 0x662266,
            noiseSmoothing: 2,
            noiseMode: 2 // Render cells with smooth intersections.
        }, width * 3 / 4, height / 2, width / 2, height);
    }
}

const config = {
    scale: { mode: Phaser.Scale.FIT },
    type: Phaser.WEBGL,
    parent: 'game-container',
    width: 1280,
    height: 720,
    scene: Example
};

const game = new Phaser.Game(config);

More in Noise33 examples