Advertisement
eriknau

25Days-13

Dec 13th, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onGLC(glc) {
  2.     glc.loop();
  3.     // glc.size(400, 400);
  4.     glc.setDuration(10);
  5.     // glc.setFPS(20);
  6.     glc.setMode("single");
  7.     glc.setEasing(false);
  8.     // glc.setMaxColors(256);
  9.     var r = 100, g = 0, b = 0;
  10.         glc.styles.backgroundColor = "black";
  11.     var list = glc.renderList,
  12.         width = glc.w,
  13.         height = glc.h,
  14.         color = glc.color;
  15.  
  16.     var sun = list.addCircle({
  17.         x: width/2,
  18.         y: height/2,
  19.         radius: 50,
  20.         fill: true,
  21.         fillStyle: "yellow",
  22.         rotation: [0,720]
  23.     });
  24.     var marsRotator = list.addContainer({
  25.         x: width/2,
  26.         y: height/2,
  27.         rotation: [0,360]
  28.     })
  29.      var mars = list.addCircle({
  30.         parent: marsRotator,
  31.         x: 160,
  32.         y: 0,
  33.         radius: 10,
  34.         fillStyle: "orange",
  35.     });
  36.     var earth = list.addCircle({
  37.         parent: sun,
  38.         x: 100,
  39.         y: 0,
  40.         radius: 10,
  41.         fillStyle: "blue",
  42.         rotation: [0,1440]
  43.     });
  44.     list.addCircle({
  45.         parent: earth,
  46.         x: 25,
  47.         y: 0,
  48.         radius: 5,
  49.         fillStyle: "gray",
  50.         // rotation: [0,180]
  51.     });
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement