Skip to content

Conversation

@marns
Copy link
Contributor

@marns marns commented Dec 16, 2025

Goal: more extensible Inspector API for use in e.g. custom editors, specifically hotkeys for gizmos and access to selected entity.

Problem:
The inspector manages its own gizmo and selection states; thus setting these up externally would result in duplicate or unsynced states. These are currently not accessible by public API.

Proposed solution:
Expose a new IInspectorHandle with gizmo and selected entity controls, and a default hotkey implementation for gizmos

Examples:

  • Updated Playground to use default hotkeys (QWERTX)
  • Updated Sandbox to use custom hotkeys (`,1,2,3,4,0) in its existing hotkey event callback

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

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 Dec 17, 2025

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

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

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

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17569/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/17569/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/17569/merge
https://gui.babylonjs.com/?snapshot=refs/pull/17569/merge
https://nme.babylonjs.com/?snapshot=refs/pull/17569/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/17569/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
Collaborator

bjsplat commented Dec 17, 2025

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17569/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17569/merge/?snapshot=refs/pull/17569/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17569/merge/

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@ryantrem
Copy link
Member

Thanks @marns for working on this! Couple of questions:

  1. Why can't keyboard handling be done directly in the GizmoToolbar? Why do you want to handle it outside?
  2. Why do you want different shortcut keys for the GizmoToolbar in Sandbox vs. Playground?

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.

3 participants