/
index-old.html
executable file
·186 lines (166 loc) · 9.14 KB
/
index-old.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>HTML5 Video Puzzle - learning the new HTML5 technologies</title>
<meta name="title" content="HTML5 Puzzle - learning the new HTML5 technologies" />
<meta name="description" content="This is a learning tool for the new HTML5 technologies" />
<meta name="keywords" content="html, css, html5, css3, canvas, animation, requestanimationframe, fullscreen, fullscreen api, cache, application cache, application cache api, appcache, audio, audio api, video, video api, modernizr" />
<meta name="author" content="Emerson Estrella">
<link type="text/plain" rel="author" href="humans.txt" />
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/libs/modernizr-2.5.3-respond-1.1.0.min.js"></script>
</head>
<body>
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
<a href="https://github.com/edse/puzzletube" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0; margin-top: 40px;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="./">HTML5 Video Puzzle</a>
<div class="nav-collapse">
<ul class="nav">
<li id="home" class="active"><a href="./">Home</a></li>
<li id="play"><a href="javascript: start();">Play</a></li>
<li id="pause" class="control"><a href="javascript: pause();">Pause</a></li>
<li id="autosnap" class="control"><a href="javascript: window.m.autoSnap();">Auto-Snap On</a></li>
<li id="autosnapoff" class="control"><a href="javascript: window.m.autoSnapOff();">Auto-Snap Off</a></li>
<li id="fullscreen" class="control"><a href="javascript: screenfull.toggle();">Fullscreen</a></li>
<li id="exitfullscreen" class="control"><a href="javascript: screenfull.toggle();">Exit Fullscreen</a></li>
<li id="sfx" class="control"><a href="javascript: window.m.startSFX();">SFX On</a></li>
<li id="sfxoff" class="control"><a href="javascript: window.m.stopSFX();">SFX Off</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div id="modal-success" class="modal hide fade" style="display: none; ">
<div class="modal-header">
<button class="close" data-dismiss="modal">×</button>
<h1>Yes, you did it!</h1>
</div>
<div class="modal-body">
<p><span id="stage" class="label label-success">Stage 1 completed!</span></p>
<p><span id="pieces" class="label label-warning">4 pieces in 30s</span></p>
<!--
<h4>Popover in a modal</h4>
<p>This <a href="#" class="btn popover-test" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A Title">button</a> should trigger a popover on hover.</p>
<h4>Tooltips in a modal</h4>
<p><a href="#" class="tooltip-test" data-original-title="Tooltip">This link</a> and <a href="#" class="tooltip-test" data-original-title="Tooltip">that link</a> should have tooltips on hover.</p>
-->
<hr />
</div>
<div class="modal-footer">
<!--<a href="#" class="btn" data-dismiss="modal">No thanks</a>-->
<a href="#" class="btn btn-primary" id="next">Next Stage</a>
</div>
</div>
<div class="container">
<!-- Main hero unit for a primary marketing message or call to action -->
<div class="hero-unit content">
<h1>HTML5 Video Puzzle</h1>
<p>I'm using this game for learning some of the "new" HTML5 features:</p>
<ul>
<li>Video API</li>
<li>Canvas</li>
<li>Image manipulation</li>
<li>RequestAnimationFrame</li>
<li>Fullscreen API</li>
<li>Application Cache API</li>
<li>Audio API</li>
<li>Mouse, keyboard, and touch support</li>
</ul>
<p><a class="btn btn-primary btn-large" href="javascript: start();">Play »</a></p>
</div>
<!-- Example row of columns -->
<div class="row content">
<div class="span4">
<h2>Video, Canvas, image manipulation, and RequestAnimationFrame</h2>
<p>HTML5 Video Puzzle runs on canvas. It loads a video and slice it in a few pieces. The RequestAnimationFrame provide power efficient and smooth animations.</p>
<!-- <p><a class="btn" href="#">View details »</a></p> -->
</div>
<div class="span4">
<h2>Audio, and fullscreen APIs</h2>
<p>Background music and sound effects using the Audio API. Also fullscreen mode support.</p>
<!-- <p><a class="btn" href="#">View details »</a></p> -->
</div>
<div class="span4">
<h2>Application Cache / Offline browsing support</h2>
<p>You can keep playing even when you go offline.</p>
<!-- <p><a class="btn" href="#">View details »</a></p> -->
</div>
</div>
<hr>
<footer class="content">
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dct:title" rel="dct:type">html5 Puzzle</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://html5puzzle.appspot.com" property="cc:attributionName" rel="cc:attributionURL">Emerson Estrella</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="http://html5rocks.com" rel="dct:source">html5rocks.com</a>.
</footer>
</div> <!-- /container -->
<!-- Game canvas -->
<div id="game">
<div id="controls" style="display:none"><!-- <input type="button" id="play" value="PLAY" /> --></div>
<canvas id="canvas" style="display:none"></canvas>
</div>
<div id="vid" style="display: none;"></div>
<!-- DEBUG -->
<div id="debug" style="display:none">
<div>
pieces: <input type="text" name="p" id="p" />
pieces placed: <input type="text" name="pp" id="pp" />
lines: <input type="text" name="l" id="l" />
Pieces width: <input type="text" name="pw" id="pw" />
Pieces height: <input type="text" name="ph" id="ph" />
</div>
<div>
moving: <input type="text" name="moving" id="moving" />
over: <input type="text" name="over" id="over" />
selected: <input type="text" name="selected" id="selected" />
</div>
<div>
x: <input type="text" name="mx" id="mx" />
y: <input type="text" name="my" id="my" />
</div>
<div>
p1 x: <input type="text" name="px" id="px" />
p1 y: <input type="text" name="py" id="py" />
</div>
<div>
h1 x: <input type="text" name="hx" id="hx" />
h1 y: <input type="text" name="hy" id="hy" />
</div>
<div>
h2 x: <input type="text" name="hx2" id="hx2" />
h2 y: <input type="text" name="hy2" id="hy2" />
</div>
</div>
<!-- /DEBUG -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.2.min.js"><\/script>')</script>
<script src="js/libs/bootstrap/bootstrap.min.js"></script>
<script src="js/script.js"></script>
<script>
var _gaq=[['_setAccount','UA-31479393-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
<!-- Game scripts -->
<script src="./js/mouse.js"></script>
<script src="./js/point2D.js"></script>
<script src="./js/piece.js"></script>
<script src="./js/holder.js"></script>
<script src="./js/game.js?a=2"></script>
<script src="./js/init.js?a=2"></script>
</body>
</html>