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
My main gripe with the p5.dom API is that the function based, chainable style is so Java coded. I can see how it was useful to help Java developers do web development back in 2014. But now vanilla JavaScript APIs and features like CSS3 flex make editing the dom just as easy.
For example, is using the p5.Element.style function actually better than setting the style props in JS? or just abstraction for the sake of Java-style abstraction that doesn't give beginners the tools to do stuff outside of the p5 ecosystem?
Why insist users do this:
p=createP();p.style('color','deeppink');
instead of this:
p=createElement('p');p.style.color='deeppink';
I'm going to implement a stripped down version of p5-dom in q5. Q5.Element will extend HTMLElement with some helpful getters and setters for x,y positioning, the draggable function, and hide/show functions.
Could be nice to offer a createFlexBox function too.
The text was updated successfully, but these errors were encountered:
My main gripe with the p5.dom API is that the function based, chainable style is so Java coded. I can see how it was useful to help Java developers do web development back in 2014. But now vanilla JavaScript APIs and features like CSS3 flex make editing the dom just as easy.
For example, is using the
p5.Element.style
function actually better than setting the style props in JS? or just abstraction for the sake of Java-style abstraction that doesn't give beginners the tools to do stuff outside of the p5 ecosystem?Why insist users do this:
instead of this:
I'm going to implement a stripped down version of p5-dom in q5. Q5.Element will extend HTMLElement with some helpful getters and setters for x,y positioning, the draggable function, and hide/show functions.
Could be nice to offer a createFlexBox function too.
The text was updated successfully, but these errors were encountered: