Here is the simple as possible code for studying processing.js

<script src="https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.6.0/processing.min.js"></script>
<script type="application/processing" data-processing-target="stage">
void setup() {
 size(500, 500);
 background(100);
 rect(30, 60, 25, 25);
}
</script>
<canvas id="stage"> </canvas>