DioxusLabs / blitz

A radically modular HTML/CSS rendering engine
Apache License 2.0
2.14k stars 45 forks source link

Use a quadtree for mouse collision #26

Closed ealmloff closed 1 year ago

ealmloff commented 1 year ago

Switches to a slightly less naïve mouse collision implementation. It uses a quadtree for nodes to allow faster collision for hover and click events. For a grid with 10,000 hoverable nodes this improves the FPS from 5 fps to 35 fps.

This is stacked on top of #22