├── .eslintrc ├── .flowconfig ├── .gitignore ├── .watchmanconfig ├── README.md ├── android ├── ImageEffects.iml ├── app │ ├── app.iml │ ├── build.gradle │ ├── proguard-rules.pro │ ├── react.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── imageeffects │ │ │ └── MainActivity.java │ │ └── res │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── index.android.js ├── index.ios.js ├── index.web.js ├── ios ├── ImageEffects.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── ImageEffects.xcscheme ├── ImageEffects │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── main.m └── ImageEffectsTests │ ├── ImageEffectsTests.m │ └── Info.plist ├── package.json └── src ├── App.js ├── AppContainer.android.js ├── AppContainer.ios.js ├── AppContainer.js ├── AppContainer.native.js ├── Button.android.js ├── Button.ios.js ├── Button.js ├── Button.native.js ├── EffectsPanel.android.js ├── EffectsPanel.ios.js ├── EffectsPanel.js ├── EffectsPanel.native.js ├── ExportPanel.android.js ├── ExportPanel.ios.js ├── ExportPanel.js ├── ExportPanel.native.js ├── ExportedLink.android.js ├── ExportedLink.ios.js ├── ExportedLink.js ├── ExportedLink.native.js ├── Field.android.js ├── Field.ios.js ├── Field.js ├── Flyeye.js ├── ImageEffects.js ├── Viewport.android.js ├── Viewport.ios.js ├── Viewport.js ├── Viewport.native.js └── uploadImage.js /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "rules": { 4 | "indent": [ 5 | 2, 6 | 2 7 | ], 8 | "quotes": [ 9 | 2, 10 | "double" 11 | ], 12 | "linebreak-style": [ 13 | 2, 14 | "unix" 15 | ], 16 | "semi": [ 17 | 2, 18 | "always" 19 | ], 20 | 21 | "react/jsx-boolean-value": 1, 22 | "react/jsx-curly-spacing": 0, 23 | "react/jsx-max-props-per-line": 0, 24 | "react/jsx-no-duplicate-props": 1, 25 | "react/jsx-no-undef": 1, 26 | "jsx-quotes": 1, 27 | "react/jsx-sort-prop-types": 0, 28 | "react/jsx-sort-props": 0, 29 | "react/jsx-uses-react": 1, 30 | "react/jsx-uses-vars": 1, 31 | "react/jsx-no-literals": 0, 32 | "react/no-danger": 0, 33 | "react/no-did-mount-set-state": 1, 34 | "react/no-did-update-set-state": 1, 35 | "react/no-multi-comp": 1, 36 | "react/no-unknown-property": 1, 37 | "react/prop-types": 1, 38 | "react/react-in-jsx-scope": 1, 39 | "react/require-extension": 1, 40 | "react/self-closing-comp": 1, 41 | "react/sort-comp": 0, 42 | "react/wrap-multilines": 0, 43 | 44 | "strict": 0 45 | }, 46 | "env": { 47 | "es6": true, 48 | "node": true, 49 | "browser": true 50 | }, 51 | "extends": "eslint:recommended", 52 | "ecmaFeatures": { 53 | "jsx": true, 54 | "experimentalObjectRestSpread": true 55 | }, 56 | "plugins": [ 57 | "react" 58 | ] 59 | } 60 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | # We fork some components by platform. 4 | .*/*.web.js 5 | .*/*.android.js 6 | 7 | # Some modules have their own node_modules with overlap 8 | .*/node_modules/node-haste/.* 9 | 10 | # Ugh 11 | .*/node_modules/babel.* 12 | .*/node_modules/babylon.* 13 | .*/node_modules/invariant.* 14 | 15 | # Ignore react and fbjs where there are overlaps, but don't ignore 16 | # anything that react-native relies on 17 | .*/node_modules/fbjs-haste/.*/__tests__/.* 18 | .*/node_modules/fbjs-haste/__forks__/Map.js 19 | .*/node_modules/fbjs-haste/__forks__/Promise.js 20 | .*/node_modules/fbjs-haste/__forks__/fetch.js 21 | .*/node_modules/fbjs-haste/core/ExecutionEnvironment.js 22 | .*/node_modules/fbjs-haste/core/isEmpty.js 23 | .*/node_modules/fbjs-haste/crypto/crc32.js 24 | .*/node_modules/fbjs-haste/stubs/ErrorUtils.js 25 | .*/node_modules/react-haste/React.js 26 | .*/node_modules/react-haste/renderers/dom/ReactDOM.js 27 | .*/node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js 28 | 29 | # Ignore commoner tests 30 | .*/node_modules/commoner/test/.* 31 | 32 | # See https://github.com/facebook/flow/issues/442 33 | .*/react-tools/node_modules/commoner/lib/reader.js 34 | 35 | # Ignore jest 36 | .*/node_modules/jest-cli/.* 37 | 38 | # Ignore Website 39 | .*/website/.* 40 | 41 | [include] 42 | 43 | [libs] 44 | node_modules/react-native/Libraries/react-native/react-native-interface.js 45 | 46 | [options] 47 | module.system=haste 48 | 49 | munge_underscores=true 50 | 51 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' 52 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub' 53 | 54 | suppress_type=$FlowIssue 55 | suppress_type=$FlowFixMe 56 | suppress_type=$FixMe 57 | 58 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 59 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ 60 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 61 | 62 | [version] 63 | 0.18.1 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IJ 26 | # 27 | .idea 28 | .gradle 29 | local.properties 30 | 31 | # node.js 32 | # 33 | node_modules/ 34 | npm-debug.log 35 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | gl-react-image-effects 2 | ====================== 3 | 4 | Universal gl-react example app with Web, iOS and Android implementation running with one codebase (a few specific code are designed to make different UI on platforms). 5 | 6 |  7 | -------------------------------------------------------------------------------- /android/ImageEffects.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | generateDebugAndroidTestSources 19 | generateDebugSources 20 | 21 | 22 | 23 | 24 | 25 | 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 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | /** 4 | * The react.gradle file registers two tasks: bundleDebugJsAndAssets and bundleReleaseJsAndAssets. 5 | * These basically call `react-native bundle` with the correct arguments during the Android build 6 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 7 | * bundle directly from the development server. Below you can see all the possible configurations 8 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 9 | * `apply from: "react.gradle"` line. 10 | * 11 | * project.ext.react = [ 12 | * // the name of the generated asset file containing your JS bundle 13 | * bundleAssetName: "index.android.bundle", 14 | * 15 | * // the entry file for bundle generation 16 | * entryFile: "index.android.js", 17 | * 18 | * // whether to bundle JS and assets in debug mode 19 | * bundleInDebug: false, 20 | * 21 | * // whether to bundle JS and assets in release mode 22 | * bundleInRelease: true, 23 | * 24 | * // the root of your project, i.e. where "package.json" lives 25 | * root: "../../", 26 | * 27 | * // where to put the JS bundle asset in debug mode 28 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 29 | * 30 | * // where to put the JS bundle asset in release mode 31 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 32 | * 33 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 34 | * // require('./image.png')), in debug mode 35 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 36 | * 37 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 38 | * // require('./image.png')), in release mode 39 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 40 | * 41 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 42 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 43 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 44 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 45 | * // for example, you might want to remove it from here. 46 | * inputExcludes: ["android/**", "ios/**"] 47 | * ] 48 | */ 49 | 50 | apply from: "react.gradle" 51 | 52 | android { 53 | compileSdkVersion 23 54 | buildToolsVersion "23.0.1" 55 | 56 | defaultConfig { 57 | applicationId "com.imageeffects" 58 | minSdkVersion 16 59 | targetSdkVersion 22 60 | versionCode 1 61 | versionName "1.0" 62 | ndk { 63 | abiFilters "armeabi-v7a", "x86" 64 | } 65 | } 66 | buildTypes { 67 | release { 68 | minifyEnabled false // Set this to true to enable Proguard 69 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 70 | } 71 | } 72 | } 73 | 74 | dependencies { 75 | compile fileTree(dir: "libs", include: ["*.jar"]) 76 | compile "com.android.support:appcompat-v7:23.0.1" 77 | compile "com.facebook.react:react-native:0.20.+" 78 | 79 | compile project(":RNMaterialKit") 80 | compile project(":RNGL") 81 | compile project(':react-native-image-picker') 82 | } 83 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | 30 | # Do not strip any method/class that is annotated with @DoNotStrip 31 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 32 | -keepclassmembers class * { 33 | @com.facebook.proguard.annotations.DoNotStrip *; 34 | } 35 | 36 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 37 | void set*(***); 38 | *** get*(); 39 | } 40 | 41 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 42 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 43 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 44 | -keepclassmembers class * { @com.facebook.react.uimanager.ReactProp ; } 45 | -keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup ; } 46 | 47 | # okhttp 48 | 49 | -keepattributes Signature 50 | -keepattributes *Annotation* 51 | -keep class com.squareup.okhttp.** { *; } 52 | -keep interface com.squareup.okhttp.** { *; } 53 | -dontwarn com.squareup.okhttp.** 54 | 55 | # okio 56 | 57 | -keep class sun.misc.Unsafe { *; } 58 | -dontwarn java.nio.file.* 59 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 60 | -dontwarn okio.** 61 | -------------------------------------------------------------------------------- /android/app/react.gradle: -------------------------------------------------------------------------------- 1 | import org.apache.tools.ant.taskdefs.condition.Os 2 | 3 | def config = project.hasProperty("react") ? project.react : []; 4 | 5 | def bundleAssetName = config.bundleAssetName ?: "index.android.bundle" 6 | def entryFile = config.entryFile ?: "index.android.js" 7 | 8 | // because elvis operator 9 | def elvisFile(thing) { 10 | return thing ? file(thing) : null; 11 | } 12 | 13 | def reactRoot = elvisFile(config.root) ?: file("../../") 14 | def jsBundleDirDebug = elvisFile(config.jsBundleDirDebug) ?: 15 | file("$buildDir/intermediates/assets/debug") 16 | def jsBundleDirRelease = elvisFile(config.jsBundleDirRelease) ?: 17 | file("$buildDir/intermediates/assets/release") 18 | def resourcesDirDebug = elvisFile(config.resourcesDirDebug) ?: 19 | file("$buildDir/intermediates/res/merged/debug") 20 | def resourcesDirRelease = elvisFile(config.resourcesDirRelease) ?: 21 | file("$buildDir/intermediates/res/merged/release") 22 | def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"] 23 | 24 | def jsBundleFileDebug = file("$jsBundleDirDebug/$bundleAssetName") 25 | def jsBundleFileRelease = file("$jsBundleDirRelease/$bundleAssetName") 26 | 27 | task bundleDebugJsAndAssets(type: Exec) { 28 | // create dirs if they are not there (e.g. the "clean" task just ran) 29 | doFirst { 30 | jsBundleDirDebug.mkdirs() 31 | resourcesDirDebug.mkdirs() 32 | } 33 | 34 | // set up inputs and outputs so gradle can cache the result 35 | inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) 36 | outputs.dir jsBundleDirDebug 37 | outputs.dir resourcesDirDebug 38 | 39 | // set up the call to the react-native cli 40 | workingDir reactRoot 41 | if (Os.isFamily(Os.FAMILY_WINDOWS)) { 42 | commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", 43 | entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug 44 | } else { 45 | commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", 46 | entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug 47 | } 48 | 49 | enabled config.bundleInDebug ?: false 50 | } 51 | 52 | task bundleReleaseJsAndAssets(type: Exec) { 53 | // create dirs if they are not there (e.g. the "clean" task just ran) 54 | doFirst { 55 | jsBundleDirRelease.mkdirs() 56 | resourcesDirRelease.mkdirs() 57 | } 58 | 59 | // set up inputs and outputs so gradle can cache the result 60 | inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) 61 | outputs.dir jsBundleDirRelease 62 | outputs.dir resourcesDirRelease 63 | 64 | // set up the call to the react-native cli 65 | workingDir reactRoot 66 | if (Os.isFamily(Os.FAMILY_WINDOWS)) { 67 | commandLine "cmd","/c", "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", 68 | entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease 69 | } else { 70 | commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", 71 | entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease 72 | } 73 | 74 | enabled config.bundleInRelease ?: true 75 | } 76 | 77 | gradle.projectsEvaluated { 78 | // hook bundleDebugJsAndAssets into the android build process 79 | bundleDebugJsAndAssets.dependsOn mergeDebugResources 80 | bundleDebugJsAndAssets.dependsOn mergeDebugAssets 81 | processDebugResources.dependsOn bundleDebugJsAndAssets 82 | 83 | // hook bundleReleaseJsAndAssets into the android build process 84 | bundleReleaseJsAndAssets.dependsOn mergeReleaseResources 85 | bundleReleaseJsAndAssets.dependsOn mergeReleaseAssets 86 | processReleaseResources.dependsOn bundleReleaseJsAndAssets 87 | } 88 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/imageeffects/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.imageeffects; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.KeyEvent; 6 | 7 | import com.facebook.react.LifecycleState; 8 | import com.facebook.react.ReactInstanceManager; 9 | import com.facebook.react.ReactRootView; 10 | import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; 11 | import com.facebook.react.shell.MainReactPackage; 12 | import com.facebook.soloader.SoLoader; 13 | import com.github.xinthink.rnmk.ReactMaterialKitPackage; 14 | import com.imagepicker.ImagePickerPackage; 15 | import com.projectseptember.RNGL.RNGLPackage; 16 | 17 | public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { 18 | 19 | private ReactInstanceManager mReactInstanceManager; 20 | private ReactRootView mReactRootView; 21 | 22 | @Override 23 | protected void onCreate(Bundle savedInstanceState) { 24 | super.onCreate(savedInstanceState); 25 | mReactRootView = new ReactRootView(this); 26 | 27 | mReactInstanceManager = ReactInstanceManager.builder() 28 | .setApplication(getApplication()) 29 | .setBundleAssetName("index.android.bundle") 30 | .setJSMainModuleName("index.android") 31 | .addPackage(new MainReactPackage()) 32 | .addPackage(new ReactMaterialKitPackage()) 33 | .addPackage(new RNGLPackage()) 34 | .addPackage(new ImagePickerPackage(this)) 35 | .setUseDeveloperSupport(BuildConfig.DEBUG) 36 | .setInitialLifecycleState(LifecycleState.RESUMED) 37 | .build(); 38 | 39 | mReactRootView.startReactApplication(mReactInstanceManager, "ImageEffects", null); 40 | 41 | setContentView(mReactRootView); 42 | } 43 | 44 | @Override 45 | public boolean onKeyUp(int keyCode, KeyEvent event) { 46 | if (keyCode == KeyEvent.KEYCODE_MENU && mReactInstanceManager != null) { 47 | mReactInstanceManager.showDevOptionsDialog(); 48 | return true; 49 | } 50 | return super.onKeyUp(keyCode, event); 51 | } 52 | 53 | @Override 54 | public void onBackPressed() { 55 | if (mReactInstanceManager != null) { 56 | mReactInstanceManager.onBackPressed(); 57 | } else { 58 | super.onBackPressed(); 59 | } 60 | } 61 | 62 | @Override 63 | public void invokeDefaultOnBackPressed() { 64 | super.onBackPressed(); 65 | } 66 | 67 | @Override 68 | protected void onPause() { 69 | super.onPause(); 70 | 71 | if (mReactInstanceManager != null) { 72 | mReactInstanceManager.onPause(); 73 | } 74 | } 75 | 76 | @Override 77 | protected void onResume() { 78 | super.onResume(); 79 | 80 | if (mReactInstanceManager != null) { 81 | mReactInstanceManager.onResume(this, this); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gre/gl-react-image-effects/75711d4ce679feaac7d98a08190d5a9de3b2b193/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gre/gl-react-image-effects/75711d4ce679feaac7d98a08190d5a9de3b2b193/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gre/gl-react-image-effects/75711d4ce679feaac7d98a08190d5a9de3b2b193/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gre/gl-react-image-effects/75711d4ce679feaac7d98a08190d5a9de3b2b193/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ImageEffects 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.3.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | jcenter { 20 | url "http://dl.bintray.com/mkonicek/maven" 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gre/gl-react-image-effects/75711d4ce679feaac7d98a08190d5a9de3b2b193/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ImageEffects' 2 | 3 | include ':app' 4 | 5 | include ':RNMaterialKit' 6 | project(':RNMaterialKit').projectDir = file('../node_modules/react-native-material-kit/android') 7 | 8 | include ':RNGL' 9 | project(':RNGL').projectDir = file('../node_modules/gl-react-native/android') 10 | 11 | include ':react-native-image-picker' 12 | project(':react-native-image-picker').projectDir = file('../node_modules/react-native-image-picker/android') -------------------------------------------------------------------------------- /index.android.js: -------------------------------------------------------------------------------- 1 | import {AppRegistry} from "react-native"; 2 | import App from "./src/App"; 3 | AppRegistry.registerComponent("ImageEffects", () => App); 4 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | import {AppRegistry} from "react-native"; 2 | import App from "./src/App"; 3 | AppRegistry.registerComponent("ImageEffects", () => App); 4 | -------------------------------------------------------------------------------- /index.web.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import {render} from "react-dom"; 3 | import App from "./src/App"; 4 | import fetch from "isomorphic-fetch"; 5 | 6 | if (!window.fetch) window.fetch = fetch; 7 | 8 | Object.assign(document.body.style, { 9 | backgroundColor: "#eee", 10 | color: "#333", 11 | padding: 0 12 | }); 13 | 14 | const root = document.createElement("div"); 15 | document.body.appendChild(root); 16 | render(, root); 17 | -------------------------------------------------------------------------------- /ios/ImageEffects.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 15 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 16 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 17 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 18 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 19 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 20 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 21 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 22 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 23 | 3436F9471C14CEAC00CE9505 /* libRNGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3436F9461C14CEA200CE9505 /* libRNGL.a */; }; 24 | 34E3F48A1C776D2100322C3A /* libRNImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 34E3F4891C775EFC00322C3A /* libRNImagePicker.a */; }; 25 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 32 | proxyType = 2; 33 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 34 | remoteInfo = RCTActionSheet; 35 | }; 36 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 39 | proxyType = 2; 40 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 41 | remoteInfo = RCTGeolocation; 42 | }; 43 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 46 | proxyType = 2; 47 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 48 | remoteInfo = RCTImage; 49 | }; 50 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 51 | isa = PBXContainerItemProxy; 52 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 53 | proxyType = 2; 54 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 55 | remoteInfo = RCTNetwork; 56 | }; 57 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 58 | isa = PBXContainerItemProxy; 59 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 60 | proxyType = 2; 61 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 62 | remoteInfo = RCTVibration; 63 | }; 64 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 65 | isa = PBXContainerItemProxy; 66 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 67 | proxyType = 1; 68 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 69 | remoteInfo = ImageEffects; 70 | }; 71 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 72 | isa = PBXContainerItemProxy; 73 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 74 | proxyType = 2; 75 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 76 | remoteInfo = RCTSettings; 77 | }; 78 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 79 | isa = PBXContainerItemProxy; 80 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 81 | proxyType = 2; 82 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 83 | remoteInfo = RCTWebSocket; 84 | }; 85 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 86 | isa = PBXContainerItemProxy; 87 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 88 | proxyType = 2; 89 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 90 | remoteInfo = React; 91 | }; 92 | 3436F9451C14CEA200CE9505 /* PBXContainerItemProxy */ = { 93 | isa = PBXContainerItemProxy; 94 | containerPortal = 3436F9371C14CEA200CE9505 /* RNGL.xcodeproj */; 95 | proxyType = 2; 96 | remoteGlobalIDString = 4107012F1ACB723B00C6AA39; 97 | remoteInfo = RNGL; 98 | }; 99 | 34E3F4881C775EFC00322C3A /* PBXContainerItemProxy */ = { 100 | isa = PBXContainerItemProxy; 101 | containerPortal = 34E3F4791C775EFC00322C3A /* RNImagePicker.xcodeproj */; 102 | proxyType = 2; 103 | remoteGlobalIDString = 014A3B5C1C6CF33500B6D375; 104 | remoteInfo = RNImagePicker; 105 | }; 106 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 107 | isa = PBXContainerItemProxy; 108 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 109 | proxyType = 2; 110 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 111 | remoteInfo = RCTLinking; 112 | }; 113 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 114 | isa = PBXContainerItemProxy; 115 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 116 | proxyType = 2; 117 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 118 | remoteInfo = RCTText; 119 | }; 120 | /* End PBXContainerItemProxy section */ 121 | 122 | /* Begin PBXFileReference section */ 123 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 124 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 125 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 126 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 127 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 128 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 129 | 00E356EE1AD99517003FC87E /* ImageEffectsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ImageEffectsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 130 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 131 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 132 | 13B07F961A680F5B00A75B9A /* ImageEffects.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ImageEffects.app; sourceTree = BUILT_PRODUCTS_DIR; }; 133 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ImageEffects/AppDelegate.h; sourceTree = ""; }; 134 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = ImageEffects/AppDelegate.m; sourceTree = ""; }; 135 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 136 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ImageEffects/Images.xcassets; sourceTree = ""; }; 137 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ImageEffects/Info.plist; sourceTree = ""; }; 138 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ImageEffects/main.m; sourceTree = ""; }; 139 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 140 | 3436F9371C14CEA200CE9505 /* RNGL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNGL.xcodeproj; path = "../node_modules/gl-react-native/ios/RNGL.xcodeproj"; sourceTree = ""; }; 141 | 34E3F4791C775EFC00322C3A /* RNImagePicker.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNImagePicker.xcodeproj; path = "../node_modules/react-native-image-picker/ios/RNImagePicker.xcodeproj"; sourceTree = ""; }; 142 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 143 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 144 | /* End PBXFileReference section */ 145 | 146 | /* Begin PBXFrameworksBuildPhase section */ 147 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 148 | isa = PBXFrameworksBuildPhase; 149 | buildActionMask = 2147483647; 150 | files = ( 151 | ); 152 | runOnlyForDeploymentPostprocessing = 0; 153 | }; 154 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 155 | isa = PBXFrameworksBuildPhase; 156 | buildActionMask = 2147483647; 157 | files = ( 158 | 34E3F48A1C776D2100322C3A /* libRNImagePicker.a in Frameworks */, 159 | 3436F9471C14CEAC00CE9505 /* libRNGL.a in Frameworks */, 160 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 161 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 162 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 163 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 164 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 165 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 166 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 167 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 168 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 169 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 170 | ); 171 | runOnlyForDeploymentPostprocessing = 0; 172 | }; 173 | /* End PBXFrameworksBuildPhase section */ 174 | 175 | /* Begin PBXGroup section */ 176 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 180 | ); 181 | name = Products; 182 | sourceTree = ""; 183 | }; 184 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 188 | ); 189 | name = Products; 190 | sourceTree = ""; 191 | }; 192 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 193 | isa = PBXGroup; 194 | children = ( 195 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 196 | ); 197 | name = Products; 198 | sourceTree = ""; 199 | }; 200 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 204 | ); 205 | name = Products; 206 | sourceTree = ""; 207 | }; 208 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 209 | isa = PBXGroup; 210 | children = ( 211 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 212 | ); 213 | name = Products; 214 | sourceTree = ""; 215 | }; 216 | 139105B71AF99BAD00B5F7CC /* Products */ = { 217 | isa = PBXGroup; 218 | children = ( 219 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 220 | ); 221 | name = Products; 222 | sourceTree = ""; 223 | }; 224 | 139FDEE71B06529A00C62182 /* Products */ = { 225 | isa = PBXGroup; 226 | children = ( 227 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 228 | ); 229 | name = Products; 230 | sourceTree = ""; 231 | }; 232 | 13B07FAE1A68108700A75B9A /* ImageEffects */ = { 233 | isa = PBXGroup; 234 | children = ( 235 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 236 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 237 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 238 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 239 | 13B07FB61A68108700A75B9A /* Info.plist */, 240 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 241 | 13B07FB71A68108700A75B9A /* main.m */, 242 | ); 243 | name = ImageEffects; 244 | sourceTree = ""; 245 | }; 246 | 146834001AC3E56700842450 /* Products */ = { 247 | isa = PBXGroup; 248 | children = ( 249 | 146834041AC3E56700842450 /* libReact.a */, 250 | ); 251 | name = Products; 252 | sourceTree = ""; 253 | }; 254 | 3436F9381C14CEA200CE9505 /* Products */ = { 255 | isa = PBXGroup; 256 | children = ( 257 | 3436F9461C14CEA200CE9505 /* libRNGL.a */, 258 | ); 259 | name = Products; 260 | sourceTree = ""; 261 | }; 262 | 34E3F47A1C775EFC00322C3A /* Products */ = { 263 | isa = PBXGroup; 264 | children = ( 265 | 34E3F4891C775EFC00322C3A /* libRNImagePicker.a */, 266 | ); 267 | name = Products; 268 | sourceTree = ""; 269 | }; 270 | 78C398B11ACF4ADC00677621 /* Products */ = { 271 | isa = PBXGroup; 272 | children = ( 273 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 274 | ); 275 | name = Products; 276 | sourceTree = ""; 277 | }; 278 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 279 | isa = PBXGroup; 280 | children = ( 281 | 34E3F4791C775EFC00322C3A /* RNImagePicker.xcodeproj */, 282 | 3436F9371C14CEA200CE9505 /* RNGL.xcodeproj */, 283 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 284 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 285 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 286 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 287 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 288 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 289 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 290 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 291 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 292 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 293 | ); 294 | name = Libraries; 295 | sourceTree = ""; 296 | }; 297 | 832341B11AAA6A8300B99B32 /* Products */ = { 298 | isa = PBXGroup; 299 | children = ( 300 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 301 | ); 302 | name = Products; 303 | sourceTree = ""; 304 | }; 305 | 83CBB9F61A601CBA00E9B192 = { 306 | isa = PBXGroup; 307 | children = ( 308 | 13B07FAE1A68108700A75B9A /* ImageEffects */, 309 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 310 | 83CBBA001A601CBA00E9B192 /* Products */, 311 | ); 312 | indentWidth = 2; 313 | sourceTree = ""; 314 | tabWidth = 2; 315 | }; 316 | 83CBBA001A601CBA00E9B192 /* Products */ = { 317 | isa = PBXGroup; 318 | children = ( 319 | 13B07F961A680F5B00A75B9A /* ImageEffects.app */, 320 | 00E356EE1AD99517003FC87E /* ImageEffectsTests.xctest */, 321 | ); 322 | name = Products; 323 | sourceTree = ""; 324 | }; 325 | /* End PBXGroup section */ 326 | 327 | /* Begin PBXNativeTarget section */ 328 | 00E356ED1AD99517003FC87E /* ImageEffectsTests */ = { 329 | isa = PBXNativeTarget; 330 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ImageEffectsTests" */; 331 | buildPhases = ( 332 | 00E356EA1AD99517003FC87E /* Sources */, 333 | 00E356EB1AD99517003FC87E /* Frameworks */, 334 | 00E356EC1AD99517003FC87E /* Resources */, 335 | ); 336 | buildRules = ( 337 | ); 338 | dependencies = ( 339 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 340 | ); 341 | name = ImageEffectsTests; 342 | productName = ImageEffectsTests; 343 | productReference = 00E356EE1AD99517003FC87E /* ImageEffectsTests.xctest */; 344 | productType = "com.apple.product-type.bundle.unit-test"; 345 | }; 346 | 13B07F861A680F5B00A75B9A /* ImageEffects */ = { 347 | isa = PBXNativeTarget; 348 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ImageEffects" */; 349 | buildPhases = ( 350 | 13B07F871A680F5B00A75B9A /* Sources */, 351 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 352 | 13B07F8E1A680F5B00A75B9A /* Resources */, 353 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 354 | ); 355 | buildRules = ( 356 | ); 357 | dependencies = ( 358 | ); 359 | name = ImageEffects; 360 | productName = "Hello World"; 361 | productReference = 13B07F961A680F5B00A75B9A /* ImageEffects.app */; 362 | productType = "com.apple.product-type.application"; 363 | }; 364 | /* End PBXNativeTarget section */ 365 | 366 | /* Begin PBXProject section */ 367 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 368 | isa = PBXProject; 369 | attributes = { 370 | LastUpgradeCheck = 0610; 371 | ORGANIZATIONNAME = Facebook; 372 | TargetAttributes = { 373 | 00E356ED1AD99517003FC87E = { 374 | CreatedOnToolsVersion = 6.2; 375 | TestTargetID = 13B07F861A680F5B00A75B9A; 376 | }; 377 | }; 378 | }; 379 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ImageEffects" */; 380 | compatibilityVersion = "Xcode 3.2"; 381 | developmentRegion = English; 382 | hasScannedForEncodings = 0; 383 | knownRegions = ( 384 | en, 385 | Base, 386 | ); 387 | mainGroup = 83CBB9F61A601CBA00E9B192; 388 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 389 | projectDirPath = ""; 390 | projectReferences = ( 391 | { 392 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 393 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 394 | }, 395 | { 396 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 397 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 398 | }, 399 | { 400 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 401 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 402 | }, 403 | { 404 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 405 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 406 | }, 407 | { 408 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 409 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 410 | }, 411 | { 412 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 413 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 414 | }, 415 | { 416 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 417 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 418 | }, 419 | { 420 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 421 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 422 | }, 423 | { 424 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 425 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 426 | }, 427 | { 428 | ProductGroup = 146834001AC3E56700842450 /* Products */; 429 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 430 | }, 431 | { 432 | ProductGroup = 3436F9381C14CEA200CE9505 /* Products */; 433 | ProjectRef = 3436F9371C14CEA200CE9505 /* RNGL.xcodeproj */; 434 | }, 435 | { 436 | ProductGroup = 34E3F47A1C775EFC00322C3A /* Products */; 437 | ProjectRef = 34E3F4791C775EFC00322C3A /* RNImagePicker.xcodeproj */; 438 | }, 439 | ); 440 | projectRoot = ""; 441 | targets = ( 442 | 13B07F861A680F5B00A75B9A /* ImageEffects */, 443 | 00E356ED1AD99517003FC87E /* ImageEffectsTests */, 444 | ); 445 | }; 446 | /* End PBXProject section */ 447 | 448 | /* Begin PBXReferenceProxy section */ 449 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 450 | isa = PBXReferenceProxy; 451 | fileType = archive.ar; 452 | path = libRCTActionSheet.a; 453 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 454 | sourceTree = BUILT_PRODUCTS_DIR; 455 | }; 456 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 457 | isa = PBXReferenceProxy; 458 | fileType = archive.ar; 459 | path = libRCTGeolocation.a; 460 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 461 | sourceTree = BUILT_PRODUCTS_DIR; 462 | }; 463 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 464 | isa = PBXReferenceProxy; 465 | fileType = archive.ar; 466 | path = libRCTImage.a; 467 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 468 | sourceTree = BUILT_PRODUCTS_DIR; 469 | }; 470 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 471 | isa = PBXReferenceProxy; 472 | fileType = archive.ar; 473 | path = libRCTNetwork.a; 474 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 475 | sourceTree = BUILT_PRODUCTS_DIR; 476 | }; 477 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 478 | isa = PBXReferenceProxy; 479 | fileType = archive.ar; 480 | path = libRCTVibration.a; 481 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 482 | sourceTree = BUILT_PRODUCTS_DIR; 483 | }; 484 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 485 | isa = PBXReferenceProxy; 486 | fileType = archive.ar; 487 | path = libRCTSettings.a; 488 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 489 | sourceTree = BUILT_PRODUCTS_DIR; 490 | }; 491 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 492 | isa = PBXReferenceProxy; 493 | fileType = archive.ar; 494 | path = libRCTWebSocket.a; 495 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 496 | sourceTree = BUILT_PRODUCTS_DIR; 497 | }; 498 | 146834041AC3E56700842450 /* libReact.a */ = { 499 | isa = PBXReferenceProxy; 500 | fileType = archive.ar; 501 | path = libReact.a; 502 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 503 | sourceTree = BUILT_PRODUCTS_DIR; 504 | }; 505 | 3436F9461C14CEA200CE9505 /* libRNGL.a */ = { 506 | isa = PBXReferenceProxy; 507 | fileType = archive.ar; 508 | path = libRNGL.a; 509 | remoteRef = 3436F9451C14CEA200CE9505 /* PBXContainerItemProxy */; 510 | sourceTree = BUILT_PRODUCTS_DIR; 511 | }; 512 | 34E3F4891C775EFC00322C3A /* libRNImagePicker.a */ = { 513 | isa = PBXReferenceProxy; 514 | fileType = archive.ar; 515 | path = libRNImagePicker.a; 516 | remoteRef = 34E3F4881C775EFC00322C3A /* PBXContainerItemProxy */; 517 | sourceTree = BUILT_PRODUCTS_DIR; 518 | }; 519 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 520 | isa = PBXReferenceProxy; 521 | fileType = archive.ar; 522 | path = libRCTLinking.a; 523 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 524 | sourceTree = BUILT_PRODUCTS_DIR; 525 | }; 526 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 527 | isa = PBXReferenceProxy; 528 | fileType = archive.ar; 529 | path = libRCTText.a; 530 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 531 | sourceTree = BUILT_PRODUCTS_DIR; 532 | }; 533 | /* End PBXReferenceProxy section */ 534 | 535 | /* Begin PBXResourcesBuildPhase section */ 536 | 00E356EC1AD99517003FC87E /* Resources */ = { 537 | isa = PBXResourcesBuildPhase; 538 | buildActionMask = 2147483647; 539 | files = ( 540 | ); 541 | runOnlyForDeploymentPostprocessing = 0; 542 | }; 543 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 544 | isa = PBXResourcesBuildPhase; 545 | buildActionMask = 2147483647; 546 | files = ( 547 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 548 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 549 | ); 550 | runOnlyForDeploymentPostprocessing = 0; 551 | }; 552 | /* End PBXResourcesBuildPhase section */ 553 | 554 | /* Begin PBXShellScriptBuildPhase section */ 555 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 556 | isa = PBXShellScriptBuildPhase; 557 | buildActionMask = 2147483647; 558 | files = ( 559 | ); 560 | inputPaths = ( 561 | ); 562 | name = "Bundle React Native code and images"; 563 | outputPaths = ( 564 | ); 565 | runOnlyForDeploymentPostprocessing = 0; 566 | shellPath = /bin/sh; 567 | shellScript = "../node_modules/react-native/packager/react-native-xcode.sh"; 568 | }; 569 | /* End PBXShellScriptBuildPhase section */ 570 | 571 | /* Begin PBXSourcesBuildPhase section */ 572 | 00E356EA1AD99517003FC87E /* Sources */ = { 573 | isa = PBXSourcesBuildPhase; 574 | buildActionMask = 2147483647; 575 | files = ( 576 | ); 577 | runOnlyForDeploymentPostprocessing = 0; 578 | }; 579 | 13B07F871A680F5B00A75B9A /* Sources */ = { 580 | isa = PBXSourcesBuildPhase; 581 | buildActionMask = 2147483647; 582 | files = ( 583 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 584 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 585 | ); 586 | runOnlyForDeploymentPostprocessing = 0; 587 | }; 588 | /* End PBXSourcesBuildPhase section */ 589 | 590 | /* Begin PBXTargetDependency section */ 591 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 592 | isa = PBXTargetDependency; 593 | target = 13B07F861A680F5B00A75B9A /* ImageEffects */; 594 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 595 | }; 596 | /* End PBXTargetDependency section */ 597 | 598 | /* Begin PBXVariantGroup section */ 599 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 600 | isa = PBXVariantGroup; 601 | children = ( 602 | 13B07FB21A68108700A75B9A /* Base */, 603 | ); 604 | name = LaunchScreen.xib; 605 | path = ImageEffects; 606 | sourceTree = ""; 607 | }; 608 | /* End PBXVariantGroup section */ 609 | 610 | /* Begin XCBuildConfiguration section */ 611 | 00E356F61AD99517003FC87E /* Debug */ = { 612 | isa = XCBuildConfiguration; 613 | buildSettings = { 614 | BUNDLE_LOADER = "$(TEST_HOST)"; 615 | FRAMEWORK_SEARCH_PATHS = ( 616 | "$(SDKROOT)/Developer/Library/Frameworks", 617 | "$(inherited)", 618 | ); 619 | GCC_PREPROCESSOR_DEFINITIONS = ( 620 | "DEBUG=1", 621 | "$(inherited)", 622 | ); 623 | INFOPLIST_FILE = ImageEffectsTests/Info.plist; 624 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 625 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 626 | PRODUCT_NAME = "$(TARGET_NAME)"; 627 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ImageEffects.app/ImageEffects"; 628 | }; 629 | name = Debug; 630 | }; 631 | 00E356F71AD99517003FC87E /* Release */ = { 632 | isa = XCBuildConfiguration; 633 | buildSettings = { 634 | BUNDLE_LOADER = "$(TEST_HOST)"; 635 | COPY_PHASE_STRIP = NO; 636 | FRAMEWORK_SEARCH_PATHS = ( 637 | "$(SDKROOT)/Developer/Library/Frameworks", 638 | "$(inherited)", 639 | ); 640 | INFOPLIST_FILE = ImageEffectsTests/Info.plist; 641 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 642 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 643 | PRODUCT_NAME = "$(TARGET_NAME)"; 644 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ImageEffects.app/ImageEffects"; 645 | }; 646 | name = Release; 647 | }; 648 | 13B07F941A680F5B00A75B9A /* Debug */ = { 649 | isa = XCBuildConfiguration; 650 | buildSettings = { 651 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 652 | DEAD_CODE_STRIPPING = NO; 653 | HEADER_SEARCH_PATHS = ( 654 | "$(inherited)", 655 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 656 | "$(SRCROOT)/../node_modules/react-native/React/**", 657 | ); 658 | INFOPLIST_FILE = ImageEffects/Info.plist; 659 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 660 | OTHER_LDFLAGS = "-ObjC"; 661 | PRODUCT_BUNDLE_IDENTIFIER = fr.greweb.ImageEffects; 662 | PRODUCT_NAME = ImageEffects; 663 | }; 664 | name = Debug; 665 | }; 666 | 13B07F951A680F5B00A75B9A /* Release */ = { 667 | isa = XCBuildConfiguration; 668 | buildSettings = { 669 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 670 | HEADER_SEARCH_PATHS = ( 671 | "$(inherited)", 672 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 673 | "$(SRCROOT)/../node_modules/react-native/React/**", 674 | ); 675 | INFOPLIST_FILE = ImageEffects/Info.plist; 676 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 677 | OTHER_LDFLAGS = "-ObjC"; 678 | PRODUCT_BUNDLE_IDENTIFIER = fr.greweb.ImageEffects; 679 | PRODUCT_NAME = ImageEffects; 680 | }; 681 | name = Release; 682 | }; 683 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 684 | isa = XCBuildConfiguration; 685 | buildSettings = { 686 | ALWAYS_SEARCH_USER_PATHS = NO; 687 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 688 | CLANG_CXX_LIBRARY = "libc++"; 689 | CLANG_ENABLE_MODULES = YES; 690 | CLANG_ENABLE_OBJC_ARC = YES; 691 | CLANG_WARN_BOOL_CONVERSION = YES; 692 | CLANG_WARN_CONSTANT_CONVERSION = YES; 693 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 694 | CLANG_WARN_EMPTY_BODY = YES; 695 | CLANG_WARN_ENUM_CONVERSION = YES; 696 | CLANG_WARN_INT_CONVERSION = YES; 697 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 698 | CLANG_WARN_UNREACHABLE_CODE = YES; 699 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 700 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 701 | COPY_PHASE_STRIP = NO; 702 | ENABLE_STRICT_OBJC_MSGSEND = YES; 703 | GCC_C_LANGUAGE_STANDARD = gnu99; 704 | GCC_DYNAMIC_NO_PIC = NO; 705 | GCC_OPTIMIZATION_LEVEL = 0; 706 | GCC_PREPROCESSOR_DEFINITIONS = ( 707 | "DEBUG=1", 708 | "$(inherited)", 709 | ); 710 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 711 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 712 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 713 | GCC_WARN_UNDECLARED_SELECTOR = YES; 714 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 715 | GCC_WARN_UNUSED_FUNCTION = YES; 716 | GCC_WARN_UNUSED_VARIABLE = YES; 717 | HEADER_SEARCH_PATHS = ( 718 | "$(inherited)", 719 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 720 | "$(SRCROOT)/../node_modules/react-native/React/**", 721 | ); 722 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 723 | MTL_ENABLE_DEBUG_INFO = YES; 724 | ONLY_ACTIVE_ARCH = YES; 725 | SDKROOT = iphoneos; 726 | }; 727 | name = Debug; 728 | }; 729 | 83CBBA211A601CBA00E9B192 /* Release */ = { 730 | isa = XCBuildConfiguration; 731 | buildSettings = { 732 | ALWAYS_SEARCH_USER_PATHS = NO; 733 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 734 | CLANG_CXX_LIBRARY = "libc++"; 735 | CLANG_ENABLE_MODULES = YES; 736 | CLANG_ENABLE_OBJC_ARC = YES; 737 | CLANG_WARN_BOOL_CONVERSION = YES; 738 | CLANG_WARN_CONSTANT_CONVERSION = YES; 739 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 740 | CLANG_WARN_EMPTY_BODY = YES; 741 | CLANG_WARN_ENUM_CONVERSION = YES; 742 | CLANG_WARN_INT_CONVERSION = YES; 743 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 744 | CLANG_WARN_UNREACHABLE_CODE = YES; 745 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 746 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 747 | COPY_PHASE_STRIP = YES; 748 | ENABLE_NS_ASSERTIONS = NO; 749 | ENABLE_STRICT_OBJC_MSGSEND = YES; 750 | GCC_C_LANGUAGE_STANDARD = gnu99; 751 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 752 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 753 | GCC_WARN_UNDECLARED_SELECTOR = YES; 754 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 755 | GCC_WARN_UNUSED_FUNCTION = YES; 756 | GCC_WARN_UNUSED_VARIABLE = YES; 757 | HEADER_SEARCH_PATHS = ( 758 | "$(inherited)", 759 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 760 | "$(SRCROOT)/../node_modules/react-native/React/**", 761 | ); 762 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 763 | MTL_ENABLE_DEBUG_INFO = NO; 764 | SDKROOT = iphoneos; 765 | VALIDATE_PRODUCT = YES; 766 | }; 767 | name = Release; 768 | }; 769 | /* End XCBuildConfiguration section */ 770 | 771 | /* Begin XCConfigurationList section */ 772 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ImageEffectsTests" */ = { 773 | isa = XCConfigurationList; 774 | buildConfigurations = ( 775 | 00E356F61AD99517003FC87E /* Debug */, 776 | 00E356F71AD99517003FC87E /* Release */, 777 | ); 778 | defaultConfigurationIsVisible = 0; 779 | defaultConfigurationName = Release; 780 | }; 781 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ImageEffects" */ = { 782 | isa = XCConfigurationList; 783 | buildConfigurations = ( 784 | 13B07F941A680F5B00A75B9A /* Debug */, 785 | 13B07F951A680F5B00A75B9A /* Release */, 786 | ); 787 | defaultConfigurationIsVisible = 0; 788 | defaultConfigurationName = Release; 789 | }; 790 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ImageEffects" */ = { 791 | isa = XCConfigurationList; 792 | buildConfigurations = ( 793 | 83CBBA201A601CBA00E9B192 /* Debug */, 794 | 83CBBA211A601CBA00E9B192 /* Release */, 795 | ); 796 | defaultConfigurationIsVisible = 0; 797 | defaultConfigurationName = Release; 798 | }; 799 | /* End XCConfigurationList section */ 800 | }; 801 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 802 | } 803 | -------------------------------------------------------------------------------- /ios/ImageEffects.xcodeproj/xcshareddata/xcschemes/ImageEffects.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /ios/ImageEffects/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/ImageEffects/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import "RCTRootView.h" 13 | 14 | @implementation AppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | NSURL *jsCodeLocation; 19 | 20 | /** 21 | * Loading JavaScript code - uncomment the one you want. 22 | * 23 | * OPTION 1 24 | * Load from development server. Start the server from the repository root: 25 | * 26 | * $ npm start 27 | * 28 | * To run on device, change `localhost` to the IP address of your computer 29 | * (you can get this by typing `ifconfig` into the terminal and selecting the 30 | * `inet` value under `en0:`) and make sure your computer and iOS device are 31 | * on the same Wi-Fi network. 32 | */ 33 | 34 | //jsCodeLocation = [NSURL URLWithString:@"http://192.168.0.26:8081/index.ios.bundle?platform=ios&dev=true"]; 35 | 36 | /** 37 | * OPTION 2 38 | * Load from pre-bundled file on disk. The static bundle is automatically 39 | * generated by "Bundle React Native code and images" build step. 40 | */ 41 | 42 | jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 43 | 44 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 45 | moduleName:@"ImageEffects" 46 | initialProperties:nil 47 | launchOptions:launchOptions]; 48 | 49 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 50 | UIViewController *rootViewController = [UIViewController new]; 51 | rootViewController.view = rootView; 52 | self.window.rootViewController = rootViewController; 53 | [self.window makeKeyAndVisible]; 54 | return YES; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /ios/ImageEffects/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ios/ImageEffects/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ios/ImageEffects/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | NSLocationWhenInUseUsageDescription 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/ImageEffects/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/ImageEffectsTests/ImageEffectsTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import "RCTLog.h" 14 | #import "RCTRootView.h" 15 | 16 | #define TIMEOUT_SECONDS 240 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface ImageEffectsTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation ImageEffectsTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /ios/ImageEffectsTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gl-react-image-effects", 3 | "version": "1.0.0", 4 | "description": "universal image app that uses different gl-react components", 5 | "scripts": { 6 | "start": "budo --live --debug index.web.js" 7 | }, 8 | "browserify": { 9 | "transform": [ 10 | [ 11 | "babelify", 12 | { 13 | "presets": [ 14 | "es2015", 15 | "stage-1", 16 | "react" 17 | ] 18 | } 19 | ] 20 | ] 21 | }, 22 | "dependencies": { 23 | "fbjs": "~0.6.0", 24 | "gl-react": "~2.2.0", 25 | "gl-react-blur": "~1.2.0", 26 | "gl-react-color-matrix": "~1.1.0", 27 | "gl-react-contrast-saturation-brightness": "~1.1.0", 28 | "gl-react-dom": "~2.2.0", 29 | "gl-react-hue-rotate": "~1.1.0", 30 | "gl-react-native": "~2.20.0", 31 | "gl-react-negative": "~1.1.0", 32 | "isomorphic-fetch": "^2.2.0", 33 | "react": "~0.14.7", 34 | "react-dom": "~0.14.7", 35 | "react-native": "~0.20.0", 36 | "react-native-image-picker": "^0.14.3", 37 | "react-native-material-kit": "~0.3.0" 38 | }, 39 | "devDependencies": { 40 | "babel-eslint": "^5.0.0", 41 | "babel-preset-es2015": "^6.5.0", 42 | "babel-preset-react": "^6.5.0", 43 | "babel-preset-stage-1": "^6.5.0", 44 | "babelify": "^7.2.0", 45 | "browserify": "^13.0.0", 46 | "budo": "^8.0.4", 47 | "eslint": "^2.1.0", 48 | "eslint-plugin-react": "^3.16.1" 49 | }, 50 | "repository": { 51 | "type": "git", 52 | "url": "git+https://github.com/gre/gl-react-image-effects.git" 53 | }, 54 | "keywords": [ 55 | "gl-react" 56 | ], 57 | "author": "Gaëtan Renaudeau", 58 | "license": "MIT", 59 | "bugs": { 60 | "url": "https://github.com/gre/gl-react-image-effects/issues" 61 | }, 62 | "homepage": "https://github.com/gre/gl-react-image-effects#readme" 63 | } 64 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | const {Component} = React; 3 | import Field from "./Field"; 4 | import Viewport from "./Viewport"; 5 | import AppContainer from "./AppContainer"; 6 | import EffectsPanel from "./EffectsPanel"; 7 | import Button from "./Button"; 8 | import ExportPanel from "./ExportPanel"; 9 | import ExportedLink from "./ExportedLink"; 10 | import uploadImage from "./uploadImage"; 11 | 12 | const percentagePrint = v => (v * 100).toFixed(0) + "%"; 13 | const radiantPrint = r => (180 * r / Math.PI).toFixed(0) + "°"; 14 | 15 | const initialInputs = { 16 | blur: 0, 17 | saturation: 1, 18 | contrast: 1, 19 | brightness: 1, 20 | negative: 0, 21 | hue: 0, 22 | sepia: 0, 23 | flyeye: 0 24 | }; 25 | 26 | const fields = [ 27 | { id: "blur", name: "Blur", min: 0, max: 6, step: 0.1, prettyPrint: blur => blur.toFixed(1) }, 28 | { id: "contrast", name: "Contrast", min: 0, max: 4, step: 0.1, prettyPrint: percentagePrint }, 29 | { id: "brightness", name: "Brightness", min: 0, max: 4, step: 0.1, prettyPrint: percentagePrint }, 30 | { id: "saturation", name: "Saturation", min: 0, max: 10, step: 0.1, prettyPrint: percentagePrint }, 31 | { id: "hue", name: "HueRotate", min: 0, max: 2 * Math.PI, step: 0.1, prettyPrint: radiantPrint }, 32 | { id: "negative", name: "Negative", min: 0, max: 1, step: 0.05, prettyPrint: percentagePrint }, 33 | { id: "sepia", name: "Sepia", min: 0, max: 1, step: 0.05, prettyPrint: percentagePrint }, 34 | { id: "flyeye", name: "FlyEye", min: 0, max: 1, step: 0.05, prettyPrint: percentagePrint } 35 | ]; 36 | 37 | export default class App extends Component { 38 | 39 | constructor (props) { 40 | super(props); 41 | this.state = { 42 | content: { 43 | uri: "http://i.imgur.com/wxqlQkh.jpg", 44 | type: "image/jpg", 45 | mainType: "image", 46 | width: 512, 47 | height: 340 48 | }, 49 | uploaded: null, 50 | ...initialInputs 51 | }; 52 | } 53 | 54 | onLoadNewContent = content => { 55 | this.setState({ content }); 56 | }; 57 | 58 | onExport = () => 59 | this.refs.viewport.captureFrame() 60 | .then(uploadImage) 61 | .then(({ data: { link: uploaded } }) => this.setState({ uploaded })); 62 | 63 | render () { 64 | const { content, uploaded, ...effects } = this.state; 65 | 66 | return ( 67 | 68 | 74 | 75 | {fields.map(({ id, ...props}) => 76 | this.setState({ [id]: value })} 80 | onReset={() => this.setState({ [id]: initialInputs[id] })} 81 | /> 82 | ) } 83 | 84 | UPLOAD TO IMGUR 85 | {uploaded ? {uploaded} : null} 86 | 87 | 88 | 89 | ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/AppContainer.android.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./AppContainer.native"); 2 | -------------------------------------------------------------------------------- /src/AppContainer.ios.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./AppContainer.native"); 2 | -------------------------------------------------------------------------------- /src/AppContainer.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes} from "react"; 2 | 3 | const styles = { 4 | root: { 5 | display: "flex", 6 | flexDirection: "row", 7 | justifyContent: "center" 8 | } 9 | }; 10 | 11 | export default class AppContainer extends Component { 12 | 13 | render () { 14 | const {children} = this.props; 15 | return ( 16 | {children} 17 | ); 18 | } 19 | } 20 | 21 | AppContainer.propTypes = { 22 | children: PropTypes.node.isRequired 23 | }; 24 | -------------------------------------------------------------------------------- /src/AppContainer.native.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes, StyleSheet, ScrollView} from "react-native"; 2 | 3 | const styles = StyleSheet.create({ 4 | root: { 5 | flex: 1, 6 | backgroundColor: "#EEE" 7 | } 8 | }); 9 | 10 | export default class AppContainer extends Component { 11 | 12 | render () { 13 | const {children} = this.props; 14 | return ( 15 | 16 | {children} 17 | 18 | ); 19 | } 20 | } 21 | 22 | AppContainer.propTypes = { 23 | children: PropTypes.node.isRequired 24 | }; 25 | -------------------------------------------------------------------------------- /src/Button.android.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./Button.native"); 2 | -------------------------------------------------------------------------------- /src/Button.ios.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./Button.native"); 2 | -------------------------------------------------------------------------------- /src/Button.js: -------------------------------------------------------------------------------- 1 | const React = require("react"); 2 | const { 3 | Component, 4 | PropTypes 5 | } = React; 6 | 7 | const styles = { 8 | button: { 9 | fontSize: "1em", 10 | padding: 10 11 | } 12 | }; 13 | 14 | class Button extends Component { 15 | 16 | constructor (props) { 17 | super(props); 18 | this.state = { 19 | pending: false 20 | }; 21 | } 22 | 23 | onClick = e => { 24 | if (this.state.pending) return; 25 | const {onPress} = this.props; 26 | e.preventDefault(); 27 | this.setState({ pending: true }); 28 | Promise.resolve() 29 | .then(onPress) 30 | .catch(e => console.warn(e)) // eslint-disable-line no-console 31 | .then(() => this.setState({ pending: false })); 32 | }; 33 | 34 | render () { 35 | const {children} = this.props; 36 | const {pending} = this.state; 37 | return 40 | {children} 41 | ; 42 | } 43 | } 44 | 45 | Button.propTypes = { 46 | onPress: PropTypes.func.isRequired, 47 | children: PropTypes.any.isRequired 48 | }; 49 | 50 | module.exports = Button; 51 | -------------------------------------------------------------------------------- /src/Button.native.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes, StyleSheet, TouchableOpacity, Text } from "react-native"; 2 | 3 | const styles = StyleSheet.create({ 4 | button: { 5 | textAlign: "center", 6 | backgroundColor: "#ccc", 7 | borderColor: "#666", 8 | borderWidth: 1, 9 | fontSize: 14, 10 | padding: 10 11 | }, 12 | buttonPending: { 13 | opacity: 0.3 14 | } 15 | }); 16 | 17 | export default class Button extends Component { 18 | constructor (props) { 19 | super(props); 20 | this.state = { 21 | pending: false 22 | }; 23 | } 24 | onPress = () => { 25 | if (this.state.pending) return; 26 | const {onPress} = this.props; 27 | this.setState({ pending: true }); 28 | Promise.resolve() 29 | .then(onPress) 30 | .catch(e => console.warn(e)) // eslint-disable-line no-console 31 | .then(() => this.setState({ pending: false })); 32 | }; 33 | render () { 34 | const {onPress, children} = this.props; 35 | const { pending } = this.state; 36 | return 37 | {children} 38 | ; 39 | } 40 | } 41 | 42 | Button.propTypes = { 43 | onPress: PropTypes.func.isRequired, 44 | children: PropTypes.any.isRequired 45 | }; 46 | -------------------------------------------------------------------------------- /src/EffectsPanel.android.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./EffectsPanel.native"); 2 | -------------------------------------------------------------------------------- /src/EffectsPanel.ios.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./EffectsPanel.native"); 2 | -------------------------------------------------------------------------------- /src/EffectsPanel.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes} from "react"; 2 | 3 | const styles = { 4 | root: { 5 | display: "flex", 6 | flexDirection: "column", 7 | flex: 1, 8 | minWidth: 400 9 | } 10 | }; 11 | 12 | export default class EffectsPanel extends Component { 13 | 14 | render () { 15 | const {children} = this.props; 16 | return ( 17 | {children} 18 | ); 19 | } 20 | } 21 | 22 | EffectsPanel.propTypes = { 23 | children: PropTypes.node.isRequired 24 | }; 25 | -------------------------------------------------------------------------------- /src/EffectsPanel.native.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes, View, StyleSheet} from "react-native"; 2 | 3 | const styles = StyleSheet.create({ 4 | root: { 5 | flexDirection: "column", 6 | flex: 1, 7 | paddingTop: 10, 8 | paddingBottom: 40, 9 | backgroundColor: "#EEE", 10 | /* 11 | shadowColor: "#000", 12 | shadowRadius: 6, 13 | shadowOffset: { width: 0, height: 0 }, 14 | shadowOpacity: 0.3 15 | */ 16 | } 17 | }); 18 | 19 | export default class EffectsPanel extends Component { 20 | 21 | render () { 22 | const {children} = this.props; 23 | return ( 24 | {children} 25 | ); 26 | } 27 | } 28 | 29 | EffectsPanel.propTypes = { 30 | children: PropTypes.node.isRequired 31 | }; 32 | -------------------------------------------------------------------------------- /src/ExportPanel.android.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./ExportPanel.native"); 2 | -------------------------------------------------------------------------------- /src/ExportPanel.ios.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./ExportPanel.native"); 2 | -------------------------------------------------------------------------------- /src/ExportPanel.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | const { 3 | Component, 4 | PropTypes 5 | } = React; 6 | 7 | const styles = { 8 | root: { 9 | margin: "0 auto", 10 | width: 200, 11 | display: "flex", 12 | flexDirection: "column" 13 | } 14 | }; 15 | 16 | export default class ExportPanel extends Component { 17 | 18 | render () { 19 | const {children} = this.props; 20 | return 21 | {children} 22 | ; 23 | } 24 | } 25 | 26 | ExportPanel.propTypes = { 27 | children: PropTypes.any.isRequired 28 | }; 29 | -------------------------------------------------------------------------------- /src/ExportPanel.native.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes, View, StyleSheet} from "react-native"; 2 | 3 | const styles = StyleSheet.create({ 4 | root: { 5 | flexDirection: "column", 6 | alignItems: "center", 7 | paddingTop: 20 8 | } 9 | }); 10 | 11 | export default class ExportPanel extends Component { 12 | 13 | render () { 14 | const {children} = this.props; 15 | return 16 | {children} 17 | ; 18 | } 19 | } 20 | 21 | ExportPanel.propTypes = { 22 | children: PropTypes.any.isRequired 23 | }; 24 | -------------------------------------------------------------------------------- /src/ExportedLink.android.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./ExportedLink.native"); 2 | -------------------------------------------------------------------------------- /src/ExportedLink.ios.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./ExportedLink.native"); 2 | -------------------------------------------------------------------------------- /src/ExportedLink.js: -------------------------------------------------------------------------------- 1 | const React = require("react"); 2 | const { 3 | Component, 4 | PropTypes 5 | } = React; 6 | 7 | const styles = { 8 | a: { 9 | color: "#aaa", 10 | textAlign: "center", 11 | fontStyle: "italic", 12 | marginTop: 10 13 | } 14 | }; 15 | 16 | class ExportedLink extends Component { 17 | 18 | render () { 19 | const { children } = this.props; 20 | return 21 | {children} 22 | ; 23 | } 24 | } 25 | 26 | ExportedLink.propTypes = { 27 | children: PropTypes.string.isRequired 28 | }; 29 | 30 | module.exports = ExportedLink; 31 | -------------------------------------------------------------------------------- /src/ExportedLink.native.js: -------------------------------------------------------------------------------- 1 | import React, { Component, StyleSheet, PropTypes, Text, TouchableOpacity, Linking } from "react-native"; 2 | 3 | const styles = StyleSheet.create({ 4 | root: { 5 | padding: 20, 6 | flex: 1 7 | }, 8 | text: { 9 | textDecorationLine: "underline", 10 | color: "#666" 11 | } 12 | }); 13 | 14 | export default class ExportedLink extends Component { 15 | static propTypes = { 16 | children: PropTypes.string.isRequired 17 | }; 18 | onPress = () => Linking.openURL(this.props.children); 19 | render () { 20 | const { children } = this.props; 21 | return 22 | {children} 23 | ; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Field.android.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes, View, TouchableOpacity, Text, StyleSheet} from "react-native"; 2 | import { MKSlider } from "react-native-material-kit"; 3 | 4 | const styles = StyleSheet.create({ 5 | slider: { 6 | flexDirection: "row", 7 | alignItems: "center", 8 | justifyContent: "center", 9 | padding: 0 10 | }, 11 | title: { 12 | width: 120, 13 | textAlign: "right", 14 | paddingRight: 40, 15 | fontSize: 14, 16 | fontFamily: "Helvetica" 17 | }, 18 | value: { 19 | width: 80 20 | }, 21 | range: { 22 | flex: 1, 23 | height: 30 24 | } 25 | }); 26 | 27 | export default class Field extends Component { 28 | render () { 29 | const { min, max, step, value, onChange, onReset, name, width, prettyPrint } = this.props; 30 | return 31 | 32 | {name} 33 | 34 | 42 | {prettyPrint(value)} 43 | ; 44 | } 45 | } 46 | 47 | Field.propTypes = { 48 | min: PropTypes.number.isRequired, 49 | max: PropTypes.number.isRequired, 50 | step: PropTypes.number.isRequired, 51 | value: PropTypes.number.isRequired, 52 | onChange: PropTypes.func.isRequired, 53 | onReset: PropTypes.func.isRequired, 54 | name: PropTypes.string.isRequired, 55 | width: PropTypes.number, 56 | prettyPrint: PropTypes.func.isRequired 57 | }; 58 | -------------------------------------------------------------------------------- /src/Field.ios.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes, TouchableOpacity, View, Text, SliderIOS, StyleSheet} from "react-native"; 2 | 3 | const styles = StyleSheet.create({ 4 | field: { 5 | flexDirection: "row", 6 | alignItems: "center", 7 | padding: 0 8 | }, 9 | title: { 10 | width: 120, 11 | textAlign: "right", 12 | padding: 10, 13 | paddingRight: 10, 14 | fontSize: 14, 15 | fontFamily: "Helvetica" 16 | }, 17 | value: { 18 | width: 80, 19 | padding: 10 20 | }, 21 | range: { 22 | flex: 1, 23 | height: 20 24 | } 25 | }); 26 | 27 | export default class Field extends Component { 28 | render () { 29 | const { min, max, step, value, onChange, onReset, name, width, prettyPrint } = this.props; 30 | return 31 | 32 | {name} 33 | 34 | 42 | {prettyPrint(value)} 43 | ; 44 | } 45 | } 46 | 47 | Field.propTypes = { 48 | min: PropTypes.number.isRequired, 49 | max: PropTypes.number.isRequired, 50 | step: PropTypes.number.isRequired, 51 | value: PropTypes.number.isRequired, 52 | onChange: PropTypes.func.isRequired, 53 | onReset: PropTypes.func.isRequired, 54 | name: PropTypes.string.isRequired, 55 | width: PropTypes.number, 56 | prettyPrint: PropTypes.func.isRequired 57 | }; 58 | -------------------------------------------------------------------------------- /src/Field.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes} from "react"; 2 | 3 | const styles = { 4 | field: { 5 | display: "flex", 6 | flexDirection: "row", 7 | alignItems: "center", 8 | padding: "5px 0" 9 | }, 10 | title: { 11 | width: 100, 12 | textAlign: "right", 13 | padding: "10px 40px", 14 | fontSize: "1.2em", 15 | fontFamily: "Helvetica" 16 | }, 17 | value: { 18 | width: 50, 19 | padding: "10px 20px", 20 | fontSize: "1em", 21 | fontFamily: "monospace" 22 | }, 23 | range: { 24 | flex: 1, 25 | height: 30 26 | } 27 | }; 28 | 29 | export default class Field extends Component { 30 | render () { 31 | const { min, max, step, value, onChange, name, width, prettyPrint } = this.props; 32 | return 33 | {name} 34 | onChange(parseFloat(e.target.value))} 41 | /> 42 | {prettyPrint(value)} 43 | ; 44 | } 45 | } 46 | 47 | Field.propTypes = { 48 | min: PropTypes.number.isRequired, 49 | max: PropTypes.number.isRequired, 50 | step: PropTypes.number.isRequired, 51 | value: PropTypes.number.isRequired, 52 | onChange: PropTypes.func.isRequired, 53 | name: PropTypes.string.isRequired, 54 | width: PropTypes.number, 55 | prettyPrint: PropTypes.func.isRequired 56 | }; 57 | -------------------------------------------------------------------------------- /src/Flyeye.js: -------------------------------------------------------------------------------- 1 | import GL from "gl-react"; 2 | import React from "react"; 3 | 4 | const shaders = GL.Shaders.create({ 5 | flyeye: { 6 | frag:` 7 | precision highp float; 8 | varying vec2 uv; 9 | uniform sampler2D t; 10 | uniform float value; 11 | void main () { 12 | gl_FragColor = texture2D( 13 | t, 14 | uv + vec2( 15 | 0.01 * sin(uv.x * value * 200.0), 16 | 0.01 * sin(uv.y * value * 200.0) 17 | ) 18 | ); 19 | } 20 | ` 21 | } 22 | }); 23 | 24 | export const Flyeye = GL.createComponent( 25 | ({ value, children: t }) => 26 | 27 | ); 28 | -------------------------------------------------------------------------------- /src/ImageEffects.js: -------------------------------------------------------------------------------- 1 | import GL from "gl-react"; 2 | import React, {PropTypes} from "react"; 3 | import {Blur} from "gl-react-blur"; 4 | import {ContrastSaturationBrightness} from "gl-react-contrast-saturation-brightness"; 5 | import {Negative} from "gl-react-negative"; 6 | import {HueRotate} from "gl-react-hue-rotate"; 7 | import {ColorMatrix} from "gl-react-color-matrix"; 8 | import {Flyeye} from "./Flyeye"; 9 | 10 | const mixArrays = (arr1, arr2, m) => arr1.map((v, i) => (1-m) * v + m * arr2[i]); 11 | 12 | const matrixForSepia = sepia => mixArrays([ 13 | // Identity 14 | 1, 0, 0, 0, 15 | 0, 1, 0, 0, 16 | 0, 0, 1, 0, 17 | 0, 0, 0, 1 18 | ], [ 19 | // one way to do Sepia: grayscale & use alpha channel to add red & remove blue 20 | .3, .3, .3, 0, 21 | .6, .6, .6, 0, 22 | .1, .1, .1, 0, 23 | 0.2, 0, -0.2, 1 24 | ], sepia); 25 | 26 | export default GL.createComponent( 27 | ({ 28 | children, 29 | width, 30 | height, 31 | blur, 32 | contrast, 33 | saturation, 34 | brightness, 35 | negative, 36 | hue, 37 | sepia, 38 | flyeye, 39 | }) => 40 | 41 | 42 | 43 | 44 | 45 | 49 | 54 | {children} 55 | 56 | 57 | 58 | 59 | 60 | , 61 | 62 | { 63 | displayName: "ImageEffects", 64 | propTypes: { 65 | children: PropTypes.node.isRequired, 66 | width: PropTypes.number.isRequired, 67 | height: PropTypes.number.isRequired, 68 | blur: PropTypes.number.isRequired, 69 | contrast: PropTypes.number.isRequired, 70 | saturation: PropTypes.number.isRequired, 71 | brightness: PropTypes.number.isRequired, 72 | negative: PropTypes.number.isRequired, 73 | hue: PropTypes.number.isRequired, 74 | sepia: PropTypes.number.isRequired 75 | } 76 | }); 77 | -------------------------------------------------------------------------------- /src/Viewport.android.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./Viewport.native"); 2 | -------------------------------------------------------------------------------- /src/Viewport.ios.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./Viewport.native"); 2 | -------------------------------------------------------------------------------- /src/Viewport.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes} from "react"; 2 | import {Surface} from "gl-react-dom"; 3 | import ImageEffects from "./ImageEffects"; 4 | 5 | const vdomForContent = ({ uri, mainType, type }, onLoadSize) => 6 | mainType === "video" ? 7 | onLoadSize(e.target.videoWidth, e.target.videoHeight)}> 8 | 9 | : 10 | uri ? 11 | onLoadSize(e.target.width, e.target.height)} /> : 12 | uri; 13 | 14 | const contentForDropEvent = e => { 15 | const file = e.dataTransfer.files[0]; 16 | if (file) { 17 | return { 18 | uri: URL.createObjectURL(file), 19 | type: file.type, 20 | mainType: file.type.split("/")[0] 21 | }; 22 | } 23 | const text = e.dataTransfer.getData("text"); 24 | if (text && text.match(/http[s]?:\/\//)) { 25 | return { uri: text }; 26 | } 27 | return { uri: null }; 28 | }; 29 | 30 | const styles = { 31 | dropDescr: { 32 | opacity: 0.3, 33 | fontStyle: "italic" 34 | }, 35 | links: { 36 | paddingTop: 10 37 | }, 38 | link: { 39 | color: "#09F", 40 | fontSize: "0.8em", 41 | marginRight: 4 42 | } 43 | }; 44 | 45 | const width = 400; 46 | const height = 300; 47 | 48 | export default class Viewport extends Component { 49 | 50 | constructor (props) { 51 | super(props); 52 | } 53 | 54 | onDrop = e => { 55 | const { onLoadNewContent } = this.props; 56 | e.preventDefault(); 57 | e.stopPropagation(); 58 | onLoadNewContent(contentForDropEvent(e)); 59 | }; 60 | 61 | onDragEnter = e => { 62 | e.preventDefault(); 63 | e.stopPropagation(); 64 | }; 65 | 66 | onDragOver = e => { 67 | e.preventDefault(); 68 | e.stopPropagation(); 69 | }; 70 | 71 | onLoadSize = (width, height) => { 72 | const { content, onLoadNewContent } = this.props; 73 | onLoadNewContent({ ...content, width, height }); 74 | }; 75 | 76 | onClickUrl = e => { 77 | const { onLoadNewContent } = this.props; 78 | e.preventDefault(); 79 | onLoadNewContent({ uri: e.target.href }); 80 | }; 81 | 82 | captureFrame = opts => 83 | this.refs.surface.captureFrame(opts); 84 | 85 | render () { 86 | const { 87 | onDrop, 88 | onDragOver, 89 | onDragEnter, 90 | onLoadSize, 91 | onClickUrl, 92 | props: { content, effects } 93 | } = this; 94 | let w = width, h = height; 95 | const ratio = content.width && content.height ? content.height/content.width : 1; 96 | if (ratio < 1) 97 | h = w * ratio; 98 | else 99 | w = h / ratio; 100 | 101 | return 102 | 103 | 104 | 105 | {vdomForContent(content, onLoadSize)} 106 | 107 | 108 | 109 | ^ Drop here an Image, Video or Image URL... 110 | { 111 | "wxqlQkh,G2Whuq3,0bUSEBX,giP58XN,8OdPTjK,iKdXwVm,IvpoR40,zJIxPEo,CKlmtPs,fnMylHI,vGXYiYy,MnOB9Le,YqsZKgc,0BJobQo,Otbz312".split(",") 112 | .map(id => {id} ) 117 | } 118 | ; 119 | } 120 | } 121 | 122 | Viewport.propTypes = { 123 | content: PropTypes.object.isRequired, 124 | effects: PropTypes.object.isRequired, 125 | onLoadNewContent: PropTypes.func.isRequired 126 | }; 127 | -------------------------------------------------------------------------------- /src/Viewport.native.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes, View, TouchableOpacity, NativeModules} from "react-native"; 2 | import {Surface} from "gl-react-native"; 3 | import ImageEffects from "./ImageEffects"; 4 | import Dimensions from "Dimensions"; 5 | const {UIImagePickerManager} = NativeModules; 6 | 7 | const { width: windowWidth, height: windowHeight } = Dimensions.get("window"); 8 | 9 | export default class Viewport extends Component { 10 | 11 | constructor (props) { 12 | super(props); 13 | } 14 | 15 | captureFrame = opts => this.refs.surface.captureFrame(opts); 16 | 17 | onPress = () => 18 | UIImagePickerManager.showImagePicker({}, ({ uri, width, height }) => { 19 | if (uri) this.props.onLoadNewContent({ uri, width, height }); 20 | }); 21 | 22 | render () { 23 | const { 24 | props: { content, effects } 25 | } = this; 26 | const width = windowWidth; 27 | const height = Math.floor(windowHeight / 3); 28 | let w = width, h = height; 29 | const ratio = content.width && content.height ? content.height / content.width : 1; 30 | if (ratio < 1) 31 | h = w * ratio; 32 | else 33 | w = h / ratio; 34 | 35 | return 36 | 37 | 38 | 39 | {content.uri} 40 | 41 | 42 | 43 | ; 44 | } 45 | } 46 | 47 | Viewport.propTypes = { 48 | content: PropTypes.object.isRequired, 49 | effects: PropTypes.object.isRequired, 50 | onLoadNewContent: PropTypes.func.isRequired 51 | }; 52 | -------------------------------------------------------------------------------- /src/uploadImage.js: -------------------------------------------------------------------------------- 1 | module.exports = image => 2 | fetch("https://api.imgur.com/3/image", { 3 | method: "POST", 4 | headers: { 5 | Authorization: "Client-ID 39022a8ba96c6ea", 6 | Accept: "application/json", 7 | "Content-Type": "application/json" 8 | }, 9 | body: JSON.stringify({ 10 | image: image.replace(/^data:image\/(png|jpg);base64,/, ""), 11 | type: "base64", 12 | name: "gl-react powered effects", 13 | description: "created with https://github.com/gre/gl-react-image-effects" 14 | }) 15 | }) 16 | .then(r => { 17 | if (r.status >= 200 && r.status < 300) return r; 18 | throw r; 19 | }) 20 | .then(r => r.json()); 21 | --------------------------------------------------------------------------------