mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
24 lines
731 B
TypeScript
24 lines
731 B
TypeScript
import * as React from 'react';
|
|
|
|
export interface GLViewHeadlessProps {
|
|
onContextCreate?: (gl: WebGLRenderingContext) => void;
|
|
onContextFailure?: (e: Error) => void;
|
|
onContextLost?: () => void;
|
|
onContextRestored?: (gl: WebGLRenderingContext) => void;
|
|
webglContextAttributes?: WebGLContextAttributes;
|
|
pixelRatio?: number;
|
|
width: number;
|
|
height: number;
|
|
}
|
|
|
|
export class GLViewHeadless extends React.Component<GLViewHeadlessProps> {
|
|
onRef: (ref: HTMLCanvasElement) => void;
|
|
captureAsDataURL(): string;
|
|
captureAsBlob(): Promise<Blob>;
|
|
simulateContextLost(): void;
|
|
simulateContextRestored(): void;
|
|
webglContextAttributes: WebGLContextAttributes;
|
|
canvas?: HTMLCanvasElement;
|
|
gl?: WebGLRenderingContext;
|
|
}
|