aevyrie / bevy_editor_cam

A camera controller for editors and CAD.
Apache License 2.0
46 stars 5 forks source link

`InputQueue::default` sometimes panics on WASM #13

Closed akhilles closed 4 months ago

akhilles commented 4 months ago

This is the line that can panic: https://github.com/aevyrie/bevy_editor_cam/blob/10f39791ec7488534e5385433bfaec1daf5756c8/src/controller/smoothing.rs#L75.

AFAIK, there's no guarantee that the monotonic clock value is large enough to be able to subtract the intervals without underflow. Would it be reasonable to detect when this happens using checked_sub and not push those entries onto the queue?

aevyrie commented 4 months ago

Fix released in 0.2.6