Get mouse coordinates relative to the canvas and to the browser client.


event: DOMEvent: The DOM Event object for mouse movement. Used to calculate to position of the pointer insicde the canvas.
mouse_position:{x:number, y: number, raw:{x: number, y:number}: The mouse position object to update, we update all the properties by reference on this object to avoid unbinding events, watchers, or listeners to this object.
canvas_element: DOMEelement: The DOM Element that contains the canvas to calculate the position.


Calculates the mouse position in world space and relative to the browser client.


A new mouse_position object: {x: number, y:number, raw: {x: number, y: number}.
The raw object give the coordinates relative the the browser client, while the top-level x why y are the position in world space inside the canvas.