Skip to content
Port of the fast noice algorithms
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmark
example
lib
test
web
.gitignore
CHANGELOG.md
LICENSE
README.md
analysis_options.yaml
pubspec.yaml

README.md

fast_noise

Fast noise is a direct port from the implementations by Jordan Peck. The Dart version currently does not yet leverage SIMD for better performance.

Usage

fast_noise offers both 2D and 3D noise generation with noise2 and noise3

The following noise types are available:

Demo

Try out some settings here

Examples

Cellular Noise

import 'package:fast_noise/fast_noise.dart';

main() {
  var arr2d = noise2(w, h,
      noiseType: NoiseType.Cellular,
      octaves: 5,
      frequency: 0.015,
      cellularReturnType: CellularReturnType.Distance2Add);
}

Cellular Noise

import 'package:fast_noise/fast_noise.dart';

main() {
  var arr2d = noise2(w, h,
      noiseType: NoiseType.Perlin,
      octaves: 3,
      frequency: 0.05);

Perlin Noise

import 'package:fast_noise/fast_noise.dart';

main() {
  var arr2d = noise2(w, h,
      noiseType: NoiseType.SimplexFractal,
      octaves: 4,
      frequency: 0.0075)

Simplex Fractal Noise

You can also call a noise type directly:

  var noise = new ValueNoise(interp: Interp.Quintic, octaves: 5);
  // generate 512x512  
  for (int x = 0; x < 512; x++) {
    for (int y = 0; y < 512; y++) {
      noise.singleValueFractalBillow2(x.toDouble(), y.toDouble());
    }
  }

Features and bugs

Please file feature requests and bugs at the issue tracker.

You can’t perform that action at this time.