mirage 0.1.0 copy "mirage: ^0.1.0" to clipboard
mirage: ^0.1.0 copied to clipboard

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

Mirage #

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

Mirage on pub.dev Code coverage Github action status Dartdocs Style guide

Usage #

An example of generating a Simplex noise pattern:

Simlex

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 / 256, y / 256);
      // 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 #

To run the tests, run:

dart test

To check code coverage locally, run:

./chore coverage

To preview dartdoc output locally, run:

./chore dartodc
3
likes
0
points
29
downloads

Publisher

verified publisherlurey.dev

Weekly Downloads

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

chaos, meta

More

Packages that depend on mirage