source-academy / modules

Modules that can be imported by programs in Source Academy, an online experiential environment for computational thinking
Apache License 2.0
8 stars 29 forks source link

[CURVE/RUNE]: WebGL context loss not handled #224

Open Cloud7050 opened 1 year ago

Cloud7050 commented 1 year ago

When the canvas used by the curve or rune modules loses its WebGL context, the canvas stops functioning and the module does not recover. Because the webglcontextlost event is not handled and does not preventDefault(), the browser does not eventually restore the context (thereby triggering the corresponding webglcontextrestored event to allow the module the chance to recover).

image

The modules should be updated to handle this scenario similar to CSG (see #146).