|
I believe something like this would work (excuse the comments normally not allowed in JSON): {
paths: [
{
points: [
[10, 10], // 0
[90, 10], // 1
[90, 90], // 2
[10, 90] // 3
],
lines: [
[0, 1, 2, 3, 0] // connect point 0 to 1 to 2 to (...)
],
curves: {
0: [5, 15, 15, 5] // bezier control points for point 0 (x1, y1, x2, y2)
}
}
]
}
The downside (other than the bloat) would be when writing the code by hand, you'd have to keep track of the indices in the `points` array. |