Class Noise

Hierarchy

  • Noise

Constructors

Properties

Accessors

Methods

Constructors

Properties

_p: number[] = []
_seed: number = 0

Accessors

  • get seed(): number
  • This isn't a very good seeding function, but it works ok. It supports 2^16 different seed values. Write something better if you need more seeds.

    Returns number

  • set seed(v: number): void
  • Parameters

    • v: number

    Returns void

Methods

  • 1D 经典噪音

    Parameters

    • x: number

      X轴数值

    Returns number

  • 2D 经典噪音

    Parameters

    • x: number

      X轴数值

    • y: number

      Y轴数值

    Returns number

  • 3D 经典噪音

    Parameters

    • x: number

      X轴数值

    • y: number

      Y轴数值

    • z: number

      Z轴数值

    Returns number

  • N阶经典噪音

    如果是1D,2D,3D噪音,最好选用对于函数,perlinN中存在for循环因此效率比perlin3等性能差3到5(8)倍!

    满足以下运算 perlinN(x) === perlin1(x) perlinN(x,y) === perlin2(x,y) perlinN(x,y,z) === perlin3(x,y,z)

    Parameters

    • Rest ...ps: number[]

      每个轴的数值

    Returns number

Generated using TypeDoc