Don't transform to local coordinates when mouse input is already captured
While i was debugging an issue with mouse input, I noticed that globalToLocal(input.stagePosition, input.localPosition); is always called even though it is only needed for the hitTouch which is only happening when the input has not been captured already.
https://github.com/roipeker/graphx/blob/master/lib/src/display/display_object.dart#L113
We should avoid this op in that case given this op will be called for each sprite / shape in your entire scene.
Also it seems we keep iterating the whole scene even when the input is captured in order to match $mouseOverObj but if $mouseOverObj is null shouldn't we stop iterating once the input is captured ?
I think the original implementation is meant to propagate events. Even if bubbling system isn't existent the child objects should be able to process the signal. You should be able to read touch events "globally" on the stage. The propagation shouldn't end, because dev needs to be able to capture pointer events in many display objects hierarchies. Maybe my idea isn't accurate. But i think i faced that dilemma while developing the input capture part.
The propagation is happening in dispatchMouseCallback
https://github.com/roipeker/graphx/blob/master/lib/src/display/display_object.dart#L190
Nothing more is being dispatched at all from that whole recursive iteration loop apart from the mouseover logic bit.