Re: [csswg-drafts] [css-transforms] New quaternion CSS transform option (#9243)

> I think it's not just syntactic sugar, since Euler angles for example have the problem of gimbal locks (that you can rotate two axes in such a way that the third angle doesn't have any effect anymore).

Isn't it, tho? The gimbal lock situation is already avoided during animation by CSS's animation rules.  Outside of animation, whether someone tracks rotations as quaternions (and thus are safe from gimbal lock) or euler angles (and thus are subject to it) is an implementation choice; either way they can output a CSS transform that represents the rotation state, and then animation between the states will work "correctly" by default.

> Since more and more APIs adapting quaternions, such as WebXR and I think there are discussions to get devicemotion/deviceorientation event data also as quat, it would be a natural extension to pass the data directly to CSS. As an overview:

Ooh, this is pretty legit tho. [Here's the WebXR interface](https://immersive-web.github.io/webxr/#dom-xrrigidtransform-orientation). Matching platform conventions more easily is a *very* good reason to add sugar.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9243#issuecomment-1698268353 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 29 August 2023 23:22:54 UTC