Clean up DOM when using container
option upon re-running or Cycle .dispose()
being called
#1
Labels
container
option upon re-running or Cycle .dispose()
being called
#1
When the Cycle instance running this driver calls
.dispose()
(e.g. in response tocycle-restart
receiving a HMR update) any generated elements/objects should be cleaned up, this already happens implicitly when using the fullscreen automatic element or thecanvas
option as Regl directly replaces those elements when running the next time, but if specifyingcontainer
you end up with multiplecanvas
elements. This might be the intended behaviour, I'm just opening it as an issue because it's not the behaviour I expected.For example, if you use something like this and get a HMR update:
canvas
elements from previous executions will remain inside the#viewport
element, a newcanvas
with the new result is appended to#viewport
.My guesses for a potential solution would be one of:
options.container
is set:regl
creates.setupRegl
.The text was updated successfully, but these errors were encountered: