Mercurial > hg > Members > e105711
annotate webGL/src/mainfunc.js @ 2:55702e139f69 draft
3rd,show Notes and set Timing, but it is not completely.
author | e105711 <yomitan.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 03 May 2012 00:52:06 +0900 |
parents | 9285dae61395 |
children | a22ff379000f |
rev | line source |
---|---|
0
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 function gameRender(ctx,MODE){ |
2
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
2 switch(MODE){ |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
3 case TITLE: |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
4 titleRender(ctx); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
5 break; |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
6 case MAIN: |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
7 mainRender(ctx); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
8 break; |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
9 case PLAY: |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
10 playRender(ctx); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
11 } |
0
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 } |
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 |
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 function titleRender(ctx){ |
2
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
15 reshape(ctx); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
16 ctx.clearColor(0,0,0.15,1); |
0
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 ctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT); |
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 PutSpriteF(ctx,100,30,1,imgs[0]); |
2
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
19 PutSpriteF(ctx,100,90,1,imgs[1]); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
20 PutSpriteF(ctx,100,70,1,imgs[6]); |
0
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21 ctx.flush(); |
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 } |
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 |
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 function mainRender(ctx){ |
2
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
25 reshape(ctx); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
26 ctx.clearColor(0,0,0.15,1); |
0
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
27 ctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT); |
2
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
28 PutSpriteF(ctx,100,7.8125,1,imgs[2]); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
29 PutSpriteF(ctx,100,105,1,imgs[3]); //y == 480 |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
30 |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
31 PutSpriteF(ctx,100,70,1,imgs[6]); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
32 ctx.flush(); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
33 } |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
34 |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
35 function playRender(ctx){ |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
36 reshape(ctx); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
37 ctx.clearColor(0,0,0.15,1); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
38 ctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
39 PutSpriteF(ctx,100,7.8125,1,imgs[2]); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
40 PutSpriteF(ctx,100,105,1,imgs[3]); //y == 480 |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
41 for(i=0;i<notesArray.length;i++){ |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
42 // notesArray[i].updLocate(150,1.0); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
43 drawNote(ctx,notesArray[i]); |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
44 } |
55702e139f69
3rd,show Notes and set Timing, but it is not completely.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
45 PutSpriteF(ctx,100,70,1,imgs[6]); |
0
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
46 ctx.flush(); |
9285dae61395
1st commit,just play sounds.
e105711 <yomitan.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
47 } |