You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the intention is to close the path, then the real SVG command is ‘Z’.
Interestingly, Android accepts the currently generated invalid paths. However, if the paths are viewed in a web browser, then only the first subpath is visible if the path is made of multiple subpaths. Here’s an example path with multiple subpaths: “ M10 20 C10,5 20,5 30,30c M20 20 C10,5 20,5, 30,0c ”. The invalid commands are highlighted.
The text was updated successfully, but these errors were encountered:
bodymovin-to-avd seems to be creating bad SVG path data.
pathData.js has code to add a ‘c’ command without coordinates to the end:
if(data.c) {
pt = matrix.transformPoint(data.o[i][0] + data.v[i][0], data.o[i][1] + data.v[i][1]);
pathValue += ' C' + roundValue(pt[0]) + ',' + roundValue(pt[1]);
pt = matrix.transformPoint(data.i[0][0] + data.v[0][0], data.i[0][1] + data.v[0][1]);
pathValue += ' ' + roundValue(pt[0]) + ',' + roundValue(pt[1]);
pt = matrix.transformPoint(data.v[0][0], data.v[0][1]);
pathValue += ' ' + roundValue(pt[0]) + ',' + roundValue(pt[1]);
pathValue += 'c';
}
If the intention is to close the path, then the real SVG command is ‘Z’.
Interestingly, Android accepts the currently generated invalid paths. However, if the paths are viewed in a web browser, then only the first subpath is visible if the path is made of multiple subpaths. Here’s an example path with multiple subpaths: “ M10 20 C10,5 20,5 30,30c M20 20 C10,5 20,5, 30,0c ”. The invalid commands are highlighted.
The text was updated successfully, but these errors were encountered: