Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.