Skip to content

Instantly share code, notes, and snippets.

@empireshades
Created December 2, 2015 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save empireshades/364df7d3fbd5deb14e08 to your computer and use it in GitHub Desktop.
Save empireshades/364df7d3fbd5deb14e08 to your computer and use it in GitHub Desktop.
function onGLC(glc) {
glc.loop();
// glc.playOnce();
// glc.size(400, 400);
glc.setDuration(1);
glc.setFPS(22);
// glc.setMode("single");
// glc.setEasing(false);
glc.setMaxColors(25);
glc.styles.backgroundColor = "#101010";
var list = glc.renderList,
width = glc.w,
height = glc.h,
style = glc.styles;
style.fill = false
style.stroke = true
style.lineWidth = 1
style.strokeStyle = "lightblue"
style.fillStyle = "darkblue"
style.shake = 4
for(var x = 30; x < width; x += 50 ) {
list.addCurve({
x0: x,
y0: height - 10,
x1: [width / 2 - 50, width / 2 + 50],
y1: height,
x2: width - x,
y2: 10
})
}
for(var x = 30; x < width; x += 50 ) {
list.addCurve({
x0: x,
y0: height - 10,
x1: [width / 2 + 50, width / 2 - 50],
y1: 0,
x2: width - x,
y2: 10,
phase: .25
})
}
for(var x = 30; x < width; x += 50 ) {
list.addCurve({
y0: x,
x0: 10,
y1: [width / 2 - 50, width / 2 + 50],
x1: width - 10,
y2: width - x,
x2: height - 10,
phase: .5
})
}
for(var x = 30; x < width; x += 50 ) {
list.addCurve({
y0: x,
x0: 10,
y1: [width / 2 + 50, width / 2 - 50],
x1: 0,
y2: width - x,
x2: height - 10,
phase: .75
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment