frame method
Copies the world and hands it to the render worker, without waiting for the GPU. Returns the frame's number (1, 2, …).
Implementation
int frame() {
final live = _live;
final own = this.camera;
final camera = own == null ? 0 : cameraObjectId(own, _world);
if (camera != _sentCamera) {
check(fy_view_camera_set(live, camera));
_sentCamera = camera;
}
_world.sendTransforms();
check(fy_view_frame(live, scratch.id));
return scratch.id.value;
}