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

Yeah I understand the benefit of quaternions for animation (at least roughly; again, I haven't had a reason to dig into the math properly but I *do* watch a lot of math YouTube, which is basically the same thing ^_^), but that's already handled implicitly by the spec; assuming the transform lists don't perfectly match so you interpolate via matrix, we then extract the equivalent quaternions (and other aspects) from the matrixes and interpolate each of those independently.

The requested change here is allowing quaternions as an *input* method for transforms; my question is what benefit this brings to authors.

> For example to rotate 45° around the X axis, you would enter:

So the comparison is `rotate3d(1, 0, 0, 45deg)` vs `quat(cos(45deg), sin(45deg), 0, 0)`, right? Could you elaborate more on what makes this more convenient in some circumstances? I check the TrackBall.js page; you mention that being able to express rotations directly as quaternions would simplify your code significantly there (presumably referring to the sample code at the bottom), but could you give an example?

(I'm pushing back like this, btw, because convenience sugar is a dime a dozen. We're not afraid to add sugar, and do so regularly, but it needs to be reasonably justified that it's actually solving problems authors have, rather than just being something that's occasionally useful to some people. *New abilities* are often easier to justify in that regard; sugar can take a little more push before it gets over the finish line. We've rejected a *lot* of perfectly reasonable numeric stuff from the V&U spec, for example, because even tho they're perfectly well-defined, simple, and can probably be useful *sometimes*, they can't be justified as useful *often enough* to be worth defining for everyone.)

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


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

Received on Monday, 28 August 2023 18:34:48 UTC