Skip to content

Commit 83a3574

Browse files
fixed shader select
1 parent b40e051 commit 83a3574

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ if (!script) {
5151
}
5252

5353
var shader;
54-
if (script.type == "x-shader/x-fragment") {
54+
if (id == "shader-fs") {
5555
shader = gl.createShader(gl.FRAGMENT_SHADER);
56-
} else if (script.type == "x-shader/x-vertex") {
56+
} else if (id == "shader-vs") {
5757
shader = gl.createShader(gl.VERTEX_SHADER);
5858
} else {
5959
return null;

0 commit comments

Comments
 (0)