32 Commits
Author SHA1 Message Date
shaneandshinyobjectz 740f3c2cf4 Engine side of the render-cost work: clip decoding, frame keys, NVENC (#282)
* A page reads a clip on from where it stopped: up to 4 readers a file, so a clip shown twice at once isn't sought every frame

Where two elements showed one 4K clip, they shared one decoder and ffmpeg restarted every frame (31 starts in 30
frames). Each file now keeps up to 4 readers, each reading on from its last frame (the one behind within 60 frames,
else a new one, else the least used), and the frame it read last for a second ask. Those frames: 909 to 53 ms on the
Mac, SSIM 1.000000; a 30 s ad of 4K street-interview clips on the farm's GPUs 277 s and $0.106 to 153 s and $0.033.

* render --keys: each frame's key with nothing drawn, and the largest each clip is drawn

raea render EDIT --keys keys.json steps React through every frame and makes the page match it without reading a clip
or drawing: each frame's key (its elements' place, kind, props and text, each video's file and time, its 3D rows;
paths named from the composition's folder), has3d, the piece's sounds, and the largest each clip is drawn (box as
drawn, transforms and punch-in applied). A render farm keeps runs by these keys and reads clips from copies no larger
than they're drawn. On the ad: 6.7 s for 894 frames; a caption word changed 70 frames' keys, a sound 3 dB louder none
(CR32, CR36).

* RAEA_NV=1: NVENC and NVDEC in the ffmpeg backend, each after a one-frame try on the machine

The render farm sets it on a GPU's runs of a piece with 3D in it. h264_nvenc at libx264's CRF number as constant QP
(SSIM 0.9925 to libx264's 0.9924 on the ad) and clips through CUDA; where a try fails, libx264 and ffmpeg's own,
said once. The answer is kept for the machine's later runs (CR34).

* The face track and render --review's sheets are crates of their own (raea-sys-facetrack, raea-runtime-review): raea-runtime-page and raea-runtime-export are under 2000 lines again

* One opener for a video (raea_io_media::open_video) and one step of React to a frame (step_react), where the render-cost work had copied each

---------

Co-authored-by: shinyobjectz <[email protected]>
2026-11-30 19:16:06 -08:00
shinyobjectz e9909de88f NB2a: debug views as channels with values; messages that told an author to run cargo
io/trace's stat_value gives a channel a value (pass=depth, lod_debug=time, fog_skip=a,b; a channel chosen bare is
"1"), its variable still the override. Nine debug views (clay, fog_debug, fog_show_fallback, lod_debug, pass,
pass_rays, pass_reach, song_debug, volume_debug), inspect and fog_skip go through it, so a composition chooses them
with stats.on. tools/nobuild.sh stats: pass=depth chosen from TypeScript draws RAEA_PASS=depth's frame (max 0 levels
apart, 240 from the picture), and its static check covers the 35 stat and view variables decided done.

raea song, framing="face" and matchmove say to update raea when raea-perceive is missing (releases ship it) rather than
to build it. export-game says this raea ships without raea-game and how to ask for it; the note on the smaller player
prints only to a checkout's build.
2026-11-22 09:15:58 -08:00
shinyobjectz 590ec633f8 SG11, SG14: the manifest lists the page's pictures and the words that may sit on a part
The render manifest's frames gain `pictures`: each shown img, inline svg, and element painting a background image or
a colour at least half opaque, past a quarter percent of the frame (engine/page manifest.rs). SG14's coverage counts
them with the page's words and videos. Measured on Stay with its page known, two of its four empty stretches before
frame 1699 clear; the other two show a pool room whose walls, floor and water are backdrop by the slab rule, so
frame-empty stays a warning.

Words in an element that says data-allow-overlap are marked allowOverlap in the manifest, and SG11's type-over-part
leaves them be: a headline across a card is an error, the same words under data-allow-overlap pass. The finding's
fix and raea render's manual say so. in_caption and the new walk share one ancestor test.
2026-11-21 21:37:18 -08:00
shinyobjectzandClaude Opus 5.5 f40e458776 Land Zach's layers stack (#167, #170, #171, #172) on main for 0.1.8
raea export layers and layers.json, CapCut drafts written from layers.json with a captions track, raea export xml
(FCP7 XML for Premiere Pro and DaVinci Resolve), footage that moves, is cut or fades keyed in every export, and the
delivery and words guides teaching them (raea-skills #99, merged onto raea-skills main).

Conflict: engine/cli/src/cli.rs's help, where main added raea wear and raea setup motion beside Zach's raea export
layers and raea export xml; both kept. The skills pin is raea-skills main with #99 merged (f37e5e3).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 09:33:11 -08:00
shinyobjectz e50c22064f RR3: in progress. A whole video made as shot segments and joined by stream copy, behind RAEA_SEGMENTS=1 until RR3's gates are measured. raea-runtime-segments: a new encoder run (unsigned) at each cut once the segment before holds a second of frames (split.rs), the whole wrapped by the signer so the export is one file with one watermark id, signed once after the join (encode.rs); the join reads the segments' MP4s with re_mp4 (H.264/HEVC to Annex B with their parameter sets ahead of each keyframe, AV1 OBUs as they are) and writes one with muxide, the sound laid under once from the backend's new Backend::sound (AAC on Apple, Opus on soft and av1) (join.rs). Cuts come from each frame of the fed render (an outermost Sequence's data-raea-start, raea-runtime-page shot_starts; the engine's camera cut, raea_sys_frame::shots::Cut set in pre_step) and the timeline's Shots up front. io-codec gains SoundTrack, remux::aac_track and hvcc_params; io-media backend_unsigned and a public sign::wrap. Benches: film.tsx's cut and cut-long compositions, pages.tsx, rr3.sh (segmented against one run: SSIM >= 0.999 and VMAF >= 99 per frame; join under 1 s on 3,600 frames). Tests: two segments joined are one video with one sound and the segments' own bytes; the encoder splits at cuts but not after a short shot 2026-11-17 19:52:34 -08:00
Zachary GuglinandClaude Opus 5.5 9df6d769e3 layers LA1-LA2: captions marked data-raea-role="caption", and RAEA_LAYER 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 <[email protected]>
2026-11-17 14:58:27 -08:00
shinyobjectz 80fbde3c58 H12: app::bundle takes the props its default export is mounted with (WINDOW, SCREEN) in place of two one-line forwarders; the app screens' log read through screen::logged (no new duplicate groups: 292 exact, 59 near) 2026-11-16 06:43:49 -08:00
shinyobjectz c30bcfbbef H12: what reached the app screens (Routed: routed, logged, read back) in raea-runtime-appscreen, and an app screen's texture handed over as bevy's; live play's needs_react in its own file (raea-runtime-page under 2000 lines, runtime/live/src/lib.rs under 500, no new duplicate groups) 2026-11-16 06:43:49 -08:00
shinyobjectz 2262e1cc7d H12: <Screen app> drawn on a Blitz document of its own
raea-runtime-appscreen opens each app screen's module on a BlitzPage of its own at the screen's size, on the shared device, with the CSS its modules import and Tailwind's for its folder (or an exported game's prebuilt X.tsx.surface.js and .surface.css). It is stepped once a frame: the input route() gave it as Blitz's pointer, wheel and key events, then one update that runs its JS on the frame's clock, and paints; the draw's later updates while faces load only paint. runtime/page's sync steps every app screen (screen.rs step_all, at at_frame's frame in a render and set_app_frame's in live play) instead of saying it isn't drawn, and its picture goes with the nested screens' (screen_textures, frame_all) to Engine::copy_screen or set_screen_picture.
2026-11-16 06:43:49 -08:00
shinyobjectz a5d89e95c1 LR7: a composition's document, with LR5's style and LR8's observers. LR5: el.style reads and writes the element's style (writes send an update op; React's next commit to the property wins), and getComputedStyle answers from the page's computed style: page.layout takes { styles: [ids] } and the snapshot carries s: {id: {property: value}} for them, as stylo serializes it (engine/page read.rs computed_style), kept until the next commit (page-layout.ts computedOf). LR7: document has body (the composition's surface, the element the page draws from), documentElement, getElementById, querySelector(All), createElement (appended into the composition it's laid out and measurable, removed it's gone; a canvas is an OffscreenCanvas), createTextNode and createRange: a Range over a text node is its characters laid out in the parent's computed font, placed where the parent's line starts. An svg <text> has getComputedTextLength, getNumberOfChars, getStartPositionOfChar, getEndPositionOfChar and getSubStringLength, laid out by usvg in the element's computed font (canvas.svgText: family, size, weight, letter- and word-spacing, font-variation-settings). document.fonts loads a family the composition asked for (fonts.load), and a FontFace given by URL is fetched through raea's cache into the faces an svg's and a canvas's text are set in (fonts.face). window is globalThis with innerWidth, innerHeight, devicePixelRatio and getComputedStyle. LR8: ResizeObserver calls back after a commit whose layout changed an observed element's size, and once on observe, with contentRect, borderBoxSize and contentBoxSize; while a delayRender hold is open it checks every 16 ms, as a browser renders while a page waits. MutationObserver and IntersectionObserver exist and never call back. A pass that draws no page (the sound pass, the 3D rows' pre-pass) answers reads with a 0 x 0 page, and its holds are released (page-layout.ts noPage): a hold waiting on a measure could never end there. probes/document.tsx and probes/observe.tsx match Chrome within 1 px 2026-11-12 16:16:09 -08:00
shinyobjectz 7fb2194503 LR1: A composition reads its layout synchronously from the page that draws its frame (#54). Its JS asks page.layout and blocks; settle wakes on the ask as on a flush, applies the commits already sent, and the host lays its page out at the frame's time and answers every element's boxes at once, keyed by React id: raea-sys-page's snapshot (now runtime/dom's too), with offsets from blitz-dom's offset_rect and offsetParent. settle_with takes the host's answer; plain settle says the host lays no page out. Each runtime has its own ask (a render's 3D pre-pass and a bake's workers run beside it). The still, 3D and fed renders answer from their page; the sound pass and the 3D rows' pre-pass answer no boxes. sdk/raea's page-layout keeps the answer until the next commit or frame, so a composition that never reads makes no snapshot 2026-11-12 13:54:53 -08:00
shinyobjectz 559d8274e0 A frame that comes out all black though its page shows something is a warning, said once over its run of frames (#96)
A frame black on two draws whose GPU passes its canary was kept as the scene's black with one stderr line, and every
later black frame was let through silently: #96's 4K handover lost frames 22-29 that way, the render reporting
success. Now, when such a frame's page shows something that isn't black, the render warns "black-frame" naming it
and where it's written ("frames 22-29: drew all black on two draws, though the page shows a rgb(34, 34, 34)
background (handover.tsx:31:3)"), in the run's findings: stderr, the manifest, the summary's count and raea check's.
A page that is black (a black background, nothing on it) says nothing, as before.

raea-page's visible_paint finds it: the first element shown on screen, not a video's holder, whose background or own
words' colour isn't black, with its source stamp; it shares the manifest's opacity and stamp walks, now functions of
their own. raea-core-facts' said_frame joins a frame's finding to the same one running on the frames just before it,
so a run prints one line and counts once. Both black checks of the page path call it (bevy_frame.rs's still and video
frames, render.rs's page over 3D). Left out, as on the issue: a fed MP4's frames, which never come back to the CPU.

RAEA_BLACK_FAULT=3 draws every frame black with the canary passing (a draw dropped whole, as #96's was), to test it.
Checked: a #222 page under that fault warns once over frames 0-5, the manifest holding one finding with frames [0, 6];
a black page under it says nothing. Test: said_frame merges a run and starts another after a gap (the two tests that
say and take findings hold one lock).

Skills (SK4): SKILL.md's "7. Deliver" names runtime/export/src and says nothing of black frames: checked, still true.
2026-11-12 12:49:42 -08:00
shinyobjectz ca54307223 DR1: raea world reads a frame into one world of facts
runtime/world (raea-runtime-world) steps a composition's React to the asked frames, as raea scene lint steps it,
and reads each into raea-core-facts entities: the 3D layer with its Camera (velocity from the next frame) and
Parts measured from their triangles, Text3D as Text and Part; the page laid out by the render's own Blitz page with
nothing painted (BevyPage::lay_out), so text has its box, size, font and line count; Sequences as Shots (from and
to; Sequence now stamps data-raea-end), footage as Clips with SHA-256 and their take's words, sounds as Cues, the
project transcript's lines and <Speech> lines; each entity's Source from the code stamps. <style>/<script> text is
not read as words.

apps/direction: raea world EDIT.tsx [--frame N | --at A-B|A,B] [--find JSON] [--no-layout] [--json]; --find spans
media (with, without, where Comp.field).

Folds: raea_runtime_react::scene::surface, raea_runtime_bake::runs, raea_core_facts::Word/transcript_words (raea
check's). Stamps name Audio. The time a layout-only page update gets is sent as a drawn update sends it.
2026-11-10 07:47:50 -08:00
shinyobjectz d1edca2817 Layer pass: a <Video> is a layer (docs/review.feature R2e; parked with the source stamps): Video and Audio pass their source stamps on to the element they draw (sdk/video media.tsx useMediaAttrs), and the page bridge keeps a video's KEPT data-raea props (runtime/page elements.rs dropped every data- prop of a video, its player's and the stamps alike). bench/layers: a 4 s test-pattern clip in the conformance composition, IoU 1.000 at all three moments; all 16 layers pass and the four mutants still fail. 2026-11-09 12:53:33 -08:00
shinyobjectz c03edea294 Layer pass oracle (docs/review.feature R2e, work in progress, parked with the source stamps): bench/layers/conformance.tsx (two 3D meshes, a component used twice, a page element, text, an image, a rotated element and a .map() list, overlapping) and oracle.sh (each layer hidden in turn at three moments, the pixels that change as quarter-size masks, sampled as NAME.layers' are); all 14 layers' hides change their pixels. Stamps: raea's page parts (Img, Video, AbsoluteFill) stamped as 3D parts are; the work folder's motion/prelude read as raea; data-raea-idx kept through the page bridge. 2026-11-09 12:45:05 -08:00
shinyobjectz ffd2738dcc A <Video> whose src is an http(s) URL plays it, fetched once into raea's URL cache (closes #57)
core/scene's media_path joined an https src to the composition's folder, so a remote clip was refused as
"<dir>/https:/…: no video track" (seven snapcn components in #13: hero-launch, laptop-frame, phone-frame,
phone-stack, reel-collage, reel-wall, screen-recording).

raea_io_net::cache::remote(src) gives an http(s) src's file through cache::fetch (keyed by the URL, which is in
the composition's source, so a render stays a function of its code; under $RAEA_CACHE beside the render cache)
and None for a file. The page's video elements, the export's sounds and live play's video list ask it first.
A src that can't be fetched refuses the frame saying why: "video <url>: HTTP 404 Not Found", or "(not in
raea's cache): not sent, because RAEA_OFFLINE is set". The cache's status errors no longer name the URL twice.

bench/remote-media/check.sh: a local server's red clip plays (centre 252,0,0), plays again offline from the
cache, an uncached URL offline refuses, a 404 refuses with its status. Before: all four read the URL as a path.
laptop-frame (snapcn) renders its remote clip, 240 frames at 7.0 ms a frame.
2026-11-08 10:34:24 -08:00
shinyobjectz fa6a5ed17f FC2a: a Material reads the camera's prepasses (shader/shader_prepass, 131/131); live play's 3D under the page drawn opaque, as a window shows it
shader/shader_prepass passes at 4 frames, one per prepass view (transparent, depth, normals, motion vectors), stepped by
scripted Space presses. The camera carries Bevy's DepthPrepass, NormalPrepass and MotionVectorPrepass and Msaa::Off as
<BevyComponent>s, and show_prepass.wesl reads them through bevy_pbr::prepass::utils as written. The opaque Material
cube writes into the prepass and turns with Time::elapsed_secs.

Live play drew its 3D under the page blended by the 3D's alpha, which a window ignores, so custom_material's
COLOR_MULTIPLIER alpha of 0.5 faded the opaque cube toward the page's white. The 3D under a whole page is now copied
opaque (place_under, fs_opaque), as raea render and Bevy's window present it.

Outside the text block at most 574 pixels differ (edges). Mutants fail: the normals view off, NormalPrepass removed,
the cube's turn frozen, the opaque cube blended. A Mask cutoff of 0.2 against 1.0 passes the bar but moves the pixel
probe (2350 to 2474 px): the icon's alpha is all but 0 or 1. The ports with input scripts rerun pass.
2026-11-08 07:00:32 -08:00
shinyobjectz 450f8e4a97 FC0a: ui/widgets/standard_widgets under scripted input: the menu opens, its popup placed by Bevy's Popover
The bar can now drive an interactive example. A row of bench/bevy-parity/runs.tsv may name an input script, in the format `raea play --input-script` takes ({"FRAME": ["Pointer:X:Y:down"]}). The example gets it as RAEA_PARITY_INPUT: systems/parity input.rs writes bevy_picking's PointerInput messages on the picture the cameras draw into. The port's pictures then come from `raea play` under the same script; cost still comes from the render.

Gaps found and patched on the way:
- raea play sent its pointer only to useInput, never to page elements, so a composition's onClick never ran. The live step now hit tests the pointer on the page (BevyPage::hit_path) and sends its React handlers the events a browser fires, in a browser's order: over/out, enter/leave, move, down/up, and click on what both the press and the release were over (runtime/live pointer.rs).
- bevy_ui_widgets' Popover: Node takes `popover` ({positions: [{side, align, gap}], window_margin}). raea's Blitz places the popup after layout beside its parent's box (inside its border), at the first placement the window hides least, as position_popover does (vendor/blitz-dom bevy_popover.rs). It's drawn and hit tested there. Node also takes bevy_picking's handlers (onClick, onPointerDown/Up/Over/Out/Enter/Leave/Move; sdk/render ui-pick.ts). The page bridge keeps data-raea-bevy-popover.
- After any state change in play, bevy text was drawn broken at min-content width: raea's bevy_text min-content measure breaks lines at width 0, and a box whose layout taffy kept from its cache never broke them back. A measure now puts back the lines a laid-out box keeps (blitz-dom inline.rs, TextLayout::performed_width).

The port's Button reads "Hover" and "Press" as set_button_style has it; the menu button toggles spawn_menu's popup of four items, each lit while hovered; activating an item closes the menu. Under a click on Menu, then the pointer on the first item: 0.994691, worst tile 17. Without the toggle, the popover, GlobalZIndex or hover, with the side flipped, a 6 px gap, three items or 90% width, the bar fails; a gray border passes it and the probe catches it (7217 px off against 6465). conformance/ui-pick.test.tsx; blitz-dom bevy_popover tests; runtime/live pointer test.
2026-11-08 02:24:37 -08:00
shinyobjectz c703bb308c FC0a: UiMaterial, as Bevy's ui/ui_material runs it (docs/control.feature FC2a). raea/ui's MaterialNode draws a node with a fragment shader of the author's, compiled as written: its @group(1) bindings are renumbered into raea's slots (up to 8 uniforms of any type to 256 bytes, 4 textures and their samplers; raea-sys-shader ui_bind.rs) and it reads UiVertexOutput as in Bevy. raea-sys-shader's ui.rs runs Bevy's own UiMaterialPlugin with one material type: each node is drawn by a Camera2d of its own into a texture of its border box (the node's border widths and corner radii as Bevy resolves them), which the page shows in the node's place, on the GPU or read back. ui/ui_material passes with no pixel off at frame 10; its probe caught every mutant (colour, border colour, slider, the border's width and radius, the texture). The rerun of every registered port changes nothing else (107 of 110 pass; the 3 that fail are the known frame-time and transparency_3d ones). 2026-11-07 23:29:58 -08:00
shinyobjectz 9fe4c0c307 FC0a: ui/widgets/feathers_gallery ports at 0.99561, with the rest of bevy_feathers: panes, sub-panes and groups; menus, selects, list views and tool buttons; checkboxes, radios, toggle switches, disclosure toggles and the slider; the text input, colour swatch, colour slider, colour plane and colour input; and its icons
The gallery brought four gaps, now patched rather than skipped:
- Okhsla: bevy_color's Okhsla (in f32, as Bevy computes it), and Okhsla gradients sampled from okhsl's mix, which CSS has no space for. An Hsla track keeps its stops' hues, so the hue slider runs the long way back to red as Bevy's does.
- A spreading BoxShadow: bevy_ui widens the shadow by the spread and scales its height and corners by the same ratio. The spread is now sent, and a node marked data-raea-bevy-shadow is spread by that rule in raea's Blitz (vendor/blitz-paint box_shadow.rs, unit tested).
- A translucent border blended over the node's own background. Bevy draws the background inside the border only, so the border blends over what lies under the node. Feathers' disabled switch slide showed it.
- The alpha checkerboard and the colour plane are UiMaterials in Bevy. raea has no UiMaterial yet (FC2), so the checkerboard is a tiled conic gradient centred on the node, and the plane is a bitmap of color_plane.wesl's formulas.

Where Bevy 0.20 itself differs from its intent, the port draws what Bevy draws:
- The list view's scrollbar never finds its scroll area (#inner, passed through the scrollbar's props, resolves to no entity), so Bevy draws its track and no thumb, and keeps the gutter.
- The hex field's InheritableFont { font: MONO } never reaches the input's own text, so it shows in feathers' regular face.

ui/images/image_node_resizing's camera index moves to 429: every example's Bevy run now has one fewer startup entity in the parity host, and this port is the only one that names an absolute index.

Probes caught all 11 gallery mutants, against 4 for the bar alone: the swatch's opaque part, the checker's phase and colours, a mirrored thumb, a lost middle stop, a flat alpha track, swapped plane axes, the plane's fixed channel, the list track, the border blend and the colour input's size. All 55 ui ports pass again.
2026-11-07 21:32:37 -08:00
shinyobjectz 00327576cc #35's test of an SVG <text>'s attribute names takes its frames from the walk (part of #27). It handed Tree::diff a frame written by hand with $ns already in it, so nothing tested the walk giving it: with elements.rs's page.insert("$ns", "svg") taken out, every test still passed. The test now builds the React tree a composition's commit leaves (a <text> in an <svg>, and a <title> under its <foreignObject>), walks it on each of two frames as BevyPage does, and sends the walk's wants through Tree::diff to ops::apply. It checks that the <text> has $ns and the HTML <title> doesn't, and that the second frame's fontSize and textAnchor keep their SVG names. With the insert taken out, it now fails at "the walk names the <text> SVG's". world.rs's walk (a plain App's page) now also starts from IN_3D 0 and IN_SVG false, as BevyPage's does. 2026-11-07 19:14:20 -08:00
James DimachkieandClaude Opus 5.5 07908a430d #27: the regression test moves to raea-runtime-page, through the frame diff
raea-sys-page is at its 2000-line limit (tools/size.sh), so the test of an SVG <text>'s attribute names leaves ops.rs.
In raea-runtime-page it takes the path a composition's frames take: the walk's Wants (the <text> with `$ns`), then
Tree::diff, whose second frame sends only the changed fontSize and textAnchor, then ops::apply. It fails without the
ops.rs change: the update adds fontsize and textanchor beside the stale font-size.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-07 18:15:43 -08:00
James DimachkieandClaude Opus 5.5 2e6ff46aea #27: an SVG <text>, <image> and <title> keep their SVG attribute names
The composition walk never said `$ns: "svg"` for the three SVG tags HTML also has, so inside an <svg> they became
HTML elements and their camelCase attributes were lowercased (textAnchor to textanchor, fontSize to fontsize), which
usvg doesn't know. The walk now tracks whether it is inside an <svg> and not back in HTML under a <foreignObject>
(IN_SVG, beside IN_3D), and gives those three `$ns: "svg"` there, as sdk/ui's host does. An update in ops.rs also
treats a node as SVG's when its element is in SVG's namespace, so an animated fontSize keeps `font-size` on every
frame, on sdk/ui's path too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-07 18:15:42 -08:00
shinyobjectz 67114ed2ca A stylesheet's url()s naming the composition's files reach the page as file URLs on Windows (part of #28). An inline <style>'s font URL was written as a raw Windows path, whose backslashes CSS read as escapes and whose C: it read as a URL scheme. One rewriter (runtime/bundle urls.rs) now serves inline <style> text, style props, brand.css and the CSS a bundle imports, writing each file through raea_io_home::src as <img> does. A relative URL starts from the stylesheet's folder (brand/ for brand.css, the edit's folder otherwise), and /media/ from the edit's. Its unit tests check a Windows path on any system: no backslash is left, and the URL is file:///C:/... 2026-11-07 18:00:09 -08:00
shinyobjectz e4bab2a77a FC0a: ui/images/image_node_resizing passes (SSIM 0.9981, worst tile 9). It brings bevy_ui's debug overlay and NodeImageMode's Auto and Stretch.
- GlobalUiDebugOptions, and a node's own ui_debug (UiDebugOptions, which replaces it): Blitz draws each enabled node's outlines after the whole document, above every UI node as bevy_ui_render's extract_debug_overlay keeps them (vendor/blitz-paint render/bevy_debug.rs).
  - An outline is a ring of line_width inside the border, padding or content box, following the corners' radii.
  - It is cut by the ancestors' overflow unless show_clipped.
  - Its colour is Hsla::sequential_dispersed of a debug_color_index, which Bevy takes from the entity's index, unless line_color_override.
- The port's indices are setup's spawn order from the camera's entity, 430, the one base whose colours match all four outlines measured (container, column, group and the 40% image). The text's observer is allocated later, when the commands apply.
- ImageNode's Auto now draws the picture contained in its content box, its aspect kept, as Bevy does; it was filled. Stretch gives the node no picture size and stretches the picture over its content box.
- The other image and UI ports keep their scores.

Probes:
- Every outline pixel along column 900 and rows 156 and 158 matches Bevy's exactly, colour and place (947 along the group's top edge).
- The first Auto icon's anti-aliased disc edges match Bevy's pixel for pixel.

Mutants:
- Base 431 fails the bar (0.9465).
- Stretch as Auto fails it (0.7387).
- The outlines drawn in reverse order fail it (0.9779) and the probe.
- Auto filled instead of contained passes the bar; the icon-edge probe catches it.

Test: conformance/ui-debug.test.tsx (the hues, global and own options, UiScale, refusals) and the ImageNode modes in ui.test.tsx.
2026-11-07 17:41:13 -08:00
shinyobjectz ec33f6b871 FC0a: ui/scroll_and_overflow/scrollbars passes (SSIM 0.9945, worst tile 21), with bevy_ui's ScrollPosition and IgnoreScroll, bevy_ui_widgets' Scrollbar and ScrollbarThumb, and UiScale laid out at its scale.
- ScrollPosition (Node's scroll_position): scrolls only a Scroll axis. Blitz keeps it in the scroller's range once layout has its content and floors it to whole physical px, as bevy_ui's layout does (vendor/blitz-dom bevy_scroll.rs, from resolve).
- IgnoreScroll (ignore_scroll): Blitz moves the node back by its parent's scroll on those axes.
- Scrollbar (target by a Node's new `name`, orientation, min_thumb_length) is a Node track. ScrollbarThumb isn't laid out: after layout, Blitz sizes and places it in the track from the target's size, content and asked ScrollPosition, as update_scrollbar_thumb's size_and_pos does.
- The page bridge keeps the new attributes (data-raea-bevy-scroll, -ignore-scroll, -scrollbar, -thumb).
- UiScale is now CSS zoom, not a transform of a logical layout. Bevy lays the UI out and shapes its text in physical px, so a 3 px padding at 1.25 is 4 px; scaled-up text sat about 1 px low. A sliced ImageNode's corner limit and tile stretch take the scale with it (ui_texture_slice_flip_and_tile is pixel-exact).

Tests:
- conformance/ui-scrollbar.test.tsx and the UiScale test.
- blitz-dom's bevy_scroll unit tests: thumb maths and the track attribute.

Mutants:
- No ScrollPosition fails the bar (tile 82).
- Thumbs not placed fails it (tile 44).
- UiScale as a transform fails it (tile 37).
- A thumb that ignores the offset passes the bar. A pixel probe catches it: rows 41-157 against Bevy's 49-165, where the real port matches Bevy exactly (49-165, and 4-240 across).

The other UiScale ports keep their scores.
2026-11-07 17:08:18 -08:00
shinyobjectz d03eb9d7c9 FC0a: bevy_ui's gradients (BackgroundGradient: LinearGradient, RadialGradient, ConicGradient, ColorStops with hints, UiPosition, Bevy's radial shapes, Oklab by default) as CSS gradients, and a bevy_ui page blending in linear light as Bevy's UI does: vendor/vello_shaders' fine stage decodes every colour, ramp and texel from sRGB, blends, and encodes once (set_blend_linear, marked by data-raea-blend on each root Node); ui/styling/stacked_gradients ported 2026-11-07 15:05:29 -08:00
shinyobjectz 71a65438d8 FC0a: bevy_ui's stacking: every node a stacking context (ZIndex ranks among siblings above their parent), GlobalZIndex hoisted to the root's stacking context in Blitz, a cleared layered Canvas3D under the whole page; ui/layout/z_index ported (exact) 2026-11-07 14:49:48 -08:00
shinyobjectz 3a2b027488 FC0a: sliced and sampled UI pictures, UiScale, OverflowClipMargin, a 2D sampler and uv_transform, Text2d, and five more examples ported
UI. raea's Blitz draws CSS border-image (css-backgrounds-3: slice, width, outset, fill, and stretch, repeat, round or
space per axis), loading border-image-source as a third image layer beside backgrounds and masks. ImageNode's
image_mode { Sliced: TextureSlicer } is that border-image, and data-raea-bevy-slice gives Blitz bevy_ui's own rules: the
corners are the slices times min(the node over the picture, max_corner_scale), and Tile tiles a part from its start
every slice times stretch_value. A flipped sliced picture is mirrored on a layer behind its children. An ImageNode's
image can carry its own sampler ({ path, sampler: { filter } }). UiScale lays its roots out in a window 1/value of the
frame and scales it up. Node takes overflow_clip_margin, which Blitz honours for every clipping overflow as bevy_ui's
resolve_clip_rect does. The page bridge resolves url(..) in a style value (a background, a border-image) as it does
an img's src, which no CSS picture did before.

2D. Shape2D and Mesh2d's ColorMaterial take a texture with its own sampler (raea-sys-sampler) and a uv_transform
(Affine2). Text2d places a Text at its Transform, centred as Bevy's Anchor::CENTER. The shape2d row carries the sampler,
the uv_transform and the vertex colours as JSON in one loop, which keeps raea-runtime-scene under 2,000 lines.

Ported, each with a mutant that fails:
  ui/images/ui_texture_slice_flip_and_tile  1.0000 (stretched instead of tiled 0.7857, unflipped 0.8360)
  ui/images/ui_texture_slice                0.9990 (corner scale halved 0.9800)
  ui/scroll_and_overflow/overflow_clip_margin 0.9968 (without the margin 0.9890, tile 120)
  2d/mesh2d_repeated_texture                0.9912 (no uv_transform 0.9420, no sampler 0.9666, Text2d not centred 0.9789)
  ui/layout/flex_layout                     0.9909 (a Center row as FlexStart 0.9463)
58 of 61 ported pass; many_lights, many_foxes and transparency_3d still fail, as before.
2026-11-07 14:07:55 -08:00
shane 3381690416 raea is developed here now (public-first)
This repository was an export of a private one; from this commit on it is where raea is developed. Contributions:
CONTRIBUTING.md.
2026-11-07 13:36:50 -08:00
shinyobjectz 925bc03c09 raea c8b196fdb32690c0ab507b6ecb34463bd859abf8 2026-11-05 04:36:44 -08:00
shinyobjectz f675b0ad2b raea dc579e418 2026-10-31 13:15:29 -07:00