We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I recently picked up this code from the generative design website
https://alpha.editor.p5js.org/generative-design/sketches/M_1_5_03
I tried to copy and paste it directly into a fresh processing sketch and came up with this error:
"Badly formed character constant (expecting quote, got s)"
The error has seemed to happen for all of them.
I'm relatively new to processing, so it's probably a simple solution I'm not thinking of. As far as I know I'm not missing any libraries. I have tried importing the generative design library in the sketch also... so I'm out of ideas.
Help?
Answers
java or javascript? because that code it javascript and by default processing is java...
Hi there! Thanks, I loaded p5.js as a mode (that's the one compatible with generative gestaltung's sketches).
However, a new problem has arisen. Still not able to run the code locally on my computer. Instead what happens is that it opens a blank web browser, without running the sketch.
what does the browser console say?
(i've changed the subject and the forum section so javascript people will see it)
basically, I don't want it to run on the internet right now. I want to run it on my computer (if possible). But if p5.js is something exclusive to the internet, then clearly I'm using the wrong library. Like I said I'm a total novice, and any advice would be helpful. I was just interested in the effect in that sketch I posted, and would like to get in running :)
it's currently javascript, which will run in a browser. that is not the same as running 'on the internet', it's not on the internet unless you upload it somewhere, which you haven't.
the browser console is part of the browser. in firefox, on a mac, it's F12 to see it, alt-cmd-i in chrome, or use the hambuger menu. it will show you any javascript errors.
if you don't want to use javascript then you'll need to convert the sketch into java processing. but that can be complicated.
https://GitHub.com/processing/p5.js/wiki/Processing-transition
Thanks koogs for answering all my questions! and thanks for the link GoToLoop. That's actually what I want to do, so much appreciated!
do you have the Agent class that that sketch uses? it's not available on the original link, afaict.