Commit Graph
24 Commits
Author SHA1 Message Date
shinyobjectz 609a22c9ec Drop the dependencies render-memory's splits left behind (cargo shear, CI's unused-dependencies gate): raea-render's eleven systems crates went with RaeaPlugins to raea-render-plugins, raea-runtime-calls's bevy with raea/ecs to raea-runtime-ecs, raea-sys-material's raea-core-shape with toon to raea-sys-toon. raea-render's cargo-shear ignore goes too: spawn.rs reads a mesh buffer through raea_core_shape::buffer_json now 2026-11-29 16:02:31 -08:00
shinyobjectz 2835c1478a Split the five crates render-memory took past 2000 lines, each where it parts cleanly, so the next lane has room (the size and rask gates; the one-time allowance is gone):
- raea-core-tables (core/tables): a row's per-frame tables, from raea-sys-frame (re-exported there as tables)
- raea-runtime-ecs (runtime/ecs): raea/ecs on Bevy's ECS, from raea-runtime-calls (ecs.rs re-exports it)
- raea-sys-toon (systems/toon): toon surfaces and outlines, from raea-sys-material; its shaders keep the embedded path compositions name (raea_sys_material/toon.wesl)
- raea-render-plugins (engine/render/plugins): RaeaPlugins, from raea-render (engine.rs re-exports it as raea_plugins; the imports only it used are gone)
- raea-runtime-kinds (runtime/kinds): the rows of models, panels, decals, plates, fog, fire, splats, mesh sequences and grass, with placement and name_column, from raea-runtime-scene
maps.rs's inline and panel pictures move to maps/pictures.rs (re-exported, 422 lines left)
2026-11-29 16:02:31 -08:00
shinyobjectz ac9e2f9ba6 Fold render-memory's copies into what they copied (the dupes gate, 297/60 back to 293/57): one two-generation cache, raea_core_shape::Generations, for core/shape's meshes and runtime/calls' built Manifolds; swapped maps load their pictures with maps.rs's panel_picture; raea_io_home::write_whole for a file written whole or not at all (the BC7 maps first); spawn_sig(it, swapped) one function, its callers saying which; the store's spawn given its columns. Size allowances taken down to the folded sizes (solid.rs is back under 500) 2026-11-29 16:02:31 -08:00
shinyobjectz b589826e7c RM1-RM10: halcyon r109's sequence from killed at 24-25 GB to a 7.8 GB peak (footprint 5.5 GB), the look within run-to-run noise
- RM1: materials' maps and Solari's traced meshes on the GPU only (RAEA_KEEP_CPU_ASSETS=1: the control)
- RM2: a sequence's first 3D engine let go before a second opens
- RM5: JS solids deduplicated by expression, their Manifolds in a two-generation cache (192 MB each); solid.free
- RM6: a map whose picture changes by frame is one part and one material, its picture swapped as frames show it
  (raea-sys-material swapped.rs): the pool's 96 water maps were 96 meshes and 186 textures
- RM7: Manifold shapes welded into indexed meshes (4.65 corners a vertex in halcyon; RAEA_NO_WELD=1: the control);
  a held frame settles to the same picture, boiling 0.30% against 0.38%
- the shape text kept out of the store and the Edit (the engine spawns from the program's rows)
- RM8: a BufferMesh of 64 KB or more kept on disk by its content (buffer:@NAME, raea's caches/buffers):
  shape text 274 MB -> 11.8 MB
- RM9: material maps as BC7 with their mips (intel_tex_2), cached by content in raea's caches/maps, any size
  resampled to whole blocks (RAEA_NO_BC=1: the control): GPU images 733 MB -> 282 MB
- RM10: raea-sys-contact's solids as bytes, a count and u16 surface points: 1.27 GB -> 0.37 GB mid-render
- memtally names the biggest GPU images; RAEA_MEM_MARKS prints the program's text by column and shape call
- tools/memprobe: memseq, heapwho/heapseq (malloc stack logging, holders.py), abenv/abseq/steadyab (A/B on one binary)

docs/render-memory.feature has each step's numbers and gates.
2026-11-29 16:02:31 -08:00
shinyobjectz ee42e31469 NB2a: stat channels and pass timings chosen and read from TypeScript
io/trace's stats.rs: a stat channel is a RAEA_ variable's name without RAEA_ (bake_trace, trace, bevy_passes), on
when the composition chose it (native("stats.on", { channels }) at its top level), when RAEA_STATS lists it, or when
its variable is set, the override. The 51 reads of 24 trace and stat variables go through raea_io_trace::stat. Each
of Bevy's render passes (RenderDiagnosticsPlugin, on by bevy_passes) and PassTimer's go into the run's totals, with
the counters engine/draws and engine/updates; native("stats.read", {}) returns them, and a run that chose a channel
prints the table and keeps stats.json in its trace folder (docs/manual/reference/cli/traces.md).

tools/nobuild.sh stats checks it: every channel decided done reads through stat(); the scene choosing bevy_passes and
trace traces, reads 9 passes and 11 draws back on its last frame, prints the table and keeps stats.json; with nothing
chosen nothing prints; RAEA_TRACE=1 and RAEA_STATS give the same trace lines. 12 frames take 12 updates.

raea-render's lines stay as they were (NB4a's plugin choice folded to one line). native-calls.ts gains the two calls,
and bevy.app.*, which raea registers now that the macOS build links the plugin catalog.
2026-11-22 09:15:58 -08:00
shinyobjectz 3a98e0a52d raea run prints its console, its answer and a throw's message (#168)
raea run's program said nothing: its console went to the log, and raea run's headless App has no log, so every
console line was dropped. The default export's return value was dropped too. A throw printed its stack alone, which on
JavaScriptCore is only the frames, so the message was missing.

- runtime/calls: CONSOLE. While it's on (and ECHO), a script's console goes to the terminal as node's does: log and
  info to stdout, warn and error to stderr (raea-runtime-react's __raea_log). print takes err for a line meant for
  stderr.
- raea-runtime-export: run_bundle_to_terminal turns it on for raea run, raea test and raea blender run. raea check's
  asks and a spec's read keep run_bundle, whose stdout is their answer.
- raea-runtime-bundle: bundle_script's entry (script_entry.ts) prints what the default export returns, a string as it
  is and anything else as indented JSON. A throw prints as error: Name: message, then the stack, on stderr, exit 1.

Checked with the issue's cases on this build: console lines before and after an await, both streams, a returned object
and a returned string, a throw (exit 1, message and stack on stderr), a script with no default export. raea test's
output is unchanged (random-colors.test.ts, 9 pass). The manual's raea run page says all of it, with an example.
2026-11-21 19:11:44 -08:00
shinyobjectz ea77b0dbb1 WR4: raea wear bake and the native call wear.bake, on the weathering bake [WR1] [WR2] [WR3]
A .glb gets a second uv set and four cause maps over it, kept by content in the composition's asset store: sky,
the year's sun, cavity and edge; run-off, what it left and its kind, and touch; height over the walk, the chart's
element and open sky; the winter sun, driven snow and where blown things settle. raea-sys-weathering packs planar
charts (flood, merge, split, absorb, hide) and casts parry3d rays; raea-sys-runoff walks rain down faces, along
ledges and off drips, carrying rust, copper, zinc and grime downstream; raea-sys-touch finds door leaves, treads,
rails, passages and gateways, and where plates, bills and nameplates belong; raea-sys-exposure takes the sun by
date and driven snow; raea-sys-glb reads and writes the .glb. wear.bake is registered with the calls crate's
natives (runtime/calls). Tests: weathering 10, touch 9, runoff 4, exposure 4, wear 3.
2026-11-17 19:52:34 -08:00
shinyobjectz 1dee5992e5 HG16: in progress: a SOMA body's twist joints set on any pose (raea-sys-body with_twists, native call character.twists, raea/character withTwists), so a clip or a solver that turns the named joints only draws with the limbs' twist spread. The body library's captures, moved to SOMA joint for joint, play on SOMA's body through it 2026-11-15 05:33:25 -08:00
shinyobjectz bdb77110de HG16: in progress: a SOMA body posed from a motion's turns in the SDK. raea-sys-body turns.rs: from_turns (a joint's world turn from bind is the motion's turn after the turn from bind to SOMA's T-pose; a joint the motion doesn't name rides its parent) and set_twists (each limb segment's four twist joints by SOMA's shares); native call character.turns; raea/character turnsPose and TurnsClip. Test: a forearm's twist joints take 5 to 95 per cent of the hand's turn, an upper arm's stay with the chest near the shoulder 2026-11-15 05:01:35 -08:00
shinyobjectz 56c71ed264 HG12a: motion on SOMA's skeleton plays on a raea body. SOMA (NVlabs/SOMA-X, Apache-2.0) is the 78-joint skeleton NVIDIA's motion models and datasets speak. raea-sys-body soma.rs points each of raea's bones the way SOMA's matching bone points, at raea's own lengths, fits the pose to those places, and turns each arm's and leg's first bone so its elbow or knee flexes about its own axis (settle_hinge, shared with two_bone). raea/character: readSomaUsda reads a SOMA animation saved as text USD; somaPose is the native call character.soma. A body 1.3 times the size under SOMA's names is followed within 2 degrees a bone; SOMA-X's example animation plays on turbo. 37 tests 2026-11-15 04:16:41 -08:00
shinyobjectz f6b3188d9f HG6b, HG5b: the arms inside the rig's ranges, the head and chest out of the scene's solids, and SOMA-X's hand prior on raea's fingers. limits.rs is sdk/body's axes and limits in Rust (the same ranges); a take holds both arms inside them and says when it had to. When a solved pose puts the head, neck or chest within 9 cm of a solid the take is solved again with less bend and lean and more squat. prior.rs and data/soma_hand_prior.bin (SOMA-X, Apache-2.0; data/README.md): a 32-component model of real hand poses cut to the rig's fifteen finger joints; a hand shaped by a few numbers, any hand read back and scored; a take opens the hand as it comes in. raea/character's handShape is the native call character.hand. 23 tests. The take scene is the Character SDK project's 2026-11-14 21:25:26 -08:00
shinyobjectz a68b96cf89 HG5a: the rest of both sources, in Rust. From Ik-Object-Holding: interact.rs pick (the nearest thing in reach that the eyes see past the scene's solids) and body.rs look (the head turned to the thing, neck and head sharing it), on through a take. From SOMA-X: fit.rs, the analytical pass of its pose inversion on marks (20 random poses recovered from joint heads and bone ends, every joint within 4 mm), and arm.rs twist_joints, its procedural twist-joint evaluator. raea/character's fitPose is the native call character.fit. A wrist stops at 70 degrees and the frame says so; the fingers point the level way the arm comes; the squat takes more from the hips and less from the back. 19 tests. docs/hands.feature says what of SOMA-X is not converted and why 2026-11-14 21:25:26 -08:00
shinyobjectz 986fae3c62 HG5: a character in a scene takes a thing. raea/character's take(skel, base, spec, t) makes the native call character.take (runtime/calls), which is systems/grab's take_json: the pose for <Character> and the thing's place each frame, with how far a wrist missed and how far the body was turned from its own motion. Asked as JSON it is the same frame as asked in Rust (a test; 13 pass). Rendered on a psx person: a box taken off a table with both hands and thrown, a cup moved across the table in one hand, upright, the fingers round it; 420 frames, no errors. Not fixed here: hands pass through the table (HG6), and the box's carry place wants tuning by eye 2026-11-14 21:25:26 -08:00
shinyobjectz 6abeb6ed43 LR10: a Google family from raea/text's loadFont is fetched when loadFont is called, and a canvas's measureText and svg text have it. The page fetched it at the first layout that named it, after a component's first effect had measured (its canvas found the fallback), and a family the page fetched first was cached without ever reaching usvg's font database, so document.fonts.load found it already known and gave the canvas nothing. Figtree's "scene" at 600 64px measured 145.72 (the fallback) against Chrome's 171.25; now 171.26. blitz-dom leaves out an app-bundled svg face of a family the page already gave (Geist fetched at import came before the bundled Geist, and both stayed; tested). snapcn 17 -> 18 of 33: bloom-lockup passes (40.8 px off before), word-gather 25.5 -> 1.2; P26 unchanged (185 of 215, every frame at the same SSIM) 2026-11-12 21:04:41 -08:00
shinyobjectz 4dc3083c6e apps/engines: Blender's TypeScript runner and Godot in a crate of their own, so apps/tools and engine/cli stay under the 2,000-line crate limit (tools/size.sh)
The lane's first commit put apps/tools at 2,192 lines and engine/cli at 2,041, and L1 refused it. raea-app-engines
(apps/engines, layer apps) now holds godot.rs, godot_run.rs and blender_bridge.rs unchanged, and `raea blender run
SCRIPT.ts` (blender_ts.rs, moved out of engine/cli's cli.rs). Its cli(args) answers `setup blender|godot`, `blender ...`
and `godot ...`, so cli.rs calls it once where it had five branches. Finding and setting up Blender stays in
apps/tools/src/blender.rs, whose run and sha256 are now pub for Godot's setup; zip and dunce moved with Godot.
Sizes now: apps/tools 1,496, apps/engines 777, engine/cli 1,996 (main has 1,999).

tools/layers.toml gives the crate its layer; tools/skills.sh's stale-help check also watches apps/engines/src, where
Godot's usage now lives; docs/godot.feature, sdk/godot/README.md, sdk/godot/tools/gen.sh and runtime/calls/src/blender.rs
name the new paths.

Proven: cargo test -p raea-app-engines -p raea-app-tools (10 and 12 pass, among them a new test that cli() takes only its
own verbs and leaves the rest to the CLI); raea built with it runs `raea godot`, `raea setup godot --check` and
`raea blender run` on a .ts script as before.
2026-11-10 21:42:49 -08:00
shinyobjectz b2631ff5b6 raea/blender and raea/godot: Blender's and Godot's whole APIs from TypeScript (docs/blender.feature BL22-BL35, docs/godot.feature GD1-GD10)
Shane, 11-10: "include natively a blender api package in raea/blender using samchon/blendia as good starting place and
get us to a solid scripting parity to the official blender python api. we will own this ourselves", and "make sure to
add GodotJS which should add a more complete integration and bindings for godot integration".

raea/blender (sdk/blender, started from samchon/blendia, MIT, and rewritten): bpy, bmesh, mathutils, bpy_extras and
gpu typed from Blender 5.2.1's own RNA and docstrings (tools/gen.sh: 1809 structs, 2498 operators, 41 modules outside
RNA; 102 of about 12 900 members any), run against a real Blender. Paths are lazy as Python's attribute access is
(writes and calls sent in order, reads awaited, py.pin for a stable handle), errors are Python's (BlenderError),
mathutils is computed in TypeScript with Blender's maths (1450 values within 1e-5 of Blender's), float arrays are
the value Blender gives (Vector, Matrix, Euler, Quaternion, Color), a call that makes a thing by its type returns
that class (tools/refine.py), node sockets are typed by name, and every argument can be given by keyword.
`raea blender run SCRIPT.ts [FILE.blend] [ARGS...]` runs a script on raea's engine against a headless Blender
(apps/tools blender_bridge.rs, runtime/calls blender.post); under Bun or Node it starts its own, or joins the person's
Blender through raea's add-on (python/raea_blender).

raea/godot (sdk/godot) on GodotJS (MIT): Godot 4.6.1's every class, singleton, enum and builtin typed from GodotJS's
codegen, JavaScriptCore on the Mac and QuickJS-ng on Windows and Linux (no V8). `raea setup godot` downloads GodotJS's
editor build pinned by size and sha256 (apps/tools godot.rs); `raea godot run SCRIPT.ts` bundles the script and runs
its default export (a function given the SceneTree and ARGS, or a SceneTree subclass as the main loop) headless or
with --window, --movie recording with Godot's Movie Maker (the window kept on top, the frame size from the project),
a callback that throws stopping the run, RAEA_CWD with cwd() and resolve() for paths; `raea godot types` and
`raea godot open` (godot_run.rs).

The guides: raea guide bevy/blender gains "A step in TypeScript" and bevy/godot is new, each example type-checked
with its SDK's tests (sdk/blender/test/guide.ts, sdk/godot/test/guide.ts) and run as shown; raea guide bevy routes to
bevy/godot. Their raea-skills copies are 7497067 (branch blender-godot-ts, not pushed). sdk/tsconfig.base.json maps
raea/blender and raea/godot; tools/release.sh ships @raea/blender's python/.

Proven: sdk/blender's tsc and bun tests against Blender 5.2.1; sdk/godot's tsc and its 7 bun tests against the
installed GodotJS; apps/tools godot_run's unit tests; post 07b's film (releases/0.1.1/src/engines), its left half
built and keyed by raea/blender and its right half recorded by raea/godot.
2026-11-10 21:42:49 -08:00
shinyobjectz f25c925eec A script's solid is its expression until something needs the solid. /3d's manifold held a built Manifold for every solid a script made, so a set made of cuts was cut twice on every open: once here as the script ran, and again by the renderer, which builds its meshes from the expressions (and now keeps them on disk). A boolean, a move, a rotate and a scale now only write the expression; a query, a mesh, an export or an operation on the solid itself builds it then, from the expression (raea-core-shape's solid_or_empty, so a boolean that left nothing can still be asked whether it is empty). A launch-film set played offscreen at frame 0: 4.6 s to 3.6 s, another 4.4 s to 3.2 s, each frame the same bytes as before; examples/headless/solids-and-worlds.ts passes its 12 checks. 2026-11-10 05:46:47 -08:00
shinyobjectz ac39b671ee raea/text loadFont: a composition asks for a Google Fonts family by name and the page gets it (part of #13)
snapcn's components (#13) load their families by name from Google Fonts; raea had no way for a composition
to ask for one. Google families came only with RAEA_PAGE_GOOGLE_FONTS=1, which fetches every family a
page names, so it is off by default (Chrome loads only what a page links, and every composition's root names Inter).

loadFont("Space Grotesk") (sdk/video/src/fonts.ts, exported from raea/text) returns { fontFamily } and calls the
new native fonts.google, which marks that family wanted in raea-sys-fonts google.rs: the page fetches its Latin
faces, every weight and style, once through raea's URL cache, so a render stays a function of its code and plays
offline once cached. Families nobody asked for still fall back as before. Outside raea (a browser) it links Google's
stylesheet, so the same code shows the same family there.

bench/load-font/check.sh: "Hello raea" in Rubik Mono One with loadFont differs from the fallback by 12885 px, and an
offline render from the cache matches the first exactly. Needs the network on the first render.
2026-11-08 10:38:36 -08:00
shinyobjectz a800f3cfa5 FC0a: ui/text/font_atlas_debug passes (0.99966): bevy_text's glyph atlas in raea's TSX. raea/ui's FontAtlasSet.atlases(font, font_size, text) is the pages a Text of that text fills, made natively by bevy_text's own code (the fonts.atlases call, raea-sys-fonts atlas.rs: the text shaped in the face as bevy_text shapes it, each glyph its layout meets rasterized by swash and packed by add_glyph_to_atlas, 2 px padding, 512 px pages), each a PNG data: URL an ImageNode shows. The port grows the yellow FiraSans-Bold text every third frame from the example's ChaCha8Rng (rand's random::<u8>() as char: "a6Ò" and a control character by frame 10, drawn as .notdef in both) and shows the page beside it a frame after it's made: the atlas's packing, Ò's base and accent as two glyphs, matches Bevy's. The bar fails 7 of the 10 mutants; of the 3 it passes, the off-pixel probe catches the atlas size (1552 against 680) and its top (1353), and a probe of the text's fully yellow pixels its colour (0 against 1680); the tenth (dropping the repeat check) draws the same three characters by frame 10. runtime/calls tests/fonts.rs (atlases: one page, a glyph met twice packed once). 2026-11-08 00:35:23 -08:00
shinyobjectz bdf9e53397 FC0a: ui/text/system_fonts passes (0.98794): the system's font families in raea's TSX, as Bevy's FontCx lists them. raea/ui's FontCx.family_names() is the native call fonts.families (runtime/calls: a fontique collection of the system's faces alone, sorted, each once; Bevy lists 516 on this Mac, the hidden "." families among them). Gaps found and patched on the way:
- a face parley can't scale (Apple's bitmap-only GB18030 Bitmap has no head table, so its advances are infinite) blacked the whole page: every box after it was NaN. blitz now measures a bevy_ui Text whose lines are no finite size as 0 by 0, as bevy_text's buffer_dimensions does.
- a FontSource::Family face missing a character fell to CSS's serif (Times), then to CoreText's pick for the face, where bevy_text falls to the collection's fallback families (Helvetica for Latin). The SDK now writes such a family as `"Name", "raea-bevy fallback"`: blitz appends no serif to it and parley asks no FallbackHook for it (NO_HOOK_FAMILY).
The bar passes every mutant but two (the count off by one, the rows' blue 0.25 to 0.22); a probe of the count line (473 px off against 556) and of a row's background (srgb 51 51 64 against 56) catches both. All 72 ui ports pass. Open: lines mixing a face with its fallback sit about 0.4 px lower than Bevy's, and their stems are softer (Bevy's atlas is sampled nearest; snapping glyphs to whole pixels didn't bring it closer).
2026-11-08 00:15:34 -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
shane d3c399b4d5 raea origin/main 2026-11-07 01:29:24 -08:00
shinyobjectz 1dff4f0aa8 raea e699cf684509a8bbada118cc302c56e99065a680 2026-11-05 17:19:37 -08:00
shinyobjectz f675b0ad2b raea dc579e418 2026-10-31 13:15:29 -07:00