vemu.

component

VemuCanvas

Pixel-perfect display surface for the emulator's video output. Registers a draw callback that blits each RGBA frame into a 2D canvas, resizing the backing store whenever the frame dimensions change, and shows a "NO SIGNAL" overlay until the first frame arrives.

function VemuCanvas(props: VemuCanvasProps): JSX.Element

Props

NameTypeDescription
hasVideobooleanTrue once the machine has produced a video frame; gates the "NO SIGNAL" overlay.
setDraw(cb: (f: VemuFrame) => void) => voidRegisters the frame-draw callback with the hook (`useVemu().setDraw`).

Examples

const { hasVideo, setDraw } = useVemu();
<VemuCanvas hasVideo={hasVideo} setDraw={setDraw} />