<head> ... <script type="text/processing" src="c1.pde" data-target="c1"></script> ... </head>
<head> ... <script type="text/processing" data-target="c2"> /*code*/ </script> ... </head>
<head> ... <script type="application/processing" src="c3.pde" data-target="c3"></script> ... </head>
<head> ... <script type="application/processing" data-target="c4"> /*code*/ </script> ... </head>
<script type="text/processing"> String lstring = "A1 loaded successfully!"; void setup() { size(200,100); textFont(createFont("Arial",18)); noLoop(); } void draw() { fill(0); float tw = textWidth(lstring); text(lstring, (width-tw)/2, height/2); } </script> <canvas></canvas>
NOTE: because there is no explicit element ordering, this is (strictly speaking) magic behaviour
<script type="application/processing"> String lstring = "A2 loaded successfully!"; void setup() { size(200,100); textFont(createFont("Arial",18)); noLoop(); } void draw() { fill(0); float tw = textWidth(lstring); text(lstring, (width-tw)/2, height/2); } </script> <canvas></canvas>
NOTE: because there is no explicit element ordering, this is (strictly speaking) magic behaviour
<body> <script type="text/processing" data-target="c5"> String lstring = "C5 loaded successfully!"; void setup() { size(200,100); textFont(createFont("Arial",18)); noLoop(); } void draw() { fill(0); float tw = textWidth(lstring); text(lstring, (width-tw)/2, height/2); } </script> ... <canvas id="c5"></canvas> ... </body>
<body> <script type="application/processing" data-target="c6"> String lstring = "C6 loaded successfully!"; void setup() { size(200,100); textFont(createFont("Arial",18)); noLoop(); } void draw() { fill(0); float tw = textWidth(lstring); text(lstring, (width-tw)/2, height/2); } </script> ... <canvas id="c6"></canvas> ... </body>
<body> <script type="text/processing" src="c7.pde" data-target="c7"></script> ... <canvas id="c7"></canvas> ... </body>
<body> <script type="application/processing" src="c8.pde" data-target="c8"></script> ... <canvas id="c8"></canvas> ... </body>
<script type="text/processing" src="c9.pde"></script> <canvas id="c9"></canvas>
NOTE: because there is no explicit element ordering, this is (strictly speaking) magic behaviour
<script type="application/processing" src="c10.pde"></script> <canvas id="c10"></canvas>
NOTE: because there is no explicit element ordering, this is (strictly speaking) magic behaviour
<canvas data-processing-sources="a3.pde"></canvas>
<canvas id="c11" data-processing-sources="c11.pde"></canvas>