You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thread to discuss issues implementing v2.0 within P5LIVE, a live-coding fullscreen editor for p5.js.
Testing
Can install offline mode or use online.
To force 2.0, add the following snippet to very top of sketch, which disables p5, loads an external library, then inits p5:
/* manually load p5.js - v2.0 beta*/// no p5letlibs=['https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.min.js']newp5()
Can also replace the p5.js file in offline mode which is held in /includes/p5/p5.min.js.
WARNING: when digging under hood with offline mode, P5LIVE is a beast of spaghetti code in one file to win them all(!) = my poetic learning JS over the years.. it works.. it's beautiful to me, maybe ugly to others.. likely tricky to parse - so be it... main concept – all code runs within a sandboxed iframe – code from editor is joined with the libs, and passed into the <body> of /includes/templates/p5live_sketch.html doc.
Issues
draw() doesn't make it past 1 frameCount cycle
what changed under hood to cause that??
FES complains about overwriting global vars (frameCount / mouseX / mouseY / pmouseX / pmouseY)
is this global-overwrite FES necessary? floods console on every recompile (unless manually filtered).
Future Planning
default version is 1.0+ until _____ then 2.0?
how to deal with loading pre-2.0 files?
only mod-dated files after switch default to 2.0?
JSON style settings at top of sketch to custom load version of p5, ie let p5liveSettings = {version:'2.0.0'}, which uses CDN for online mode and offline potentially uses node fs to once download custom version if needed.
The text was updated successfully, but these errors were encountered:
For the FES, we have some ideas to help make your use case work but in the meantime, disabling FES should make the messages go away. Do let us know if that's not the case though.
For draw() not advancing I'll need to investigate deeper. I'm not familiar with P5Live's code but if you have some idea around what kind of hook P5Live uses/modify from p5 in relation to the animation loop, it would be helpful for me to narrow things down quicker.
@ffd8 I just had a test of P5Live locally with p5.js 2.0 beta 3 and am I right in saying that it is just the values of mouseX/Y, pmouseX/Y and frameCount being incorrect while the sketch and draw loop itself is still working? I was under the impression that the problem is the draw loop not advancing after 1 frame but I may have misunderstood and it is just the frameCount not advancing?
If that is the problem and not the draw loop not running, I'll need to think about how to enable this overriding of instance value here, but if there is another issue that I'm not noticing here do let me know.
p5.js 2.0 🙏 P5LIVE
Thread to discuss issues implementing v2.0 within P5LIVE, a live-coding fullscreen editor for p5.js.
Testing
Can install offline mode or use online.
To force 2.0, add the following snippet to very top of sketch, which disables
p5
, loads an external library, then inits p5:Can also replace the p5.js file in offline mode which is held in
/includes/p5/p5.min.js
.WARNING: when digging under hood with offline mode, P5LIVE is a beast of spaghetti code in one file to win them all(!) = my poetic learning JS over the years.. it works.. it's beautiful to me, maybe ugly to others.. likely tricky to parse - so be it... main concept – all code runs within a sandboxed iframe – code from editor is joined with the libs, and passed into the
<body>
of/includes/templates/p5live_sketch.html
doc.Issues
draw()
doesn't make it past 1 frameCount cycleframeCount / mouseX / mouseY / pmouseX / pmouseY
)Future Planning
let p5liveSettings = {version:'2.0.0'}
, which uses CDN for online mode and offline potentially uses nodefs
to once download custom version if needed.The text was updated successfully, but these errors were encountered: