[READ-ONLY] Mirror of https://github.com/flo-bit/every-noise. javascript noise class with lots of features flo-bit.github.io/every-noise/
javascript noise procedural-generation
0

Configure Feed

Select the types of activity you want to include in your feed.

HTML 51.4%
JavaScript 48.6%
Other 0.1%
33 1 0

Clone this repository

https://tangled.org/flo-bit.dev/every-noise https://tangled.org/did:plc:qmbfap7ogqkosj42nhik6ly3
git@tangled.org:flo-bit.dev/every-noise git@tangled.org:did:plc:qmbfap7ogqkosj42nhik6ly3

For self-hosted knots, clone URLs may differ based on your setup.



README.md

every-noise#

⚠️ This repository is archived. Find the new and improved (typescript) version here!

3D every(where) noise javascript class for all your noise needs. 20kb minified, dependency-free.

  • seeded noise

  • scaling, pow

  • fBM noise

  • domain warping

  • ridged noise

  • billowed noise

  • stepped noise

  • tileable noise

  • set properties of noise to own noise object (e.g. set noise.scale = new Noise());

  • erosion-like fBM

  • combined noise

how to use#

import#

import Noise from "https://flo-bit.github.io/every-noise/noise.js";

create noise object#

// optionally pass in settings object
let noise = new Noise();

get noise value#

// z and w are optional
let value = noise.get(x, y, z, w);

OR

// vector has {x, y, (optional) z, (optional) w} properties
let value = noise.get(vector);

also included#

  • Vector class (2D, 3D, 4D) with vector math functions

  • jsrand for seeded pseudo random number generation

current version#

this is a work in progress, so expect bugs and changes. until version 1.0.0 is released, the api as well as noise results may change.

v0.0.2 (2022-12-31)#

  • added more examples
  • added performance test
  • added prng for seeded noise

v0.0.1 (2022-12-27)#

  • initial release

demos#

simple (p5.js)#

simple 1D noise simple 2D noise

tileable (p5.js)#

fBm (p5.js)#

seeded (p5.js)#

2D noise

stepped (p5.js)#

ridged (p5.js)#

billowed (p5.js)#

warped (p5.js)#

1D noise

advanced (p5.js)#

simple 3D noise on sphere (three.js)#

performance test#

performance test v1

future examples#

  • erosion 1D noise

  • erosion 2D noise

  • erosion on sphere

  • pixi noise flow field

  • adding gui to examples

TODO#

  • add more noise types

  • add more examples

  • add gui to warped, ridged and simple 3D sphere example

  • add example with all options and gui

    • 1D and 2D p5 version
    • 3D three.js version (sphere or heightmap plane)

License#

MIT License, see LICENSE file for details.

Credits#

This project uses the following libraries: