A helper WebGL module for clearing the current buffer โ extracted from @mikolalysenko's gl-now.
Creates a clear function for you, accepting the following options:
color
: An RGBA array for the colors to clear the buffer to, between 0 and 1. Set tofalse
to disable.depth
: A single value to clear the depth buffer to. Set tofalse
to disable.stencil
: A single value to clear the stencil buffer to, disabled by default.
Clears the current buffer on the gl
context.
MIT. See LICENSE.md for details.