combining processing with processing.js

edited June 2014 in JavaScript Mode

Hi, I'm fairly new to processing. I've started understanding processing, but I've still got a problem with processing.js. I'm trying to integrate a sketch in browser.

I am trying with the examples showed here . Let's say the one which says exemplo_pag33 + map.png + table.js (substitui table.pde) + locations.tsv .

The code is there. But I can't seem to "unite" them. I put the table.js in the same file with .pde ( I tried before and after the .pde code), I used the correct links (regarding the path for grabbing the map.png and locations.tsv files). But the browser doesn't load anything.

This is what is used in the html file:

  <script src="/path/to/processing.js"></script>
<canvas data-processing-sources="/path/to/example.pde" width="640" height="400"></canvas>

What am I doing wrong? Please help

PS; if I'm not integrating the js part in the file "example.pde", it does, at least, show the picture.(inthe browser)



  • edited June 2014

    Have you tried "JavaScript Mode" already?
    When we click play it creates a sub-folder called "\web-export\" and opens it using system's default browser.
    I advise you to study the generated "index.html" file in order to learn how it's done! ;)

  • edited June 2014

    Thank you so much for your answer! I didn't know that. I did as you told but it shows a gray box in the browser...However when I use a simple example it does show the picture, I guess the problem is the Table.js? The code is here

Sign In or Register to comment.