0.3.0 • Published 3 years ago
gl-canvas v0.3.0
gl-canvas
a Custom Element that extends
<canvas>with handlers for the WebGL context and various events.
Usage
Note: twgl.js is not required but highly reccomended when working with raw WebGL calls
in HTML
<script type="module" src="gl-canvas.esm.js"></script>
<gl-canvas></gl-canvas>Installation
npm install gl-canvasFeatures
- Set WebGL context attributes with HTML attributes
- Viewport automatically resizes with element (using
ResizeObserver)
Contributing
Pull requests and suggestions are very welcome now
License
MIT