Skip to content
V module to calculate Perlin noise (https://en.wikipedia.org/wiki/Perlin_noise)
C V
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
stb
.gitignore
README.md
vperlin.v

README.md

vperlin

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 .

Usage:

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) )
}

Development setup for contribution:

  1. Fork this repository (https://github.com/spytheman/vperlin/fork)
  2. Clone your forked repository to ~/.vmodules/spytheman/vperlin:
mkdir -p ~/.vmodules/spytheman/ && cd ~/.vmodules/spytheman/ && rm -rf vperlin/ 
git clone https://github.com/YOU/vperlin vperlin/
cd vperlin/
  1. Create your new feature/bugfix branch (git checkout -b my-new-feature)
  2. Make your changes and then run make test
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request from github's web interface at https://github.com/spytheman/vperlin

License

MIT

Contributors

You can’t perform that action at this time.