I’m learning Processing and want to be able to write it in a text editor on my computer. I downloaded processing.js and have written a quick sketch called program.pde:
void setup() {
size(200, 200);
fill(200);
ellipse(10, 20, 30, 40);
}
Now, from what I know, I need to put an html file in the same folder as processing.js and program.pde. I’ve looked around for hours and hours, and I’ve tried putting many things in the html file, but nothing seems to work. I never get my ellipse when I open the html file in Chrome. I’ve tried this:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script src="processing.js"></script>
</head>
<body>
<canvas data-processing-sources="program.pde"></canvas>
</body>
</html>
…and this:
<!DOCTYPE html>
<html lang="en">
<head>
<script src="processing.js"></script>
</head>
<body>
<script src="program.pde"></script>
</body>
</html>
…and much more, but I’ve never gotten anything on the webpage. If someone could help me figure this out, that would be very much appreciated! Thanks.