Skip to content

Instantly share code, notes, and snippets.

@cgcostume
Created September 14, 2020 15:36
Show Gist options
  • Save cgcostume/422a06ff680a2c77296a1294c0759ca2 to your computer and use it in GitHub Desktop.
Save cgcostume/422a06ff680a2c77296a1294c0759ca2 to your computer and use it in GitHub Desktop.
frame capture in webgl-operate
controller.postFrameEvent$.pipe(rxjs.operators.first()).subscribe(() => {
const img = gloperate.FrameCapture.capture(renderer._defaultFBO);
const data = gloperate.FrameCapture.createDataURL(img, 'image/png');
console.log(data);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment