MCPcopy Create free account
hub / github.com/codrops/RainEffect / setRectangle

Function setRectangle

demo/js/index.js:12647–12653  ·  view source on GitHub ↗
(gl, x, y, width, height)

Source from the content-addressed store, hash-verified

12645}
12646
12647function setRectangle(gl, x, y, width, height) {
12648 var x1 = x;
12649 var x2 = x + width;
12650 var y1 = y;
12651 var y2 = y + height;
12652 gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([x1, y1, x2, y1, x1, y2, x1, y2, x2, y1, x2, y2]), gl.STATIC_DRAW);
12653}
12654
12655function error(msg) {
12656 console.error(msg);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected