Overview of the Bezier Pen + Animatable Path System
mainThe Bezier Pen + Animatable Path System provides vertex-preserving path animation, a pen tool for drawing with click-drag handles, on-canvas vertex editing, bezier masks, and keyframed mask-path animation (suitable for rotoscoping). The system uses a shared vertex model for both shapes and masks.
Core Architecture Components:
MotionShapePathPoint: The single vertex model containingx/ycoordinates andin/outhandles.interpolateMotionPathPoints: An interpolator used for equal-count lerp of vertices and handles (with a resample fallback).stage-path-editing.ts: A helper for web-based pen draw and edit interactions.MasksPanel: Used for mask drawing.pathKeyframes: Evaluated using the same interpolator as the path points.