cdeevfrr / Photon

A video game
GNU General Public License v3.0
0 stars 0 forks source link

Refactor PhotonViewport to have internal photon reports & refresh rate #28

Open cdeevfrr opened 2 years ago

cdeevfrr commented 2 years ago

Instead of updating the canvas directly on every photon event (collision, expire, ...) we should update an internal state, and let that internal state refresh the view every fixed time interval.

The HTML canvas context help said that it's good to batch canvas draw calls, so this will accomplish that goal & probably help a lot with performance.