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.
title: "raea playable" summary: "Export a game as a playable ad: one page or ZIP for each ad network, under its size cap, from the same TSX that renders as the video ad." order: 5 sources: ["apps/playable/src/lib.rs"]
raea playable turns a raea game into a playable ad: a short game served in place of a video ad inside other apps,
ending on a card that opens the store. The same file renders with raea render as the video ad, because a game that
nobody touches plays itself. Each network gets the page or ZIP it takes, with its own start, pause and store calls,
checked against its 5 MB cap. Nothing in the page loads anything: pictures, sounds and the 3D renderer travel inside it.
raea playable game.tsx -o out/playable --ios https://apps.apple.com/app/id123 --android https://play.google.com/store/apps/details?id=com.example
raea playable game.tsx -o out/playable --networks applovin,google,preview --cta "Play free"
Before it bundles, the export refuses what a playable can't have: files read from disk at render time (staticFile;
import the file instead), URLs and network calls, modules that need the native engine, <Video> and <Audio>, and 3D
kinds the playable's renderer doesn't draw. It notes a game with only one orientation, and one that never imports
raea/playable (<EndCard>, <InstallButton>, install()) to open the store itself.
The 3D is drawn by three.js on raea's scene contract, with Bevy's light units and tone mapping. It comes from the
project (raea add [email protected]).
Usage
raea playable GAME.tsx -o DIR [--networks LIST] [--ios URL] [--android URL] [--title TEXT] [--cta TEXT] [--orientation portrait|landscape|both] (a game as a playable ad: one page or ZIP per network (applovin, unity, google, meta, moloco, mintegral, tiktok, liftoff, preview), each under its 5 MB cap, from the TSX that renders as the video ad)
Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
Flags
| Flag | Takes | What it does |
|---|---|---|
--android |
URL |
The Google Play page the store tap opens on Android. |
--cta |
TEXT |
The button's words on the host's own end card, Play now by default. A game's <EndCard cta> sets its own. |
--ios |
URL |
The App Store page the store tap opens on iPhone and iPad. |
--networks |
LIST |
The networks to write, split by commas: applovin, unity, google, meta, moloco, mintegral, tiktok, liftoff, preview. All of them by default. |
--orientation |
portrait|landscape|both |
What Google's ad.orientation tag and TikTok's config.json are told; both by default. The game plays whichever of its compositions is nearest the screen's shape either way. |
--title |
TEXT |
The title on the host's own end card, shown at the last frame when the game never shows an <EndCard>. |
-o |
DIR |
The folder the pages and ZIPs go in, named GAME-NETWORK.html or .zip. |