balance svg paths
Make two paths equivalent in terms of structure while respecting their original shapes. So they can be easily tweened and animated. Currently its a pretty half-ass implementation. See test/cases.js for an analysis.
With your favorite package manager:
packin add balance-svg-paths
component install jkroso/balance-svg-paths
npm install balance-svg-paths
then in your app:
var balance = require'balance-svg-paths'
b using the same number of path segments while preserving their shapes. Where both
b are normalized paths. It returns an Array containing the balanced paths in the same order they were input.
var a = 'c'00500500 'c'00050050var b = 'c'55455500balancea b // => [a, b.concat([['c',0,0,0,0,0,0]])]