Previous commit
parent
b77c073169
commit
3468925f9d
123
index.html
123
index.html
|
@ -1,123 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmanifest="cache.manifest">
|
|
||||||
<head>
|
|
||||||
<title>The Bunnies, Inc. </title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
|
|
||||||
<link rel="icon" type="image/png" href="assets/icon.png" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<meta name="author" content="ambc">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="loading">
|
|
||||||
<div id="loadingc">
|
|
||||||
<div class="loading"></div>
|
|
||||||
Loading...
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tgp">Pause</div>
|
|
||||||
|
|
||||||
<div id="bar">
|
|
||||||
<div id="sec"></div>
|
|
||||||
<div id="kills"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tgpm">
|
|
||||||
<h1>Paused</h1>
|
|
||||||
<div id="cont" class="btn">▶ Continue playing</div>
|
|
||||||
<div id="endg" class="btn">End game</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="menu">
|
|
||||||
<h1>The Bunnies, Inc. <sup>ALPHA</sup></h1>
|
|
||||||
<div id="play-holder">
|
|
||||||
<div id="play-b-holder"><div id="play" class="btn">Play</div></div>
|
|
||||||
<div id="opt-holder">
|
|
||||||
<select id="opt-maptype">
|
|
||||||
<option value="h">Hybrid</option>
|
|
||||||
<option value="r">Roadmap</option>
|
|
||||||
<option value="s" selected="selected">Satellite (Recomended)</option>
|
|
||||||
<option value="t">Terrain</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="high" class="btn" onClick="alert('The bunnies have not made this work yet! ');">Highscores</div>
|
|
||||||
<div class="btn" id="about">About</div>
|
|
||||||
<a href="http://ambrosechua.github.com/thebunniesinc/" class="btn">How to play</a>
|
|
||||||
<span style="font-size: 12px;">Alpha Version 2.0.0 release 14</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="aboutc">
|
|
||||||
<h1>About</h1>
|
|
||||||
The Bunnies Inc. by <!-- <img src="assets/ambc.png" width="50" /> -->ambc<br />
|
|
||||||
<br />
|
|
||||||
<h3>Starring</h3>
|
|
||||||
The Bunnies, <br />
|
|
||||||
Google Maps and <br />
|
|
||||||
<!--<img src="assets/ft.png" width="200" /> -->
|
|
||||||
<a href="http://www.w3.org/html/logo/">
|
|
||||||
<img src="http://www.w3.org/html/logo/badge/html5-badge-h-css3-graphics-storage.png" width="197" height="64" alt="HTML5 Powered with CSS3 / Styling, Graphics, 3D & Effects, and Offline & Storage" title="HTML5 Powered with CSS3 / Styling, Graphics, 3D & Effects, and Offline & Storage">
|
|
||||||
</a>
|
|
||||||
<br />
|
|
||||||
Entire game licensed under <a href="LICENSE.md">MIT</a>. <br />
|
|
||||||
Parts of this game includes code from other sources. <br />
|
|
||||||
<a href="https://github.com/ambrosechua/thebunniesinc/commits/master">Release history. </a> | <a href="http://ambrosechua.github.com/thebunniesinc/">Website. </a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<canvas id="you"><h1>Aww, snap! </h1><p>Please use a updated browser to play. </p></canvas>
|
|
||||||
|
|
||||||
<div id="frame">
|
|
||||||
<div id="bunny"></div>
|
|
||||||
<div class="enemy"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="dirh">
|
|
||||||
<div id="dir"> </div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="map_canvas"></div>
|
|
||||||
|
|
||||||
<div id="dpf">▲</div>
|
|
||||||
<div id="dpb">▼</div>
|
|
||||||
<div id="dpl">◀</div>
|
|
||||||
<div id="dpr">▶</div>
|
|
||||||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBTw2l8fjcXamgL0HasFr0CLPe54qFl_AA&sensor=true">
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
var _gaq = _gaq || [];
|
|
||||||
_gaq.push(['_setAccount', 'UA-38941535-1']);
|
|
||||||
_gaq.push(['_trackPageview']);
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
||||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
||||||
})();
|
|
||||||
|
|
||||||
pos = new google.maps.LatLng(1.312548, 103.825548);
|
|
||||||
|
|
||||||
google.maps.visualRefresh=true;
|
|
||||||
var mapOptions = {
|
|
||||||
center: pos,
|
|
||||||
zoom: 18,
|
|
||||||
disableDefaultUI: true,
|
|
||||||
draggable: false,
|
|
||||||
scrollwheel: false,
|
|
||||||
disableDoubleClickZoom: true,
|
|
||||||
mapTypeId: google.maps.MapTypeId.SATELLITE
|
|
||||||
};
|
|
||||||
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript" src="main.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(window).load(function () {
|
|
||||||
$("#loading").fadeOut(300, function() { $(this).remove(); });
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
375
main.css
375
main.css
|
@ -1,375 +0,0 @@
|
||||||
|
|
||||||
@import url(http://fonts.googleapis.com/css?family=Londrina+Solid|Londrina+Shadow);
|
|
||||||
* {
|
|
||||||
margin: 0;
|
|
||||||
outline: none;
|
|
||||||
padding: 0;/*
|
|
||||||
-webkit-touch-callout: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-khtml-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;*/
|
|
||||||
user-select: none;
|
|
||||||
font-family: "Londrina Solid";/*
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
-moz-box-sizing: border-box;*/
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
html {
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
background-color: #222;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
background-color: #222;
|
|
||||||
color: #eee;
|
|
||||||
text-align: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
font-size: 20px;
|
|
||||||
line-height: 20px;
|
|
||||||
vertical-align: middle;
|
|
||||||
overflow: hidden;
|
|
||||||
cursor: url(assets/cursor.png) 4 4, auto;
|
|
||||||
}
|
|
||||||
#loading {
|
|
||||||
background-color: #aaa;
|
|
||||||
color: rgba(0, 0, 0, 0.5);
|
|
||||||
text-align: center;
|
|
||||||
z-index: 9990;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
backface-visibility: hidden;
|
|
||||||
}
|
|
||||||
#loadingc {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
z-index: 9999;
|
|
||||||
margin: -50px 0 0 -100px;
|
|
||||||
height: 100px;
|
|
||||||
width: 200px;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes loading {
|
|
||||||
from {
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}/*
|
|
||||||
@-moz-keyframes loading {
|
|
||||||
from {
|
|
||||||
-moz-transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-moz-transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@-webkit-keyframes loading {
|
|
||||||
from {
|
|
||||||
-webkit-transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@-ms-keyframes loading {
|
|
||||||
from {
|
|
||||||
-ms-transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-ms-transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@-o-keyframes loading {
|
|
||||||
from {
|
|
||||||
-o-transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-o-transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
.loading {
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
margin-right: 0px;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
|
||||||
border-radius: 10px;
|
|
||||||
border-top-right-radius: 0px;/*
|
|
||||||
-webkit-border-radius: 10px;
|
|
||||||
-webkit-border-top-right-radius: 0px;
|
|
||||||
-moz-border-radius: 10px;
|
|
||||||
-moz-border-top-right-radius: 0px;
|
|
||||||
-o-border-radius: 10px;
|
|
||||||
-o-border-top-right-radius: 0px;
|
|
||||||
-ms-border-radius: 10px;
|
|
||||||
-ms-border-top-right-radius: 0px;*/
|
|
||||||
animation: loading 1s infinite;/*
|
|
||||||
-webkit-animation: loading 1s infinite;
|
|
||||||
-moz-animation: loading 1s infinite;
|
|
||||||
-o-animation: loading 1s infinite;
|
|
||||||
-ms-animation: loading 1s infinite;*/
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
#map_canvas {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
#dpf, #dpb, #dpl, #dpr {
|
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
line-height: 50px;
|
|
||||||
font-size: 20px;
|
|
||||||
border: 1px solid #999;
|
|
||||||
border-radius: 10px;
|
|
||||||
background-color: #bbb;
|
|
||||||
color: #333;
|
|
||||||
opacity: 0.8;
|
|
||||||
z-index: 3;
|
|
||||||
}
|
|
||||||
#dpf:active, #dpb:active, #dpl:active, #dpr:active {
|
|
||||||
background-color: #aaa;
|
|
||||||
border: 1px solid #888;
|
|
||||||
}
|
|
||||||
#dpf {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 130px;
|
|
||||||
right: 60px;
|
|
||||||
}
|
|
||||||
#dpb {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 30px;
|
|
||||||
right: 60px;
|
|
||||||
}
|
|
||||||
#dpl {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 80px;
|
|
||||||
right: 110px;
|
|
||||||
}
|
|
||||||
#dpr {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 80px;
|
|
||||||
right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#bar {
|
|
||||||
background-color: rgba(0, 0, 0, 0.0);
|
|
||||||
z-index: 2;
|
|
||||||
color: #eee;
|
|
||||||
padding: 10px 0px;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
vertical-align: middle;
|
|
||||||
border: 1px solid rgba(0, 0, 0, 0.0);
|
|
||||||
}
|
|
||||||
#you {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
z-index: 2;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
#menu, #tgpm, #aboutc {
|
|
||||||
text-align: center;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 6;
|
|
||||||
background-color: rgba(0, 0, 0, 0.8);
|
|
||||||
}
|
|
||||||
#menu > h1 {
|
|
||||||
font-family: "Londrina Shadow";
|
|
||||||
padding: 30px 10px;
|
|
||||||
font-size: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
word-spacing: 20px;
|
|
||||||
background: transparent url("assets/the-bunnies.png") center center no-repeat;
|
|
||||||
background-size: 250px 40px;
|
|
||||||
color: transparent;
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
font-family: "Londrina Shadow";
|
|
||||||
padding: 30px 10px;
|
|
||||||
font-size: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
font-family: "Londrina Shadow";
|
|
||||||
font-size: 25px;
|
|
||||||
padding: 15px 5px;
|
|
||||||
line-height: 25px;
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
.btn {
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 10px;
|
|
||||||
margin: 10px auto;
|
|
||||||
box-shadow: -5px -5px 1px rgba(255, 255, 255, 0.25);
|
|
||||||
border: 1px dashed #fff;
|
|
||||||
font-size: 20px;
|
|
||||||
display: block;
|
|
||||||
width: 200px;
|
|
||||||
background-color: rgba(255, 255, 255, 0.5);
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.btn:hover {
|
|
||||||
box-shadow: -3px -3px 1px rgba(255, 255, 255, 0.25);
|
|
||||||
position: relative;
|
|
||||||
top: -2px;
|
|
||||||
left: -2px;
|
|
||||||
background-color: rgba(255, 255, 255, 0.4);
|
|
||||||
}
|
|
||||||
#dir {
|
|
||||||
width: 2px;
|
|
||||||
height: 100px;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
#dirh {
|
|
||||||
width: 2px;
|
|
||||||
height: 200px;
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
top: 50%;
|
|
||||||
z-index: 2;
|
|
||||||
margin: -100px 0 0 -1px;
|
|
||||||
}
|
|
||||||
#tgp {
|
|
||||||
margin: 0;
|
|
||||||
width: auto;
|
|
||||||
padding: 10px 5px;
|
|
||||||
z-index: 4;
|
|
||||||
line-height: 20px;
|
|
||||||
position: absolute;
|
|
||||||
right: 0px;
|
|
||||||
top: 0px;
|
|
||||||
font-size: 20px;
|
|
||||||
display: none;
|
|
||||||
/* box-shadow: -5px 5px 1px rgba(255, 255, 255, 0.25); */
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
background: transparent url("assets/pauseplay.png") no-repeat right top;
|
|
||||||
width: 42px;
|
|
||||||
background-size: 42px 84px;
|
|
||||||
color: transparent;
|
|
||||||
}
|
|
||||||
#tgp:hover {
|
|
||||||
/* box-shadow: -3px 3px 1px rgba(255, 255, 255, 0.25); */
|
|
||||||
position: absolute;
|
|
||||||
right: 2px;
|
|
||||||
top: 2px;
|
|
||||||
}
|
|
||||||
#tgpm, #aboutc {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
#aboutc {
|
|
||||||
line-height: 25px;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
#play-holder {
|
|
||||||
width: 600px;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
margin-bottom: -10px;
|
|
||||||
}
|
|
||||||
#play-b-holder {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
#opt-holder {
|
|
||||||
display: inline-block;
|
|
||||||
height: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
transition: all 1s;
|
|
||||||
float: right;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 20px;
|
|
||||||
width: 200px;
|
|
||||||
/* background-color: rgba(255, 255, 255, 0.5); */
|
|
||||||
text-decoration: none;
|
|
||||||
margin-top: -42px;
|
|
||||||
margin-right: -10px;
|
|
||||||
background: rgba(255, 255, 255, 0.1) url(assets/wrench.png) no-repeat 5px 5px;
|
|
||||||
}
|
|
||||||
#play-holder:hover > #opt-holder {
|
|
||||||
height: 75px;
|
|
||||||
}
|
|
||||||
#opt-holder > select {
|
|
||||||
margin: 20px 20px;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
color: #fff;
|
|
||||||
padding: 3px;
|
|
||||||
box-shadow: -5px -5px 1px rgba(255, 255, 255, 0.15);
|
|
||||||
border: 1px dashed #fff;
|
|
||||||
font-size: 15px;
|
|
||||||
display: block;
|
|
||||||
background-color: rgba(255, 255, 255, 0.3);
|
|
||||||
text-decoration: none;
|
|
||||||
border-radius: 0;
|
|
||||||
background-image: none;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
#opt-holder > select:hover {
|
|
||||||
box-shadow: -3px -3px 1px rgba(255, 255, 255, 0.15);
|
|
||||||
position: relative;
|
|
||||||
top: -2px;
|
|
||||||
left: -2px;
|
|
||||||
background-color: rgba(255, 255, 255, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 > sup {
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 13px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
#sec {
|
|
||||||
float: center;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
#kills {
|
|
||||||
float: left;
|
|
||||||
display: inline-block;
|
|
||||||
margin-left: 30px;
|
|
||||||
}
|
|
||||||
#frame {
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
#bunny {
|
|
||||||
display: none;
|
|
||||||
width: 100px;
|
|
||||||
height: 175px;
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
margin-top: -82.5px;
|
|
||||||
margin-left: -50px;
|
|
||||||
background: url(assets/you.png);
|
|
||||||
background-size: 100% 100%;
|
|
||||||
z-index: 3;
|
|
||||||
}
|
|
||||||
.enemy {
|
|
||||||
display: block;
|
|
||||||
width: 100px;
|
|
||||||
height: 175px;
|
|
||||||
position: absolute;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
margin-top: -82.5px;
|
|
||||||
margin-left: -50px;
|
|
||||||
background: url(assets/eknife.png);
|
|
||||||
background-size: 100% 100%;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
Loading…
Reference in New Issue