Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- // glc.size(400, 400);
- glc.setDuration(1.5);
- // glc.setFPS(20);
- glc.setMode('single');
- // glc.setEasing(false);
- glc.styles.backgroundColor = "black";
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- var rad = 50, shapeHt = rad*0.87, color1 = "green", color2 = "yellow";
- for(var i = -shapeHt; i<width+shapeHt;i+=shapeHt*2) {
- for(var j = -rad; j<height+rad; j+=rad*2) {
- list.addStar({
- x: [j,j+rad],
- y: [i,i+shapeHt],
- innerRadius: [rad,rad/2],
- outerRadius: shapeHt,
- points: [6,2],
- fill: true,
- fillStyle: [color1,color2],
- stroke: true,
- lineWidth: 2,
- //strokeStyle: "black",
- rotation: [30,90]
- })
- }
- }
- for(var k = -shapeHt; k<width+shapeHt;k+=shapeHt*2) {
- for(var l = -rad; l<height+rad; l+=rad*2) {
- list.addStar({
- x: [l+rad,l+rad*2],
- y: [k+shapeHt,k+shapeHt*2],
- innerRadius: [rad/2,rad],
- outerRadius: shapeHt,
- points: [2,6],
- fill: true,
- fillStyle: [color2,color1],
- stroke: true,
- lineWidth: 2,
- //strokeStyle: "black",
- rotation: [90,150]
- })
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment