Closed Wumpf closed 1 month ago
ah the ci config didn't age well, have to fix this up
done!
Couldn't have asked for a better example why the ci check is needed than the unwrap_or(return false)
that slipped onto master
meanwhile ;-)
Awesome! Thanks for the fixes :)
Also, fixed various warnings & added a CI step to check the wasm target.
The reason
getContext
have to be delayed here is that this stateful: OncegetContext
is called with one type of context (2d
,webgl
orwebgpu
), any future call with a different type will fail. -> Previously, it was not possible to use the canvas with a WebGL/WebGPU context sinceminifb
would call.get_context("2d")
during initialization.Tested this on https://github.com/Wumpf/minifb_wgpu_web_and_desktop (at https://github.com/Wumpf/minifb_wgpu_web_and_desktop/commit/e39be06686b9b8662d27fd4cb0a3787dfaee172d)