Jump to content
Search Community

Rotate an svg component through an isometric direction

Léo S test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

I would like to rotate an svg component through an isometric direction.

Of course if I use a simple rotate, the element rotate through the Z direction (direction of the "camera") and does not produce the desired effect. See the associated CodePen.

 

Instead, I try to rotate the component through the direction normal to the plane:

image.png.ddecb3c84c60f23cf2ba3606b404711c.png

 

Is it possible using RotationX, RotationY, RotationZ ?

If yes, would it be possible to have an example ?

 

Thanks !

See the Pen vYZdexR by ingeloop (@ingeloop) on CodePen

Link to comment
Share on other sites

  • Solution

Heya @Léo S,

 

So, there's no 3D space in SVG - the cog you've got in that pen is drawn to look like it has perspective but it's actually just a squashed cog.

If I were you I would use an image (not squashed) inside a div - then you can make use of 3D CSS.

Screenshot 2021-12-21 at 21.25.27.png

 

This is a great article to learn about setting up a 3d css scene...

https://css-tricks.com/css-in-3d-learning-to-think-in-cubes-instead-of-boxes/

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...