mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 12:44:11 -10:00
The rules are raea/goal's (sdk/goal), run by `raea goal check` at four moments: the hook after a save, every render's end, raea cloud's publish, and the Stop hook. Rust's cut and goal gates and the box's word, sound, frame and place checks are packs (MK30-MK39); runtime/cut-plan, runtime/goal-plan, raea make status and the box's check code are gone with no alias (MK41). brief.ts is the one registered root (MK43): raea runs it, and every file that imports raea must be reached from it (the registered check, an error at publish and done). Its tasks are its `plan` (MK44), read from its run and written back where each is written by `raea goal tasks`, the one path for the app, agents and the box. Its `goal` is one goal or a workflow of several (MK46), each with its step, after and rules, checked and reported alone. Taste lines and signed asks run inside the loop (MK47). `raea goal check|tasks|seen|judge|gates|next` is the loop; `raea make clothes|motion|solid|wear|splat|physics|bake| sao|tokensynth|sounds|component|blockout|...` the asset tools (MK45). Old names are refused with where they went. docs/make.feature is docs/goal.feature; tools/legacy-names.sh holds the old names out. raea's Node mode on JavaScriptCore now gives a CommonJS package's names as named exports (React's jsx), loads a file a tool imports by URL, keeps process.exit's code from a promise callback, and reads stdin as fd 0, so the goal runner runs on the shipped binary.
44 lines
2.3 KiB
TypeScript
44 lines
2.3 KiB
TypeScript
// The edit: a React composition rendered by raea (`raea render`). The clips come from cuts.ts (`raea cut` writes it),
|
|
// the parts from components/ (`raea make component add` copies them in; they're yours to change), the look from brand/brand.css.
|
|
// Change anything here: layout, timing, what plays when. `raea check` renders it and says what's wrong.
|
|
import { AbsoluteFill, Audio, Composition, Series, Video, registerRoot } from "raea";
|
|
import { cuts, edit, frames, total } from "./cuts";
|
|
import { css } from "./styles.gen";
|
|
|
|
// Before any cuts: a card saying what comes next, three seconds long. Its colours are its own on purpose, not a brand's
|
|
// (`raea brand SITE` writes brand/brand.css); delete it once the edit has clips.
|
|
function Start() {
|
|
return (
|
|
<AbsoluteFill style={{ background: "#14120f", color: "#f2ede4", justifyContent: "center", padding: "0 8%", fontFamily: "Helvetica, Arial, sans-serif" }}>
|
|
<div style={{ fontSize: edit.width * 0.11, fontWeight: 700, letterSpacing: "-0.02em" }}>raea</div>
|
|
<div style={{ fontSize: edit.width * 0.04, marginTop: edit.width * 0.03, lineHeight: 1.4, opacity: 0.8 }}>
|
|
No clips yet. Run raea cut on a take to put its footage in cuts.ts, and this edit plays it.
|
|
</div>
|
|
</AbsoluteFill>
|
|
);
|
|
}
|
|
|
|
function Edit() {
|
|
if (cuts.length === 0) return <Start />;
|
|
return (
|
|
<AbsoluteFill className="bg-brand-bg">
|
|
<style>{css}</style>
|
|
<Series>
|
|
{cuts.map((c, i) => (
|
|
<Series.Sequence key={i} durationInFrames={frames(c)}>
|
|
{/* a talking take: <FaceFrame>; a screen recording: <ScreenFit> (`raea frame TAKE` says which); a take with
|
|
sound alone (a voice recording) plays under whatever you put in its place */}
|
|
{c.kind === "audio" ? (
|
|
<Audio src={c.src} startFrom={Math.round(c.from * edit.fps)} endAt={Math.round(c.to * edit.fps)} />
|
|
) : (
|
|
<Video src={c.src} startFrom={Math.round(c.from * edit.fps)} endAt={Math.round(c.to * edit.fps)} style={{ width: "100%", height: "100%", objectFit: "cover" }} />
|
|
)}
|
|
</Series.Sequence>
|
|
))}
|
|
</Series>
|
|
</AbsoluteFill>
|
|
);
|
|
}
|
|
|
|
registerRoot(() => <Composition id="edit" component={Edit} width={edit.width} height={edit.height} fps={edit.fps} durationInFrames={total || edit.fps * 3} />);
|