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
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.