This file contains hidden or 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
(function() { | |
var lastTime = 0; | |
var vendors = ['webkit', 'moz']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | |
window.cancelAnimationFrame = | |
window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; | |
} | |
if (!window.requestAnimationFrame) |
This file contains hidden or 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
do -> | |
w = window | |
for vendor in ['ms', 'moz', 'webkit', 'o'] | |
break if w.requestAnimationFrame | |
w.requestAnimationFrame = w["#{vendor}RequestAnimationFrame"] | |
w.cancelAnimationFrame = (w["#{vendor}CancelAnimationFrame"] or | |
w["#{vendor}CancelRequestAnimationFrame"]) | |
# deal with the case where rAF is built in but cAF is not. | |
if w.requestAnimationFrame |
This file contains hidden or 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://compass-style.org/reference/compass/helpers/sprites/ | |
@mixin get-sprite($map, $sprite, $repeat: no-repeat, $height: true, $width: true){ | |
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file | |
$sprite-image: sprite-file($map, $sprite); | |
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-url | |
$sprite-map: sprite-url($map); | |
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-position |
This file contains hidden or 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
<a href="#" onclick=" | |
window.open( | |
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent('http://urlofthepage.com/share/'), | |
'facebook-share-dialog', | |
'width=626,height=436'); | |
return false;" target="_blank"> Share </a> | |
<html> | |
<head> | |
<title></title> |
This file contains hidden or 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
Grid = ( function Grid() { | |
var _itemSize = 156, | |
_$content = null, _w = 0, _h = 0, _spacing, | |
_cellWidthPercent = 0.0, _totalWidth = 0, _cellWidth = 0, _spacingPercent = 0.5; | |
function Grid( $content, w, h, spacing ) { | |
_$content = $content; | |
_w = w; | |
_h = h; |
This file contains hidden or 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
baseImg = "../img/" | |
img( url ) | |
background transparent url( baseImg + url ) no-repeat | |
imgImportant( url ) | |
background transparent url( baseImg + url ) !important | |
imgRepeat( url ) | |
background transparent url( baseImg + url ) |
This file contains hidden or 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
/* | |
* Natural Sort algorithm for Javascript - Version 0.6 - Released under MIT license | |
* Author: Jim Palmer (based on chunking idea from Dave Koelle) | |
* Contributors: Mike Grier (mgrier.com), Clint Priest, Kyle Adams, guillermo | |
*/ | |
function naturalSort(a, b) { | |
var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi, | |
sre = /(^[ ]*|[ ]*$)/g, | |
dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/, | |
hre = /^0x[0-9a-f]+$/i, |
This file contains hidden or 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
# if engine.isWebGL() | |
# PIXI.updateWebGLTexture @_texture.baseTexture, engine.getRenderer().gl |
This file contains hidden or 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
/* | |
** Copyright (c) 2012, Romain Dura [email protected] | |
** | |
** Permission to use, copy, modify, and/or distribute this software for any | |
** purpose with or without fee is hereby granted, provided that the above | |
** copyright notice and this permission notice appear in all copies. | |
** | |
** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
** WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
** MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
This file contains hidden or 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
/** | |
* @author Mat Groves http://matgroves.com/ @Doormat23 | |
*/ | |
/** | |
* The AlphaMaskFilter2 class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. | |
* You can use this filter to apply all manor of crazy warping effects | |
* Currently the r property of the texture is used to offset the x and the g property of the texture is used to offset the y. | |
* | |
* @class AlphaMaskFilter2 |
OlderNewer