Skip to content

Instantly share code, notes, and snippets.

@ukris
ukris / parallel.js
Last active August 29, 2015 14:21 — forked from ded/parallel.js
function parallel() {
var args = Array.apply(null, arguments)
, callback = args.pop()
, returns = []
, len = 0
args.forEach(function (el, i) {
el(function () {
var a = Array.apply(null, arguments)
, e = a.shift()
if (e) return callback(e)
@ukris
ukris / famo cube
Last active August 29, 2015 14:00
Rotate Cube in FAMO.US - NOT WORKING Replicate this //http://codepen.io/AllanDennis/pen/enaIj in FAMO.US- Demonstrate Transform and Touch Event
//http://codepen.io/AllanDennis/pen/enaIj
// Replicate the above coeepen in FAMO.US
//This should enable understanding of FAMO.US perspective, rotation and event handling
// ** NOT WORKING
define(function(require, exports, module) {
var matrix;
var x,y,rot,scale;
var rotate = [
[0,0,0],
[0, 90,0],
@ukris
ukris / FAMO.US - confetti
Created May 2, 2014 03:59
FAMO.US - NOOB Example using Modifier and Transform
define(function(require, exports, module) {
var matrix;
var x,y,rot,scale;
function confetti() {
for (var i=1;i<=colors.length;i++) {
x = Math.floor(Math.random() * 15) + 1
y = Math.floor(Math.random() * 10) + 1