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

InputManager: Modify Picking to only happen with necessary scenarios #13145

Merged
merged 11 commits into from
Nov 10, 2022
Merged

InputManager: Modify Picking to only happen with necessary scenarios #13145

merged 11 commits into from
Nov 10, 2022

Conversation

PolygonalSun
Copy link
Contributor

@PolygonalSun PolygonalSun commented Oct 20, 2022

This PR modifies the picking code for UP and DOWN to only pick when there is a user scenario that requires it (user-defined observers in onPointerObservable, defined actions for an ActionManager, and assigned behaviors). Additionally, there are tests being added to verify that the InputManager callbacks and observable are functioning properly, as well as picking functionality. All camera pointer inputs will now connect to an internal observable _onCameraInputObservable

@azure-pipelines
Copy link

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.

@azure-pipelines
Copy link

packages/dev/core/src/Inputs/scene.inputManager.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Inputs/scene.inputManager.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Inputs/scene.inputManager.ts Outdated Show resolved Hide resolved
packages/tools/tests/test/visualization/config.json Outdated Show resolved Hide resolved
packages/dev/core/src/Inputs/scene.inputManager.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Inputs/scene.inputManager.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Inputs/scene.inputManager.ts Outdated Show resolved Hide resolved
packages/dev/core/src/scene.ts Show resolved Hide resolved
Copy link
Member

@sebavan sebavan left a comment

Choose a reason for hiding this comment

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

LGTM with the same feedback than Gary.

@PolygonalSun PolygonalSun marked this pull request as ready for review November 9, 2022 00:30
Copy link
Member

@sebavan sebavan left a comment

Choose a reason for hiding this comment

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

Love the tests !!!

Copy link
Contributor

@bghgary bghgary left a comment

Choose a reason for hiding this comment

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

Very minor comments. LGTM

packages/dev/core/src/Inputs/scene.inputManager.ts Outdated Show resolved Hide resolved
@PolygonalSun PolygonalSun enabled auto-merge (squash) November 10, 2022 20:56
@PolygonalSun PolygonalSun changed the title InputManager: Add Lazy Picking Functionality to PointerDown InputManager: Modify Picking to only happen with necessary scenarios Nov 10, 2022
@PolygonalSun PolygonalSun merged commit 7dca66b into BabylonJS:master Nov 10, 2022
RaananW pushed a commit that referenced this pull request Dec 9, 2022
…13145)

* lazy down

* changed to break

* Change to remove potential double pick

* Add visual tests for callbacks/observables

* Some PR Feedback

* PR Feedback

* Fix for Safari test

* nits

Former-commit-id: a3eb9040ae03757e550ebfc4292115d26a85f137
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

3 participants