Part of #326. Batch 3 — depends on #327 and #328.
Rustmotion has roughly fourteen drawing primitives against about twenty for Canvas and fifteen for SVG, so the count is not the problem. ClipPath::Path and Polygon already exist, mix-blend-mode exists, shape: {path: {data}} accepts arbitrary path data, and filter/backdrop-filter carry a deterministic noise. What is missing is narrow, and it is what stops those primitives from composing into the shapes the reference reels build.
Owned files
crates/rustmotion-components/src/shape.rs
crates/rustmotion-core/src/schema/video.rs (Stroke)
crates/rustmotion-core/src/css/style.rs (ClipPath node-reference variant only)
Do NOT write: engine/deps.rs (#328 owns the resolver this calls), expr/** (#327).
Deliverables
-
Stroke control on an arbitrary path. dash, dash_offset (animatable), line_cap and line_join exist only on arrow, connector and line today. Move them onto Stroke so shape.path gets them too.
-
path.data accepts an expression. This is what turns a gem into twenty-four triangular facets computed from eight outline points, an inner ring and an offset centre, each tinted by its angle to a light. Without it, procedural geometry stays impossible whatever else lands.
-
clip-path may reference another node's path. The reference reel's cracking stone is one gem drawn twice, each half clipped by a path following the crack, so the two halves separate along a coherent break. A rectangular overflow: hidden cannot express that and ClipPath::Path alone cannot either, because the crack is a node with its own animation.
Acceptance
- A
for-each over 24 facets with computed data and computed fill renders a shaded gem
- A dashed arbitrary path animates its
dash_offset into a draw-on
- Two shapes clipped by the same referenced crack path separate without a seam
Part of #326. Batch 3 — depends on #327 and #328.
Rustmotion has roughly fourteen drawing primitives against about twenty for Canvas and fifteen for SVG, so the count is not the problem.
ClipPath::PathandPolygonalready exist,mix-blend-modeexists,shape: {path: {data}}accepts arbitrary path data, andfilter/backdrop-filtercarry a deterministicnoise. What is missing is narrow, and it is what stops those primitives from composing into the shapes the reference reels build.Owned files
crates/rustmotion-components/src/shape.rscrates/rustmotion-core/src/schema/video.rs(Stroke)crates/rustmotion-core/src/css/style.rs(ClipPathnode-reference variant only)Do NOT write:
engine/deps.rs(#328 owns the resolver this calls),expr/**(#327).Deliverables
Stroke control on an arbitrary path.
dash,dash_offset(animatable),line_capandline_joinexist only onarrow,connectorandlinetoday. Move them ontoStrokesoshape.pathgets them too.path.dataaccepts an expression. This is what turns a gem into twenty-four triangular facets computed from eight outline points, an inner ring and an offset centre, each tinted by its angle to a light. Without it, procedural geometry stays impossible whatever else lands.clip-pathmay reference another node's path. The reference reel's cracking stone is one gem drawn twice, each half clipped by a path following the crack, so the two halves separate along a coherent break. A rectangularoverflow: hiddencannot express that andClipPath::Pathalone cannot either, because the crack is a node with its own animation.Acceptance
for-eachover 24 facets with computeddataand computedfillrenders a shaded gemdash_offsetinto a draw-on