1.0.0 • Published 5 years ago

noisadelic v1.0.0

Weekly downloads
11
License
-
Repository
github
Last release
5 years ago

Noisadelic

Getting started

Install noisadelic

npm i noisadelic

Basic implementation

This example create a new noise, convert it to an image and add it to the body

import {Brownian} from "noisadelic"

var noise = new Brownian({
    size: 1024,
    rgb: true
});

var image = noise.convertImage();
document.body.appendChild(image);

THREE.js example

import {Brownian} from "noisadelic"

var noise = new Brownian({
    size: 1024
});

// If texture need to be dynamic
var texture = new THREE.CanvasTexture(noise.canvas);

// If texture need to be static
var texture = new THREE.Texture(noise.convertImg());

var material = new THREE.MeshBasicMaterial({
    map: texture
});

License

Based on https://github.com/rollup/rollup-starter-lib MIT.