mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 06:53:19 -10:00
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.
2.1 KiB
2.1 KiB
title, summary, order, sources
| title | summary | order | sources | ||
|---|---|---|---|---|---|
| raea app | Run, check headless and package a desktop app written as one TSX file on @raea/ui. | 7 |
|
raea app takes a desktop app written in React on @raea/ui and runs it in a window (run), runs it headless
through scripted steps and writes a PNG after each one (check), or packages it as a Mac app (bundle). The web
target draws it with Blitz on Bevy; the native target with Rune. The app's export const app picks the target, and
--target overrides it.
raea app run signin.tsx
raea app check signin.tsx --png out/ # 00-mount.png, a PNG after each step, tree.json
raea app check signin.tsx --target native --script steps.json --png out/native/
raea app bundle signin.tsx -o "Sign In.app"
The check's steps find elements by data-testid. Read the PNGs it writes: tree.json gives each element's role,
label, text and box.
Usage
raea app run|check|bundle APP.tsx [--target web|native] [--size WxH] [--script steps.json] [--png DIR] [-o App.app] (a TSX app on @raea/ui: its window, the headless check, a Mac app; web is Blitz on Bevy, native is Rune; the app's `export const app` sets the target, web when it doesn't; raea rune ... is --target native)
Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.
Flags
| Flag | Takes | What it does |
|---|---|---|
--png |
DIR |
Where check writes its PNGs and tree.json. |
--script |
steps.json |
The steps check runs, when they aren't in the app's own file. |
--size |
WxH |
The window's size in pixels. |
--target |
web|native |
Draw with Blitz on Bevy (web) or with Rune (native), over what the app's export const app says. |
-o |
App.app |
Where bundle writes the Mac app. |
See also
- Apps walks through writing, checking and bundling an app on both targets.