pp
phenomenon-px
npm i phenomenon-px
pp

phenomenon-px

⚡️ The fastest way to create pixel shaders.

by Colin van Eenige

1.0.0 (see all)License:MITTypeScript:Not Found
npm i phenomenon-px
Readme

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

Downloads/wk

7

GitHub Stars

78

LAST COMMIT

4yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

2

OPEN PRs

0
VersionTagPublished
1.0.0
latest
4yrs ago
No alternatives found
No tutorials found
Add a tutorial