This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 1,000,000+ packages pre-installed, including
gl-quad with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Creates an indexed quad that you can draw.
var gl = require('webgl-context') var quad = require('gl-quad')(gl) quad.draw( myShader )
The passed shader is expected to have
var quad = createQuad(gl)
Creates a new quad with position and texcoord buffers.
Draws the quad with a gl-shader.
If a shader is not passed, it's assumed that you've already bound a shader.
Disposes the quad.
The vertex buffer.
The texcoord buffer.
The element buffer.
The Vertex Array Object backing this quad.
MIT, see LICENSE.md for details.