Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
alcalyn committed Dec 17, 2014
2 parents e5acf20 + 550cf02 commit c4caa6d
Show file tree
Hide file tree
Showing 26 changed files with 1,352 additions and 3 deletions.
Empty file added .gitignore
Empty file.
49 changes: 46 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
xmas-pirate-race
================
Christmas pirate race
=====================

Display teams scores through an exciting pirates boats race for Darkmira Xmas blind-test !
Display teams scores through an exciting pirates boats race.
Project created for the Darkmira Xmas blind-test event.

![Treasure map and boats](readme-treasure-map.jpg)

Developed by [Darkmira](http://www.darkmira.fr/).


### Prerequisites

- Browser compatible with css3 ([use filter property, see compatibility](http://caniuse.com/#feat=css-filters))
- A saber and brave crews to board your ship


## Using

Simply open index.html in your browser, and start to count points to each team
by clicking + or - in the menu.

Boats will then navigate to the treasure.


### Features

- Add or remove point to teams
- Change team name


### Advanced usage

- Add or remove boats by changing `Config.boatsNumber` in model.js, and uncommenting UI items in index.html

- Invoke Poseidon to create more or less waves:

``` js
Poseidon.createWaves(32);
```


## License

This project in under GNU License.

[See complete License here](LICENSE)
5 changes: 5 additions & 0 deletions css/bootstrap.min.css

Large diffs are not rendered by default.

95 changes: 95 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
@font-face {
font-family: pirate;
src: url(../fonts/black-sams-gold.ttf);
}

body {
font-family: pirate;
background: url("../img/background-wood.jpg");
}

.container-fluid {
padding-left: 0;
padding-right: 0;
}

#sea {
width: 1300px;
margin: auto;
}

#waves {
position: absolute;
}

.boat {
position: absolute;
}

.color-0, .boat:nth-child(1) {
color: red;
-webkit-filter: hue-rotate(150deg) saturate(0.75);
}
.color-1, .boat:nth-child(2) {
color: red;
-webkit-filter: hue-rotate(40deg) saturate(0.75);
}
.color-2, .boat:nth-child(3) {
color: red;
-webkit-filter: hue-rotate(200deg) saturate(0.75);
}
.color-3, .boat:nth-child(4) {
color: red;
-webkit-filter: hue-rotate(240deg) saturate(0.75);
}
.color-4, .boat:nth-child(5) {
color: red;
-webkit-filter: hue-rotate(290deg) saturate(0.75);
}

#ui {
height: auto;
background-image: url(../img/bg-boat.jpg), url(../img/bg.jpg);
background-repeat: no-repeat, repeat;
background-position: right bottom, 0 0;
}

#ui h2 {
padding-top: 15px;
}

#ui .team {
margin-top: 24px;
padding-bottom: 18px;
border-bottom: 2px dashed rgba(0, 0, 0, 0.15);
}
#ui input {
border: none;
background: none;
font-size: 26px;
padding: 4px 8px;
box-shadow: none;
text-align: center;
}
#ui .team .score {
font-size: 48px;
margin: 0;
}
#ui .team .more {
width: 100px;
}

@media (min-width: 992px) and (max-width: 1560px) {
.col-md-2 {
width: 100% !important;
}
}

@media (min-width: 1561px) {
#ui {
height: 980px;
position: fixed;
right: 0;
width: 300px;
}
}
Binary file added fonts/black-sams-gold.ttf
Binary file not shown.
Binary file added fonts/glyphicons-halflings-regular.eot
Binary file not shown.
229 changes: 229 additions & 0 deletions fonts/glyphicons-halflings-regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fonts/glyphicons-halflings-regular.ttf
Binary file not shown.
Binary file added fonts/glyphicons-halflings-regular.woff
Binary file not shown.
Binary file added img/background-wood.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/bg-boat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/map-pirate-race.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/pirate-boat-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/pirate-boat-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/pirate-boat-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/pirate-boat-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html>
<head>
<title>Bateaux pirates</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<div class="row">
<div id="sea" class="col-md-10">
<div id="map"><img src="img/map-pirate-race.png" class="img-responsive" /></div>
<div id="waves">
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
</div>
</div>

<div id="ui" class="col-md-2">
<div class="text-center">
<h2>Planche à points</h2>
<div id="team-0" class="team" data-boat="0">
<input value="Equipe 1" class="form-control input-lg color-0" />
<p class="score color-0">0</p>
<div class="btn-group" role="group">
<button type="button" class="btn btn-success more">+</button>
<button type="button" class="btn btn-danger less">-</button>
</div>
</div>
<div id="team-1" class="team" data-boat="1">
<input value="Equipe 2" class="form-control input-lg color-1" />
<p class="score color-1">0</p>
<div class="btn-group" role="group">
<button type="button" class="btn btn-success more">+</button>
<button type="button" class="btn btn-danger less">-</button>
</div>
</div>
<div id="team-2" class="team" data-boat="2">
<input value="Equipe 3" class="form-control input-lg color-2" />
<p class="score color-2">0</p>
<div class="btn-group" role="group">
<button type="button" class="btn btn-success more">+</button>
<button type="button" class="btn btn-danger less">-</button>
</div>
</div>
<!--
<div id="team-4" class="team col-md-12" data-boat="3">
<input value="Equipe 4" class="form-control input-lg color-3" />
<p class="score color-3">0</p>
<div class="btn-group" role="group">
<button type="button" class="btn btn-success more">+</button>
<button type="button" class="btn btn-danger less">-</button>
</div>
</div>
<div id="team-5" class="team col-md-12" data-boat="4">
<input value="Equipe 5" class="form-control input-lg color-4" />
<p class="score color-4">0</p>
<div class="btn-group" role="group">
<button type="button" class="btn btn-success more">+</button>
<button type="button" class="btn btn-danger less">-</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>

<script src="js/jquery.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/model.js"></script>
<script src="js/main.js"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions js/bootstrap.min.js

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions js/debug.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* Debug function to display path.
* Call it again to remove path.
* Call it again to re-display path.
* Call it again to re-remove path.
* Call it again to re-display one more time if you are not sure the last times.
* And so on...
*/
function displayMainPath() {
if ($('.main-path-debug').size()) {
$('.main-path-debug').remove();
return;
}

for (var i = 0; i <= 1.0; i += 0.0025) {
var $p = $('<p class="main-path-debug">.</p>');
var pos = Poseidon.seaPath.getPosition(i);

$p.css({
position: 'absolute',
left: pos.x+'px',
top: pos.y+'px'
});

$('#sea').append($p);
}
}

/**
* Use it to trace a path with mouse.
*/
function logClicks() {
$('#sea').click(function (e) {
var origin = $('#sea').position();
var p = new Point(e.pageX - origin.left, e.pageY - origin.top);
console.log('new Point('+p.x+', '+p.y+'),');
});
}
Loading

0 comments on commit c4caa6d

Please sign in to comment.