noise-ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

noise-ts

A simple library for 2D and 3D simplex noise and perlin noise in TypeScript.

This is a TypeScript implementation of josephg/noisejs. Slightly modified from alanko0511/noisejs-typescript.

Installation

npm i noise-ts

How to use

import Noise from 'noise-ts';

// Seed value is optional, default is 0.
const seed = Math.random();
const noise = new Noise(seed);

// Call the noise functions to get the noise value for that coordinates.
noise.simplex2(x, y);
noise.simplex3(x, y, z);

noise.perlin2(x, y);
noise.perlin3(x, y, z);

Please read the original repo's README for more information.

Package Sidebar

Install

npm i noise-ts

Weekly Downloads

14

Version

1.0.1

License

MIT

Unpacked Size

15.9 kB

Total Files

5

Last publish

Collaborators

  • evanhosni