ElliotPenson / fractal.parts

❄️ build and view fractals
https://fractal.parts
MIT License
23 stars 1 forks source link

Allow Shape Rotation #9

Closed ElliotPenson closed 5 years ago

ElliotPenson commented 5 years ago

This should exist at a draggable element near the shape.

ElliotPenson commented 5 years ago

Canvas translate->rotate->translate can give rotation. Note that the shape's grid will be affected. Consider rotating the x/y in mouse events as well. See https://en.wikipedia.org/wiki/Rotation_of_axes

ElliotPenson commented 5 years ago

The low-level transform method would be a better approach than the high-level methods mentioned above. The matrix given to this method may be directly multiplied by an [x, y, 1] vector to transform mouse events.

ElliotPenson commented 5 years ago

Done in f69a290 and e9afc34.