Updated docs.

This commit is contained in:
Bruce Hill 2017-10-29 16:15:44 -07:00
parent 69d97d6773
commit cc39970def

View File

@ -9,9 +9,9 @@ values in the range (0-1) with configurable resolution, level of detail, and sha
* `make1d([opts])` Return 1D noise function and 1D noise gradient function. * `make1d([opts])` Return 1D noise function and 1D noise gradient function.
* `make2d([opts])` Return 2D noise function and 2D noise gradient function. * `make2d([opts])` Return 2D noise function and 2D noise gradient function.
* `make3d([opts])` Return 3D noise function and 3D noise gradient function. * `make3d([opts])` Return 3D noise function and 3D noise gradient function.
* `make1dShader([opts])` Return 1D noise shader and 1D noise gradient shader (for use with LÖVE game engine). * `make1dShader([opts])` Return 1D noise shader and 1D noise gradient shader (LÖVE only).
* `make2dShader([opts])` Return 2D noise shader and 2D noise gradient shader (for use with LÖVE game engine). * `make2dShader([opts])` Return 2D noise shader and 2D noise gradient shader (LÖVE only).
* `make3dShader([opts])` Return 3D noise shader and 3D noise gradient shader (for use with LÖVE game engine). * `make3dShader([opts])` Return 3D noise shader and 3D noise gradient shader (LÖVE only).
## Usage ## Usage
@ -43,7 +43,8 @@ may be needed for higher dimensional noise and additional detail.
This library also include 1D, 2D, and 3D noise shaders for use with the [LÖVE game engine](https://love2d.org/). This library also include 1D, 2D, and 3D noise shaders for use with the [LÖVE game engine](https://love2d.org/).
The shader versions are much faster for producing many noise values, as they run in parallel on the GPU. The shader versions are much faster for producing many noise values, as they run in parallel on the GPU.
There is a demo available in the demo/ directory. There is a demo available in the demo/ directory that can be run with LÖVE. If the demo
fails to find `hill_noise.lua`, then just copy into the demo directory.
```lua ```lua
local noise_shader, noise_gradient_shader = Noise.make3dShader{resolution=11} local noise_shader, noise_gradient_shader = Noise.make3dShader{resolution=11}