Skip to content

Commit

Permalink
chore(web): invoke requestRender before capture screen
Browse files Browse the repository at this point in the history
  • Loading branch information
keiya01 committed Jan 16, 2024
1 parent 9b9d4bc commit 86f6662
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions web/src/beta/lib/core/engines/Cesium/useEngineRef.ts
Expand Up @@ -502,6 +502,7 @@ export default function useEngineRef(
captureScreen: (type?: string, encoderOptions?: number) => {
const viewer = cesium.current?.cesiumElement;
if (!viewer || viewer.isDestroyed()) return;
viewer.scene.requestRender();
viewer.render();
return viewer.canvas.toDataURL(type, encoderOptions);
},
Expand Down

0 comments on commit 86f6662

Please sign in to comment.