MCPcopy Create free account
hub / github.com/Ropedia/SpatialBench / _run_play_loop

Function _run_play_loop

benchmark/models/r3/view.py:870–883  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

868 print(f"single-frame video -> {out_path}")
869
870 def _run_play_loop():
871 period = lambda: 1.0 / max(1.0, float(gui_play_fps.value)) # noqa: E731
872 while state["playing"]:
873 data = state["data"]
874 if data is None:
875 break
876 n = len(data["cam_c2ws"])
877 i = (int(gui_frame.value) + 1) % max(1, n)
878 try:
879 gui_frame.value = i
880 except Exception:
881 break
882 time.sleep(period())
883 state["playing"] = False
884
885 # --- Event wiring -----------------------------------------------------------
886 @gui_load_btn.on_click

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected