I feel like this should be an easy thing to do but my brain is fried. How can I use data from a JSON object in processing.js? I've spent all day trying to figure it out.
My ajax script for storing the json looks like this: obj = JSON.parse(response);
The result of which is this: [{"x":20,"y":145},{"x":70,"y":10},{"x":18,"y":50}]...
My sketch in test.pde looks like this:
My ajax script for storing the json looks like this: obj = JSON.parse(response);
The result of which is this: [{"x":20,"y":145},{"x":70,"y":10},{"x":18,"y":50}]...
My sketch in test.pde looks like this:
void setup(){
size(200, 200);
}
void draw(){
background(204);
fill(20, 255, 160);
ellipse(100, 100, 20, 20);
}
1