Skip to content

Commit

Permalink
fix(viewport): Prevent flickering during viewport flip operations (#1813
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sedghi authored Feb 5, 2025
1 parent 42fe807 commit 4170a06
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/core/src/RenderingEngine/Viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,13 @@ class Viewport {
this.setRotation(rotation);
}

this.flip({ flipHorizontal, flipVertical });
// flip operation requires another re-render to take effect, so unfortunately
// right now if the view presentation requires a flip, it will flicker. The
// correct way to handle this is to wait for camera and flip together and then
// do one render
if (flipHorizontal || flipVertical) {
this.flip({ flipHorizontal, flipVertical });
}
}

_getCorners(bounds: number[]): number[][] {
Expand Down

0 comments on commit 4170a06

Please sign in to comment.