Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add triangle predicates to pointer down and up events. #14789

Merged
merged 1 commit into from Feb 20, 2024

Conversation

f-rooom
Copy link
Contributor

@f-rooom f-rooom commented Feb 20, 2024

This PR adds scene.pointerDownTrianglePredicate and scene.pointerUpTrianglePredicate, which function analogous to the already implemented scene.pointerMoveTrianglePredicate. This allows to set triangle predicates for use with ActionManager or Behaviors like PointerDragBehavior, which currently is not possible.

There should be no performance impact when not setting the predicates, as is with pointerMoveTrianglePredicate.

Relevant forum post: https://forum.babylonjs.com/t/triangle-predicate-for-picking-triggers-in-actionmanager-and-pointerdragbehaviour/47761

I hope this fits all the guidelines. :)
Open for review!

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 20, 2024

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 20, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 20, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 20, 2024

Visualization tests for WebGPU (Experimental)
Important - these might fail sporadically. This is an optional test.

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14789/merge/testResults/webgpuplaywright/index.html

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. back-compat, optional :-)

@sebavan sebavan merged commit 1146e16 into BabylonJS:master Feb 20, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants