Roofpig icon indicating copy to clipboard operation
Roofpig copied to clipboard

Feature request: Support websites using many (8+) cube demos at once

Open wasamasa opened this issue 1 year ago • 1 comments

When trying to view the demos on the author's website in a Chromium-based browser (see https://lar5.com/cube/blox.html for a broken example), the first example disappears. I've checked the dev console and saw "WARNING: Too many active WebGL contexts. Oldest context will be lost." which explains what's going on: A separate WebGL context is used for each demo.

I can think of a number of workarounds:

  • Split up the linked website into several smaller pages with less cube demos to not exceed the browser-specific limit of maximum number of WebGL contexts.
  • Offer a way of viewing each cube demo separately, for example by having links to initialize a roofpig context via query parameter (as seen on https://alg.cubing.net/?alg=F_F_F_F ).
  • Implement a "multi-cube demo" feature, where you'd specify several cube demos which share one WebGL context.

wasamasa avatar Oct 12 '23 07:10 wasamasa

Even though I can not reproduce your issue, if Roofpig is not working for you, you might want to try another simulator, such as AnimCubeJS: https://github.com/cubing/AnimCubeJS

bcube2 avatar Dec 29 '23 11:12 bcube2