Skip to content

Instantly share code, notes, and snippets.

@rachsmithcodes
Last active June 20, 2016 17:13
Show Gist options
  • Save rachsmithcodes/4cd42b2a3bcb9a3f80767681ff01fdf3 to your computer and use it in GitHub Desktop.
Save rachsmithcodes/4cd42b2a3bcb9a3f80767681ff01fdf3 to your computer and use it in GitHub Desktop.
box loop
function onGLC(glc) {
glc.loop();
glc.size(400, 400);
glc.setDuration(2);
glc.setFPS(30);
glc.setMode('bounce');
glc.setEasing(true);
glc.styles.backgroundColor = '#eee';
var list = glc.renderList,
width = glc.w,
height = glc.h,
color = glc.color;
for (var x = 14; x < 420; x+=31) {
var hue = 150+(x*0.15);
list.addIsobox({
x: x,
y: 240,
h: 100,
size: 22,
scaleY: [0.2, 1],
translationY: [-30, 0],
colorTop: color.hsv(hue, 0.9, 1),
colorRight: color.hsv(hue, 0.9, 0.85),
colorLeft: color.hsv(hue, 0.9, 0.7),
phase: 0.002*x
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment