-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
1,352 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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+'),'); | ||
}); | ||
} |
Oops, something went wrong.