Mercurial > hg > Members > e085711
comparison webGL/dandy/dandy4.html @ 9:1d76f5717ba7
upload dandy4.html
author | NOBUYASU Oshiro |
---|---|
date | Sat, 10 Jul 2010 16:38:10 +0900 |
parents | 03b67cd2bde7 |
children | 680b5b0cd1e4 |
comparison
equal
deleted
inserted
replaced
8:03b67cd2bde7 | 9:1d76f5717ba7 |
---|---|
41 <script src="resources/collision.js"> </script> | 41 <script src="resources/collision.js"> </script> |
42 <script src="resources/constKey.js"> </script> | 42 <script src="resources/constKey.js"> </script> |
43 <script src="resources/keybord.js"> </script> | 43 <script src="resources/keybord.js"> </script> |
44 <script src="resources/boss.js"> </script> | 44 <script src="resources/boss.js"> </script> |
45 <script src="resources/parse.js"> </script> | 45 <script src="resources/parse.js"> </script> |
46 <script src="resources/bom.js"> </script> | |
46 | 47 |
47 <script id="vshader" type="x-shader/x-vertex"> | 48 <script id="vshader" type="x-shader/x-vertex"> |
48 uniform mat4 u_modelViewProjMatrix; | 49 uniform mat4 u_modelViewProjMatrix; |
49 uniform mat4 u_normalMatrix; | 50 uniform mat4 u_normalMatrix; |
50 uniform vec3 lightDir; | 51 uniform vec3 lightDir; |
101 gl.uniform3f(gl.getUniformLocation(gl.program, "lightDir"), 0, 0, 1); | 102 gl.uniform3f(gl.getUniformLocation(gl.program, "lightDir"), 0, 0, 1); |
102 gl.uniform1i(gl.getUniformLocation(gl.program, "sampler2d"), 0); | 103 gl.uniform1i(gl.getUniformLocation(gl.program, "sampler2d"), 0); |
103 | 104 |
104 gl.enable(gl.TEXTURE_2D); | 105 gl.enable(gl.TEXTURE_2D); |
105 | 106 |
106 parseXml(gl);//parse.js | 107 |
108 parseXml(gl);//parse.js | |
107 | 109 |
108 return gl; | 110 return gl; |
109 } | 111 } |
110 | 112 |
111 width = -1; | 113 width = -1; |
145 filpcount++; | 147 filpcount++; |
146 schedule(); | 148 schedule(); |
147 state_update(); | 149 state_update(); |
148 collision_detect(); | 150 collision_detect(); |
149 | 151 |
152 PutBom(ctx); | |
153 | |
150 framerate.snapshot(); | 154 framerate.snapshot(); |
151 | 155 |
152 } | 156 } |
153 | 157 |
154 function start() | 158 function start() |