help getting processing.js on a webpage; coming from khan academy

I am trying to get the khan academy codes to work outside of khan academy, like on my own webpage. I followed their instructions but couldn't get them to work, can someone help me? I downloaded the processing.js from their website and put it in the folder with these two things.

HELP.html

<!DOCTYPE html> <html> <head> <title>Hello Web - Processing.js Test</title> <script src="processing.js"></script> </head> <body> <h1>Processing.js Test</h1> <p>This is my first Processing.js web-based sketch:</p>

<canvas data-processing-sources="hello-world.pde"></canvas>

</body> </html>

and helo-world.pde

void setup() {

size(200, 200);

background(100);

stroke(255);

ellipse(50, 50, 25, 25);

println("hello web!");

}

I put all three things into the same folder, yet when i open the webpage in chrome, i only get the html text, and not the processing canvas.

What am i doing wrong? I'm on a macbook air OSX yosemite. Using Sublime Text, and have tried opening in chrome and safari.

Posted Mar 18, 2015, 4:02 PM UTC

10

No comments yet

Nobody commented on this post, or the comments weren't captured.