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
/* usage: | |
parallel( | |
func1, [arg, arg, arg...], | |
func2, [arg, arg, arg...], | |
... | |
function() { | |
arguments[0]; // holds output from first function | |
arguments[1]; // holds output from second function | |
} |
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
/* | |
Go to CSS deck to understand how it works | |
http://cssdeck.com/labs/mtmn9aph/0 | |
*/ | |
function align (boundX, boundY, boundW, boundH, objectW, objectH, boundAlignX, boundAlignY, objectAlignX, objectAlignY) { | |
var result = []; |
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
/* usage: | |
var image = new Image; | |
simploader(image); // also accept array of images | |
image.src = "something.png"; | |
simploader(function() { |
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 easings = { | |
linear: function(t, b, c, d) { | |
return c * t / d + b; | |
}, | |
inQuad: function(t, b, c, d) { | |
return c * (t /= d) * t + b; | |
}, |
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
/* example Kohana/CodeIgniter like controller */ | |
module.exports = { | |
default: function(args, callback) { | |
}, | |
article: function(args, callback) { | |
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
/* | |
Playground 1.1 | |
http://canvasquery.org | |
(c) 2012-2014 http://rezoner.net | |
Playground may be freely distributed under the MIT license. | |
*/ | |
function playground(args) { | |
return new Playground(args); | |
}; |
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
/* | |
A full list of simple easing equations inspired by GIST from greweb - https://gist.github.com/gre/1650294 | |
Equations source - http://gsgd.co.uk/sandbox/jquery/easing/ | |
*/ | |
{ | |
linear: function(t) { | |
return t | |
}, | |
inQuad: function(t) { |
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 app = playground({ | |
create: function() { | |
this.renderer = new THREE.WebGLRenderer(); | |
document.body.appendChild(app.renderer.domElement); | |
}, |
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 app = playground({ | |
use: { | |
"three": { | |
renderer: "webgl" | |
}, | |
}, |
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
/* | |
ThreeJS bootstrap plugin | |
Sets up three.js render for an application | |
Sets up separate camera and scene for each state | |
*/ | |
playground.plugins.three = { |
OlderNewer