Processing does not show up in webpage

I have a processing program which I want to display on a browser in an html file. I found an instruction on https://cs.nyu.edu/~kapp/cs101/processing_on_the_web/. It still does not show up in my webpage. I also tried it with the same code from the instruction and it still does not show up. I am using chrome and my html code looks like this:

<!DOCTYPE html>
<html>
<head>
    <title>Bitmap?</title>
    <script type="text/javascript" src="processing.js"></script>
</head>
<body>

<h1>Text</h1>
/* @pjs preload="Karte_schweiz_zentriert.jpg","bitmap_zentriert.jpg"; */
<canvas data-processing-sources="bitmap_map_comparison.pde"></canvas>

</body>
</html>

I have the .html file, processing.js, the two .jpg pictures and the bitmap_map_comparison.pde processing code in one folder called bitmap_map_comparison. Does anyone know where the problem is?

Upvotes: 0

Views: 115

Answers (1)

Voxel
Voxel

Reputation: 74

You are using src incorrectly. Unless you have ProcessingJS in the exact same folder as the program, it will not import as it does not exist. Use this instead:

<script src="https://cdn.jsdelivr.net/processing.js/1.6.6/processing.min.js"></script> 

Edit: I'm just now realizing that I'm 3 years late and this probably won't help anyone.

Upvotes: 0

Related Questions