austingray / canvas-game-engine

An HTML 5 canvas game engine.
2 stars 0 forks source link

Update mouse input system #7

Open austingray opened 5 years ago

austingray commented 5 years ago

As mentioned in #6, we need to refactor the mouse input system.

Current mouse position should be recalculated on mouse move as well as any time the Canvas Camera position gets updated. Then when drawing objects, it should check if the mouse position intersects it, then promote any intersecting objects into a global prop for currently hovered objects.