mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-06 05:33:38 -10:00
Round 22's ad cuts spent most of their render passes on two kinds of error that the goal check found only after a
full render: text in the app's UI zones (the floor's safe-area rule) and clips whose in or out cut a word (the sound
pack's edit points). This makes the SDK's defaults avoid both.
Text: uiZones(width, height, {platform, shape}) is the floor's own table (apps/check/text/src/lib.rs zones), and
useUiZones() reads it for the composition. <SafeArea> is a layer over the frame inset by the zones, for text placed by
hand. <Region> now keeps its bands out of the zones by default: its edges were 0.08 H and 0.80 H, inside the 9:16 top
and bottom zones, and its sides a symmetric 65 px, inside the 140 px right-hand zone. keepOut={false} gives the old
bands for a part placed there on purpose, and platform picks a platform's zones.
Clips: a <Video> placed straight in the edit's tree (under an AbsoluteFill or a Series, in its Sequence) on a take
with its words beside it (TAKE.words.json, or footage/TAKE.words.json for a take in media/) moves in its take by the
least amount within 0.4 s that leaves neither end inside a word, judged as the sound pack judges it. In and out move
together, so its place and length in the edit stay and nothing freezes. Clips of one take that play on from each other
(a take split only to reframe it) move together, so the take plays on unbroken where they join; this is why the move
is made where the clips are placed (AbsoluteFill and Series look through their children) rather than by each Video,
which can't see the clips it joins. Each move is written to the render's log once, and the element carries
data-raea-snapped. snap={false} keeps a clip where it is; snap={true} moves a Video on its own where the tree doesn't
reach it.
Tested: bun test conformance (776 pass; the 6 that fail fail the same on main), with new tests in
safe-defaults.test.tsx and the Region tests updated to the new bands. On the three round 22 projects' render manifests
and take words, the clip snapping takes the real cut ends inside words from 24 to 8, 22 to 6 and 2 to 2, and keeps all
65 joins between continuous clips unbroken. On a Fly box, raea 0.1.17-rc4 with this sdk/video overlaid (its files were
identical to main's before the change) rendered a test edit: the caption row placed on the frame is flagged in the
right-hand zone and the same row inside SafeArea is not, a Region's bands are clear, the clip whose in cut a word
plays 300 ms earlier (sounds.clips at 10.2) with the move in the render's log, and the reframed pair is left alone.
The SDK reference pages are regenerated for the new exports only.
docs
Documentation that spans more than one folder.
- settings.md: every setting raea reads (the agent's model provider, the optional API for generated music and speech, checks), and where they go.
Each folder's own README describes that part of the code. Behaviour specs written in Gherkin sit beside the code they
specify, for example sdk/shell/shell.feature and
sdk/raea/spec/motion.feature.