Showing
12 changed files
with
16 additions
and
14 deletions
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <title>Colored animated cube.</title> |
4 | - <link rel="stylesheet" href="main.css"> | |
5 | - <script src="gl-matrix-min.js" type="text/javascript"></script> | |
6 | - <script src="cube.js" type="text/javascript"></script> | |
4 | + <link rel="stylesheet" href="css/main.css"> | |
5 | + <script type="text/javascript" src="js/gl-matrix-min.js"></script> | |
6 | + <script type="text/javascript" src="js/cube.js"></script> | |
7 | 7 | |
8 | 8 | <script id="cube-vertex-shader" type="x-shader/x-vertex"> |
9 | 9 | attribute vec3 vertexPos; | ... | ... |
... | ... | @@ -38,8 +38,7 @@ function initTexture(gl) { |
38 | 38 | webGLTexture.image.onload = function () { |
39 | 39 | handleTextureLoaded(gl, webGLTexture) |
40 | 40 | } |
41 | - //webGLTexture.image.src = "P3D/images/webgl-logo-256.jpg"; | |
42 | - webGLTexture.image.src = "gravatar-256.jpg"; | |
41 | + webGLTexture.image.src = "images/gravatar-256.jpg"; | |
43 | 42 | } |
44 | 43 | |
45 | 44 | function initWebGL(canvas) { | ... | ... |
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <title>First very simple WebGL example...</title> |
4 | - <link rel="stylesheet" href="main.css"> | |
5 | - <script src="gl-matrix-min.js" type="text/javascript"></script> | |
6 | - <script src="square.js" type="text/javascript"></script> | |
4 | + <link rel="stylesheet" href="css/main.css"> | |
5 | + <script type="text/javascript" src="js/gl-matrix-min.js"></script> | |
6 | + <script type="text/javascript" src="js/square.js"></script> | |
7 | 7 | |
8 | 8 | <script id="square-vertex-shader" type="x-shader/x-vertex"> |
9 | 9 | attribute vec3 vertexPos; | ... | ... |
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <title>My first animated and textured WebGL content.</title> |
4 | - <link rel="stylesheet" href="main.css"> | |
5 | - <script src="gl-matrix-min.js" type="text/javascript"></script> | |
6 | - <script src="texture.js" type="text/javascript"></script> | |
4 | + <link rel="stylesheet" href="css/main.css"> | |
5 | + <script type="text/javascript" src="js/gl-matrix-min.js"></script> | |
6 | + <script type="text/javascript" src="js/texture.js"></script> | |
7 | 7 | |
8 | 8 | <script id="texture-vertex-shader" type="x-shader/x-vertex"> |
9 | 9 | attribute vec3 vertexPos; |
... | ... | @@ -13,7 +13,8 @@ |
13 | 13 | varying vec2 vTexCoord; |
14 | 14 | void main(void) { |
15 | 15 | // Return the transformed and projected vertex value |
16 | - gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPos, 1.0); | |
16 | + gl_Position = | |
17 | + projectionMatrix * modelViewMatrix * vec4(vertexPos, 1.0); | |
17 | 18 | // Output the texture coordinate in vTexCoord |
18 | 19 | vTexCoord = texCoord; |
19 | 20 | } | ... | ... |
Please
register
or
login
to post a comment