1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Code cleanup.

This commit is contained in:
kkapsner 2017-10-05 19:00:00 +02:00
parent 289cea0fc0
commit 01c1145e28
9 changed files with 81 additions and 61 deletions

View file

@ -69,12 +69,12 @@
var positionBuffer = context.createBuffer();
context.bindBuffer(context.ARRAY_BUFFER, positionBuffer);
context.bufferData(context.ARRAY_BUFFER, new Float32Array([
-1,-1,
-1, 1,
1,-1,
1, 1,
-1, 1,
1,-1
-1, -1,
-1, 1,
1, -1,
1, 1,
-1, 1,
1, -1
]), context.STATIC_DRAW);
@ -84,7 +84,7 @@
var normalize = false; // don't normalize the data
var stride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position
var offset = 0; // start at the beginning of the buffer
context.vertexAttribPointer( positionAttributeLocation, size, type, normalize, stride, offset);
context.vertexAttribPointer(positionAttributeLocation, size, type, normalize, stride, offset);
var texCoordLocation = context.getAttribLocation(program, "a_texCoord");