/
index.html
117 lines (93 loc) · 3.85 KB
/
index.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
<!doctype html>
<html>
<head>
<title>Nodecraft - NodeJS + ThreeJS + Minecraft</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<script src="libs/jquery/jquery-1.7.2.min.js"></script>
<script src="libs/modernizr/modernizr.js"></script>
<script src="libs/threejs/Detector.js"></script>
<!-- This script is returned by socket.io package and does not exist as a regular file in the filesystem -->
<script src="/socket.io/socket.io.js"></script>
<script src="libs/coffeescript/coffee-script.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript">
$(document).ready(function(){
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
$('html').addClass('mobile');
Modernizr.load({
test: Modernizr.deviceorientation,
yep : 'mobile.js'
});
}else{
$('html').addClass('desktop');
Modernizr.load({
test: Modernizr.webgl,
yep : ['libs/threejs/Three.js','libs/threejs/Stats.js','libs/threejs/ImprovedNoise.js','minecraft.js','desktop.js']
});
}
$('#closeCredits, #openCredits').click(function(){
$('#credits').toggle();
});
});
</script>
</head>
<body>
<div id="container"></div>
<div id="mobileInput">
<h1>NodeCraft</h1>
<p>Visit this page on your desktop and enter the code on screen below...</p>
<input type="text" pattern="[0-9]*" placeholder="e.g. 12345">
<span class="btn">Connect!</span>
</div>
<div id="creditsBar">
<h1 class="pull-left">NodeCraft</h1>
<h2 class="pull-left"><a href="#">http://github.com/adambutler/nodecraft/</a></h2>
<span id="openCredits" class="btn pull-right">Credits & Info</span>
</div>
<div id="desktopConnect" class="modal hide">
<div class="content">
<h1>Awesome! Lets get started</h1>
<h2>Go to...<br/><small>http://nodecraft.lab.io</small><br/>on your iOS or Android device and type in this code...<br/><small id="connectionID">wait...</small></i></h2>
<hr>
<h2>Status:<br/><small class="status">Waiting for connection</small></h2>
</div>
</div>
<div id="credits" class="modal hide">
<div class="content">
<p><b>NodeCraft</b> is a project by <a href="http://www.twitter.com/adambu1988">Adam Butler</a> as a tech demo for Mobile, WebGL, Node and WebSockets.</p>
<h2>Built with...</h2>
<ul>
<li><a href="http://nodejs.org/">Node.js</a></li>
<li><a href="https://github.com/mrdoob/three.js/">Three.js</a></li>
<li><a href="http://socket.io/">Socket.IO</a></li>
<li><a href="http://coffeescript.org/">CoffeeScript</a></li>
</ul>
<h2>Textures by...</h2>
<ul>
<li><a href="http://painterlypack.net/">Painterly Pack</a></li>
</ul>
<h2>3D Scene by...</h2>
<ul>
<li><a href="http://mrdoob.com/">mrdoob</a></li>
</ul>
<h2>Inspired by...</h2>
<ul>
<li><a href="http://minecraft.net/">Minecraft</a></li>
</ul>
<h2>Special thanks to...</h2>
<ul>
<li><a href="http://www.influxis.com/">Inflxis</a> for hosting on <a href="http://nodecloud.io/">NodeCloud.io</a></li>
<li><a href="http://www.twiter.com/hectijeff">Chris Mytton</a> for help on the project</a></li>
<li><a href="http://riothq.com/hacknight">Riot</a> for the beer!</a></li>
<li><a href="https://github.com/jbaicoianu/">bai</a> for being awesome!</li>
</ul>
<span id="closeCredits" class="btn">Close</span>
</div>
</div>
<div id="loading" class="modal hide">
<img src="img/loading.gif"><h1>Loading...</h1>
</div>
<a href="https://github.com/adambutler/nodecraft" id="gh-banner"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
</body>
</html>