import { useState } from 'react' import { CanvasMorph } from './CanvasMorph' export const App = (): React.ReactElement => { const [animating, setAnimating] = useState(true) const [speed, setSpeed] = useState(1) const [manualT, setManualT] = useState(0.5) const [seed, setSeed] = useState(0) const [splitRatio, setSplitRatio] = useState(0.5) const [splitOffset, setSplitOffset] = useState(0) const [showSplit, setShowSplit] = useState(true) const [showEndpoints, setShowEndpoints] = useState(true) return (

bezier-kit: canvas-morph

A React + Canvas 2D sample that interpolates two randomly generated BezierPaths with{' '} createPathInterpolator and visualizes an arc-length split via createPathSplitter at the same time. The two halves are offset vertically to separate them visually.

from (faded) / to (faded) / split first half /{' '} split second half
Segment counts are also random (3–8). matchSegmentCount equalizes them automatically, so{' '} you can interpolate paths with different segment counts.
Split offset shifts each half vertically by half of the offset value (total separation equals the offset).
) }