Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit 05a4ac5cc0c431e407a9eebc4dd95c7989882923 @jasonmcleod committed Jul 20, 2011
BIN .DS_Store
Binary file not shown.
6 README
@@ -0,0 +1,6 @@
+What it is:
+
+This project aims to be a emulation front end which runs in kiosk mode. The machine this baby runs on will need
+all the emulators and roms on the file system. It will also need a way to execute system commands. I'll be
+developing PHP and node.js scripts to do just that. In the future, there may be a websocket shuttle which could
+potentially connect to a thin executable which would fire system commands on behalf of the javascript (security nightmare :D)
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,211 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <title>funhax to the max</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="viewport" content="initial-scale=0.60, minimum-scale=0.60, maximum-scale=0.60">
+ <style type="text/css">
+
+ html {
+ overflow:hidden;
+ }
+
+ body {
+ font-family: 'Lucida Grande', Verdana, Arial;
+ font-size: 12px;
+ background:black;
+ }
+
+ #stage {
+ margin: 150px auto;
+ width: 600px;
+ height: 400px;
+ -webkit-perspective: 2000;
+ zoom:1.5;
+ }
+
+ #rotate {
+ margin: 0 auto;
+ width: 600px;
+ height: 400px;
+ -webkit-transform-style: preserve-3d;
+ }
+
+ .ring {
+ margin: 0 auto;
+ height: 110px;
+ width: 600px;
+ -webkit-transform-style: preserve-3d;
+ -webkit-animation-iteration-count: infinite;
+ -webkit-animation-timing-function: linear;
+ }
+
+
+ .poster {
+ position: absolute;
+ left: 250px;
+ width: 100px;
+ overflow:hidden;
+ height: 160px;
+ opacity: 0.95;
+ color: rgba(0,0,0,0.9);
+ -webkit-border-radius: 3px;
+ }
+
+ .poster > p {
+ font-family: 'Georgia', serif;
+ font-size: 36px;
+ font-weight: bold;
+ text-align: center;
+ margin-top: 28px;
+ color:white;
+ }
+
+ .poster.selected {
+ position:absolute;
+ top:-10px;
+ border:2px solid white;
+ }
+
+ .poster.backmost {
+ opacity:.5;
+ /*-webkit-box-shadow: 0px 0px 5px rgba(255,255,255,.5);*/
+ }
+ .poster h1 {
+ background:black;
+ color:white;
+ border-radius:5px;
+ font-family:helvetic;
+ padding:5px;
+ font-size:11px;
+ text-align:center;
+ }
+
+ .poster img {
+ position:absolute;
+ top:0px;
+ height:135px;
+ width:100px;
+ }
+
+ #ring {
+ -webkit-animation-name: back-y-spin;
+ -webkit-animation-duration: 40s;
+ }
+
+ </style>
+
+ <script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
+
+ <script type="text/javascript">
+
+ const POSTERS_PER_ROW = 6;
+ const RING_RADIUS = 320;
+ const LEFT = -1;
+ const RIGHT = 1;
+
+ var posterAngle = 0;
+ var rotation = 0;
+ var selected = 0;
+ var games = [];
+ var allGames = [];
+
+ var current_index = POSTERS_PER_ROW;
+
+ function setup_posters (row) {
+ posterAngle = 360 / POSTERS_PER_ROW;
+ for (var i = 0; i< POSTERS_PER_ROW; i ++) {
+ $poster = $('<div></div>');
+ $poster.addClass('poster');
+ var transform = 'rotateY(' + (posterAngle * i) + 'deg) translateZ(' + RING_RADIUS + 'px)';
+ //poster.style.webkitTransform = transform;
+ $poster.css('webkitTransform',transform)
+ // setup the number to show inside the poster
+ $poster.append('<p>' + i + '</p>');
+ $poster.append('<img>');
+ $poster.attr('id','poster_' + i)
+ $(row).append($poster);
+ }
+ }
+
+ $(function() {
+
+ $.getJSON('games.php',function(msg) {
+ allGames = msg;
+ games = allGames.slice(0,POSTERS_PER_ROW);
+
+ for(var game in games) {
+ $('#poster_' + game + ' img').attr('src','covers/' + games[game].image);
+ }
+ });
+
+ setup_posters(document.getElementById('ring'));
+
+ $(document).keydown(function(e) {
+ if(e.keyCode==37) {
+ rotate(LEFT);
+ }
+ if(e.keyCode==39) {
+ rotate(RIGHT);
+ }
+ });
+ });
+
+ function rotate(dir) {
+
+ if(dir==LEFT) {
+ selected = selected > 0 ? selected-1 : POSTERS_PER_ROW-1;
+ rotation--;
+ } else {
+ selected = selected < POSTERS_PER_ROW-1 ? selected+1 : 0;
+ rotation++;
+ }
+
+ $('#ring').css({
+ '-webkit-transition':'all 200ms ease-out',
+ '-webkit-transform':'rotateY(' + (posterAngle*rotation) + 'deg)'
+ });
+
+ $('#ring .selected').removeClass('selected');
+ $('#poster_' + selected).addClass('selected');
+
+ // highlight the poster farthest away
+ var backmost = selected<POSTERS_PER_ROW/2 ? selected+POSTERS_PER_ROW/2 : selected-POSTERS_PER_ROW/2;
+
+ $('.backmost').removeClass('backmost');
+ $('#poster_' + backmost).addClass('backmost');
+
+ //games = allGames.slice(selected,selected+POSTERS_PER_ROW);
+ if(games.length<POSTERS_PER_ROW) {
+ var need = POSTERS_PER_ROW - Math.abs(selected-allGames.length);
+ var firstBit = allGames.slice(0,need);
+ //games = allGames.slice(selected,POSTERS_PER_ROW-need+selected).concat(firstBit)
+ }
+
+ console.log(games)
+ //$('.backmost img').attr('src','covers/' + games[backmost].image)
+ console.log(selected % POSTERS_PER_ROW)
+ //if(selected % POSTERS_PER_ROW==0) {
+ //$('.poster').each(function(i) {
+ // console.log(i)
+ // $(this).find('img').attr('src','covers/' + games[i].image)
+ //$(this).find('p').html(i)
+ //});
+ //}
+
+ }
+
+ </script>
+</head>
+
+ <body>
+
+ <div id="stage">
+ <div id="rotate">
+ <div id="ring" class="ring"></div>
+ </div>
+ </div>
+
+ </body>
+
+</html>
Oops, something went wrong.

0 comments on commit 05a4ac5

Please sign in to comment.