melonJS
    Preparing search index...

    Class Noise

    Index

    Constructors

    Properties

    cellularJitter: number
    domainWarp: boolean
    domainWarpAmp: number
    domainWarpFrequency: number
    fractalType: FractalType
    frequency: number
    gain: number
    lacunarity: number
    octaves: number
    offsetX: number
    offsetY: number
    offsetZ: number
    pingPongStrength: number
    seed: number
    type: NoiseType

    Methods

    • Sample the 1D noise field (a 2D slice at y = 0).

      Parameters

      • x: number

        sample coordinate

      Returns number

      noise value in the [-1, 1] range

    • Sample the 2D noise field at (x, y).

      Parameters

      • x: number

        horizontal sample coordinate

      • y: number

        vertical sample coordinate

      Returns number

      noise value in the [-1, 1] range

    • Sample the 3D noise field at (x, y, z) — useful for animating a 2D field by advancing z over time, or for volumetric/tiling effects.

      Parameters

      • x: number

        sample coordinate

      • y: number

        sample coordinate

      • z: number

        sample coordinate

      Returns number

      noise value in the [-1, 1] range