MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / event_loop

Method event_loop

dm_control/viewer/gui/glfw_gui.py:277–286  ·  view source on GitHub ↗

Runs the window's event loop. This is a blocking call that won't exit until the window is closed. Args: tick_func: A callable, function to call every frame.

(self, tick_func)

Source from the content-addressed store, hash-verified

275 self.close()
276
277 def event_loop(self, tick_func):
278 """Runs the window's event loop.
279
280 This is a blocking call that won't exit until the window is closed.
281
282 Args:
283 tick_func: A callable, function to call every frame.
284 """
285 while not glfw.window_should_close(self._context.window):
286 self.update(tick_func)
287
288 def update(self, render_func):
289 """Updates the window and renders a new image.

Callers 1

launchMethod · 0.80

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected