Returns a value of perlin noise given a point.
Details
Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
binaries/data/mods/public/maps/random/rmgen/PerlinNoise.js | ||
---|---|---|
3 | It's not a point, it's vector2d. (Widely used inaccuracy, I know, but please change the description to tell that) |
See IRC for improvements: http://irclogs.wildfiregames.com/2019-11/2019-11-30-QuakeNet-%230ad-dev.log starting with "12:30 < FeXoR> ...so on to D1630 I guess ^^"
@"let weight = multiplier;":
Shouldn't waight start at 1 and then be reduced each iteration?
I have no idea about math behind this but code looks good so nice job :)
I have just small safety reminder (you are free to ignore it)
would be nice to make check for scale == 0 or iterations == 0 and early return 0 and maybe log error ?
just safe guard against division by 0 :)
binaries/data/mods/public/maps/random/rmgen/perlinNoise.js | ||
---|---|---|
11 ↗ | (On Diff #10545) | iterations <= 0 :) |
binaries/data/mods/public/maps/random/rmgen/perlinNoise.js | ||
---|---|---|
21 ↗ | (On Diff #10546) | This is really not perlin noise now. Perlin noise implies gradient noise. I suggest renaming this function. Or use the perlin noise implementation in Noise2D. |
binaries/data/mods/public/maps/random/rmgen/perlinNoise.js | ||
---|---|---|
21 ↗ | (On Diff #10546) | Suggestion ? Factal noise, fbm ? |
binaries/data/mods/public/maps/random/rmgen/perlinNoise.js | ||
---|---|---|
21 ↗ | (On Diff #10546) | Fractal noise sounds better. |