An open API service indexing awesome lists of open source software.

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>

Awesome Lists containing this project

README

          

# gl-canvas
[![Published on NPM](https://img.shields.io/npm/v/gl-canvas.svg)](https://www.npmjs.com/package/gl-canvas) [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](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