Phenomenon
Phenomenon is a very small, low-level WebGL library that provides the essentials to deliver a high performance experience. Its core functionality is built around the idea of moving millions of particles around using the power of the GPU.
Features:
- Small in size, no dependencies
- GPU based for high performance
- Low-level & highly configurable
- Helper functions with options
- Add & destroy instances dynamically
- Dynamic attribute switching
*Want to see some magic right away? Have a look
here!*
Install
- ```
- $ npm install --save phenomenon
- ```
Usage
- ``` js
- // Import the library
- import Phenomenon from 'phenomenon';
- // Create a renderer
- const phenomenon = new Phenomenon(options);
- // Add an instance
- phenomenon.add("particles", options);
- ```
For a better understanding of how to use the library, read along or have a look at the demo!
API
Phenomenon(options)
Returns an instance of Phenomenon.
Throughout this documentation we'll refer to an instance of this as renderer.
options.canvas
Type: `HTMLElement`
Default: `document.querySelector('canvas')`
The element where the scene, with all of its instances, will be rendered to. The provided element has to be `