You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

fractal-noise

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fractal-noise - npm Package Compare versions

Comparing version

to
0.7.0

@@ -5,2 +5,6 @@ # Change Log

## [v0.7] – 2017-02-15
### Fixed
- Rename functions to match API because I'm a dummy and forgot to do that.
## [v0.6] – 2017-02-15

@@ -40,3 +44,4 @@ ### Changed

[Unreleased]: https://github.com/joshforisha/fractal-noise-js/compare/v0.6...HEAD
[Unreleased]: https://github.com/joshforisha/fractal-noise-js/compare/v0.7...HEAD
[v0.6]: https://github.com/joshforisha/fractal-noise-js/compare/v0.6...v0.7
[v0.6]: https://github.com/joshforisha/fractal-noise-js/compare/v0.5...v0.6

@@ -43,0 +48,0 @@ [v0.5]: https://github.com/joshforisha/fractal-noise-js/compare/v0.4...v0.5

@@ -11,6 +11,6 @@ export declare type Noise1Fn = (x: number) => number;

};
export declare function cuboid(width: number, height: number, depth: number, noise3: Noise3Fn, options?: Options): number[][];
export declare function cylinderSurface(circumference: number, height: number, noise3: Noise3Fn, options?: Options): number[];
export declare function line(length: number, noise1: Noise1Fn, options?: Options): number[];
export declare function rectangle(width: number, height: number, noise2: Noise2Fn, options?: Options): number[];
export declare function sphereSurface(circumference: number, noise3: Noise3Fn, options?: Options): number[];
export declare function makeCuboid(width: number, height: number, depth: number, noise3: Noise3Fn, options?: Options): number[][];
export declare function makeCylinderSurface(circumference: number, height: number, noise3: Noise3Fn, options?: Options): number[];
export declare function makeLine(length: number, noise1: Noise1Fn, options?: Options): number[];
export declare function makeRectangle(width: number, height: number, noise2: Noise2Fn, options?: Options): number[];
export declare function makeSphereSurface(circumference: number, noise3: Noise3Fn, options?: Options): number[];
"use strict";
var TWO_PI = 2 * Math.PI;
function cuboid(width, height, depth, noise3, options) {
function makeCuboid(width, height, depth, noise3, options) {
if (options === void 0) { options = {}; }

@@ -23,4 +23,4 @@ var _a = processOptions(options), amplitude = _a.amplitude, frequency = _a.frequency, octaves = _a.octaves, persistence = _a.persistence;

}
exports.cuboid = cuboid;
function cylinderSurface(circumference, height, noise3, options) {
exports.makeCuboid = makeCuboid;
function makeCylinderSurface(circumference, height, noise3, options) {
if (options === void 0) { options = {}; }

@@ -47,4 +47,4 @@ var _a = processOptions(options), amplitude = _a.amplitude, frequency = _a.frequency, octaves = _a.octaves, persistence = _a.persistence;

}
exports.cylinderSurface = cylinderSurface;
function line(length, noise1, options) {
exports.makeCylinderSurface = makeCylinderSurface;
function makeLine(length, noise1, options) {
if (options === void 0) { options = {}; }

@@ -63,4 +63,4 @@ var _a = processOptions(options), amplitude = _a.amplitude, frequency = _a.frequency, octaves = _a.octaves, persistence = _a.persistence;

}
exports.line = line;
function rectangle(width, height, noise2, options) {
exports.makeLine = makeLine;
function makeRectangle(width, height, noise2, options) {
if (options === void 0) { options = {}; }

@@ -82,4 +82,4 @@ var _a = processOptions(options), amplitude = _a.amplitude, frequency = _a.frequency, octaves = _a.octaves, persistence = _a.persistence;

}
exports.rectangle = rectangle;
function sphereSurface(circumference, noise3, options) {
exports.makeRectangle = makeRectangle;
function makeSphereSurface(circumference, noise3, options) {
if (options === void 0) { options = {}; }

@@ -110,3 +110,3 @@ var _a = processOptions(options), amplitude = _a.amplitude, frequency = _a.frequency, octaves = _a.octaves, persistence = _a.persistence;

}
exports.sphereSurface = sphereSurface;
exports.makeSphereSurface = makeSphereSurface;
function processOptions(options) {

@@ -113,0 +113,0 @@ return {

{
"name": "fractal-noise",
"version": "0.6.0",
"version": "0.7.0",
"description": "Fractal noise library",

@@ -5,0 +5,0 @@ "main": "lib/index",

@@ -18,3 +18,3 @@ const TWO_PI = 2 * Math.PI

export function cuboid (
export function makeCuboid (
width: number,

@@ -45,3 +45,3 @@ height: number,

export function cylinderSurface (
export function makeCylinderSurface (
circumference: number,

@@ -73,3 +73,3 @@ height: number,

export function line (length: number, noise1: Noise1Fn, options: Options = {}): number[] {
export function makeLine (length: number, noise1: Noise1Fn, options: Options = {}): number[] {
const { amplitude, frequency, octaves, persistence } = processOptions(options)

@@ -88,3 +88,3 @@ const field = new Array(length)

export function rectangle (
export function makeRectangle (
width: number,

@@ -111,3 +111,3 @@ height: number,

export function sphereSurface (circumference: number, noise3: Noise3Fn, options: Options = {}): number[] {
export function makeSphereSurface (circumference: number, noise3: Noise3Fn, options: Options = {}): number[] {
const { amplitude, frequency, octaves, persistence } = processOptions(options)

@@ -114,0 +114,0 @@ const diameter = Math.ceil(circumference / Math.PI)