Live data from Hacker News

Some pragmatic notes on CSS3 matrix3d transforms

9elements.com

11–16 of 16 posts

Re: Some pragmatic notes on CSS3 matrix3d transforms

#11
post #7

The CSS 2D [1] and 3D [2] Transforms Modules specify that browsers should expose an implementation of the CSSMatrix interface; unfortunately, only WebKit does this at the moment. However, since that's also the only browser in which the CSS 3D Transforms Module is implemented, it doesn't really matter too much yet. WebKitCSSMatrix [3] provides most of the low-level code you'll want to generate 3D transforms, including…

The CSS 2D transforms are frustratingly crippled in my opinion. Instead of allowing the specification of a full 3x3 matrix for doing homogeneous coordinate transformations (and thus general perspective transforms), only a 2x3 matrix can be specified. I’m really glad they actually give access to the whole 4x4 matrix in the 3D version.

Yes, it's a big improvement. The WebKitCSSMatrix implementation is actually compatible with both specifications: it provides getters and setters for elements a-f as well as m11-m44, and serialises to "matrix(a, b, c, d, e, f)" if the matrix is affine.

Re: Some pragmatic notes on CSS3 matrix3d transforms

#13
post #12

The 3d transforms in webkit are pretty neat. In fact, I played about with generating 3d transforms using data from Blender a while back ( http://github.com/jamesu/csstransformexport/ ), with some success. Still, needs more browser support.

Really interesting idea,

i wonder when a company will release canvas/css3 visual design tools comparable to flash. I seem to remember Steve Jobs mentioning in a keynote that Adobe should be building tools for this exact purpose.

I havent tried out your code, but it is definitely an interesting prospect

Re: Some pragmatic notes on CSS3 matrix3d transforms

#14
post #2

I don't know... You don't need to be a math god at all. It's basic linear alg. I guess lin alg isn't required in CS?

Homogeneous coordinates are not linear algebra. Translation is simple, but few people actually understand how the perspective transformation works - it's a convenient hack but if you try to figure it out from scratch you may be surprised by what's going on.
Post reply on HN