-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
p5.dom CSS transforms #389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I just ran into this issue too. I think it'd be very useful. I also think it'd be useful to be able to transform p5.elements together w/ basic shapes like push() im assuming div's values are cached... and it will only modify the divs css just on change not update/draw. |
Hi @ekeneijeoma, this is a good point. Should push() and pop() be tracking added element styles as well as canvas styles? I think it does make sense. Also, I guess the default unit for rotate() should be in radians? |
I'm not sure if The two options as I see it for units are:
I would say let's go with All this said, I don't really have experience with CSS transforms so could be way off base. Here are two nice resources / sets of examples for reference. http://desandro.github.io/3dtransforms/ |
p5.dom CSS transforms #389, translate() rotate()
closed with 9015ffe |
I'm working on a set of examples for the "a to z" class at ITP and am doing a lot of CSS transformations on divs. This results in writing lots of awkward code like.
I think it might be nice to have:
This would also help deal with the fact that for cross-browser compatibility I should really be doing multiple calls to:
Not to mention all my values are in radians so there's another set of conversion happening in my code.
I'd be happy to work on wrapping all this up nicely. Thoughts on usefulness? (Also I have to admit that I'm on about day 2 of working with CSS transforms so I don't really know what I'm talking about.)
The text was updated successfully, but these errors were encountered: