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

Skybox flickers while viewports are synchronized #3753

Closed
pmconne opened this issue Jun 6, 2022 · 0 comments · Fixed by #4757
Closed

Skybox flickers while viewports are synchronized #3753

pmconne opened this issue Jun 6, 2022 · 0 comments · Fixed by #4757
Assignees
Labels
bug Something isn't working display good first issue Good for newcomers
Milestone

Comments

@pmconne
Copy link
Member

pmconne commented Jun 6, 2022

Describe the bug
When two or more viewports are synchronized using TwoWayViewportSync, TwoWayFrustumSync, or connectViewports when navigating one of the viewports the skybox in the other viewport(s) flickers.

To Reproduce
Steps to reproduce the behavior:

  1. Open a view in display-test-app with skybox enabled.
  2. Clone the viewport using ctrl-.
  3. Key in dta viewport sync
  4. Navigate in one of the viewports

Expected behavior
The views in both viewports should be synchronized. They are, except the skybox flickers off and on in the inactive viewport.

Screenshots

Desktop (please complete the applicable information):

  • OS: [e.g. iOS] irrelevant
  • Browser [e.g. chrome, safari] irrelevant
  • Version [e.g. 22] irrelevant
  • iTwin.js Version 3.2.0

Additional context
This bug was introduced by #2661. The synchronization is done by cloning the ViewState, which causes the previous ViewState to detach from the Viewport and the new one to attach. The EnvironmentDecorations containing the skybox are deleted when detaching and recreated by the new ViewState when attaching. They load asynchronously so there is a brief period of time during which they cannot render until they finish loading.

@pmconne pmconne added bug Something isn't working display labels Jun 6, 2022
@pmconne pmconne self-assigned this Dec 2, 2022
@pmconne pmconne added this to the iTwin.js 3.6 milestone Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working display good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant