UNPKG

1.42 kBSource Map (JSON)View Raw
1{"version":3,"file":"GLView.types.js","sourceRoot":"","sources":["../src/GLView.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ViewProps } from 'react-native';\n\nimport WebGL2RenderingContext from './WebGL2RenderingContext'\n\nexport type SurfaceCreateEvent = {\n nativeEvent: {\n exglCtxId: number;\n };\n};\n\nexport type SnapshotOptions = {\n flip?: boolean;\n framebuffer?: WebGLFramebuffer;\n rect?: {\n x: number;\n y: number;\n width: number;\n height: number;\n };\n format?: 'jpeg' | 'png';\n compress?: number;\n};\n\nexport type GLSnapshot = {\n uri: string | Blob | null;\n localUri: string;\n width: number;\n height: number;\n};\n\nexport interface ExpoWebGLRenderingContext extends WebGL2RenderingContext {\n __exglCtxId: number;\n endFrameEXP(): void;\n}\n\n/**\n *\n * A View that acts as an OpenGL ES render target. On mounting, an OpenGL ES\n * context is created. Its drawing buffer is presented as the contents of\n * the View every frame.\n */\nexport interface BaseGLViewProps extends ViewProps {\n /**\n * Called when the OpenGL context is created, with the context object as a parameter. The context\n * object has an API mirroring WebGL's WebGLRenderingContext.\n */\n onContextCreate(gl: ExpoWebGLRenderingContext): void;\n\n /**\n * [iOS only] Number of samples for Apple's built-in multisampling.\n */\n msaaSamples?: number;\n}\n"]}
\No newline at end of file