Skip to content

armgit / raea

Public Imported from GitHub
0

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.

722 B
Raw Blame
// DR4's proof, the mix's cheat: the beep placed on the same frame, but its file starts with 150 ms of silence, so it is
// heard four frames late. The placement reads right; the render doesn't. checks/cue.ts must fail it.
import { AbsoluteFill, Audio, Composition, Sequence, registerRoot, useCurrentFrame } from "raea";

function Mix() {
  const f = useCurrentFrame();
  return (
    <AbsoluteFill style={{ background: f < 30 ? "#203040" : "#e0e0e0" }}>
      <Sequence from={30} name="beep" layout="none">
        <Audio src="media/late-beep.wav" />
      </Sequence>
    </AbsoluteFill>
  );
}

registerRoot(() => <Composition id="mix-cheat" component={Mix} width={540} height={960} fps={30} durationInFrames={60} />);