We are about to switch to a new forum software. Until then we have removed the registration on this forum.
how do you run a sketch inside an html file? i made a folder that has an index.html, theme.css and sketch.js(alongside its libraries (p5.js, p5.dom.js, p5.sound.js)
html = http://pastebin.com/kRXGVZKH
Answers
In your ".html" file, you attempt to load & run a JS script called "watch.js".
However, according to your PasteBin.com post, that file is called "sketch.js" instead! #-o
In https://forum.Processing.org/two/discussion/19988/how-can-i-default-a-library#Item_1, I've already posted a minimum HTML template.
And also proved it had worked by hosting the whole codes @ http://CodePen.io/GoSubRoutine/pen/YpmRRR/right/?editors=101
However, running code locally, for a long time already, only works under Firefox family browsers! :|
Other browsers either ask for permission or demand extra hack config though. :ar!
A more definite solution which works for all browsers is to open a local server for the code's folder.
If you choose this route, read this article: https://GitHub.com/processing/p5.js/wiki/Local-server
My pick'd be Node.JS: https://GitHub.com/processing/p5.js/wiki/Local-server#node-http-server ;)
But my main option is to simply add "--allow-file-access-from-files" argument for my Chromium-based browser's shortcut: http://Chrome-Allow-File-Access-From-File.com/ \m/
it was the first paragraph. thanks
answered late bc i had solved it :)