problems showing sketches on webpage

edited September 2014 in JavaScript Mode

im quite new to processing and wanted to use processing.js to integrate some processing sketches within my webpage.

i cant seem to show any sketches by using the guide on processingjs.org.

this code is taken from the guide and all files are located in the same directory. the processing.js file is v1.4.8 downloaded from the site.

this is the code i have - step 1 in the guide which doesnt show the sketch for me:

html:

tute1

processing:

void setup() {
  size(200, 200);
  background(100);
  stroke(255);
  ellipse(50, 50, 25, 25);
  println("hello web!");
}

i seem to be missing something basic here...

if anyone knows about processing for web, i would appreciate your help,

thanks, Lucas.

Answers

  • Have you tried your example in "JavaScript Mode" already? It generates an ".html" file.
    You can inspect that file in order to have a better idea how to make your own! O:-)

  • thanks!

    looks like its alot more involved than the guide,

    having a go at it now

    cheers, Lucas.

  • Search the JavaScript category (where I moved your topic): there are other similar threads. A common issue is using a browser disabling JS when loaded from file:// scheme. Your files should be served by a real web server.

Sign In or Register to comment.