FBM

FBM

This class is an implimentaiton of a Fractal Brownian Motion function using Perlin Nosie.

Members

Methods

Constructor

new FBM(options)

Create an instance of the FBM class. Use this instance to generate fBm noise.

Parameters
Name Type Description
options Object

Options for fBm generaiton.

Properties
Name Type Description
seed number

Seed for Perlin Noise

scale number

What distance to view the noisemap

persistance number

How much each octave contributes to the overall shape

lacunarity number

How much detail is added or removed at each octave

octaves number

Levels of detail you want you perlin noise to have

redistribution number

Level of flatness within the valleys

Classes

FBM

Methods

get2(input) → {number}

Sample 2D Perlin Noise with fBm at given coordinates. The function will use Perlin_get2 or Perlin_get3 depending on the input vector's type.

Parameters
Name Type Description
input THREE.Vector2 | THREE.Vector3

Coordinates to sample noise at.

Returns

Normalized noise in the range [0, 1]

Type
number

get3(input) → {number}

Sample 3D Perlin Noise with fBm at given coordinates. The function will use Perlin_get2 or Perlin_get3 depending on the input vector's type.

Parameters
Name Type Description
input THREE.Vector3

Coordinates to sample noise at.

Returns

Normalized noise in the range [0, 1]

Type
number