# gl-checker-texture

> generates a checkered texture

Latest version **1.0.1** (published 2015-01-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install gl-checker-texture
pnpm add gl-checker-texture
yarn add gl-checker-texture
bun add gl-checker-texture
```

## 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.0.1 |
| Published | 2015-01-26 |
| First published | 2014-10-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | gl, webgl, stackgl, check, checker, checkered, transparency, background, test, texture, image |

## Links

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

## Dependencies (2)

- [ndarray](https://npm.io/package/ndarray.md) ^1.0.15
- [gl-texture2d](https://npm.io/package/gl-texture2d.md) ^2.0.7

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-01-26
- 1.0.0 — 2014-10-20

## README

# gl-checker-texture

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

Creates a 2x2 checkered repeating WebGL texture. Useful for checkered backgrounds, dotted lines, etc.

```js
var Checker = require('gl-checker-texture')

var tex = Checker(gl)
tex.bind()
```

## Usage

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

#### `createTexture(gl[, opt])`

Creates a new 2x2 texture with the given options:

- `colors` an array of two RGBA colors *in bytes*. Defaults to #ffffff and #cccccc. 

Example:

```js
var tex = createTexture(gl, { colors: [
    [0x50,0x50,0x50,0xff],
    [0x46,0x46,0x46,0xff]
]})
```

The new texture is set to `gl.REPEAT` wrap and `gl.NEAREST` filtering. 

## License

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

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