mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 12:44:11 -10:00
* 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]>
44 lines
4.6 KiB
Markdown
44 lines
4.6 KiB
Markdown
---
|
||
title: "raea export"
|
||
summary: "The composition as a CapCut draft ready in its timeline: its footage and sounds as clips of their own files at their trims and gains, everything raea draws as transparent overlay clips above them."
|
||
order: 6
|
||
sources: ["engine/cli/src/cli.rs"]
|
||
---
|
||
|
||
The composition as a CapCut draft ready in its timeline: its footage and sounds as clips of their own files at their trims and gains, everything raea draws as transparent overlay clips above them.
|
||
|
||
```sh
|
||
raea export capcut edit.tsx # into CapCut's projects; open CapCut and it's in the list
|
||
raea export capcut edit.tsx -o drafts/ # a draft folder to copy into CapCut's projects folder yourself
|
||
```
|
||
|
||
raea renders the composition three times. The first render, as it is, is kept in `out/capcut/NAME/reference.mp4` to compare against. The second hides the footage and draws everything else with a transparent background: titles, lower thirds, shapes, 3D and effects. That render becomes one transparent movie, cut into a clip wherever something is drawn, on a track above the footage. The third draws only the backgrounds that sit behind the footage (a card behind a picture in picture, a coloured page), and goes under it unless it's black.
|
||
|
||
Each stretch of frames that shows one video file becomes a clip of that file, starting where the composition starts it and playing at its rate. It is placed and scaled as `object-fit` shows it in raea (`cover`, `contain`, a crop). Clips covering the whole frame go on the main track; the others go on tracks above it. A video's own sound stays on its clip at the composition's volume; every other sound becomes an audio clip with its gain and fades. The output names what doesn't carry over, such as the Tone graph's music, which has no file, or a clip that moves or fades within its shot (placed as its first frame shows it).
|
||
|
||
CapCut rewrites its project list when it quits, so `raea export capcut` refuses to write into CapCut's projects while CapCut is open. Quit it first, or pass `--no-register` or `-o`. The previous project list is kept first in `~/.raea/capcut/backups` (`%LOCALAPPDATA%\raea\capcut\backups` on Windows), never in raea's own folder.
|
||
|
||
<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
|
||
|
||
## Usage
|
||
|
||
```sh
|
||
raea export capcut EDIT.tsx [--composition ID] [-o DIR] [--name NAME] [--alpha-codec prores|hevc|rle|png] [--no-register] (the composition as a CapCut draft ready in its timeline: its footage and sounds as clips of their own files at their trims and gains, everything raea draws as transparent overlay clips above them; the captions on a track of their own above it; into CapCut's projects, entered in its project list while CapCut is closed, or a draft folder in DIR; the reference render copied into the draft's folder, and it and the layers kept in out/capcut/NAME)
|
||
raea export layers EDIT.tsx [--composition ID] [-o DIR] [--name NAME] [--alpha-codec prores|hevc|rle|png] (the composition as its layers and the timeline that places them, layers.json: the captions and the graphics as transparent movies, what's under the footage (and any 3D) as an opaque one, the footage and sounds as clips of their own files where they are, the captions also as SubRip, and the reference render; into out/layers/NAME, or DIR)
|
||
raea export xml EDIT.tsx [--composition ID] [-o DIR] [--name NAME] [--alpha-codec prores|hevc|rle|png] (the composition as an FCP7 XML project for Premiere Pro (File, Import) and DaVinci Resolve (File, Import, Timeline): its layers as raea export layers writes them, NAME.premiere.xml and NAME.resolve.xml beside them placing them on a timeline, each as that editor writes it, the footage and sounds as clips of their own files where they are, each clip's own sound linked to it; into out/xml/NAME, or DIR)
|
||
```
|
||
|
||
Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.
|
||
|
||
## Flags
|
||
|
||
| Flag | Takes | What it does |
|
||
| --- | --- | --- |
|
||
| `--alpha-codec` | `prores\|hevc\|rle\|png` | The overlay movie's codec. ProRes 4444 by default on a Mac, QuickTime Animation elsewhere; HEVC with alpha is far smaller and Mac-only, like ProRes. |
|
||
| `--composition` | `ID` | The composition to export when the file registers more than one. |
|
||
| `--name` | `NAME` | The draft's name in CapCut. The file's name by default; a name already taken gets " 2", " 3" and so on. |
|
||
| `--no-register` | – | Write the draft into CapCut's projects folder without adding it to CapCut's project list. |
|
||
| `-o` | `DIR` | Write the draft folder into DIR instead of CapCut's projects folder (to copy to another machine, or to look at first). |
|
||
|
||
<!-- generated:end -->
|