Commit Graph
4 Commits
Author SHA1 Message Date
shaneandshinyobjectz 28af820668 PA13, PA14: raea playable, and playables in the public engine (#264)
* PA13, PA14: raea playable, and playables in the public engine

Playables move from the private tree into the public engine (Shane 11-28: "public totally part of the engine"):
sdk/playable (raea/playable for authors, the browser host, check.ts, parity.ts, tony.ts), examples/playables and
docs/playables.feature, with raea/playable and @raea/playable back in sdk/tsconfig.base.json.

`raea playable GAME.tsx -o DIR` (apps/playable) replaces the Bun pipeline (playable.sh, bundle.ts, lint.ts, walk.ts,
alias.ts). It lints the source, renders each composition through `raea run` for its shapes and 3D kinds, bundles the
game and the host once with raea's own bundler, and writes each network's page or ZIP against its 5 MB cap.
engine/bundle gains `minify`, `inline` (inline.rs: pictures, sounds, fonts and .glb as data URLs, .bin as a
Uint8Array) and package-folder aliases (`three/=DIR`). brick-rush writes all nine targets in 7 s (1,384 KB a page);
mobile-ads' tiles and gates export; all play in WebKit, the Google and TikTok packages included.

check.ts lets a network's own page tags through; parity.ts draws in WebKit (chrome.ts is gone), 6.8/255 on
brick-rush frame 300. The craft guide motion/playable.md is `raea guide playable`. bench/live-3d skips brick-rush with
its real reason (PA18).

* tools/layers.toml: raea-app-playable in apps (PA13)

* Fonts travel with a playable, and an end card in a brand's type

An imported .ttf, .otf, .woff or .woff2 (and .jpeg) is its path in a native render (runtime/bundle rewrite.rs,
engine/bundle script.rs) and a data URL in a playable (inline.rs), so an @font-face names the same file either way.
<EndCard> takes font, color and button. Made for the real-brand playables in mobile-ads (ACANA, OLIPOP, HelloFresh),
which carry their brands' own type; the guide and docs/playables.feature say how.

* The preview page tells raea's review its ad events (PA16)

Inside a frame, the preview network posts {raeaPlayable: kind} to its parent on install and end, so the review can show
them beside the game.

* PA16 status: the review plays playables (raea-platform #99), on a host of their own

* The preview page tells the review when it's ready, seen or hidden, and the first touch (PA16)

Beside install and end, the preview build inside a frame posts ready (the game started), viewable and hidden (its page
shown or put away) and touch (the player took over from the game's own hand), so the review and the desktop show them.

* PA16 status: built in cloud (raea-platform #99, #101) and desktop (raea-feed #124), and raea show --playable

* raea playable says what the source can't have even when the game won't render for the lint

A fetch or a URL often stops the walk's render too, and the lint answered with the render's end ("lint.ts ended with
exit 1") and dropped the refusals it had found. Now the source's refusals are the answer, and a render that fails
for another reason is named by its error line.

* PA16 status: play.raea.io is live, checked with the ACANA export

* skills: raea-skills main ae81d0f (#135 notes hook, #136 and #137 the playable guide and raea playable in cli.md)

tools/skills.sh gen with a raea built at this branch and the feed app at main: every reference and guide copy matches it.

* raea-cli: export-game and playable dispatched in a line each, as the verbs around them, so the crate stays at the size gate's 2000 lines

* dupes: the playable's copies folded into what they copied

spec is raea-runtime-bundle's own (now pub), inline.rs's base64 is the base64 crate as raea's other crates use it,
the store and card JSON are json!, and the bundle FFI reads minify and inline as it reads z3 and stamps. tools/dupes.sh:
293 exact, 57 near, as allowed.

---------

Co-authored-by: shinyobjectz <[email protected]>
2026-11-28 13:53:48 -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 07cd85e663 CC1, CC2: raea render -o OUT.mov --alpha writes a transparent movie natively, and raea export capcut EDIT.tsx writes the composition as a CapCut draft ready in its timeline (docs/capcut.feature)
raea-io-alpha encodes --alpha PNG frames (straight alpha) as a QuickTime movie: ProRes 4444 or HEVC with alpha through AVAssetWriter on the Mac, and QuickTime Animation (32-bit ARGB run-length, FFmpeg's qtrle layout) or PNG frames on every platform. `--alpha-codec prores|hevc|rle|png` picks one; prores is the Mac's default, rle elsewhere. CC1a, on a 3 s 1080x1920 graphic: 12.3 MB, 0.34 MB, 0.84 MB and 7.4 MB; rle and png decode identical to the PNGs, prores and hevc alpha within 61 dB, and a frame that draws nothing decodes fully transparent in all four.

raea-io-capcut writes CapCut 8.5.0's draft as CapCut writes it (an empty project and one with a clip placed by hand give its skeleton and a video segment's companion materials): one material per segment, times on the frame grid, media copied into its assets/, version markers from the newest draft CapCut made, and the entry in root_meta_info.json (backed up first, refused while CapCut runs). raea-app-capcut renders the composition three times: as it is with --manifest (footage runs, sound clips); with its footage and the backgrounds holding it hidden (RAEA_HIDE_MEDIA=1, the overlay); and with only those backgrounds (RAEA_HIDE_MEDIA=under, kept unless black). Footage becomes clips of the original files at their trims and rates, placed by object-fit (cover, contain, a cover crop), keeping their own sound at the composition's gain; sounds become audio clips with gains and fades; the overlay becomes clips cut where it draws. The manifest gains each video's object-fit and each sound's rate and fades, and the export cache is skipped under RAEA_HIDE_*. Checked on two fixtures: the draft's layers composited in ffmpeg match raea's render (31-33 dB against its H.264). Not yet checked: the draft opened in CapCut itself (CC3a). The CLI reference gains export (in Make) and --alpha-codec.
2026-11-11 06:43:39 -08:00
shinyobjectz 2881f190bb Docs: a page for every CLI verb and every SDK import path on raea.io/docs
The CLI reference is now 43 pages, one a verb, each with its forms, where it runs and what each of its 164 flags does,
under docs/manual/reference/cli. The forms and flags are generated from `raea help --json`; the prose and the flag
descriptions are written by hand, kept by the generator, and checked: a new flag without a description fails.

The SDK reference is 28 pages, one an import path, under docs/manual/reference/sdk: every export with its doc, its
signature, a component's props, a class's members, its Bevy type and the parity ports and examples that use it,
generated by the TypeScript compiler, with a hand-written introduction and a type-checked example on each page.
Where the SDK mirrors a Bevy type without a comment of its own, Bevy's own doc is shown, marked as Bevy's
(tools/manual-ref/bevy-docs.json). Doc comments added to the SDK exports that had none.

tools/manual-ref.sh gen|check runs both generators.
2026-11-08 19:43:15 -08:00