FLUTTER ECOSYSTEM

bluefireteam/fast_noise

त्वरित शोर एल्गोरिदम का पोर्ट

fast_noise प्रोजेक्ट कवर
Stars
52
Forks
4
अंतिम पुश (UTC)
27 जुल॰ 2023
प्रोजेक्ट स्थिति
सक्रिय
Blue Fire GitHub avatar
GITHUB Organization

Blue Fire ↗

Team working on open source packages and plugins for Flutter, including Flame, Audioplayers, Photo View, and more.

भाषाएँDartHTMLCSS

तकनीकी विषय

उपयोग की गई निर्भरताएँ

निर्भरता सूची 5 आइटम

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

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(
      width,
      height,
      noiseType: NoiseType.cellular,
      octaves: 5,
      frequency: 0.015,
      cellularReturnType: CellularReturnType.distance2Add,
  );
}

Cellular Noise

import 'package:fast_noise/fast_noise.dart';

main() {
  var arr2d = noise2(
      width,
      height,
      noiseType: NoiseType.perlin,
      octaves: 3,
      frequency: 0.05,
  );
}

Perlin Noise

import 'package:fast_noise/fast_noise.dart';

main() {
  var arr2d = noise2(
      width,
      height,
      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.