tick method
This method is called every tick() and updates the display list if autoUpdateAndRender is true, and calls _onUpdate?.dispatch(time). It then calls $render(), and if useOwnCanvas is true, sets _ownCanvasNeedsRepaint to true.
Implementation
void tick(double time) {
makeCurrent();
if (autoUpdateAndRender) {
$currentFrameId++;
$runTime += time;
$update(time);
}
_onUpdate?.dispatch(time);
$render();
if (useOwnCanvas) {
_ownCanvasNeedsRepaint = true;
}
}