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

Viewer: Allow environment texture and skybox to be set separately (and a couple other small changes) #15994

Merged
merged 4 commits into from
Dec 13, 2024

Conversation

ryantrem
Copy link
Member

The main change in this PR is to allow the environment texture and the skybox to be configured separately (this has come up multiple times, including in the forum. To try to keep this simple, Viewer.loadEnvironment now has an options object where you can specify whether the "environment" should be used for lighting or skybox or both. On the html element level, the environment attribute behaves the same as before (sets both the env texture and the skybox), but there are also now environment-lighting and environment-skybox attributes if you want to set them separately. This makes environment essentially a shorthand, somewhat like padding relative to padding-top, padding-bottom, etc.

The other changes included in this PR are:

  • Adding a reset camera button (so that discovering double click/tap is not required). This change was based on feedback from @PatrickRyanMS.
  • If animation is playing, pause it when activating a hotspot (e.g. moving the camera to a pose associated with the hotspot). Without this, a surface type hotspot will almost certainly have moved by the time the camera finishes its interpolation. This change was based on feedback from @PatrickRyanMS.
  • Update the icons to use svg from https://iconcloud.design. This change was based on feedback from @PatrickRyanMS.
  • Mark various internal members as @internal so they don't show up in the API docs.

@ryantrem ryantrem enabled auto-merge (squash) December 13, 2024 01:06
@ryantrem ryantrem requested review from RaananW and sebavan December 13, 2024 01:07
@bjsplat
Copy link
Collaborator

bjsplat commented Dec 13, 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 Dec 13, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 13, 2024

Visualization tests for WebGL 1 have failed. If some tests failed because the snapshots do not match, the report can be found at

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15994/merge/testResults/webgl1/index.html

If tests were successful afterwards, this report might not be available anymore.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 13, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 13, 2024

@ryantrem ryantrem disabled auto-merge December 13, 2024 03:53
@ryantrem ryantrem merged commit 2025a90 into BabylonJS:master Dec 13, 2024
12 of 14 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.

3 participants