1. petraszd
  2. transparency-2012-bancrupt

Commits

petraszd  committed 0ed8b3d

Slider improvments

  • Participants
  • Parent commits cb19dda
  • Branches master

Comments (0)

Files changed (1)

File main.js

View file
   for (var i = 0, c; c = circles[i]; ++i) {
     c.remove();
   }
+  circles = [];
 
-  generateStaticCircles(points, 1.0);
+  generateStaticCircles(points, 1.0, 1.0);
   if (step - 1 >= 0)  {
-    generateStaticCircles(data[step - 1], 0.75);
+    generateStaticCircles(data[step - 1], 0.75, 1.0);
   }
   if (step - 2 >= 0)  {
-    generateStaticCircles(data[step - 2], 0.5);
+    generateStaticCircles(data[step - 2], 0.5, 1.0);
   }
   if (step - 3 >= 0)  {
-    generateStaticCircles(data[step - 3], 0.25);
+    generateStaticCircles(data[step - 3], 0.25, 1.0);
   }
-  if (step - 4 >= 0)  {
-    generateStaticCircles(data[step - 4], 0.1);
+
+  if (step + 1 < data.length)  {
+    generateStaticCircles(data[step + 1], 1, 0.75);
+  }
+  if (step + 2 < data.length)  {
+    generateStaticCircles(data[step + 2], 1, 0.5);
+  }
+  if (step + 3 < data.length)  {
+    generateStaticCircles(data[step + 3], 1, 0.25);
   }
 }
 
-function generateStaticCircles (points, alpha) {
+function generateStaticCircles (points, alpha, radiusMultiply) {
   for (var i = 0, p; p = points[1][i]; ++i) {
     var key = '' + step + ':' + i;
     var pos;