Crate noise [] [src]

A procedural noise generation library for Rust.

Example

use noise::{NoiseModule, Perlin};

let perlin = Perlin::new();
let val = perlin.get([42.4, 37.7, 2.8]);

Structs

Abs

Noise module that outputs the absolute value of the output value from the source module.

Add

Noise module that outputs the sum of the two output values from two source modules.

BasicMulti

Noise module that outputs heterogenous Multifractal noise.

Billow

Noise module that outputs "billowy" noise.

Blend

Noise module that outputs a weighted blend of the output values from two source modules given the output value supplied by a control module.

Brownian2 [
Deprecated
]

A callable struct for applying 2-dimensional fractional Brownian motion.

Brownian3 [
Deprecated
]

A callable struct for applying 3-dimensional fractional Brownian motion.

Brownian4 [
Deprecated
]

A callable struct for applying 4-dimensional fractional Brownian motion.

Cache

Noise module that caches the last output value generated by the source module.

Checkerboard

Noise module that outputs a checkerboard pattern.

Clamp

Noise module that clamps the output value from the source module to a range of values.

Constant

Noise module that outputs a constant value.

Curve

Noise module that maps the output value from the source module onto an arbitrary function curve.

Cylinders

Noise module that outputs concentric cylinders.

Displace

Noise Module that uses multiple source modules to displace each coordinate of the input value before returning the output value from the source module.

Exponent

Noise module that maps the output value from the source module onto an exponential curve.

Fbm

Noise module that outputs fBm (fractal Brownian motion) noise.

HybridMulti

Noise module that outputs hybrid Multifractal noise.

Invert

Noise module that inverts the output value from the source module.

Max

Noise module that outputs the larger of the two output values from two source modules.

Min

Noise module that outputs the smaller of the two output values from two source modules.

Multiply

Noise module that outputs the product of the two output values from two source modules.

Perlin

Noise module that outputs 2/3/4-dimensional Perlin noise.

PermutationTable [
Deprecated
]

A seed table, required by all noise functions.

Power

Noise module that raises the output value from the first source module to the power of the output value of the second source module.

RidgedMulti

Noise module that outputs ridged-multifractal noise.

RotatePoint

Noise Module that rotates the input value around the origin before returning the output value from the source module.

ScaleBias

Noise module that applies a scaling factor and a bias to the output value from the source module.

ScalePoint

Noise Module that scales the coordinates of the input value before returning the output value from the source module.

Select

Noise module that outputs the value selected from one of two source modules chosen by the output value from a control module.

Terrace

Noise module that maps the output value from the source module onto a terrace-forming curve.

TranslatePoint

Noise Module that moves the coordinates of the input value before returning the output value from the source module.

Turbulence

Noise Module that randomly displaces the input value before returning the output value from the source module.

Worley

Noise module that outputs Worley noise.

Enums

RangeFunction

Set of distance functions that can be used in the Worley noise module.

Constants

BASICMULTI_MAX_OCTAVES

Maximum number of octaves for the BasicMulti noise module.

BILLOW_MAX_OCTAVES

Maximum number of octaves for the Billow noise module.

DEFAULT_BASICMULTI_FREQUENCY

Default frequency for the BasicMulti noise module.

DEFAULT_BASICMULTI_LACUNARITY

Default lacunarity for the BasicMulti noise module.

DEFAULT_BASICMULTI_OCTAVES

Default number of octaves for the BasicMulti noise module.

DEFAULT_BASICMULTI_PERSISTENCE

Default persistence for the BasicMulti noise module.

DEFAULT_BASICMULTI_SEED

Default noise seed for the BasicMulti noise module.

DEFAULT_BILLOW_FREQUENCY

Default frequency for the Billow noise module.

DEFAULT_BILLOW_LACUNARITY

Default lacunarity for the Billow noise module.

DEFAULT_BILLOW_OCTAVE_COUNT

Default number of octaves for the Billow noise module.

DEFAULT_BILLOW_PERSISTENCE

Default persistence for the Billow noise module.

DEFAULT_BILLOW_SEED

Default noise seed for the Billow noise module.

DEFAULT_CHECKERBOARD_SIZE

Default Checkerboard size

DEFAULT_CYLINDERS_FREQUENCY

Default cylinders frequency

DEFAULT_FBM_FREQUENCY

Default frequency for the fBm noise module.

DEFAULT_FBM_LACUNARITY

Default lacunarity for the fBm noise module.

DEFAULT_FBM_OCTAVE_COUNT

Default number of octaves for the fBm noise module.

DEFAULT_FBM_PERSISTENCE

Default Hurst exponent for the fBm noise module

DEFAULT_FBM_SEED

Default noise seed for the fBm noise module.

DEFAULT_HYBRIDMULTI_FREQUENCY

Default frequency for the BasicMulti noise module.

DEFAULT_HYBRIDMULTI_LACUNARITY

Default lacunarity for the BasicMulti noise module.

DEFAULT_HYBRIDMULTI_OCTAVES

Default number of octaves for the BasicMulti noise module.

DEFAULT_HYBRIDMULTI_PERSISTENCE

Default persistence for the BasicMulti noise module.

DEFAULT_HYBRIDMULTI_SEED

Default noise seed for the BasicMulti noise module.

DEFAULT_PERLIN_SEED

Default Seed for the Perlin noise module.

DEFAULT_RIDGED_ATTENUATION

Default attenuation for the RidgedMulti noise module.

DEFAULT_RIDGED_FREQUENCY

Default frequency for the RidgedMulti noise module.

DEFAULT_RIDGED_LACUNARITY

Default lacunarity for the RidgedMulti noise module.

DEFAULT_RIDGED_OCTAVE_COUNT

Default number of octaves for the RidgedMulti noise module.

DEFAULT_RIDGED_PERSISTENCE

Default persistence for the RidgedMulti noise module.

DEFAULT_RIDGED_SEED

Default noise seed for the RidgedMulti noise module.

DEFAULT_TURBULENCE_FREQUENCY

Default frequency for the Turbulence noise module.

DEFAULT_TURBULENCE_POWER

Default power for the turbulence noise module.

DEFAULT_TURBULENCE_ROUGHNESS

Default roughness for the Turbulence noise module.

DEFAULT_TURBULENCE_SEED

Default seed for the Turbulence noise module.

DEFAULT_WORLEY_DISPLACEMENT

Default displacement for the Worley noise module.

DEFAULT_WORLEY_FREQUENCY

Default frequency for the Worley noise module.

DEFAULT_WORLEY_RANGEFUNCTION

Default RangeFunction for the Worley noise module.

DEFAULT_WORLEY_SEED

Default noise seed for the Worley noise module.

FBM_MAX_OCTAVES

Maximum number of octaves for the fBm noise module.

HYBRIDMULTI_MAX_OCTAVES

Maximum number of octaves for the BasicMulti noise module.

RIDGED_MAX_OCTAVES

Maximum number of octaves for the RidgedMulti noise module.

Traits

GenFn2

A trait alias for a 2-dimensional noise function.

GenFn3

A trait alias for a 3-dimensional noise function.

GenFn4

A trait alias for a 4-dimensional noise function.

MultiFractal

Trait for MultiFractal modules

NoiseModule

Base trait for noise modules.

Seedable

Trait for modules that require a seed before generating their values

Functions

cell2_manhattan [
Deprecated
]
cell2_manhattan_inv [
Deprecated
]
cell2_manhattan_value [
Deprecated
]
cell2_range [
Deprecated
]
cell2_range_inv [
Deprecated
]
cell2_seed_point [
Deprecated
]
cell2_value [
Deprecated
]
cell3_manhattan [
Deprecated
]
cell3_manhattan_inv [
Deprecated
]
cell3_manhattan_value [
Deprecated
]
cell3_range [
Deprecated
]
cell3_range_inv [
Deprecated
]
cell3_seed_point [
Deprecated
]
cell3_value [
Deprecated
]
cell4_manhattan [
Deprecated
]
cell4_manhattan_inv [
Deprecated
]
cell4_manhattan_value [
Deprecated
]
cell4_range [
Deprecated
]
cell4_range_inv [
Deprecated
]
cell4_seed_point [
Deprecated
]
cell4_value [
Deprecated
]
open_simplex2

2-dimensional OpenSimplex Noise

open_simplex3

3-dimensional OpenSimplex Noise

open_simplex4

4-dimensional OpenSimplex Noise

perlin2 [
Deprecated
]

2-dimensional perlin noise

perlin3 [
Deprecated
]

3-dimensional perlin noise

perlin4 [
Deprecated
]

4-dimensional perlin noise

range_sqr_euclidian2 [
Deprecated
]
range_sqr_euclidian3 [
Deprecated
]
range_sqr_euclidian4 [
Deprecated
]
value2

2-dimensional value noise

value3

3-dimensional value noise

value4

4-dimensional value noise

Type Definitions

Point2

A 2-dimensional point. This is a fixed sized array, so should be compatible with most linear algebra libraries.

Point3

A 3-dimensional point. This is a fixed sized array, so should be compatible with most linear algebra libraries.

Point4

A 4-dimensional point. This is a fixed sized array, so should be compatible with most linear algebra libraries.