Skip to content

Commit

Permalink
Preserve GL buffer to fix "save image as"
Browse files Browse the repository at this point in the history
  • Loading branch information
axelboc committed Jul 26, 2023
1 parent 7ad6549 commit 33e3aa6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/lib/src/vis/shared/R3FCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function R3FCanvas(props: PropsWithChildren<Props>) {
frameloop="demand" // disable game loop
dpr={[1, 3]} // https://discoverthreejs.com/tips-and-tricks/#performance
resize={{ debounce: { scroll: 20, resize: 200 }, scroll: false }} // https://github.com/pmndrs/react-three-fiber/discussions/1906
gl={{ preserveDrawingBuffer: true }} // for "Save Image As..." to work
>
<ambientLight />
{children}
Expand Down

0 comments on commit 33e3aa6

Please sign in to comment.