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
//Math.floor( a * 2 ) | |
a = a << 1 | |
// Math.floor( a / 2 ) | |
a = a >> 1 |
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
/* The Grid ---------------------- */ | |
.row { width: 1080px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
.row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.row.large-collapse .column, | |
.row.large-collapse .columns { padding: 0; } | |
.row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.row .row.large-collapse { margin: 0; } | |
.column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
.column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
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
var interval; | |
var displayTime = 4000; | |
function wait( delay ) { | |
stop(); | |
interval = setInterval(waitContinue, delay); | |
} | |
function waitContinue() { | |
play(); |
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
$.fn.reverse = [].reverse; |
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
var aspectRatio = width / height; | |
if( height > APP.height ) { | |
height = APP.height; | |
width = height * aspectRatio; | |
} else if( width > APP.width ) { | |
width = APP.width; | |
height = width / aspectRatio; | |
} |
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
var renderToCanvas = function (width, height, renderFunction) { | |
var buffer = document.createElement('canvas'); | |
buffer.width = width; | |
buffer.height = height; | |
renderFunction(buffer.getContext('2d')); | |
return buffer; | |
}; |
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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller | |
// fixes from Paul Irish and Tino Zijdel | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { |
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
.ir { | |
border: 0; | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
background-color: transparent; | |
} |
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
<!doctype html> | |
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]--> | |
<!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]--> | |
<!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]--> | |
<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<title>Seitentitel</title> | |
<meta charset="utf-8" /> | |
<meta name="description" content="Kurzbeschreibung der Seite, idealerweise unter 160 Zeichen" /> |
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
/** | |
* return the distance between two points. | |
* | |
* @param {number} x1 x position of first point | |
* @param {number} y1 y position of first point | |
* @param {number} x2 x position of second point | |
* @param {number} y2 y position of second point | |
* @return {number} distance between given points | |
*/ | |
Math.getDistance = function( x1, y1, x2, y2 ) { |