Skip to content

Instantly share code, notes, and snippets.

@rachsmithcodes
Last active December 2, 2015 05:37
Show Gist options
  • Save rachsmithcodes/60adcdc969363a4ceb7c to your computer and use it in GitHub Desktop.
Save rachsmithcodes/60adcdc969363a4ceb7c to your computer and use it in GitHub Desktop.
25 Days of Gifmas no. 2
function onGLC(glc) {
glc.loop();
glc.size(400, 400);
glc.setDuration(2.5);
// glc.setFPS(20);
glc.setMode("single");
glc.setEasing(false);
// glc.setMaxColors(256);
var list = glc.renderList,
width = glc.w,
height = glc.h,
color = glc.color;
glc.styles.backgroundColor = '#7467a3';
// your code goes here:
for (var i = 0; i < 30; i++) {
list.addStar({
x: [400, -40],
y: [-40*1.2, 200],
innerRadius: [28*0.5, 28*1.2],
outerRadius: [40*0.5, 40*1.2],
points: 5,
rotation: [45, 225],
fill: true,
shadowColor: "rgba(0, 0, 0, 0.2)",
shadowOffsetX: 5,
shadowOffsetY: 5,
shadowBlur: 20,
fillStyle: ['#e36c1e', '#eae37e'],
phase: i*0.008,
globalAlpha: i*1/30
});
list.addStar({
x: [400, -40],
y: [-40*1.2, 440],
innerRadius: [28*0.5, 28*1.2],
outerRadius: [40*0.5, 40*1.2],
points: 5,
rotation: [45, 225],
fill: true,
shadowColor: "rgba(0, 0, 0, 0.2)",
shadowOffsetX: 5,
shadowOffsetY: 5,
shadowBlur: 20,
fillStyle: ['#e36c1e', '#eae37e'],
phase: i*0.008,
globalAlpha: i*1/30
});
list.addStar({
x: [400, 200],
y: [-40*1.2, 440],
innerRadius: [28*0.5, 28*1.2],
outerRadius: [40*0.5, 40*1.2],
points: 5,
rotation: [45, 225],
fill: true,
shadowColor: "rgba(0, 0, 0, 0.2)",
shadowOffsetX: 5,
shadowOffsetY: 5,
shadowBlur: 20,
fillStyle: ['#e36c1e', '#eae37e'],
phase: i*0.008,
globalAlpha: i*1/30
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment