You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
canvas.visible = False freezes the last frame instead of hiding the canvas #231
The docs say that with canvas.visible = False, "no objects are displayed in this canvas." Instead, the canvas freezes on its last frame. This was reported on the glowscript-users list on 2026-11-12.
canvas.visible is a plain attribute (lib/glow/canvas.js:215) with no setter, so changing it does nothing right away. The renderer checks it once per frame (lib/glow/WebGLRenderer.js:439) and returns early when it is False. Nothing is drawn, but nothing is cleared either, so the last frame stays on screen. The camera still moves when the user drags, but it isn't redrawn, so it looks as if rotation is broken.
Proposed fix
Give visible a setter in canvas.js that hides the 3D canvas when it is False and shows it again when it is True. That matches classic VPython, where the window goes away. Keep the renderer's early return so no GPU time is spent on a hidden canvas.
Decided: visible=False hides only the 3D area. The canvas's title and caption stay visible.
rsWVPRunner has the same code, so the fix needs porting there too.
Activity