FastNoiseLite class Noise

A web-safe port of FastNoiseLite covering the OpenSimplex2, OpenSimplex2S, Perlin, Value, and Cellular noise types with None/FBm/Ridged/PingPong fractal layering, plus domain warp (domainWarp2/domainWarp3).

Output of getNoise2 and getNoise3 is roughly in the range -1, 1.

The GLSL half of this module (#include <noise.glsl> in a .fmat block) implements the same algorithms with the same tables; see the library doc of package:flutter_scene/noise.dart for the CPU/GPU agreement contract.

Constructors

FastNoiseLite({int seed = 1337})

Properties

cellularDistanceFunction CellularDistanceFunction
Distance function for NoiseType.cellular. Default CellularDistanceFunction.euclideanSq.
getter/setter pair
cellularJitterModifier double
Maximum distance a cellular point can move off its grid position. Default 1.0; values above 1 cause artifacts.
getter/setter pair
cellularReturnType CellularReturnType
Return value computed by NoiseType.cellular. Default CellularReturnType.distance.
getter/setter pair
domainWarpAmp double
Maximum warp distance from the original position. Default 1.0.
getter/setter pair
domainWarpFractalType DomainWarpFractalType
Octave layering for domainWarp2/domainWarp3. Default DomainWarpFractalType.none.
getter/setter pair
domainWarpType DomainWarpType
The warp algorithm for domainWarp2/domainWarp3. Default DomainWarpType.openSimplex2.
getter/setter pair
fractalType FractalType
The fractal layering mode. Default FractalType.none.
getter/setter pair
frequency double
Coordinates are multiplied by this before evaluation. Default 0.01.
getter/setter pair
gain double
Amplitude multiplier between octaves. Default 0.5.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
lacunarity double
Frequency multiplier between octaves. Default 2.0.
getter/setter pair
noiseType NoiseType
The base noise algorithm. Default NoiseType.openSimplex2.
getter/setter pair
octaves int
Number of fractal octaves. Default 3.
getter/setter pair
pingPongStrength double
Strength of the ping-pong warp for FractalType.pingPong. Default 2.0.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seed int
Seed used for all noise types. Default 1337.
getter/setter pair
weightedStrength double
Octave amplitude weighting toward stronger detail. Default 0.0.
getter/setter pair

Methods

domainWarp2(double x, double y) → ({double x, double y})
2D warps the input position using the current domain warp settings.
domainWarp3(double x, double y, double z) → ({double x, double y, double z})
3D warps the input position using the current domain warp settings.
getNoise2(double x, double y) double
2D noise at the given position using the current settings.
getNoise3(double x, double y, double z) double
3D noise at the given position using the current settings.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited