regl-primitive
Create a regl draw command from a simplicial complex.
Example
const primitive = const bunny = const regl = const camera = regl center: 0 25 0 distance: 20 const drawBunny = reglframe
Installation
$ npm install regl-primitive --save
See demo here
API
Constructor
const primitive = require('regl-primitive')(regl, complex[, options])
where regl-primitive
expects the following arguments:
regl
- A handle to a regl instancecomplex
- An object exposing at leastpositions
(See simplicial-complex)[configuration]
- An optional object that extends the initial state used to create a regl draw command
License
MIT