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
<link rel="stylesheet" href="css/gifplayer.css"> | |
<script src="js/jquery-1.10.2.min.js"></script> | |
<script src="js/jquery.gifplayer.js"></script> | |
<img id="banana" src="img/banana.png" data-gif="img/banana-animated.gif" class="gifs"/> | |
<img id="cheetah" src="img/cheetah.png" class="gifs"/> | |
<img id="mario" src="img/mario.png" class="gifs"/> | |
<script> | |
$('.gifs').gifplayer(); |
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
<script src="js/jquery-1.10.2.min.js"></script> | |
<script src="js/jquery.radios-to-slider.js"></script> | |
<script> | |
$(document).ready( function(){ | |
$("#radios").radiosToSlider(); | |
}); | |
</script> | |
<div id="radios"> |
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
<button id="toasty-button" style="padding:10px;">Show toasty</button> | |
<link rel="stylesheet" href="toasty.css"> | |
<script type="text/javascript" src="jquery-2.1.0.min.js"></script> | |
<script type="text/javascript" src="jquery.toasty.js"></script> | |
<script> | |
$(document).ready( function(){ | |
$("body").toasty(); |
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
<div id="cubeman" class="cubeman-wrap"> | |
<span class="cubeman-all"> | |
<span class="cubeman-head"> | |
<span class="face front"></span> | |
<span class="face back"></span> | |
<span class="face top"></span> | |
<span class="face bottom"></span> | |
<span class="face left"></span> | |
<span class="face right"></span> | |
</span> |
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
//BASE: | |
@head-width:50px; | |
@head-height:60px; | |
@head-depth:50px; | |
@body-width:25px; | |
@body-height:40px; | |
@body-depth:25px; |
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
/** | |
* Cubeman | |
*/ | |
#cubeman{ | |
margin-top:100px; | |
} | |
#spiderman{ | |
margin-top:200px; |
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
<script src="../js/jquery.dirrty.js"></script> | |
<script> | |
$("#my-form").dirrty({ | |
onDirty: function(){ | |
$("#status").html("dirty"); | |
$("#save").removeAttr("disabled"); | |
$("#status").removeClass("clean"); | |
}, | |
onClean: function(){ | |
$("#status").html("clean"); |
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
$("#form-id").dirrty("isDirty"); |
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
client.on('joinGame', function(tank){ | |
console.log(tank.id + ' joined the game'); | |
var initX = getRandomInt(40, 900); | |
var initY = getRandomInt(40, 500); | |
client.emit('addTank', { id: tank.id, type: tank.type, isLocal: true, x: initX, y: initY, hp: TANK_INIT_HP }); | |
client.broadcast.emit('addTank', { id: tank.id, type: tank.type, isLocal: false, x: initX, y: initY, hp: TANK_INIT_HP} ); | |
game.addTank({ id: tank.id, type: tank.type, hp: TANK_INIT_HP}); | |
}); |
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
setInterval(function(){ | |
g.mainLoop(); | |
}, INTERVAL); | |
mainLoop: function(){ | |
if(this.localTank != undefined){ | |
this.sendData(); //send data to server about local tank | |
} | |
if(this.localTank != undefined){ |
OlderNewer