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
I tried the ModFill visualizer with default options on A006769, and when resizing the window produced this console error:
P5Visualizer.ts:112 Uncaught RangeError: Cached: Index 301 not in 0..300.
at Proxy.getElement (Cached.ts:112:19)
at Proxy.drawNew (ModFill.ts:55:27)
at Proxy.draw (ModFill.ts:76:14)
at sketch.draw (P5Visualizer.ts:106:26)
at o.default.redraw (p5.js?v=1eaac891:11599:22)
at l.default.resizeCanvas (p5.js?v=1eaac891:11226:24)
at Proxy.windowResized (P5Visualizer.ts:177:22)
at o.default._onresize (p5.js?v=1eaac891:9912:73)
The text was updated successfully, but these errors were encountered:
This is occurring because draw is called again automatically by p5 when the canvas resizes, and the ModFill code just goes ahead and increments the index again even though it already got to the limit. (To be fair, the original author of ModFill did not realize it was possible for draw() to be called again after it had called noLoop().) Anyhow, we need to make visualizers in general resilient to draw being called again after the visualizer thinks it is "done".
I tried the ModFill visualizer with default options on A006769, and when resizing the window produced this console error:
The text was updated successfully, but these errors were encountered: