0

I am trying to determine an angle of rotation dynamically within an animation for each frame. The object is only rotating on its Z axis and after some research I found that the best method is probably to output a matrix3d using window.getComputedStyle().transform and use that to find the rotateZ().

What I'm wondering is how to find the rotateZ from this matrix? I've seen a bunch of stuff online but most of it is transformations.

2
  • I'm a bit confused about what you are trying to do. It sounds as though at any point in time you want to find out the Z rotation of an element, but you say you will 'output a matrix3d' so are you actually trying to set something? Commented yesterday
  • He's right, the question isn't clear, are you trying to animate it rotating on the z-axis only? else why would you use JS for that, you should use the rotate proprety on CSS see: documenation and : w3schools demo Commented yesterday

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.