diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index aea7c7b..2d1e90f 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -113,6 +113,17 @@ return childTransform; }; + +/** + * Decomposes a matrix and sets the transforms properties based on it. + * @param {Matrix} + */ +Transform.prototype.setFromMatrix = function (matrix) +{ + matrix.decompose(this); +}; + + Object.defineProperties(Transform.prototype, { /** * The rotation of the object in radians.