Wait until a condition is satisfied, up to a given maximum duration. Parameters ---------- stop_condition A function with no arguments that determines whether or not the scene should keep waiting. max_time The maximum wait time in
(
self, stop_condition: Callable[[], bool], max_time: float = 60
)
| 1261 | self.wait(duration=duration, frozen_frame=True) |
| 1262 | |
| 1263 | def wait_until( |
| 1264 | self, stop_condition: Callable[[], bool], max_time: float = 60 |
| 1265 | ) -> None: |
| 1266 | """Wait until a condition is satisfied, up to a given maximum duration. |
| 1267 | |
| 1268 | Parameters |
| 1269 | ---------- |
| 1270 | stop_condition |
| 1271 | A function with no arguments that determines whether or not the |
| 1272 | scene should keep waiting. |
| 1273 | max_time |
| 1274 | The maximum wait time in seconds. |
| 1275 | """ |
| 1276 | max_time = self.validate_run_time(max_time, self.wait_until, "max_time") |
| 1277 | self.wait(max_time, stop_condition=stop_condition) |
| 1278 | |
| 1279 | def compile_animation_data( |
| 1280 | self, |