-
Notifications
You must be signed in to change notification settings - Fork 0
Transformer.js
Danny Garcia edited this page Sep 29, 2012
·
4 revisions
Transformer.js is a lot like jQuery.css(), except it's dedicated to CSS transform and transformOrigin. It's easier than jQuery.css() because it's automatically prefixed and easily allows an infinite combination of transformations.
<div id="box"></div>// Standard
(function () {
var tr = new fil.Transformer(),
box = document.getElementById('box');
tr.transform(box, {
translateX : '10px',
rotateY : '45deg',
translateZ : '-40px'
});
}());
// AMD
require(["Transformer"], function (Transformer) {
var tr = new fil.Transformer(),
box = document.getElementById('box');
tr.transform(box, {
translateX : '10px',
rotateY : '45deg',
translateZ : '-40px'
});
});