mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-09 18:00:55 +08:00
Remove serde from Bezier-rs web demos to reduce Wasm size
This commit is contained in:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user