{
while(width()< g.position+1)
{
- graphicBuffer.add(color(0,0,0));
+ graphicBuffer.add(lx.hsb(0,0,0));
}
drawAll();
displayList.put(name , g);
{
while(width()< g.position + g.width())
{
- graphicBuffer.add(color(0,0,0));
+ graphicBuffer.add(lx.hsb(0,0,0));
}
if(g.changed)
{
return displayList.get(name);
}
- public void run(int deltaMs)
+ public void run(double deltaMs)
{
drawToPointList();
}
{
((Granim) g).update();
}
- List<Point> drawList = model.points.subList(Math.min(g.position,colors.length-1), Math.min(g.position + g.width(),colors.length-1));
- println("drawlistsize "+drawList.size());
+ List<LXPoint> drawList = model.points.subList(Math.min(g.position,colors.length-1), Math.min(g.position + g.width(),colors.length-1));
+ //println("drawlistsize "+drawList.size());
gbuffer = g.graphicBuffer.toArray(new Integer[0]);
{
colors[drawList.get(i).index] = gbuffer[i];
}
- g.changed =false;
+ g.changed = false;
}
}
{
for(int i = 0; i < len ;i++)
{
- graphicBuffer.add(color(0,255,255));
+ graphicBuffer.add(lx.hsb(0,255,255));
}
}
};
_len=len;
addGraphic("myrandoms", makeGraphic(len));
}
+ int colorLid=0;
public Graphic makeGraphic(int len)
{
+
int[] colors= new int[len];
for(int i =0;i<len;i++)
{
- colors[i]=(int) Math.round(Math.random()*255);
+ colors[i]=(int) Math.round(Math.random()*80)+colorLid;
+
}
+ colorLid+=4;
return new ColorDotsGraphic(colors);
}
private int count =1;
private int instanceCount =0;
public void update()
{
- super.update();
- if(instanceCount<50 && count % 20==0)
+
+ if(instanceCount<90 && count % 20==0)
{
instanceCount++;
Graphic h=addGraphic("myrandoms_"+instanceCount, makeGraphic(_len));
h.position = instanceCount*(_len+100);
- println("one more " + instanceCount+" at "+h.position);
+ //println("one more " + instanceCount+" at "+h.position);
count=0;
changed = true;
}
count++;
-
+ super.update();
}
};
super();
for (int colorVal : colorSequence)
{
- graphicBuffer.add(color(colorVal, 255, 255));
+ graphicBuffer.add(lx.hsb(colorVal, 255, 255));
}
changed = true;
}