p5.js-editor icon indicating copy to clipboard operation
p5.js-editor copied to clipboard

Live update sketch when code changes

Open sepans opened this issue 10 years ago • 2 comments

Editor can detect the changes in editor and pass the changes with websocket to the canvas window. In global mode browser window handles the message and updates window.[setup/draw/variableName] accordingly.

sepans avatar May 29 '15 15:05 sepans

+1 for this feature. This would really help speed up sketching. Also, doing it with a websocket is cool but I don't think it's completely necessary to get livereload functionality.

indefinit avatar Aug 18 '15 13:08 indefinit

Look at tools like Browsersync, Webpack etc. I believe they use websockets and this allows selective updating of assets (e.g. HTML and CSS) without reloading the whole page (also see Brackets.io which will automatically update HTML edits on the fly without even saving the source file!). Apparently Webpack live-updates JS module changes - which is super cool. Whether that's applicable in the context of p5js I don't know... Anyway, doing a whole page reload on asset save is old-school...

blindfish3 avatar Nov 16 '15 21:11 blindfish3