PerlinGenerator

public class PerlinGenerator

Generate Perlin noise.

Implemented from p5.js

  • A shared generator

    Declaration

    Swift

    public static let shared: PerlinGenerator
  • The number of noise samples to blend together

    Declaration

    Swift

    public var octives: Int
  • Instantiate a new generator

    Declaration

    Swift

    public init()
  • Calculate the Perlin noise values for the specified coordinates

    Declaration

    Swift

    public func noise(_ vector: Vector) -> Double

    Parameters

    vector

    Position for the noice value

  • Calculate the Perlin noise values for the specified coordinates

    Declaration

    Swift

    public func noise(_ x: Double, _ y: Double = 0, _ z: Double = 0) -> Double

    Parameters

    x

    x coordinate

    y

    y coordinate

    z

    z coordinate