waitForSceneCompletion Method
Returns a Promise that resolves after the contents of this viewport are fully loaded and rendered. This can be useful, for example, when you want to capture an image of the viewport's contents, as in the following code:
async function captureImage(vp: Viewport): Promise<ImageBuffer | undefined> {
await vp.waitForSceneCompletion();
return vp.readImageBuffer();
}
waitForSceneCompletion(): Promise<void>
Returns - Promise
Defined in
- core/frontend/src/Viewport.ts Line 2741
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.