You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm kinda low on bandwidth at the moment; it's currently exam season for me.
I might be able to fix the bug after this weekend.
This particular issue is caused by Math.trunc(x) % 256 returning a negative number if x is negative. I use the result to deference a lookup array, which then returns undefined. I'll use x & 255 instead.
I've experimented and noticed other odd bugs, such as perlin.gen(0, 0, 512) returning numbers outside the [-1, 1] bound. This is why I'm holding back on a "hot fix"; I want to fix it properly when I get around to it.
Dunno what you're using the library for, but I know the library works well for positive fractional input
Perlin 3 is still broken, it actually doesn't work at all for me. Throws an error Cannot read properties of undefined (reading 'dot'). grad3 is supposed to return an object that has a dot function and it returns undefined. All the noise is actually broken in this library sadly, it just returns 1 past a certain fairly low input (not sure the exact value). I'm not passing any negative numbers in.
I am using this library from npm and when I run the perlin3 function with -1 as the z parameter, I keep getting this error.
The text was updated successfully, but these errors were encountered: