P5.js Loading Files

edited February 2017 in p5.js

I'm just starting out with P5 but there seems to be an issue with getting the script to load properly into the web page. Could this be issue with new processing_3.2.4?

I've tried example pages in both linux and Mac and similar, though not same, results. Ubantu/linux, the page I try loads only after I try a second, different script, and then it loads the first and then seems stuck on it. can't clear the page out even though displaying on different ports. trying to execute examples ex05_pointllisim and ex02_transparency and only loads the latter in Linux. Tried ex00_load_and_display_Image and still get transparency example though in totally new port.

on mac seems to work on first file, but can't seem to clear cache and brings up more and more pages of the same first script. I just tried example "game of life" and I got "smoky particle system" which is what I tried a while ago. maybe I have to wait a while for cache to clear?

Tagged:

Answers

  • Documentation seems to be a problem. I can't find anywhere that says the scripts must be run from the browser (click on html file) and not the IDE. This seems to be a solid part of my problems. Scripts open browser window and run reasonably well if the index.html page is opened from within the sketch folder, but not if 'run' from the IDE. Running the actual script tab in IDE is a bit of a disaster at present. The index.html tab is better, though don't do it. It may still load into leftover tabs from previous js loads. There seems to be less conflict re the various web pages launched at the same time if done from html tab. Page reload works as expected for example.

    But second issue.... There also seems to be an problem with the Browser or IDE not clearing script after the web page closes. even the browser quits. This seems to be linked to the "On Startup/Continue Where You Left Off" setting in Chrome. Once this is disabled (change to "open the new tab page") the scripts do not load into the existing pages and conflict. This may be a 'solution' in other browser/OS combinations as well.

  • No this is just a mess. It's loading the wrong file into tabs that are already open in browser.

  • Same port here, different scripts. how can that be right.

  • pics didn't show up... ah well time to move on.

  • Thanks. A reread after encountering problems was most helpful. Thanks too for the links. the openProcessing editor looks promising.

    NB I found that if I uniquely named the html file (ie not index.html) and open from the sketch folder instead of running it from IDE it works so far. If later run from IDE it generates 'index.html' tab/file which should be avoided.

  • Also see this recent related discussion on p5.js editing options:

Sign In or Register to comment.