Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arcanis/js.perlin
Javascript perlin's noise implementation - Demo on the arcanis/voxplode repository
https://github.com/arcanis/js.perlin
Last synced: about 2 months ago
JSON representation
Javascript perlin's noise implementation - Demo on the arcanis/voxplode repository
- Host: GitHub
- URL: https://github.com/arcanis/js.perlin
- Owner: arcanis
- Created: 2011-12-01T12:24:15.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-03-16T03:41:52.000Z (almost 12 years ago)
- Last Synced: 2024-10-10T15:51:35.319Z (2 months ago)
- Language: JavaScript
- Homepage: http://arcanis.github.com/voxplode/
- Size: 125 KB
- Stars: 9
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JS.Perlin
## Disclaimer
If you want to use this library in a WebGL context, please consider using [this one][1] instead.
[1]: https://github.com/ashima/webgl-noise
## Installation
**Warning :** This is a web-only package : it should not be used in a Node environment.
```npm install wo-perlin```
## Usage
- *new PERLIN.Generator( [ table ] )*
Returns a new generator instance. If `table` is set, then it will be used
as random lookup table otherwise a random table will be generated.- *[instance].octaves*
- *[instance].frequency*
- *[instance].persistence*Generator configurations variables.
- *[instance].generate( start, size, callback )*
This function will call `callback()` for each pixel in the N-dimensional
range between `start` and `start+size`, with two parameters : the
coordinates of the current pixel, and the related Perlin value.```javascript
var generator = new PERLIN.Generator( );generator.generate( [ 0, 0 ], [ 2, 2 ], function ( point, value ) {
console.log( point, value );
} );
```## Authors
Implementation by Maël Nison, from Jeremy Cochoy's [paper][2].
[2]: http://zenol.fr/dl/perlin_noise.pdf