diff --git a/src/nodecontainer.js b/src/nodecontainer.js index 15737e7..a7a1299 100644 --- a/src/nodecontainer.js +++ b/src/nodecontainer.js @@ -258,7 +258,7 @@ NodeContainer.prototype.getValue = function() { return value.length === 0 ? (this.node.placeholder || "") : value; }; -NodeContainer.prototype.MATRIX_PROPERTY = /(matrix)\((.+)\)/; +NodeContainer.prototype.MATRIX_PROPERTY = /(matrix|matrix3d)\((.+)\)/; NodeContainer.prototype.TEXT_SHADOW_PROPERTY = /((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g; NodeContainer.prototype.TEXT_SHADOW_VALUES = /(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g; NodeContainer.prototype.CLIP = /^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/; @@ -273,6 +273,11 @@ function parseMatrix(match) { return match[2].split(",").map(function(s) { return parseFloat(s.trim()); }); + } else if (match && match[1] === "matrix3d") { + var matrix3d = match[2].split(",").map(function(s) { + return parseFloat(s.trim()); + }); + return [matrix3d[0], matrix3d[1], matrix3d[4], matrix3d[5], matrix3d[12], matrix3d[13]]; } }