mirror of
https://github.com/gre/gl-react.git
synced 2026-01-18 16:16:59 +00:00
gl-react-native
gl-react-native is the React Native standalone implementation of gl-react, library to write and compose WebGL shaders. If you are using Exponent, it is recommended to use gl-react-exponent instead.
This implementation is a standalone fork of Exponent GLView (MIT License) available on https://github.com/exponent/exponent and https://github.com/exponent/exponent-sdk. Huge kudos to Exponent team and especially @nikki93 for implementing it.
Links
Install
Configure your React Native Application
on iOS:
on Android:
android/settings.gradle:: Add the following snippet
include ':RNGL'
project(':RNGL').projectDir = file('../node_modules/gl-react-native/android')
android/app/build.gradle: Add in dependencies block.
compile project(':RNGL')
- in your
MainApplication(or equivalent) the RNGLPackage needs to be added. Add the import at the top:
import fr.greweb.rngl.RNGLPackage;
- In order for React Native to use the package, add it the packages inside of the class extending ReactActivity.
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
...
new RNGLPackage()
);
}
also make sure you have configured Android NDK. You will need it to compile the Native C++ code.
