GLCanvas.captureFrame.android.js 526 Bytes
Newer Older
1 2 3
import invariant from "invariant";
import {NativeModules} from "react-native";
const {UIManager} = NativeModules;
4
const GLCanvas = UIManager.getViewManagerConfig('GLCanvas');
5 6 7 8 9
invariant(GLCanvas,
`gl-react-native: the native module is not available.
Make sure you have properly configured it.
See README install instructions.

Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
10
NativeModules.UIManager.GLCanvas is %s`, GLCanvas);
11 12
const {Commands} = GLCanvas;

13
module.exports = (handle, config) => UIManager.dispatchViewManagerCommand(handle, Commands.captureFrame, [ config ]);