MCPcopy Create free account
hub / github.com/gre/gl-react / captureAsDataURL

Method captureAsDataURL

packages/gl-react-dom/src/GLViewDOM.tsx:215–223  ·  view source on GitHub ↗
(...args: any[])

Source from the content-addressed store, hash-verified

213 };
214
215 captureAsDataURL(...args: any[]): string {
216 if (!this.webglContextAttributes.preserveDrawingBuffer) {
217 console.warn(
218 "Surface#captureAsDataURL is likely to not work if you don't define webglContextAttributes={{ preserveDrawingBuffer: true }}"
219 );
220 }
221 invariant(this.canvas, "canvas is no longer available");
222 return this.canvas!.toDataURL(...args);
223 }
224
225 captureAsBlob(...args: any[]): Promise<Blob> {
226 if (!this.webglContextAttributes.preserveDrawingBuffer) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected