I am implementing the first method, as recommended here,http://processingjs.org/learning/.
My code is:
Anything.html
<script src="processing.js"></script>
<canvas data-processing-sources="anything.pde"></canvas>
Anything.pde
void setup()
{
size(200,200);
background(125);
fill(255);
noLoop();
PFont fontA = loadFont("courier");
textFont(fontA, 14);
}
void draw(){
text("Hello Web!",20,20);
println("Hello ErrorLog!");
}
Web browser screen shows nothing...
Why am I not seeing the canvas? What is the problem?
Second method as reccomeded in the site mentioned at the top, works well.
Second method code:
<script src="processing.js"></script>
<script type="text/processing" data-processing-target="mycanvas">
void setup()
{
size(200,200);
background(125);
fill(255);
noLoop();
PFont fontA = loadFont("courier");
textFont(fontA, 14);
}
void draw(){
text("Hello Web!",20,20);
println("Hello ErrorLog!");
}
</script>
<canvas id="mycanvas"></canvas>
Web browsers output: