This is a pure V module that calculates Perlin noise .
Initially based on http://riven8192.blogspot.com/2010/08/calculate-perlinnoise-twice-as-fast.html .
v install spytheman.vperlin... then in your v source:
import spytheman.vperlin as perlin
fn main(){
println( perlin.noise2d( 1.2, 0.1) )
println( perlin.noise3d( 1.2, 0.1, 0.21 ) )
println( perlin.noise4d( 1.2, 0.12, 0.13, 0.15) )
}v install spytheman.vperlincd ~/.vmodules/spytheman/vperlinhub forkgit checkout -b my_cool_fix- Make your changes, and commit them, as many times, as you like.
hub pull-request
- Delian Angelov - creator and maintainer