Skip to content

Layers LA1–LA2: captions marked data-raea-role="caption", and RAEA_LAYER renders one layer of an export - #170

Open
wackyza wants to merge 2 commits into
shinyobjectz:mainfrom
wackyza:layers-captions
Open

wackyza wants to merge 2 commits into
shinyobjectz:mainfrom
wackyza:layers-captions

Conversation

@wackyza

@wackyza wackyza commented Nov 17, 2026 •

Copy link
Copy Markdown

Stacked on #167 (the spec amendment); review the top commit, 9df6d769.

A composition's captions are the one layer split out of its graphics (docs/layers.feature LA1–LA2), so they can go
to an editor on a track of their own and as SubRip:

  • A caption is marked data-raea-role="caption"; the page keeps the mark (runtime/page elements.rs), and the
    timeline's captions operation writes it.
  • RAEA_LAYER=captions|graphics|under renders one layer of an export: captions alone; the graphics less the
    captions; what's under the footage (the backgrounds holding it, and the 3D). RAEA_HIDE_MEDIA's own CSS is
    unchanged, so raea export capcut renders as before.
  • A layer that draws no 3D keeps only the cameras; a render with RAEA_LAYER isn't the export cache's.

Checked: two fixtures rendered in each layer from a source build; tools/*.sh pass at this head (dupes 289/58,
windows-paths ok).

🤖 Generated with Claude Code

…the only layer split out of it

docs/layers.feature after working through the implementation:
- Text is part of the graphics layer. Pulling words apart from the graphics they're built into (kinetic type, words
  cut from a shape, a word behind a graphic) caused more problems than it solved; a text layer may come later, opt-in
  only (an element marked data-raea-role="text"), never guessed.
- Captions are the only layer split from the graphics: marked data-raea-role="caption", nothing guessed.
- One `raea export xml` for Premiere and Resolve; a command of an editor's own only if testing finds it reads the XML
  differently.
- Leaner: the layers composited back is a test of the method, not run on every export; an export always renders its
  own reference; no `raea check` heuristic for unmarked captions; no moving covered captions (captions go on top).
- What rendering the passes taught: the page keeps only the data-raea- props it names, it draws nothing inside a
  hidden element (so the captions pass clears what holds a caption), and 3D is Bevy's, so a layer without it leaves
  the 3D out of the scene and keeps its cameras.

Spec only; no code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…YER renders one layer of an export (captions, graphics, under)

docs/layers.feature amended: text is part of the graphics layer (a text layer only ever opt-in), one `raea export xml`
for Premiere and Resolve, the composite check a test of the method rather than every export's, no reuse of an earlier
render, no unmarked-caption heuristic.

- sdk/timeline: the captions operation's `text` ops say `caption: true`, as does a caption clip added on its own
  (said: true), so the code raea-feed writes can carry the mark.
- runtime/page elements.rs: data-raea-role is kept on the page (KEPT names the data-raea- props the page keeps; the
  mark was dropped before it could be matched).
- systems/layers hide.rs: RAEA_LAYER=captions draws only what is marked a caption: the page draws nothing inside a
  hidden element (vendor/blitz-paint render.rs), so what holds a caption is cleared, not hidden, as RAEA_HIDE_MEDIA=under
  clears what holds footage. graphics and under are RAEA_HIDE_MEDIA's 1 and under, less the captions. RAEA_HIDE_MEDIA's
  own CSS is unchanged, so raea export capcut is too. hiding_css is the pure function hidden_css reads the settings into.
- runtime/scene items_of: a layer that draws no 3D (captions, under; raea_sys_layers::draws_3d) keeps only the
  cameras, since Bevy draws the 3D and the page's CSS can't hide it. This also keeps the 3D out of capcut's under pass
  once it moves onto RAEA_LAYER.
- runtime/bundle cache.rs: a render with RAEA_LAYER isn't the export cache's, as with RAEA_HIDE_MEDIA.

Checked with a source build on two fixtures (footage on a card, a lower third and a caption with a highlighted word;
a 3D turntable with a title and a caption): each layer draws only its own, and raea export capcut writes its draft
as before. Tests: raea-sys-layers, raea-runtime-scene, raea-runtime-page, raea-runtime-bundle, sdk/timeline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant