use noise::{Fbm, Perlin};
use noise::utils::{NoiseMapBuilder, PlaneMapBuilder};
fn main() {
let fbm = Fbm::<Perlin>::new(0);
PlaneMapBuilder::<_, 2>::new(&fbm)
.set_size(1000, 1000)
.set_x_bounds(-5.0, 5.0)
.set_y_bounds(-5.0, 5.0)
.build()
.write_to_file("fbm.png");
}
This code which lives in the main README as an example throws the error
error[E0599]: no method named `set_size` found for struct `PlaneMapBuilder<&Fbm<Perlin>, 2>` in the current scope
--> src/main.rs:8:12
|
7 | / PlaneMapBuilder::<_, 2>::new(&fbm)
8 | | .set_size(1000, 1000)
| | -^^^^^^^^ method not found in `PlaneMapBuilder<&Fbm<Perlin>, 2>`
| |___________|
|
|
= note: the method was found for
- `PlaneMapBuilder<NoiseFnWrapper<SourceFn, DIM>, DIM>`
This code which lives in the main README as an example throws the error