Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

gl-white-texture

mattdesl107MIT1.0.0

creates a white 2x2 WebGL texture

gl, stackgl, glsl, modules-gl, gl-modules, webgl, tex, texture, white, opaque, gl-texture2d, texture2d

readme

gl-white-texture

experimental

Creates an opaque white 2x2 texture. This is often used as an optimization when drawing colored and filled lines/rectangles alongside textured sprites, as it allows us to use the same shader.

var tex = require('gl-white-texture')(gl)

//bind and draw that sucker
tex.bind()

Usage

NPM

tex = createWhiteTexture(gl)

Creates and returns a new 2x2 RGBA texture using an unsigned byte array filled with 0xFF bytes.

License

MIT, see LICENSE.md for details.