1 | import { ViewProps } from 'react-native';
|
2 |
|
3 | import WebGL2RenderingContext from './WebGL2RenderingContext'
|
4 |
|
5 | export type SurfaceCreateEvent = {
|
6 | nativeEvent: {
|
7 | exglCtxId: number;
|
8 | };
|
9 | };
|
10 |
|
11 | export type SnapshotOptions = {
|
12 | flip?: boolean;
|
13 | framebuffer?: WebGLFramebuffer;
|
14 | rect?: {
|
15 | x: number;
|
16 | y: number;
|
17 | width: number;
|
18 | height: number;
|
19 | };
|
20 | format?: 'jpeg' | 'png';
|
21 | compress?: number;
|
22 | };
|
23 |
|
24 | export type GLSnapshot = {
|
25 | uri: string | Blob | null;
|
26 | localUri: string;
|
27 | width: number;
|
28 | height: number;
|
29 | };
|
30 |
|
31 | export interface ExpoWebGLRenderingContext extends WebGL2RenderingContext {
|
32 | __exglCtxId: number;
|
33 | endFrameEXP(): void;
|
34 | }
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | export interface BaseGLViewProps extends ViewProps {
|
43 | |
44 |
|
45 |
|
46 |
|
47 | onContextCreate(gl: ExpoWebGLRenderingContext): void;
|
48 |
|
49 | |
50 |
|
51 |
|
52 | msaaSamples?: number;
|
53 | }
|