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

Simplified require and further linting.

This commit is contained in:
kkapsner 2017-10-06 16:06:31 +02:00
parent 01c1145e28
commit dcb878392e
15 changed files with 86 additions and 78 deletions

View file

@ -32,7 +32,8 @@
var program = context.createProgram();
var shader = context.createShader(context.VERTEX_SHADER);
var vertex = "attribute vec4 a_position;\nattribute vec2 a_texCoord;\nvarying vec2 v_texCoord;\nvoid main(){\n\tgl_Position = a_position;\n\tv_texCoord = a_texCoord;\n}";
var vertex = "attribute vec4 a_position;\nattribute vec2 a_texCoord;\nvarying vec2 v_texCoord;\n" +
"void main(){\n\tgl_Position = a_position;\n\tv_texCoord = a_texCoord;\n}";
context.shaderSource(shader, vertex);
context.compileShader(shader);
success = context.getShaderParameter(shader, context.COMPILE_STATUS);
@ -44,7 +45,8 @@
context.attachShader(program, shader);
shader = context.createShader(context.FRAGMENT_SHADER);
var fragmenter = "precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\nvoid main(){\n\tgl_FragColor = texture2D(u_image, v_texCoord);\n}";
var fragmenter = "precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\n" +
"void main(){\n\tgl_FragColor = texture2D(u_image, v_texCoord);\n}";
context.shaderSource(shader, fragmenter);
context.compileShader(shader);
success = context.getShaderParameter(shader, context.COMPILE_STATUS);