README.md 1.96 KB
Newer Older
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
1
**[Gitbook documentation](http://projectseptemberinc.gitbooks.io/gl-react/content/) / [Github](https://github.com/ProjectSeptemberInc/gl-react-native/) / [gl-react](https://github.com/ProjectSeptemberInc/gl-react/)** / [#gl-react on reactiflux](https://discordapp.com/channels/102860784329052160/106102146109325312)
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
2

3
# <img width="32" alt="icon" src="https://cloud.githubusercontent.com/assets/211411/9813786/eacfcc24-5888-11e5-8f9b-5a907a2cbb21.png"> gl-react-native ![](https://img.shields.io/badge/react--native-%200.17.x-05F561.svg)
4

Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
5
OpenGL bindings for React Native to implement complex effects over images and components, in the descriptive VDOM paradigm.
6

Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
7
**`gl-react-native` is an implementation of `gl-react` for `react-native`. Please [read the main gl-react README](https://github.com/ProjectSeptemberInc/gl-react/) for more information.**
8

9
[![](https://github.com/ProjectSeptemberInc/gl-react-native/raw/master/docs/simple.gif)](./Examples/Simple)[![](https://github.com/ProjectSeptemberInc/gl-react-native/raw/master/docs/advancedeffects.gif)](./Examples/AdvancedEffects)
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
10

11
## Documentation
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
12

13
[**Gitbook**](http://projectseptemberinc.gitbooks.io/gl-react/content/)
14

Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
15 16 17 18 19 20
## Installation

```
npm i --save gl-react-native
```

21 22 23
### Configure your React Native Application

**on iOS:**
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
24

25
![](https://github.com/ProjectSeptemberInc/gl-react-native/raw/master/docs/install-steps.png)
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51

**on Android:**

1. `android/settings.gradle`:: Add the following snippet
  ```gradle
  include ':RNGL'
  project(':RNGL').projectDir = file('../node_modules/gl-react-native/android')
  ```
1. `android/app/build.gradle`: Add in dependencies block.
  ```gradle
  compile project(':RNGL')
  ```
1. in your `MainActivity` (or equivalent):
  ```java
  import com.projectseptember.RNGL.RNGLPackage;
  ...

  mReactInstanceManager = ReactInstanceManager.builder()
      .setApplication(getApplication())
      ...
      .addPackage(new MainReactPackage())
      .addPackage(new RNGLPackage())
      ...
      .build();

  ```