Browse docson_frame
On this page
Lifecycle event

on_frame

Runs every frame for video processing only: vision.* and ui.*.

Syntax

Atlas Script
event on_frame() { }

Return value

See the remarks for the returned value and runtime behavior.

Remarks

Runs every frame for video processing only: vision.* and ui.*. Controller input, output, feedback, and motion are not available here; use on_input for the pad.

Examples

Draw text and a status message.atlas
font hud = font.create(1.4, rgb.lime);

event on_frame() {
    ui.print(hud, 0.05, 0.08, string.format("Frame {}", frame));
    ui.status(string.format("Runtime age {} ms", time_ms));
}

event on_stop() {
    ui.clear();
}
Reference details are generated from the Atlas Script schema in this documentation source snapshot. Confirm release-specific behavior in the Atlas for Windows build you use.