https://github.com/musakui/gl-canvas
a Custom Element that extends <canvas>
https://github.com/musakui/gl-canvas
custom-elements web-components webgl
Last synced: about 1 month ago
JSON representation
a Custom Element that extends <canvas>
- Host: GitHub
- URL: https://github.com/musakui/gl-canvas
- Owner: musakui
- License: mit
- Created: 2020-03-13T17:10:55.000Z (over 6 years ago)
- Default Branch: omo
- Last Pushed: 2022-11-13T16:52:55.000Z (over 3 years ago)
- Last Synced: 2025-10-21T20:57:58.302Z (8 months ago)
- Topics: custom-elements, web-components, webgl
- Language: JavaScript
- Homepage: https://musakui.github.io/gl-canvas/
- Size: 251 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gl-canvas
[](https://www.npmjs.com/package/gl-canvas) [](https://www.webcomponents.org/element/gl-canvas/elements/gl-canvas)
> a Custom Element that extends `` with handlers for the WebGL context and various events.
## Usage
*Note*: [`twgl.js`](https://github.com/greggman/twgl.js) is not required but highly reccomended when working with raw WebGL calls
### in HTML
```htmlmixed
```
### Installation
```shell
npm install gl-canvas
```
## Features
- Set [WebGL context attributes](https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2) with HTML attributes
- Viewport automatically resizes with element (using `ResizeObserver`)
## Contributing
Pull requests and suggestions are very welcome now
## License
MIT