javascriptcsscanvassvg

How to rotate in 3D many rect in SVG with a different angle of rotation?


I would like to rotate in 3D each element with different degrees (rect) of a single SVG. So each element in my SVG should have a different angle of rotation.

[I mean this: IMAGE ][1] [1]: https://i.sstatic.net/rHCAy.jpg

Is it possible?

For example in CSS for many div I could use attributes such as perspective and transform (rotateY) with different values.

I can use them also to rotate the SVG, but not EACH single elements in different way.

What about CANVAS?


Solution

  • Unfortunately 3D transforms aren't supported on SVG elements.
    There are a few workarounds that allow you to rotate three-dimensionally by CSS the element inside: look here
    So you could...

    OR anyway without to use SVG...