Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
FC0a: ui/text/text_wrap_debug ported (every LineBreak under every JustifyContent, at its default scale)
shinyobjectzbea844ba6ce4
diff --git a/bench/bevy-parity/examples.list b/bench/bevy-parity/examples.listindex 1e656882..89413b2f 100644--- a/bench/bevy-parity/examples.list+++ b/bench/bevy-parity/examples.list@@ -74,3 +74,4 @@ ui/text/generic_font_familiesui/layout/ghost_nodesui/relative_cursor_positionui/ui_target_camera+ui/text/text_wrap_debugdiff --git a/bench/bevy-parity/runs.tsv b/bench/bevy-parity/runs.tsvindex 2f808695..5a5b063f 100644--- a/bench/bevy-parity/runs.tsv+++ b/bench/bevy-parity/runs.tsv@@ -73,3 +73,4 @@ ui/text/generic_font_families - 10ui/layout/ghost_nodes - 10ui/relative_cursor_position - 10ui/ui_target_camera - 10+ui/text/text_wrap_debug - 10diff --git a/docs/bevy-parity.md b/docs/bevy-parity.mdindex 51d039c1..0d70271a 100644--- a/docs/bevy-parity.md+++ b/docs/bevy-parity.md@@ -4,7 +4,7 @@ Bevy v0.20.0's examples against their raea TSX ports (docs/control.feature FC0a)don't edit. An example passes when every probed frame passes pixels (SSIM 0.98 and no 32 px tile off by more than 24 of 255) and cost (batch keys andframe time at most 1.25x the example's). Wall time is one machine's, measured in the same run.-Examples: **438**, ported **74**, passing **70**, excluded **16** (docs/bevy-parity/excluded.tsv), left **352**.+Examples: **438**, ported **75**, passing **71**, excluded **16** (docs/bevy-parity/excluded.tsv), left **351**.raea's frame ms is its update's plus the time React takes to step a frame for its 3D (step), which the exampledoesn't pay.@@ -130,6 +130,7 @@ doesn't pay.| ui/layout/ghost_nodes | 10 | 0.998544 | 9 | 0 / 0 | 455 / 492 | 5 / 7 | 1 / 1 | 35.333 / 1.312 = 1.13 + 0.182 | yes | || ui/relative_cursor_position | 10 | 0.999907 | 2 | 0 / 0 | 443 / 492 | 5 / 7 | 1 / 1 | 52.279 / 3.978 = 3.723 + 0.255 | yes | || ui/ui_target_camera | 10 | 0.998769 | 7 | 0 / 0 | 452 / 492 | 5 / 7 | 1 / 1 | 39.413 / 1.71 = 1.71 + 0 | yes | |+| ui/text/text_wrap_debug | 10 | 0.986254 | 15 | 0 / 0 | 589 / 492 | 5 / 7 | 1 / 1 | 34.219 / 0.924 = 0.924 + 0 | yes | |## Excludeddiff --git a/docs/bevy-parity/results.jsonl b/docs/bevy-parity/results.jsonlindex f90ec197..3add8323 100644--- a/docs/bevy-parity/results.jsonl+++ b/docs/bevy-parity/results.jsonl@@ -117,3 +117,4 @@{"example":"ui/layout/ghost_nodes","frame":10,"ssim":0.998544,"tile":9,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":10,"frame_ms":35.333,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.13,"step_ms":0.182,"cost_ms":1.312},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}{"example":"ui/relative_cursor_position","frame":10,"ssim":0.999907,"tile":2,"bevy":{"batch_keys":0,"entities":443,"extents":[],"frame":10,"frame_ms":52.279,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":3.723,"step_ms":0.255,"cost_ms":3.978},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}{"example":"ui/ui_target_camera","frame":10,"ssim":0.998769,"tile":7,"bevy":{"batch_keys":0,"entities":452,"extents":[],"frame":10,"frame_ms":39.413,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.71,"step_ms":null,"cost_ms":1.71},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}+{"example":"ui/text/text_wrap_debug","frame":10,"ssim":0.986254,"tile":15,"bevy":{"batch_keys":0,"entities":589,"extents":[],"frame":10,"frame_ms":34.219,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":0.924,"step_ms":null,"cost_ms":0.924},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}diff --git a/sdk/raea/bench/bevy-parity/ui/text/text_wrap_debug.tsx b/sdk/raea/bench/bevy-parity/ui/text/text_wrap_debug.tsxnew file mode 100644index 00000000..5dd6523c--- /dev/null+++ b/sdk/raea/bench/bevy-parity/ui/text/text_wrap_debug.tsx@@ -0,0 +1,41 @@+// Bevy v0.20.0 examples/ui/text/text_wrap_debug.rs in raea's TSX, at its defaults (no scale factor override, UiScale+// 1): on black, a column of four rows (each 50% tall, so two show), one per LineBreak (AnyCharacter, WordBoundary,+// WordOrCharacter, NoWrap); each row spaces around six columns 16% wide and 95% tall, clipped in x, one per+// JustifyContent, coloured (0.5, c, 1 - c) for c from 0.3 by 0.1; each column holds five 12 px FiraSans-Bold texts on+// reds from 0.8 down by 0.2: its JustifyContent and LineBreak by Debug name, two lines, a sentence and a long word.+// Bevy's Camera2d over the default clear colour is the layered <Canvas3D>. In Bevy's default 1280 x 720 window.+import { AbsoluteFill, Composition, registerRoot, staticFile } from "raea";+import { Canvas3D } from "raea/3d";+import { Node, Overflow, Text, percent } from "raea/ui";+import { Srgba } from "raea/color";++const FONT = staticFile("fonts/FiraSans-Bold.ttf");+const BREAKS = ["AnyCharacter", "WordBoundary", "WordOrCharacter", "NoWrap"] as const;+const JUSTIFY = ["Center", "FlexStart", "FlexEnd", "SpaceAround", "SpaceBetween", "SpaceEvenly"] as const;++function Shot() {+ return (+ <AbsoluteFill>+ <Canvas3D layered clearColor="rgb(43, 44, 47)" />+ <Node width={percent(100)} height={percent(100)} flex_direction="Column" background_color={new Srgba(0, 0, 0)}>+ {BREAKS.map((linebreak) => (+ <Node key={linebreak} flex_direction="Row" justify_content="SpaceAround" align_items="Center" width={percent(100)} height={percent(50)}>+ {JUSTIFY.map((justification, i) => {+ const c = 0.3 + i * 0.1;+ const messages = [`JustifyContent::${justification}`, `LineBreakOn::${linebreak}`, "Line 1\nLine 2", "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas auctor, nunc ac faucibus fringilla.", "pneumonoultramicroscopicsilicovolcanoconiosis"];+ return (+ <Node key={justification} justify_content={justification} flex_direction="Column" width={percent(16)} height={percent(95)} overflow={Overflow.clip_x()} background_color={new Srgba(0.5, Math.fround(c), Math.fround(1 - c))}>+ {messages.map((m, j) => (+ <Text key={j} font={FONT} font_size={{ Px: 12 }} justify="Left" linebreak={linebreak} background_color={new Srgba(Math.fround(0.8 - j * 0.2), 0, 0)}>{m}</Text>+ ))}+ </Node>+ );+ })}+ </Node>+ ))}+ </Node>+ </AbsoluteFill>+ );+}++registerRoot(() => <Composition id="main" component={Shot} durationInFrames={11} fps={60} width={1280} height={720} />);