Skip to content

Optimization for panning#18307

Merged
sebavan merged 2 commits intoBabylonJS:masterfrom
kircher1:opt-geo-cam-movement
Apr 14, 2026
Merged

Optimization for panning#18307
sebavan merged 2 commits intoBabylonJS:masterfrom
kircher1:opt-geo-cam-movement

Conversation

@kircher1
Copy link
Copy Markdown
Contributor

Compute the ray directly, avoiding the more expensive scene pick.

Copilot AI review requested due to automatic review settings April 14, 2026 01:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Optimizes geospatial camera panning by avoiding a full scene.pick during drag and instead computing the picking ray directly, reducing per-drag overhead in the camera movement subsystem.

Changes:

  • Replace scene.pick(...) during dragging with scene.createPickingRayToRef(...) and reuse a cached Ray.
  • Initialize _tempPickingRay via Ray.Zero().

Comment thread packages/dev/core/src/Cameras/geospatialCameraMovement.ts Outdated
@Popov72
Copy link
Copy Markdown
Contributor

Popov72 commented Apr 14, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 14, 2026

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
Copy Markdown
Collaborator

bjsplat commented Apr 14, 2026

Snapshot stored with reference name:
refs/pull/18307/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18307/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18307/merge/index.html#WGZLGJ#4600

Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves):

https://playground.babylonjs.com/?snapshot=refs/pull/18307/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/18307/merge
https://gui.babylonjs.com/?snapshot=refs/pull/18307/merge
https://nme.babylonjs.com/?snapshot=refs/pull/18307/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/18307/merge#BCU1XR#0

If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 14, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 14, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 14, 2026

1 similar comment
@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 14, 2026

@sebavan sebavan merged commit 44fd4a6 into BabylonJS:master Apr 14, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants