mirage 0.2.0%2B4

SDKdartflutter
Platformandroidioswindowslinuxmacosweb

Generate noise and patterns algorithmically for use in software, textures, and graphics.

mirage

Generate noise and patterns algorithmically for use in software, textures, and graphics.

✅ Health🚀 Release📝 Docs♻️ Maintenance
Build status for package/miragePub version for package/mirageDart documentation for package/mirageGitHub Issues for package/mirage

Usage

An example of generating a Simplex noise pattern:

Simplex

import 'package:mirage/mirage.dart';

void main() {
  final noise = Simplex();
  for (var y = 0; y < 256; y++) {
    for (var x = 0; x < 256; x++) {
      final value = noise.get2d(x, y);
      // Do something with the value...
    }
  }
}

For a full example, see the example directory.

Features

  • Full implementations of popular 2D noise functions.
  • Simple and predictable API for generating noise patterns.
  • Build your own generator functions with the Pattern2d interface.
  • Thoughtfully tested and documented for ease of use.

Contributing

We welcome contributions to this package!

Please file an issue before contributing larger changes.

This package uses repository specific tooling to enforce formatting, static analysis, and testing. Please run the following commands locally before submitting a pull request:

  • ./dev.sh --packages packages/mirage check
  • ./dev.sh --packages packages/mirage test