How to use the clearColor function from bindings

Find comprehensive JavaScript bindings.clearColor code examples handpicked from public code repositorys.

154
155
156
157
158
159
160
161
162
163
    throw new TypeError('Expected clear(number mask)');
  }
  return _clear(mask);
}

var _clearColor = gl.clearColor;
gl.clearColor = function clearColor(red, green, blue, alpha) {
  if (!(arguments.length === 4 && typeof red === "number" && typeof green === "number" && typeof blue === "number" && typeof alpha === "number")) {
    throw new TypeError('Expected clearColor(number red, number green, number blue, number alpha)');
  }
fork icon265
star icon386
watch icon20

428
429
430
431
432
433
434
435
436
437
GL.clearColor = function() {
    if (GL.debug) {
        console.log("clearColor");
        console.log(arguments);
    }
    return gl_bindings.clearColor.apply(null, arguments);
};
GL.clearDepth = function() {
    if (GL.debug) {
        console.log("clearDepth");
fork icon0
star icon0
watch icon0

+ 70 other calls in file

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)