index.js 357 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
const { Shaders } = require("gl-react-core");
const Surface = require("./Surface");
const { NativeModules: { RNGLContext } } = require("react-native");

// Hook Shaders to RNGLContext
Shaders.list().map(id => RNGLContext.addShader(id, Shaders.get(id)));
Shaders.on("add", (id, shader) => RNGLContext.addShader(id, shader));

module.exports = {
  Surface
};