Hacker News new | ask | show | jobs
by splatcollision 5108 days ago
Very neat work!

You could make it cross-platform (not webkit-only) by using a JS implementation of the WebKitCSSMatrix object, which happens to be available as part of the Firmin JS Animation library. It's a technique I use in Edit Room (link in profile) to support javascript controls for modifying 3D CSS transforms.

Here's the relevant file: https://github.com/beastaugh/firmin/blob/master/src/matrix.j...

You could use this when WebKitCSSMatrix doesn't exist, and support other browsers that support 3d transforms:

Something like:

//shim to create CSSMatrix object reference using either WebKit or Firmin implementation

if (!window.CSSMatrix) window.CSSMatrix = window.WebKitCSSMatrix || window.FirminCSSMatrix;

1 comments

I'm going to be looking into this. I hate putting "WebKit only" on things, but this was the simplest solution I could find. Thank you for this!