firmin icon indicating copy to clipboard operation
firmin copied to clipboard

3D transforms

Open beastaugh opened this issue 15 years ago • 2 comments

Add support for 3D transforms. This should be relatively straightforward for WebKit-based browsers.

beastaugh avatar Feb 21 '10 01:02 beastaugh

Let's look at what support for 3D transforms would entail.

  • 3D transform origins
  • 3D matrix support
  • translate3d and translateZ functions
  • scale3d and scaleZ functions
  • rotate3d and rotateX, rotateY and rotateZ functions
  • A perspective function
  • Possibly also support for the perspective and perspective-origin properties

3D matrix support could be added by extending Firmin.CTM; a 2D CTM is just a specialised version of a 3D CTM. As the spec says,

matrix(, , , , , )

specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to matrix3d(a, b, 0, 0, c, d, 0, 0, 0, 0, 1, 0, e, f, 0, 1).

The difference would mainly lie in different serialisations, and possibly different code paths for multiplication, if we decided to optimise for speed over code size.

beastaugh avatar May 08 '10 15:05 beastaugh

As of version 1.0, the first four of these are supported, so completing Firmin's 3D transform support should just require a nice interface to the various pieces of perspective functionality.

beastaugh avatar Apr 04 '11 16:04 beastaugh