useMouse
function useMouse(
scope: Fusion.Scope,
observer: (mouse: Vector2) -> ()?
): Fusion.StateObject<Vector2>
Returns a state object with the mouse position. Updates when the mouse position changes.
Parameters
scope : Fusion.Scope
The scope to store cleanup tasks.
observer : (mouse: Vector2) -> ()?
Optional observer tracking the mouse position.
Returns -> Fusion.StateObject<Vector2>
A state object with the mouse position.
Example Usage
-- TODO: write example