phenomenon-px

1.0.0 • Public • Published

Phenomenon-px

npm version gzip size license dependencies

Phenomenon-px is the fastest way to create pixel shaders. With its simple API and small size all focus is on your code!

Install

$ npm install --save phenomenon-px

Usage

// Import the library
import Phenomenon from 'phenomenon-px';
 
// Create the pixel shader
Phenomenon(fragment, uniforms, render, canvas);

API

Phenomenon(fragment, uniforms, render, canvas)

Creates a new instance of Phenomenon-px.

fragment

Type: string

The fragment shader that will be applied to all pixels on the canvas.

uniforms

Type: Object

An object with uniforms that can be used in the shader program.

render(uniforms)

Type: function

A function that is called on every frame that can be used to update uniforms.

canvas

Type: HTMLElement
Default: document.querySelector('canvas')

The canvas that will be used to render the shaders on.

Contribute

Are you excited about this library and have interesting ideas on how to improve it? Contribute! 🙌

$ npm install; npm run demo;

License

MIT © Colin van Eenige

Readme

Keywords

Package Sidebar

Install

npm i phenomenon-px

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

16.5 kB

Total Files

6

Last publish

Collaborators

  • vaneenige