scenic icon indicating copy to clipboard operation
scenic copied to clipboard

primitives outside of scissor region are not removed from the input list

Open vacarsu opened this issue 4 years ago • 6 comments

Primitives with the input style can still be interacted with even if they are outside of a scissor region.

edit: this may have to do with #253

vacarsu avatar Dec 13 '21 06:12 vacarsu

My wager (@boydm correct me on this) is that we don't account for stenciling when handling input events--if you look at Scenic.Input.t it looks like input events don't mention where they come in from.

My first guess as to how to handle this is to pass up the visible component where an input hit happens along with the normal information, maybe using stencil buffer picking or something.

crertel avatar Dec 13 '21 07:12 crertel

Yeah. it does not account for stenciling when checking for inputs.

boydm avatar Dec 13 '21 21:12 boydm

This is going to require some thought

boydm avatar Dec 13 '21 21:12 boydm

And also yes, #253 would be the same issue.

boydm avatar Dec 13 '21 21:12 boydm

My inital thought is to mark scissor regions in the input tree in the viewport. Then when searching down the tree, it would be pretty easy to see if the point is in the scissor region or not. If yes, continue searching. If not, abandon this branch of the tree.

boydm avatar Dec 13 '21 21:12 boydm

Yeah, in most cases you don't want to account for stenciling. I remember that being a big pain point in Scenic 0.10.0 where any rendered primitive would block input for any primitive underneath it. It made things like scroll containers impossible.

vacarsu avatar Dec 14 '21 00:12 vacarsu