Hey @almarklein
While working with rendercanvas.jupyter.JupyterRenderCanvas in ndv, I found that all scene updates appears to be one step behind my interactions. So, for example, if I toggle a checkbox to hide one of the objects in the scene, or change the data in a texture, the immediate result of the interaction is to render the state resulting from the previous interaction.
The workaround I came up with was:
class JupyterRenderCanvas(rendercanvas.jupyter.JupyterRenderCanvas):
def get_frame(self) -> Any:
self._process_events()
self._draw_and_present(force_sync=True)
return self._last_image
however, I suspect I'm not quite understanding the contract of the ABC there. Can you help me understand? is get_frame() designed to be asynchronous? Is this likely a bug in how I'm invoking request_draw(animate)? (fwiw, my request_draw pattern is working fine in Qt and Wx, it's just the jupyter backend that is one-step-behind... And furthermore: it's only in pygfx; vispy going through jupyter-rfb seems fin)
Hey @almarklein
While working with
rendercanvas.jupyter.JupyterRenderCanvasin ndv, I found that all scene updates appears to be one step behind my interactions. So, for example, if I toggle a checkbox to hide one of the objects in the scene, or change the data in a texture, the immediate result of the interaction is to render the state resulting from the previous interaction.The workaround I came up with was:
however, I suspect I'm not quite understanding the contract of the ABC there. Can you help me understand? is
get_frame()designed to be asynchronous? Is this likely a bug in how I'm invokingrequest_draw(animate)? (fwiw, my request_draw pattern is working fine in Qt and Wx, it's just the jupyter backend that is one-step-behind... And furthermore: it's only in pygfx; vispy going through jupyter-rfb seems fin)