Closed Jamzy01 closed 1 year ago
Here's a demo to show how you can change the orientation of an object: https://codepen.io/jonobr1/pen/OJwrjrJ
That's an interesting approach to rotating an object from a pivot point, but I think it will be fairly easy to implement.
Also, if you're using only Two.Rectangle there is Two.Rectangle.origin
which is a Two.Vector
that represents an amount to offset all verts.
No other object has this property though.
How can I rotate a Two.js object around a pivot/anchor point?
How exactly can I rotate and scale any two js object around a pivot point? For example, If I want to rotate a shape by pivoting around the top left corner or from any point on the shape, how can I do that? Here is an example of what I want to do: