docs(compose): document shape assets - #76
Merged
Merged
Conversation
Covers the centre-anchored position, the 8-digit fill for a constant scrim, rounded corners and the pixel-square rule for a circle, outlines, the animated progress bar, and lines and letterbox bars as recipes rather than schema members. States the two refused combinations and why. Every JSON snippet on the page was parsed against the live schema, and the 16:9 circle formula (width 10% pairs with height 17.8%) was rendered and measured at a 1.000 aspect bounding box before being published.
Covers the five kinds, the omitted-height rule that is the only way to get a true circle on a non-square frame, the anchor, outlines whose interior is genuinely transparent, rotation about the shape's own centre, softness, and animated geometry with easing. Adds a table of the combinations the API refuses, each with the fix, so the two drawing primitives' split is visible rather than surprising. Every JSON snippet on the page was extracted programmatically, parsed against the live schema, and rendered on the pinned MLT build: all seven draw what the prose says they draw.
Rewrites the Shapes section for what a shape can now do: six kinds including pasted SVG paths, solid or gradient fills, outlines whose interior is genuinely transparent, drop shadows, rotation about the shape's own centre, feathered edges, and position, size, rotation, colour and radius that all animate. Leads with the fact that only `type` and `size` are required, so the page reads as a small feature with a lot of optional depth rather than a large one. The refusal table gains the two rules that came out of the rewrite: `radius` cannot be combined with `rotate` or `softness`, and `transform` is refused on shapes entirely because it moves the frame rather than the shape in it. Every JSON snippet was extracted programmatically, parsed against the live schema and rendered on the pinned MLT build: all nine draw what the prose says they draw.
Rotation used to be a filter parameter spanning exactly one revolution, which clamped and made an animation across the wrap turn the long way round, so the API capped an animated `rotate` at -180 to 180. Rotation is baked into the shape's own outline now, so there is no wrap and no cap: 0 to 720 is two full turns.
Every clip is a real compose render, now live on the CDN under assets/showcase/shapes/, matching how the transitions section already works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the
shapeasset added in rendobar/rendobar#592.Covers the six kinds, the required fields (
typeandsize, nothing else), centre-based positioning and anchors, flat and gradient fills, outlines with a real hole, drop shadows, rotation, feathering, and what animates.Includes the refusal table: every combination the schema rejects, why, and what to do instead. Each row is backed by a real refusement in
timeline.tsrather than prose.Six demo clips, each a real compose render, served from
assets/showcase/shapes/the same way the transitions section already works.Merge alongside the API PR, not before: the schema is not live until that ships.