bluefireteam/fast_noise
快速雜訊演算法的移植
- Stars
- 52
- Forks
- 4
- 最近推送(UTC)
- 2023年7月27日
- 專案狀態
- 未封存
語言DartHTMLCSS
技術主題
使用的依賴
依賴清單 5 項
- fixnum
^1.1.0 - benchmark_harness開發依賴
^2.2.2 - flame_lint開發依賴
^1.0.0 - image開發依賴
^4.0.17 - test開發依賴
^1.24.4
原始 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.