CacheProvider constructor
CacheProvider({
- required int width,
- required int height,
- required NoisePlane generator,
Implementation
CacheProvider(
{required int width,
required int height,
required NoisePlane generator}) {
cache = DoubleCache(width: width, height: height);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
cache.set(x, y, generator.noise2(x.toDouble(), y.toDouble()));
}
}
}