I'd like to wake up issue #252 – which discussed push() and pop(), in relation of how to make basil.js as compatible as possible with p5.js. The more I use p5.js, the more I find little nooks and crannies that are missing. Last fall I had students complain about how slow/etc it was to code purely in basil.js/inDesign and we found p5.js to be a great sandbox environment allowing code to quickly be copy + pasted + tweaked to basil.js (bummer ES6 isn't implemented). For that reason, I realize lots of little things that could be added/modified to make it that much smoother. Nevertheless I think we need a consensus about where these functions should sit and how their documentation should work. For speed of implementing this, I suggest we avoid new functions (ie. pushStyle()- unless time/interest allows), but put a priority on code compatibility that avoids error messages of non-existing functions = just mirrors/wrappers.
DOCUMENTATION (wrapper functions)
SRC (where do these wrappers go?)
EXAMPLE (wrappers)
createCanvas() » size()
frameCount » new global frameCount = 1
textAlign() » needs same constants linked to TOP, BOTTOM, LEFT, CENTER, RIGHT
textSize » needs to allow 0 and not break.. could use abs() and <= 0 becomes .1
text() » work with just 3 params.. text(txt, x, y) (use width, height as default size)
circle() + square() + ellipse(x, y, w) <- ellipse with just 3 params = circle
color()/fill()/stroke() » allow a 2nd or 4th value for opacity = probably not so easy to implement...
textToPoints() » had based function name on Processing's Geomerative, but p5.js style makes more sense now
- ...
Of course the list can slowly be implemented after a 2.0 release, but it would be nice to launch w/ main ones that would trip up beginners. Please feel free to add to the list and once we decide how/where to put them and documentation style, I'd get started.
Re: neverending launch of 2.0, this adds a decent reason for further delay... I'd aim for start of new year, or anniversary of 1.0 = Feb and schedule how to make that happen?
I'd like to wake up issue #252 – which discussed
push()andpop(), in relation of how to make basil.js as compatible as possible with p5.js. The more I use p5.js, the more I find little nooks and crannies that are missing. Last fall I had students complain about how slow/etc it was to code purely in basil.js/inDesign and we found p5.js to be a great sandbox environment allowing code to quickly be copy + pasted + tweaked to basil.js (bummer ES6 isn't implemented). For that reason, I realize lots of little things that could be added/modified to make it that much smoother. Nevertheless I think we need a consensus about where these functions should sit and how their documentation should work. For speed of implementing this, I suggest we avoid new functions (ie.pushStyle()- unless time/interest allows), but put a priority on code compatibility that avoids error messages of non-existing functions = just mirrors/wrappers.DOCUMENTATION (wrapper functions)
SRC (where do these wrappers go?)
EXAMPLE (wrappers)
createCanvas()»size()frameCount» new globalframeCount = 1textAlign()» needs same constants linked to TOP, BOTTOM, LEFT, CENTER, RIGHTtextSize» needs to allow 0 and not break.. could useabs()and <= 0 becomes .1text()» work with just 3 params..text(txt, x, y)(use width, height as default size)circle()+square()+ellipse(x, y, w)<- ellipse with just 3 params = circlecolor()/fill()/stroke()» allow a 2nd or 4th value for opacity = probably not so easy to implement...textToPoints()» had based function name on Processing's Geomerative, but p5.js style makes more sense nowOf course the list can slowly be implemented after a 2.0 release, but it would be nice to launch w/ main ones that would trip up beginners. Please feel free to add to the list and once we decide how/where to put them and documentation style, I'd get started.
Re: neverending launch of 2.0, this adds a decent reason for further delay... I'd aim for start of new year, or anniversary of 1.0 = Feb and schedule how to make that happen?