# gl-quad

> a simple quad utility for stackgl

Latest version **1.1.3** (published 2016-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install gl-quad
pnpm add gl-quad
yarn add gl-quad
bun add gl-quad
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2016-02-21 |
| First published | 2014-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | stackgl, gl-modules, gl, webgl, glsl, quad, triangles, draw, full, screen, fullscreen |

## Links

- npm: https://www.npmjs.com/package/gl-quad
- Repository: https://github.com/mattdesl/gl-quad
- Issues: https://github.com/mattdesl/gl-quad/issues
- npm.io page: https://npm.io/package/gl-quad

## Dependencies (2)

- [gl-vao](https://npm.io/package/gl-vao.md) ^1.1.3
- [gl-buffer](https://npm.io/package/gl-buffer.md) ^2.0.8

## Recent versions

- 1.1.3 (latest) — 2016-02-21
- 1.1.2 — 2014-09-27
- 1.1.1 — 2014-08-14
- 1.0.0 — 2014-08-12

## README

# gl-quad

[![unstable](http://badges.github.io/stability-badges/dist/unstable.svg)](http://github.com/badges/stability-badges)

Creates an indexed quad that you can draw. 

```js
var gl = require('webgl-context')

var quad = require('gl-quad')(gl)
quad.draw( myShader )
```

The passed shader is expected to have `position` and `uv` attributes.

## Usage

[![NPM](https://nodei.co/npm/gl-quad.png)](https://nodei.co/npm/gl-quad/)

## functions

### ```var quad = createQuad(gl)```

Creates a new quad with position and texcoord buffers.

### ```quad.draw([shader])```

Draws the quad with a gl-shader. 

If a shader is not passed, it's assumed that you've already bound a shader.

### ```quad.dispose()```

Disposes the quad.

## members

### ```quad.vertices```

The vertex buffer.

### ```quad.texcoords```

The texcoord buffer.

### ```quad.elements```

The element buffer.

### ```quad.vao```

The Vertex Array Object backing this quad.

## License

MIT, see [LICENSE.md](http://github.com/mattdesl/gl-quad/blob/master/LICENSE.md) for details.

---
_Source: https://npm.io/package/gl-quad · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
