Remove serde from Bezier-rs web demos to reduce Wasm size

This commit is contained in:
Keavon Chambers
2024-09-24 01:33:15 -07:00
parent aa03dc8278
commit 0b0169a415
7 changed files with 152 additions and 73 deletions
@@ -11,7 +11,7 @@ const bezierFeatures = {
"bezier-through-points": {
name: "Bezier Through Points",
callback: (bezier: WasmBezierInstance, options: Record<string, number>): string => {
const points = JSON.parse(bezier.get_points());
const points = bezier.get_points();
if (Object.values(options).length === 1) {
return WasmBezier.quadratic_through_points(points, options.t);
}
@@ -514,7 +514,7 @@ const bezierFeatures = {
join: {
name: "Join",
callback: (bezier: WasmBezierInstance): string => {
const points = JSON.parse(bezier.get_points());
const points = bezier.get_points();
let examplePoints = [];
if (points.length === 2) {
examplePoints = [