3 ms·
Did you consider doing spline fits to the x,y coordinates and then just saving the spline coefficients instead? The fit process could likely be done client-sid
by henningo 12y ago
Did you consider doing spline fits to the x,y coordinates and then just saving the spline coefficients instead?
The fit process could likely be done client-side, and could offer some subtle smoothing if wanted?
Anyhow, really nice execution!
- byoung2 12y agopaper.js has a nice method to do this. I actually used it in a whiteboard app I made as a proof of concept. Rather than saving every X,Y coordinate, it uses a configurable number of points and handles and makes bezier curves. http://paperjs.org/examples/path-simplification/ http://paperjs.org/examples/path-simplification/