Commit 29bebfc6 authored by Gaëtan Renaudeau's avatar Gaëtan Renaudeau

migrate to RN 0.25.0

parent f100fd9e
**[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) **[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)
# <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.21.x-05F561.svg) ![](https://img.shields.io/badge/gl--react-%202.2.x-05F561.svg) # <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.25.x-05F561.svg) ![](https://img.shields.io/badge/gl--react-%202.2.x-05F561.svg)
OpenGL bindings for React Native to implement complex effects over images and components, in the descriptive VDOM paradigm. OpenGL bindings for React Native to implement complex effects over images and components, in the descriptive VDOM paradigm.
......
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "RNGL" s.name = "RNGL"
s.version = "2.24.0" s.version = "2.25.0"
s.homepage = "https://github.com/ProjectSeptemberInc/gl-react-native" s.homepage = "https://github.com/ProjectSeptemberInc/gl-react-native"
s.platform = :ios, "8.0" s.platform = :ios, "8.0"
s.source = { :git => "https://github.com/ProjectSeptemberInc/gl-react-native.git" } s.source = { :git => "https://github.com/ProjectSeptemberInc/gl-react-native.git" }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
.*/node_modules/fbjs/lib/crc32.js .*/node_modules/fbjs/lib/crc32.js
.*/node_modules/fbjs/lib/ErrorUtils.js .*/node_modules/fbjs/lib/ErrorUtils.js
# Flow has a built-in definition for the 'react' module which we prefer to use # Flow has a built-in definition for the "react" module which we prefer to use
# over the currently-untyped source # over the currently-untyped source
.*/node_modules/react/react.js .*/node_modules/react/react.js
.*/node_modules/react/lib/React.js .*/node_modules/react/lib/React.js
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
3469C4C71C723AD300AE6E0E /* libRCTMaterialKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3469C4C61C723AC400AE6E0E /* libRCTMaterialKit.a */; }; 3469C4C71C723AD300AE6E0E /* libRCTMaterialKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3469C4C61C723AC400AE6E0E /* libRCTMaterialKit.a */; };
3469C4C81C723AD300AE6E0E /* libRNFS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3469C4C01C723ABC00AE6E0E /* libRNFS.a */; }; 3469C4C81C723AD300AE6E0E /* libRNFS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3469C4C01C723ABC00AE6E0E /* libRNFS.a */; };
3469C4C91C723AD300AE6E0E /* libRNGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3469C4BA1C723AB400AE6E0E /* libRNGL.a */; }; 34BA81381CEDCC6100FCF175 /* libRNGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3469C4BA1C723AB400AE6E0E /* libRNGL.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -167,9 +167,9 @@ ...@@ -167,9 +167,9 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
34BA81381CEDCC6100FCF175 /* libRNGL.a in Frameworks */,
3469C4C71C723AD300AE6E0E /* libRCTMaterialKit.a in Frameworks */, 3469C4C71C723AD300AE6E0E /* libRCTMaterialKit.a in Frameworks */,
3469C4C81C723AD300AE6E0E /* libRNFS.a in Frameworks */, 3469C4C81C723AD300AE6E0E /* libRNFS.a in Frameworks */,
3469C4C91C723AD300AE6E0E /* libRNGL.a in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
......
...@@ -7,15 +7,14 @@ ...@@ -7,15 +7,14 @@
}, },
"dependencies": { "dependencies": {
"crypto": "0.0.3", "crypto": "0.0.3",
"fbjs": "^0.6.1",
"gl-react": "^2.2.0", "gl-react": "^2.2.0",
"gl-react-blur": "^1.2.2", "gl-react-blur": "^1.2.2",
"gl-react-native": "file:..", "gl-react-native": "file:..",
"glsl-transitions": "^2016.2.15", "glsl-transitions": "^2016.2.15",
"react": "^0.14.7", "react": "^0.14.8",
"react-native": "^0.24.0", "react-native": "^0.25.1",
"react-native-fs": "^1.2.0", "react-native-fs": "^1.4.0",
"react-native-material-kit": "^0.3.0", "react-native-material-kit": "PyYoshi/react-native-material-kit#rn-0.25.1",
"react-transform-hmr": "^1.0.2", "react-transform-hmr": "^1.0.2",
"seedrandom": "gre/seedrandom#released" "seedrandom": "gre/seedrandom#released"
} }
......
import React from "react-native"; import React from "react";
import GL from "gl-react"; import GL from "gl-react";
import {Surface} from "gl-react-native"; import {Surface} from "gl-react-native";
const shaders = GL.Shaders.create({ const shaders = GL.Shaders.create({
......
import React from "react-native"; import React from "react";
const { import {
View, View,
Text, Text,
} = React; } from "react-native";
import GL from "gl-react"; import GL from "gl-react";
import {Surface} from "gl-react-native"; import {Surface} from "gl-react-native";
......
import React, { View, Text, StyleSheet } from "react-native"; import React from "react";
import {View, Text, StyleSheet} from "react-native";
import GL from "gl-react"; import GL from "gl-react";
import {Surface} from "gl-react-native"; import {Surface} from "gl-react-native";
import TransitionGenerator from "./TransitionGenerator"; import TransitionGenerator from "./TransitionGenerator";
......
import React from "react-native"; import {PixelRatio} from "react-native";
import React from "react";
import GL from "gl-react"; import GL from "gl-react";
module.exports = GL.createComponent( module.exports = GL.createComponent(
({ width, height, shader, progress, from, to, uniforms }) => { ({ width, height, shader, progress, from, to, uniforms }) => {
const scale = React.PixelRatio.get(); const scale = PixelRatio.get();
return <GL.Node return <GL.Node
preload preload
shader={shader} shader={shader}
......
import React from "react-native"; import React from "react";
import GL from "gl-react"; import GL from "gl-react";
import {Surface} from "gl-react-native"; import {Surface} from "gl-react-native";
......
import React, { import React from "react";
StyleSheet, import {StyleSheet, View} from "react-native";
View,
} from "react-native";
const { width: viewportW, height: viewportH } = require("Dimensions").get("window"); const { width: viewportW, height: viewportH } = require("Dimensions").get("window");
import resolveAssetSource from "react-native/Libraries/Image/resolveAssetSource"; import resolveAssetSource from "react-native/Libraries/Image/resolveAssetSource";
......
import React, { import React, {Component} from "react";
StyleSheet, import {StyleSheet, ListView} from "react-native";
ListView,
Component,
} from "react-native";
import seedrandom from "seedrandom"; import seedrandom from "seedrandom";
import Dimensions from "Dimensions"; import Dimensions from "Dimensions";
const { width: viewportWidth } = Dimensions.get("window"); const { width: viewportWidth } = Dimensions.get("window");
......
import React, {Animated} from "react-native"; import React from "react";
import {Animated} from "react-native";
import GL from "gl-react"; import GL from "gl-react";
import {Surface} from "gl-react-native"; import {Surface} from "gl-react-native";
......
import React, { import React, {Component} from "react";
StyleSheet, import {StyleSheet, View, Text, TouchableOpacity} from "react-native";
Component,
View,
Text,
TouchableOpacity
} from "react-native";
const styles = StyleSheet.create({ const styles = StyleSheet.create({
root: { root: {
......
import React, {PanResponder, UIManager} from "react-native"; import React from "react";
import {PanResponder, UIManager, findNodeHandle} from "react-native";
import GL from "gl-react"; import GL from "gl-react";
import {Surface} from "gl-react-native"; import {Surface} from "gl-react-native";
...@@ -38,7 +39,7 @@ class OneFingerResponse extends React.Component { ...@@ -38,7 +39,7 @@ class OneFingerResponse extends React.Component {
onPanResponderGrant: (evt, gestureState) => onPanResponderGrant: (evt, gestureState) =>
UIManager.measure( UIManager.measure(
React.findNodeHandle(this.refs.surface), findNodeHandle(this.refs.surface),
(a, b, w, h, x, y) => (a, b, w, h, x, y) =>
this.setState({ this.setState({
pressed: 1, pressed: 1,
......
import React, { import React, {Component} from "react";
StyleSheet, import {StyleSheet, Text, View, Image, TextInput, TouchableOpacity} from "react-native";
Text,
View,
Image,
TextInput,
Component,
TouchableOpacity,
} from "react-native";
import { Surface } from "gl-react-native"; import { Surface } from "gl-react-native";
......
import React, { View } from "react-native"; import React from "react";
import {View} from "react-native";
class NativeLayer extends React.Component { class NativeLayer extends React.Component {
render () { render () {
......
import React, { import React from "react";
Text, import {Text, View, ScrollView, Image} from "react-native";
View,
ScrollView,
Image,
} from "react-native";
import {Surface} from "gl-react-native"; import {Surface} from "gl-react-native";
import {Blur} from "gl-react-blur"; import {Blur} from "gl-react-blur";
import Add from "./Add"; import Add from "./Add";
......
import React, { import React, {Component, PropTypes} from "react";
StyleSheet, import {StyleSheet, View, Text, TouchableOpacity, Navigator, AsyncStorage} from "react-native";
Component,
View,
PropTypes,
Text,
TouchableOpacity,
Navigator,
AsyncStorage,
} from "react-native";
const screens = { const screens = {
Simple: require("./Simple"), Simple: require("./Simple"),
......
...@@ -7,7 +7,7 @@ invariant(GLCanvas, ...@@ -7,7 +7,7 @@ invariant(GLCanvas,
Make sure you have properly configured it. Make sure you have properly configured it.
See README install instructions. See README install instructions.
React.NativeModules.UIManager.GLCanvas is %s`, GLCanvas); NativeModules.UIManager.GLCanvas is %s`, GLCanvas);
const {Commands} = GLCanvas; const {Commands} = GLCanvas;
module.exports = (handle, config) => UIManager.dispatchViewManagerCommand(handle, Commands.captureFrame, [ config ]); module.exports = (handle, config) => UIManager.dispatchViewManagerCommand(handle, Commands.captureFrame, [ config ]);
import invariant from "invariant"; import invariant from "invariant";
import React from "react-native"; import { NativeModules } from "react-native";
const { const { GLCanvasManager } = NativeModules;
NativeModules: { GLCanvasManager }
} = React;
invariant(GLCanvasManager, invariant(GLCanvasManager,
`gl-react-native: the native module is not available. `gl-react-native: the native module is not available.
Make sure you have properly configured it. Make sure you have properly configured it.
See README install instructions. See README install instructions.
React.NativeModules.GLCanvasManager is %s`, GLCanvasManager); NativeModules.GLCanvasManager is %s`, GLCanvasManager);
module.exports = (handle, config) => GLCanvasManager.capture(handle, config); module.exports = (handle, config) => GLCanvasManager.capture(handle, config);
import invariant from "invariant"; import invariant from "invariant";
import React, { import React, {Component} from "react";
Component, import {requireNativeComponent, findNodeHandle} from "react-native";
requireNativeComponent,
} from "react-native";
import defer from "promise-defer"; import defer from "promise-defer";
import captureFrame from "./GLCanvas.captureFrame"; import captureFrame from "./GLCanvas.captureFrame";
...@@ -36,7 +34,7 @@ class GLCanvas extends Component { ...@@ -36,7 +34,7 @@ class GLCanvas extends Component {
_addPendingCaptureFrame (config) { _addPendingCaptureFrame (config) {
const key = serializeOption(config); const key = serializeOption(config);
return this._pendingCaptureFrame[key] || ( return this._pendingCaptureFrame[key] || (
(captureFrame(React.findNodeHandle(this.refs.native), config), (captureFrame(findNodeHandle(this.refs.native), config),
this._pendingCaptureFrame[key] = defer()) this._pendingCaptureFrame[key] = defer())
); );
} }
......
import invariant from "invariant"; import invariant from "invariant";
import {createSurface} from "gl-react"; import {createSurface} from "gl-react";
import React, { import React from "react";
View, import {View, PixelRatio} from "react-native";
PixelRatio
} from "react-native";
import GLCanvas from "./GLCanvas"; import GLCanvas from "./GLCanvas";
invariant(typeof createSurface === "function", invariant(typeof createSurface === "function",
......
...@@ -8,7 +8,7 @@ invariant(RNGLContext, ...@@ -8,7 +8,7 @@ invariant(RNGLContext,
Make sure you have properly configured it. Make sure you have properly configured it.
See README install instructions. See README install instructions.
React.NativeModules.RNGLContext is %s`, RNGLContext); NativeModules.RNGLContext is %s`, RNGLContext);
// Hook Shaders to RNGLContext // Hook Shaders to RNGLContext
Shaders.setImplementation({ Shaders.setImplementation({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment