joshuabowers / graphca

A graphing calculator and analytic calculus engine
MIT License
0 stars 0 forks source link

Graphing: Grid: Ghost lines and scale #11

Closed joshuabowers closed 1 year ago

joshuabowers commented 2 years ago

As the graph is zoomed in and out, the number of grid lines which are displayed needs to change: zooming out will coalesce smaller units of scale into larger ones, causing smaller divisions to disappear; zooming in will cause smaller divisions of scale to show up and be displayed.

As of the current revision (d2ac318), zooming in and out works, and the associated numeric scale should be accurate; however, the transition for grid lines is broken: zooming out causes ghost lines---apparently not rendered by Grid2, but not yet garbage collected nor purged from VRAM---to still exist; zooming in does not cleanly transition between the larger and smaller scales.

The current system is based on Drei's Segments geometry component, which is likely doing certain things for performance reasons which bork this use-case. Will likely need to rewrite the rendering by hand to better manage dead lines based on scale.