GLCanvas.captureFrame.android.js 516 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
const invariant = require("invariant");
const React = require("react-native");
const {
  NativeModules: { UIManager }
} = React;
const {GLCanvas} = UIManager;
invariant(GLCanvas,
`gl-react-native: the native module is not available.
Make sure you have properly configured it.
See README install instructions.

React.NativeModules.UIManager.GLCanvas is %s`, GLCanvas);
const {Commands} = GLCanvas;

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