ya-svg-transform
Yet another SVG transform parser.
Installation
npm install ya-svg-transform
Usage
var tx = tx >> 29132799384885755 1499066376115481 tx >> x: 29132799384885755 y: 1499066376115481 tx>> "rotate(45) scale(2) translate(10 100) matrix(1 2 3 4 5 6)" tx>> "matrix(4.242640687119285 1.4142135623730954 9.899494936611665 1.4142135623730958 171.1198410471445 128.69343417595167)" // invert and apply the reverse transformation tx>> 5 10000000000000007 // Yes, there a bit or rounding error on the round trip... tx>> x: 5 y: 10000000000000007 // Yes, there a bit or rounding error on the round trip... // merge transformsvar tx_part_1 = var tx_part_2 = tx_part_1>> 29132799384885755 1499066376115481
- Also plays nice with TypeScript