Hi all!
In my game
http://quantuminformation.github.io/Density-Wars/
You can select units by clicking on them and a bounding box shows it as currently selected. If a user clicks anywhere on scene I want to deselect them. Obviously I can listen to canvas click natively but that won't tell me if no unit is under the mouse.
What is my correct strategy?
As a bonus does anyone know a good tweening lib for moving from (x1,y1) to (x2,y2). Basically I want to have a a unit acceleration to top speed and deceleration approaching end point.