diff --git a/LightWork_Scraper/LightWork_Scraper.pde b/LightWork_Scraper/LightWork_Scraper.pde index ee879d7..429105a 100644 --- a/LightWork_Scraper/LightWork_Scraper.pde +++ b/LightWork_Scraper/LightWork_Scraper.pde @@ -9,16 +9,17 @@ int pos; float margin =50; void setup() { - size(800, 800, P2D); + size(800, 800, JAVA2D); //wtf background(0); //initialize scraper - scrape = new Scraper("mapper-test-new.svg"); + scrape = new Scraper("mapper-lightwork-filtered-negative.svg"); scrape.init(); scrape.normCoords(); opc = new OPC(this, "fade1.local", 7890); scrape.update(); + opc.showLocations(false); //display array of points from SVG //println(scrape.getArray()); @@ -34,9 +35,9 @@ void draw() { //simple chase animation noStroke(); fill(0,0,255); - if(pos<=width)pos+=10; + if(pos<=width)pos+=5; else pos=0; - rect(pos,0,30,height); + rect(pos,0,100,height); } \ No newline at end of file diff --git a/LightWork_Scraper/Scraper.pde b/LightWork_Scraper/Scraper.pde index d08f783..28de647 100644 --- a/LightWork_Scraper/Scraper.pde +++ b/LightWork_Scraper/Scraper.pde @@ -20,11 +20,13 @@ public class Scraper { int total = child.getVertexCount(); // Now we can actually get the vertices from each child - for (int j = 1; j < total; j++) { //using 1 to fix duplicate first point issue temporarily + for (int j = 0; j < total; j++) { //using 1 to fix duplicate first point issue temporarily PVector v = child.getVertex(j); + if(v.x>=0 && v.y>=0){ v.set (v.x, v.y); loc.add(v); //print(v); + } } } }