fractal-noise
Advanced tools
Comparing version 0.1.0-pre.2 to 0.1.0
@@ -107,5 +107,2 @@ "use strict"; | ||
exports.generateRectangle = generateRectangle; | ||
function lerp(a, b, w) { | ||
return a + w * (b - a); | ||
} | ||
function processOptions(options) { | ||
@@ -112,0 +109,0 @@ return { |
{ | ||
"name": "fractal-noise", | ||
"version": "0.1.0-pre.2", | ||
"version": "0.1.0", | ||
"description": "Fractal noise library", | ||
@@ -8,3 +8,2 @@ "main": "lib/index.js", | ||
"compile": "tsc", | ||
"dev": "webpack-dev-server --content-base test --hot --inline", | ||
"test": "standardts src/**/*.ts", | ||
@@ -29,7 +28,4 @@ "watch": "tsc --watch" | ||
"standardts": "^1", | ||
"ts-loader": "^2", | ||
"typescript": "^2", | ||
"webpack": "^2", | ||
"webpack-dev-server": "^2" | ||
"typescript": "^2" | ||
} | ||
} |
@@ -14,3 +14,3 @@ # Fractal Noise | ||
### Options | ||
##### Options | ||
The `options` object for each `generate` function contains the following properties: | ||
@@ -22,9 +22,9 @@ * `amplitude?: number` – Defaults to `1.0` | ||
### `generateCylinder (circumference: number, height: number, options: Options = {}): Uint8Array[]` | ||
##### `generateCylinder (circumference: number, height: number, options: Options = {}): Uint8Array[]` | ||
Generates a two-dimensional noise field formed around a three-dimensional cylinder, such that it is continuous across the x-boundaries. | ||
### `generateLine (length: number, options: Options = {}): number[]` | ||
##### `generateLine (length: number, options: Options = {}): number[]` | ||
Generates a one-dimensional noise field. | ||
### `generateRectangle (width: number, height: number, options: Options = {}): Uint8Array[]` | ||
##### `generateRectangle (width: number, height: number, options: Options = {}): Uint8Array[]` | ||
Generates a two-dimensional noise field isolated to `width` and `height` (non-continuous noise). |
@@ -153,6 +153,2 @@ const TWO_PI = 2 * Math.PI | ||
function lerp (a: number, b: number, w: number): number { | ||
return a + w * (b - a) | ||
} | ||
function processOptions (options: Options): Options { | ||
@@ -159,0 +155,0 @@ return { |
2
18215
10
276