gl-react-native
Version:
OpenGL bindings for react-native to implement complex effects over images and components, in the descriptive VDOM paradigm
12 lines (9 loc) • 352 B
JavaScript
const { Shaders } = require("gl-react");
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
};