Explore viewport modals in TetaNES Web
Explore the feasibility of creating popup modals with a separate canvas element for rendering deferred UI viewports in TetaNES Web. This would enable TetaNES Web to toggle the embedded viewport option and be able to move the separate viewports away from the primary canvas so e.g. you could have the ppu viewer open side by side with the main view.
Theoretically should be possible to have the wgpu painter target another canvas from the same wasm module as long as it's in the same browser tab but unclear if there is a limitation there or not.
Looks like this is blocked. See https://github.com/gfx-rs/wgpu/issues/2343
It's not possible to target multiple canvases using wgpu because they don't share a webgl context.
The only real solution to emulate the same multi-window behavior as desktop is to have a full-window canvas instead and make the main TetaNES window just a smaller portion of it.
Might go this route eventually - and get rid of the html elements in index.html in favor of a full egui app that only renders the additional elements when compiled to wasm. Will have to see how file upload works.