├── .eslintrc.js
├── .gitignore
├── .npmignore
├── LICENSE
├── README.md
├── cat-gl-filters.gif
├── examples
├── expo
│ ├── .expo-shared
│ │ └── assets.json
│ ├── .gitignore
│ ├── App.js
│ ├── AppExample.js
│ ├── Filter.js
│ ├── app.json
│ ├── assets
│ │ ├── icon.png
│ │ └── splash.png
│ ├── babel.config.js
│ ├── package.json
│ └── yarn.lock
├── react-native
│ ├── .buckconfig
│ ├── .eslintrc.js
│ ├── .flowconfig
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .prettierrc.js
│ ├── .watchmanconfig
│ ├── App.js
│ ├── Filter.js
│ ├── android
│ │ ├── app
│ │ │ ├── BUCK
│ │ │ ├── build.gradle
│ │ │ ├── build_defs.bzl
│ │ │ ├── proguard-rules.pro
│ │ │ └── src
│ │ │ │ ├── debug
│ │ │ │ └── AndroidManifest.xml
│ │ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── imagefilters
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ ├── MainApplication.java
│ │ │ │ │ └── generated
│ │ │ │ │ └── BasePackageList.java
│ │ │ │ └── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ └── settings.gradle
│ ├── app.json
│ ├── babel.config.js
│ ├── index.js
│ ├── ios
│ │ ├── Podfile
│ │ ├── Podfile.lock
│ │ ├── imagefilters-tvOS
│ │ │ └── Info.plist
│ │ ├── imagefilters-tvOSTests
│ │ │ └── Info.plist
│ │ ├── imagefilters.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ ├── imagefilters-tvOS.xcscheme
│ │ │ │ └── imagefilters.xcscheme
│ │ ├── imagefilters.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── imagefilters
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Base.lproj
│ │ │ │ └── LaunchScreen.xib
│ │ │ ├── Images.xcassets
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ └── main.m
│ │ └── imagefiltersTests
│ │ │ ├── Info.plist
│ │ │ └── imagefiltersTests.m
│ ├── metro.config.js
│ ├── package.json
│ └── yarn.lock
└── web
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ ├── Filter.js
│ ├── index.css
│ ├── index.js
│ └── serviceWorker.js
│ └── yarn.lock
├── index.d.ts
├── package.json
├── src
├── ImageFiltersComponent.js
├── constants
│ ├── DefaultValues.js
│ ├── Presets.js
│ └── index.js
├── filters
│ ├── Blur.js
│ ├── ColorOverlay.js
│ ├── ContrastSaturationBrightness.js
│ ├── Exposure.js
│ ├── Hue.js
│ ├── Negative.js
│ ├── Noop.js
│ ├── Sepia.js
│ ├── Sharpen.js
│ └── Temperature.js
├── index.js
├── presets
│ ├── AmaroPreset.js
│ ├── ClarendonPreset.js
│ ├── DogpatchPreset.js
│ ├── GinghamPreset.js
│ ├── GinzaPreset.js
│ ├── HefePreset.js
│ ├── LudwigPreset.js
│ ├── NoPreset.js
│ ├── SierraPreset.js
│ ├── SkylinePreset.js
│ ├── SlumberPreset.js
│ ├── StinsonPreset.js
│ └── index.js
└── utils
│ ├── createConditionalWrapper.js
│ ├── directionForPassDefault.js
│ ├── index.js
│ ├── isUndefinedOrNull.js
│ ├── mixArrays.js
│ ├── preset.js
│ └── shaders-functions.js
├── tsconfig.json
└── yarn.lock
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | const { peerDependencies } = require('./package.json');
2 |
3 | module.exports = {
4 | "parser": "babel-eslint",
5 | "env": {
6 | "browser": true,
7 | "es6": true
8 | },
9 | "extends": [
10 | "eslint:recommended",
11 | "plugin:react/recommended",
12 | "plugin:import/errors"
13 | ],
14 | "parserOptions": {
15 | "ecmaFeatures": {
16 | "jsx": true
17 | },
18 | "ecmaVersion": 12,
19 | "sourceType": "module"
20 | },
21 | "plugins": [
22 | "react",
23 | "import"
24 | ],
25 | "rules": {
26 | "quotes": [2, "single", { "allowTemplateLiterals": true }],
27 | "import/no-unresolved": ["error", { ignore: Object.keys(peerDependencies) }],
28 | "react/prop-types": [0]
29 | },
30 | "settings": {
31 | "react": {
32 | "version": "^17.0.1"
33 | }
34 | }
35 | };
36 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Folders
2 | node_modules/
3 | .idea/
4 | .expo/
5 | lib/
6 |
7 | # Files
8 | yarn-error.log
9 | .DS_Store
10 | .idea
11 | yarn.lock
12 | package-lock.json
13 | favicon.psd
14 | gh-md-toc
15 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | examples/
2 | src/
3 | cat-gl-filters.gif
4 | .idea/
5 | package-lock.json
6 | gh-md-toc
7 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Gregory Galushka.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://stand-with-ukraine.pp.ua)
2 |
3 |
4 | react-native-gl-image-filters
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | [](https://badgen.net/badge/expo/snack/blue?icon=https://symbols.getvecta.com/stencil_79/82_expo-icon.11a3983570.svg)
26 | OpenGL bindings for React Native to implement complex effects over images and components, in the descriptive VDOM paradigm. You can use predefined filters:
27 | - blur
28 | - contrast
29 | - saturation
30 | - brightness
31 | - hue
32 | - negative
33 | - sepia
34 | - sharpen
35 | - temperature
36 | - exposure.
37 |
38 | 
39 |
40 | **`gl-react-native` is an implementation of `gl-react` for `react-native`. Please [read the main gl-react README](https://github.com/gre/gl-react) and [gl-react-native README](https://github.com/gre/gl-react/tree/master/packages/gl-react-native) for more information.**
41 |
42 | Table of Contents
43 | =================
44 |
45 | * [API](#api)
46 | * [Props](#props)
47 | * [Constants](#constants)
48 | * [DefaultValues](#defaultvalues)
49 | * [Usage example](#usage-example)
50 | * [DefaultPresets](#defaultpresets)
51 | * [Usage example](#usage-example-1)
52 | * [Presets](#presets)
53 | * [Utils](#utils)
54 | * [createPreset](#createpreset)
55 | * [Recommended Min and Max range for each filter](#recommended-min-and-max-range-for-each-filter)
56 | * [Installation](#installation)
57 | * [Installation for React Native](#installation-for-react-native)
58 | * [Configure your React Native Application](#configure-your-react-native-application)
59 | * [Installation on Expo](#installation-on-expo)
60 | * [Installation on React Web](#installation-on-react-web)
61 | * [Usage](#usage)
62 | * [Usage with React Native](#usage-with-react-native)
63 | * [Usage with Expo](#usage-with-expo)
64 | * [Usage with React web](#usage-with-react-web)
65 |
66 |
67 | ## API
68 | - [`Props`](#props)
69 | - [`Constants`](#constants)
70 | - [`Presets`](#presets)
71 | - [`Utils`](#utils)
72 |
73 | ### `Props`
74 | Props for ImageFilters Component
75 |
76 | | Name | Description | Type | Required | Default Value |
77 | | :--- | :----- | :--- | :---: | :---: |
78 | | children | Inner component or url for image | Any | + | |
79 | | width | Width of component | Number | + | |
80 | | height | Height of component | Number | + | |
81 | | hue | Hue filter | Number | | 0 |
82 | | blur | Blur filter | Number | | 0 |
83 | | sepia | Sepia filter | Number | | 0 |
84 | | sharpen | Sharpen filter | Number | | 0 |
85 | | negative | Negative filter | Number | | 0 |
86 | | contrast | Contrast filter | Number | | 1 |
87 | | saturation | Saturation filter | Number | | 1 |
88 | | brightness | Brightness filter | Number | | 1 |
89 | | temperature | Temperature filter | Number | | 6500 |
90 | | exposure | Exposure filter | Number | | 0 |
91 | | 🆕 colorOverlay | Color Overlay with the length of 4 (RGBA format). Values must be a real value between 0 and 255. | Array | | [0.0, 0.0, 0.0, 0.0] |
92 |
93 | ### `Constants`
94 | - [`DefaultValues`](#defaultvalues)
95 | - [`DefaultPresets`](#defaultpresets)
96 |
97 | #### `DefaultValues`
98 | Can be used to set filter to default one manually.
99 |
100 | ```ts
101 | interface DefaultValues {
102 | sepia: number;
103 | hue: number;
104 | blur: number;
105 | sharpen: number;
106 | negative: number;
107 | temperature: number;
108 | brightness: number;
109 | contrast: number;
110 | saturation: number;
111 | exposure: number;
112 | colorOverlay: Array;
113 | }
114 | ```
115 |
116 | ##### Usage example
117 |
118 | ```js
119 | import ImageFilters, { Constants } from 'react-native-gl-image-filters';
120 |
121 | ...
122 |
123 | state = {
124 | blur: 4,
125 | };
126 |
127 | ...
128 |
129 | resetFilter = () => {
130 | this.setState({
131 | blur: Constants.DefaultValues.blur,
132 | });
133 | }
134 | ```
135 |
136 | #### `DefaultPresets`
137 | Can be used to list available presets.
138 |
139 | ```ts
140 | interface DefaultPresets extends Array {}
141 | ```
142 |
143 | ```ts
144 | interface DefaultPreset {
145 | name: string,
146 | description: string,
147 | preset: Preset,
148 | }
149 | ```
150 |
151 | ```ts
152 | interface Preset {
153 | sepia?: number;
154 | hue?: number;
155 | blur?: number;
156 | sharpen?: number;
157 | negative?: number;
158 | temperature?: number;
159 | brightness?: number;
160 | contrast?: number;
161 | saturation?: number;
162 | exposure?: number;
163 | }
164 | ```
165 |
166 | ##### Usage example
167 |
168 | ```js
169 | import ImageFilters, { Constants } from 'react-native-gl-image-filters';
170 |
171 | ...
172 |
173 | <>
174 | {Constants.DefaultPresets.map(item =>
175 |
176 | {item.name}
177 | {item.description}
178 |
179 |
180 | {{ uri: 'https://i.imgur.com/5EOyTDQ.jpg' }}
181 |
182 |
183 |
184 | )}
185 | >
186 | ```
187 |
188 | ### `Presets`
189 | Use predefined presets.
190 |
191 | ```js
192 | import { Presets } from 'react-native-gl-image-filters';
193 |
194 | Presets.NoPreset;
195 | Presets.AmaroPreset;
196 | Presets.ClarendonPreset;
197 | Presets.DogpatchPreset;
198 | Presets.GinghamPreset;
199 | Presets.GinzaPreset;
200 | Presets.HefePreset;
201 | Presets.LudwigPreset;
202 | Presets.SkylinePreset;
203 | Presets.SlumberPreset;
204 | Presets.SierraPreset;
205 | Presets.StinsonPreset;
206 |
207 | ...
208 |
209 |
210 | {{ uri: 'https://i.imgur.com/5EOyTDQ.jpg' }}
211 |
212 | ```
213 |
214 | ### `Utils`
215 |
216 | #### createPreset
217 | Available for creating own presets.
218 |
219 | ```js
220 | import ImageFilters, { Utils } from 'react-native-gl-image-filters';
221 |
222 | const MyOwnPreset = Utils.createPreset({
223 | brightness: .1,
224 | saturation: -.5,
225 | sepia: .15,
226 | });
227 |
228 | ...
229 |
230 |
231 | {{ uri: 'https://i.imgur.com/5EOyTDQ.jpg' }}
232 |
233 | ```
234 |
235 | ## Recommended Min and Max range for each filter
236 |
237 | | Name | Min. Value | Max. Value |
238 | | :--- | :---: | :---: |
239 | | hue | 0 | 6.3 |
240 | | blur | 0 | 30 |
241 | | sepia | -5 | 5 |
242 | | sharpen | 0 | 15 |
243 | | negative | -2 | 2 |
244 | | contrast | -10 | 10 |
245 | | saturation | 0 | 2 |
246 | | brightness | 0 | 5 |
247 | | temperature | 0 | 40000 |
248 | | exposure | -1 | 1 |
249 |
250 | ## Installation
251 |
252 | ### Installation for React Native
253 |
254 | ```
255 | npm i --save react-native-gl-image-filters
256 | npm i --save gl-react@^4.0.1
257 | npm i --save gl-react-native@^4.0.1
258 | npm i --save buffer@^5.4.3
259 | npm i --save react-native-unimodules@^0.7.0
260 | ```
261 | or
262 | ```
263 | yarn add react-native-gl-image-filters
264 | yarn add gl-react@^4.0.1
265 | yarn add gl-react-native@^4.0.1
266 | yarn add buffer@^5.4.3
267 | yarn add react-native-unimodules@^0.7.0
268 | ```
269 |
270 | #### Configure your React Native Application
271 |
272 | **on iOS:**
273 |
274 | https://github.com/unimodules/react-native-unimodules#-configure-ios
275 |
276 | **on Android:**
277 |
278 | https://github.com/unimodules/react-native-unimodules#-configure-android
279 |
280 | ### Installation on Expo
281 |
282 | ```
283 | npm i --save react-native-gl-image-filters
284 | npm i --save expo-gl
285 | npm i --save gl-react@^4.0.1
286 | npm i --save gl-react-expo@^4.0.1
287 | npm i --save buffer@^5.4.3
288 | ```
289 | or
290 | ```
291 | yarn add react-native-gl-image-filters
292 | yarn add expo-gl
293 | yarn add gl-react@^4.0.1
294 | yarn add gl-react-expo@^4.0.1
295 | yarn add buffer@^5.4.3
296 | ```
297 |
298 | ### Installation on React Web
299 |
300 | ```
301 | npm i --save react-native-gl-image-filters
302 | npm i --save gl-react@^4.0.1
303 | npm i --save gl-react-dom@^4.0.1
304 | ```
305 | or
306 | ```
307 | yarn add react-native-gl-image-filters
308 | yarn add gl-react@^4.0.1
309 | yarn add gl-react-dom@^4.0.1
310 | ```
311 |
312 | ## Usage
313 |
314 | ### Usage with React Native
315 | Example here: [examples/react-native](https://github.com/GregoryNative/react-native-gl-image-filters/tree/master/examples/react-native)
316 |
317 | ### Usage with Expo
318 | Snack: https://snack.expo.io/@gregoryrn/expo-gregorynative-react-native-gl-image-filters
319 | Example here: [examples/expo](https://github.com/GregoryNative/react-native-gl-image-filters/tree/master/examples/expo)
320 |
321 | ### Usage with React web
322 | Blitz: https://stackblitz.com/edit/react-native-gl-image-filters-web-example
323 | Example here: [examples/web](https://github.com/GregoryNative/react-native-gl-image-filters/tree/master/examples/web)
324 |
--------------------------------------------------------------------------------
/cat-gl-filters.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/cat-gl-filters.gif
--------------------------------------------------------------------------------
/examples/expo/.expo-shared/assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "f9155ac790fd02fadcdeca367b02581c04a353aa6d5aa84409a59f6804c87acd": true,
3 | "89ed26367cdb9b771858e026f2eb95bfdb90e5ae943e716575327ec325f39c44": true
4 | }
--------------------------------------------------------------------------------
/examples/expo/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/**/*
2 | .expo/*
3 | npm-debug.*
4 | *.jks
5 | *.p8
6 | *.p12
7 | *.key
8 | *.mobileprovision
9 | *.orig.*
10 | web-build/
11 | web-report/
12 |
13 | # macOS
14 | .DS_Store
15 |
--------------------------------------------------------------------------------
/examples/expo/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { SafeAreaView } from 'react-native';
3 | import AppLoading from 'expo-app-loading';
4 | import * as Font from 'expo-font';
5 | import { Ionicons } from '@expo/vector-icons';
6 |
7 | import AppExample from './AppExample';
8 |
9 | export default class App extends Component {
10 | state = {
11 | isReady: false,
12 | };
13 |
14 | async componentDidMount() {
15 | await Font.loadAsync({
16 | Roboto: require('native-base/Fonts/Roboto.ttf'),
17 | Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'),
18 | ...Ionicons.font,
19 | });
20 |
21 | this.setState({ isReady: true });
22 | }
23 |
24 | render() {
25 | if (!this.state.isReady) {
26 | return ;
27 | }
28 |
29 | return (
30 |
31 |
32 |
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/expo/AppExample.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import {
3 | Dimensions,
4 | StyleSheet,
5 | ScrollView,
6 | } from 'react-native';
7 | import {
8 | Container,
9 | Header,
10 | Body,
11 | Title,
12 | Text,
13 | Button,
14 | } from 'native-base';
15 | import { Surface } from 'gl-react-expo';
16 | import ImageFilters, { Constants } from 'react-native-gl-image-filters';
17 |
18 | import Filter from './Filter';
19 |
20 | const width = Dimensions.get('window').width - 40;
21 |
22 | const settings = [
23 | {
24 | name: 'hue',
25 | minValue: 0,
26 | maxValue: 6.3,
27 | },
28 | {
29 | name: 'blur',
30 | minValue: 0,
31 | maxValue: 30,
32 | },
33 | {
34 | name: 'sepia',
35 | minValue: -5,
36 | maxValue: 5,
37 | },
38 | {
39 | name: 'sharpen',
40 | minValue: 0,
41 | maxValue: 15,
42 | },
43 | {
44 | name: 'negative',
45 | minValue: -2.0,
46 | maxValue: 2.0,
47 | },
48 | {
49 | name: 'contrast',
50 | minValue: -10.0,
51 | maxValue: 10.0,
52 | },
53 | {
54 | name: 'saturation',
55 | minValue: 0.0,
56 | maxValue: 2,
57 | },
58 | {
59 | name: 'brightness',
60 | minValue: 0,
61 | maxValue: 5,
62 | },
63 | {
64 | name: 'temperature',
65 | minValue: 0.0,
66 | maxValue: 40000.0,
67 | },
68 | {
69 | name: 'exposure',
70 | step: 0.05,
71 | minValue: -1.0,
72 | maxValue: 1.0,
73 | },
74 | ];
75 |
76 | export default class AppExample extends Component {
77 | state = {
78 | ...settings,
79 | hue: 0,
80 | blur: 0,
81 | sepia: 0,
82 | sharpen: 0,
83 | negative: 0,
84 | contrast: 1,
85 | saturation: 1,
86 | brightness: 1,
87 | temperature: 6500,
88 | exposure: 0,
89 | };
90 |
91 | saveImage = async () => {
92 | if (!this.image) return;
93 |
94 | const result = await this.image.glView.capture();
95 | console.warn(result);
96 | };
97 |
98 | resetImage = () => {
99 | this.setState({
100 | ...Constants.DefaultValues,
101 | });
102 | }
103 |
104 | render() {
105 | return (
106 |
107 |
108 |
109 | Image Filters
110 |
111 |
112 |
113 | <>
114 | (this.image = ref)}>
115 |
116 | {{ uri: 'https://i.imgur.com/5EOyTDQ.jpg' }}
117 |
118 |
119 | {settings.map(filter => (
120 | this.setState({ [filter.name]: value })}
126 | />
127 | ))}
128 |
135 |
143 | >
144 |
145 |
146 | );
147 | }
148 | }
149 |
150 | const styles = StyleSheet.create({
151 | content: { marginTop: 20, marginHorizontal: 20 },
152 | button: { marginTop: 20, borderRadius: 0 },
153 | });
154 |
--------------------------------------------------------------------------------
/examples/expo/Filter.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StyleSheet, View, Slider } from 'react-native';
3 | import { Text } from 'native-base';
4 |
5 | export default ({ name, minimum, maximum, onChange }) => (
6 |
7 | {name}
8 |
14 |
15 | );
16 |
17 | const styles = StyleSheet.create({
18 | container: {
19 | flexDirection: 'row',
20 | justifyContent: 'space-between',
21 | alignItems: 'center',
22 | width: 300,
23 | paddingLeft: 20,
24 | },
25 | text: { textAlign: 'center' },
26 | slider: { width: 150 },
27 | });
28 |
--------------------------------------------------------------------------------
/examples/expo/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "expo": {
3 | "name": "Expo example for react-native-gl-image-filters",
4 | "slug": "example-expo",
5 | "privacy": "public",
6 | "platforms": [
7 | "ios",
8 | "android"
9 | ],
10 | "version": "0.3.1",
11 | "orientation": "portrait",
12 | "icon": "./assets/icon.png",
13 | "splash": {
14 | "image": "./assets/splash.png",
15 | "resizeMode": "contain",
16 | "backgroundColor": "#ffffff"
17 | },
18 | "updates": {
19 | "fallbackToCacheTimeout": 0
20 | },
21 | "assetBundlePatterns": [
22 | "**/*"
23 | ],
24 | "ios": {
25 | "supportsTablet": true
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/examples/expo/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/expo/assets/icon.png
--------------------------------------------------------------------------------
/examples/expo/assets/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/expo/assets/splash.png
--------------------------------------------------------------------------------
/examples/expo/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = function(api) {
2 | api.cache(true);
3 | return {
4 | presets: ['babel-preset-expo'],
5 | };
6 | };
7 |
--------------------------------------------------------------------------------
/examples/expo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "node_modules/expo/AppEntry.js",
3 | "scripts": {
4 | "start": "expo start",
5 | "android": "expo start --android",
6 | "ios": "expo start --ios",
7 | "web": "expo start --web",
8 | "eject": "expo eject"
9 | },
10 | "dependencies": {
11 | "@expo/vector-icons": "^12.0.3",
12 | "buffer": "^5.5.0",
13 | "expo": "^40.0.0",
14 | "expo-app-loading": "^1.0.1",
15 | "expo-font": "~8.4.0",
16 | "expo-gl": "~9.2.0",
17 | "gl-react": "^4.0.1",
18 | "gl-react-expo": "^4.0.1",
19 | "native-base": "^2.13.0",
20 | "react": "16.13.1",
21 | "react-dom": "16.13.1",
22 | "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
23 | "react-native-gl-image-filters": "0.3.1"
24 | },
25 | "devDependencies": {
26 | "@babel/core": "~7.9.0",
27 | "babel-preset-expo": "8.3.0"
28 | },
29 | "private": true
30 | }
31 |
--------------------------------------------------------------------------------
/examples/react-native/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/examples/react-native/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | };
5 |
--------------------------------------------------------------------------------
/examples/react-native/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore polyfills
9 | node_modules/react-native/Libraries/polyfills/.*
10 |
11 | ; These should not be required directly
12 | ; require from fbjs/lib instead: require('fbjs/lib/warning')
13 | node_modules/warning/.*
14 |
15 | ; Flow doesn't support platforms
16 | .*/Libraries/Utilities/LoadingView.js
17 |
18 | [untyped]
19 | .*/node_modules/@react-native-community/cli/.*/.*
20 |
21 | [include]
22 |
23 | [libs]
24 | node_modules/react-native/Libraries/react-native/react-native-interface.js
25 | node_modules/react-native/flow/
26 |
27 | [options]
28 | emoji=true
29 |
30 | esproposal.optional_chaining=enable
31 | esproposal.nullish_coalescing=enable
32 |
33 | module.file_ext=.js
34 | module.file_ext=.json
35 | module.file_ext=.ios.js
36 |
37 | munge_underscores=true
38 |
39 | module.name_mapper='^react-native$' -> '/node_modules/react-native/Libraries/react-native/react-native-implementation'
40 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
41 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
42 |
43 | suppress_type=$FlowIssue
44 | suppress_type=$FlowFixMe
45 | suppress_type=$FlowFixMeProps
46 | suppress_type=$FlowFixMeState
47 |
48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
50 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
51 |
52 | [lints]
53 | sketchy-null-number=warn
54 | sketchy-null-mixed=warn
55 | sketchy-number=warn
56 | untyped-type-import=warn
57 | nonstrict-import=warn
58 | deprecated-type=warn
59 | unsafe-getters-setters=warn
60 | inexact-spread=warn
61 | unnecessary-invariant=warn
62 | signature-verification-failure=warn
63 | deprecated-utility=error
64 |
65 | [strict]
66 | deprecated-type
67 | nonstrict-import
68 | sketchy-null
69 | unclear-type
70 | unsafe-getters-setters
71 | untyped-import
72 | untyped-type-import
73 |
74 | [version]
75 | ^0.105.0
76 |
--------------------------------------------------------------------------------
/examples/react-native/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/examples/react-native/.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 |
24 | # Android/IntelliJ
25 | #
26 | build/
27 | .idea
28 | .gradle
29 | local.properties
30 | *.iml
31 |
32 | # node.js
33 | #
34 | node_modules/
35 | npm-debug.log
36 | yarn-error.log
37 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | *.keystore
42 | !debug.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # CocoaPods
59 | /ios/Pods/
60 |
--------------------------------------------------------------------------------
/examples/react-native/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | bracketSpacing: true,
3 | jsxBracketSameLine: true,
4 | singleQuote: true,
5 | trailingComma: 'all',
6 | };
7 |
--------------------------------------------------------------------------------
/examples/react-native/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/examples/react-native/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Dimensions, StyleSheet } from 'react-native';
3 | import {
4 | Container,
5 | Content,
6 | Header,
7 | Body,
8 | Title,
9 | Text,
10 | Button,
11 | } from 'native-base';
12 | import { Surface } from 'gl-react-native';
13 | import ImageFilters from 'react-native-gl-image-filters';
14 |
15 | import Filter from './Filter';
16 |
17 | const width = Dimensions.get('window').width - 40;
18 |
19 | const settings = [
20 | {
21 | name: 'hue',
22 | minValue: 0,
23 | maxValue: 6.3,
24 | },
25 | {
26 | name: 'blur',
27 | minValue: 0,
28 | maxValue: 30,
29 | },
30 | {
31 | name: 'sepia',
32 | minValue: -5,
33 | maxValue: 5,
34 | },
35 | {
36 | name: 'sharpen',
37 | minValue: 0,
38 | maxValue: 15,
39 | },
40 | {
41 | name: 'negative',
42 | minValue: -2.0,
43 | maxValue: 2.0,
44 | },
45 | {
46 | name: 'contrast',
47 | minValue: -10.0,
48 | maxValue: 10.0,
49 | },
50 | {
51 | name: 'saturation',
52 | minValue: 0.0,
53 | maxValue: 2,
54 | },
55 | {
56 | name: 'brightness',
57 | minValue: 0,
58 | maxValue: 5,
59 | },
60 | {
61 | name: 'temperature',
62 | minValue: 0.0,
63 | maxValue: 40000.0,
64 | },
65 | ];
66 |
67 | export default class App extends Component {
68 | state = {
69 | ...settings,
70 | hue: 0,
71 | blur: 0,
72 | sepia: 0,
73 | sharpen: 0,
74 | negative: 0,
75 | contrast: 1,
76 | saturation: 1,
77 | brightness: 1,
78 | temperature: 6500,
79 | };
80 |
81 | saveImage = async () => {
82 | if (!this.image) return;
83 |
84 | const result = await this.image.glView.capture();
85 | console.warn(result);
86 | };
87 |
88 | render() {
89 | return (
90 |
91 |
92 |
93 | Image Filters
94 |
95 |
96 |
97 | (this.image = ref)}>
98 |
99 | {{ uri: 'https://i.imgur.com/5EOyTDQ.jpg' }}
100 |
101 |
102 | {settings.map(filter => (
103 | this.setState({ [filter.name]: value })}
109 | />
110 | ))}
111 |
118 |
119 |
120 | );
121 | }
122 | }
123 |
124 | const styles = StyleSheet.create({
125 | content: { marginTop: 20, marginHorizontal: 20 },
126 | button: { marginVertical: 20, borderRadius: 0 },
127 | });
128 |
--------------------------------------------------------------------------------
/examples/react-native/Filter.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StyleSheet, View, Slider } from 'react-native';
3 | import { Text } from 'native-base';
4 |
5 | export default ({ name, minimum, maximum, onChange }) => (
6 |
7 | {name}
8 |
14 |
15 | );
16 |
17 | const styles = StyleSheet.create({
18 | container: {
19 | flexDirection: 'row',
20 | justifyContent: 'space-between',
21 | alignItems: 'center',
22 | width: 300,
23 | paddingLeft: 20,
24 | },
25 | text: { textAlign: 'center' },
26 | slider: { width: 150 },
27 | });
28 |
--------------------------------------------------------------------------------
/examples/react-native/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.imagefilters",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.imagefilters",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/examples/react-native/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 | apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
3 |
4 | import com.android.build.OutputFile
5 |
6 | /**
7 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
8 | * and bundleReleaseJsAndAssets).
9 | * These basically call `react-native bundle` with the correct arguments during the Android build
10 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
11 | * bundle directly from the development server. Below you can see all the possible configurations
12 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
13 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
14 | *
15 | * project.ext.react = [
16 | * // the name of the generated asset file containing your JS bundle
17 | * bundleAssetName: "index.android.bundle",
18 | *
19 | * // the entry file for bundle generation
20 | * entryFile: "index.android.js",
21 | *
22 | * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
23 | * bundleCommand: "ram-bundle",
24 | *
25 | * // whether to bundle JS and assets in debug mode
26 | * bundleInDebug: false,
27 | *
28 | * // whether to bundle JS and assets in release mode
29 | * bundleInRelease: true,
30 | *
31 | * // whether to bundle JS and assets in another build variant (if configured).
32 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
33 | * // The configuration property can be in the following formats
34 | * // 'bundleIn${productFlavor}${buildType}'
35 | * // 'bundleIn${buildType}'
36 | * // bundleInFreeDebug: true,
37 | * // bundleInPaidRelease: true,
38 | * // bundleInBeta: true,
39 | *
40 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
41 | * // for example: to disable dev mode in the staging build type (if configured)
42 | * devDisabledInStaging: true,
43 | * // The configuration property can be in the following formats
44 | * // 'devDisabledIn${productFlavor}${buildType}'
45 | * // 'devDisabledIn${buildType}'
46 | *
47 | * // the root of your project, i.e. where "package.json" lives
48 | * root: "../../",
49 | *
50 | * // where to put the JS bundle asset in debug mode
51 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
52 | *
53 | * // where to put the JS bundle asset in release mode
54 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
55 | *
56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
57 | * // require('./image.png')), in debug mode
58 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
59 | *
60 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
61 | * // require('./image.png')), in release mode
62 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
63 | *
64 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
65 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
66 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
67 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
68 | * // for example, you might want to remove it from here.
69 | * inputExcludes: ["android/**", "ios/**"],
70 | *
71 | * // override which node gets called and with what additional arguments
72 | * nodeExecutableAndArgs: ["node"],
73 | *
74 | * // supply additional arguments to the packager
75 | * extraPackagerArgs: []
76 | * ]
77 | */
78 |
79 | project.ext.react = [
80 | entryFile: "index.js",
81 | enableHermes: false, // clean and rebuild if changing
82 | ]
83 |
84 | apply from: "../../node_modules/react-native/react.gradle"
85 |
86 | /**
87 | * Set this to true to create two separate APKs instead of one:
88 | * - An APK that only works on ARM devices
89 | * - An APK that only works on x86 devices
90 | * The advantage is the size of the APK is reduced by about 4MB.
91 | * Upload all the APKs to the Play Store and people will download
92 | * the correct one based on the CPU architecture of their device.
93 | */
94 | def enableSeparateBuildPerCPUArchitecture = false
95 |
96 | /**
97 | * Run Proguard to shrink the Java bytecode in release builds.
98 | */
99 | def enableProguardInReleaseBuilds = false
100 |
101 | /**
102 | * The preferred build flavor of JavaScriptCore.
103 | *
104 | * For example, to use the international variant, you can use:
105 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
106 | *
107 | * The international variant includes ICU i18n library and necessary data
108 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
109 | * give correct results when using with locales other than en-US. Note that
110 | * this variant is about 6MiB larger per architecture than default.
111 | */
112 | def jscFlavor = 'org.webkit:android-jsc:+'
113 |
114 | /**
115 | * Whether to enable the Hermes VM.
116 | *
117 | * This should be set on project.ext.react and mirrored here. If it is not set
118 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
119 | * and the benefits of using Hermes will therefore be sharply reduced.
120 | */
121 | def enableHermes = project.ext.react.get("enableHermes", false);
122 |
123 | android {
124 | compileSdkVersion rootProject.ext.compileSdkVersion
125 |
126 | compileOptions {
127 | sourceCompatibility JavaVersion.VERSION_1_8
128 | targetCompatibility JavaVersion.VERSION_1_8
129 | }
130 |
131 | defaultConfig {
132 | applicationId "com.imagefilters"
133 | minSdkVersion rootProject.ext.minSdkVersion
134 | targetSdkVersion rootProject.ext.targetSdkVersion
135 | versionCode 1
136 | versionName "1.0"
137 | }
138 | splits {
139 | abi {
140 | reset()
141 | enable enableSeparateBuildPerCPUArchitecture
142 | universalApk false // If true, also generate a universal APK
143 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
144 | }
145 | }
146 | buildTypes {
147 | debug {
148 | signingConfig signingConfigs.debug
149 | }
150 | release {
151 | // Caution! In production, you need to generate your own keystore file.
152 | // see https://facebook.github.io/react-native/docs/signed-apk-android.
153 | signingConfig signingConfigs.debug
154 | minifyEnabled enableProguardInReleaseBuilds
155 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
156 | }
157 | }
158 | // applicationVariants are e.g. debug, release
159 | applicationVariants.all { variant ->
160 | variant.outputs.each { output ->
161 | // For each separate APK per architecture, set a unique version code as described here:
162 | // https://developer.android.com/studio/build/configure-apk-splits.html
163 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
164 | def abi = output.getFilter(OutputFile.ABI)
165 | if (abi != null) { // null for the universal-debug, universal-release variants
166 | output.versionCodeOverride =
167 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
168 | }
169 |
170 | }
171 | }
172 | }
173 |
174 | dependencies {
175 | implementation fileTree(dir: "libs", include: ["*.jar"])
176 | implementation "com.facebook.react:react-native:+" // From node_modules
177 | addUnimodulesDependencies()
178 |
179 | if (enableHermes) {
180 | def hermesPath = "../../node_modules/hermes-engine/android/";
181 | debugImplementation files(hermesPath + "hermes-debug.aar")
182 | releaseImplementation files(hermesPath + "hermes-release.aar")
183 | } else {
184 | implementation jscFlavor
185 | }
186 | }
187 |
188 | // Run this once to be able to run the application with BUCK
189 | // puts all compile dependencies into folder libs for BUCK to use
190 | task copyDownloadableDepsToLibs(type: Copy) {
191 | from configurations.compile
192 | into 'libs'
193 | }
194 |
195 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
196 |
--------------------------------------------------------------------------------
/examples/react-native/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/examples/react-native/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 |
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/java/com/imagefilters/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.imagefilters;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "imagefilters";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/java/com/imagefilters/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.imagefilters;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 | import com.facebook.react.PackageList;
6 | import com.facebook.react.ReactApplication;
7 | import com.facebook.react.ReactNativeHost;
8 | import com.facebook.react.ReactPackage;
9 | import com.facebook.soloader.SoLoader;
10 | import com.imagefilters.generated.BasePackageList;
11 |
12 | import org.unimodules.adapters.react.ModuleRegistryAdapter;
13 | import org.unimodules.adapters.react.ReactModuleRegistryProvider;
14 | import org.unimodules.core.interfaces.SingletonModule;
15 |
16 | import java.lang.reflect.InvocationTargetException;
17 | import java.util.Arrays;
18 | import java.util.List;
19 |
20 | public class MainApplication extends Application implements ReactApplication {
21 | private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null);
22 |
23 |
24 | private final ReactNativeHost mReactNativeHost =
25 | new ReactNativeHost(this) {
26 | @Override
27 | public boolean getUseDeveloperSupport() {
28 | return BuildConfig.DEBUG;
29 | }
30 |
31 | @Override
32 | protected List getPackages() {
33 | @SuppressWarnings("UnnecessaryLocalVariable")
34 | List packages = new PackageList(this).getPackages();
35 |
36 | // Add unimodules
37 | List unimodules = Arrays.asList(
38 | new ModuleRegistryAdapter(mModuleRegistryProvider)
39 | );
40 | packages.addAll(unimodules);
41 |
42 | return packages;
43 | }
44 |
45 | @Override
46 | protected String getJSMainModuleName() {
47 | return "index";
48 | }
49 | };
50 |
51 | @Override
52 | public ReactNativeHost getReactNativeHost() {
53 | return mReactNativeHost;
54 | }
55 |
56 | @Override
57 | public void onCreate() {
58 | super.onCreate();
59 | SoLoader.init(this, /* native exopackage */ false);
60 | initializeFlipper(this); // Remove this line if you don't want Flipper enabled
61 | }
62 |
63 | /**
64 | * Loads Flipper in React Native templates.
65 | *
66 | * @param context
67 | */
68 | private static void initializeFlipper(Context context) {
69 | if (BuildConfig.DEBUG) {
70 | try {
71 | /*
72 | We use reflection here to pick up the class that initializes Flipper,
73 | since Flipper library is not available in release mode
74 | */
75 | Class> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
76 | aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
77 | } catch (ClassNotFoundException e) {
78 | e.printStackTrace();
79 | } catch (NoSuchMethodException e) {
80 | e.printStackTrace();
81 | } catch (IllegalAccessException e) {
82 | e.printStackTrace();
83 | } catch (InvocationTargetException e) {
84 | e.printStackTrace();
85 | }
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/java/com/imagefilters/generated/BasePackageList.java:
--------------------------------------------------------------------------------
1 | package com.imagefilters.generated;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 | import org.unimodules.core.interfaces.Package;
6 |
7 | public class BasePackageList {
8 | public List getPackageList() {
9 | return Arrays.asList(
10 | new expo.modules.constants.ConstantsPackage(),
11 | new expo.modules.filesystem.FileSystemPackage(),
12 | new expo.modules.gl.GLPackage(),
13 | new expo.modules.imageloader.ImageLoaderPackage(),
14 | new expo.modules.permissions.PermissionsPackage()
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | imagefilters
3 |
4 |
--------------------------------------------------------------------------------
/examples/react-native/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/examples/react-native/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "28.0.3"
6 | minSdkVersion = 21
7 | compileSdkVersion = 30
8 | targetSdkVersion = 30
9 | }
10 | repositories {
11 | google()
12 | jcenter()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle:3.4.2")
16 |
17 | // NOTE: Do not place your application dependencies here; they belong
18 | // in the individual module build.gradle files
19 | }
20 | }
21 |
22 | allprojects {
23 | repositories {
24 | mavenLocal()
25 | maven {
26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27 | url("$rootDir/../node_modules/react-native/android")
28 | }
29 | maven {
30 | // Android JSC is installed from npm
31 | url("$rootDir/../node_modules/jsc-android/dist")
32 | }
33 |
34 | google()
35 | jcenter()
36 | maven { url 'https://jitpack.io' }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/examples/react-native/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.useAndroidX=true
21 | android.enableJetifier=true
22 |
--------------------------------------------------------------------------------
/examples/react-native/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/react-native/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/examples/react-native/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/examples/react-native/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin, switch paths to Windows format before running java
129 | if $cygwin ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=$((i+1))
158 | done
159 | case $i in
160 | (0) set -- ;;
161 | (1) set -- "$args0" ;;
162 | (2) set -- "$args0" "$args1" ;;
163 | (3) set -- "$args0" "$args1" "$args2" ;;
164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=$(save "$@")
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 | cd "$(dirname "$0")"
186 | fi
187 |
188 | exec "$JAVACMD" "$@"
189 |
--------------------------------------------------------------------------------
/examples/react-native/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem http://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/examples/react-native/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'imagefilters'
2 |
3 | apply from: '../node_modules/react-native-unimodules/gradle.groovy'; includeUnimodulesProjects()
4 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
5 |
6 | include ':app'
7 |
--------------------------------------------------------------------------------
/examples/react-native/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "imagefilters",
3 | "displayName": "imagefilters"
4 | }
--------------------------------------------------------------------------------
/examples/react-native/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/examples/react-native/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import { AppRegistry } from 'react-native';
6 | import App from './App';
7 | import { name as appName } from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/examples/react-native/ios/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '11.0'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 | require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
4 |
5 | target 'imagefilters' do
6 | use_unimodules!
7 | # Pods for imagefilters
8 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
9 | pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
10 | pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
11 | pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
12 | pod 'React', :path => '../node_modules/react-native/'
13 | pod 'React-Core', :path => '../node_modules/react-native/'
14 | pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
15 | pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
16 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
17 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
18 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
19 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
20 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
21 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
22 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
23 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
24 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
25 | pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
26 |
27 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
28 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
29 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
30 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
31 | pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
32 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
33 | pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
34 |
35 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
36 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
37 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
38 |
39 | target 'imagefiltersTests' do
40 | inherit! :search_paths
41 | # Pods for testing
42 | end
43 |
44 | use_native_modules!
45 | end
46 |
47 | target 'imagefilters-tvOS' do
48 | # Pods for imagefilters-tvOS
49 |
50 | target 'imagefilters-tvOSTests' do
51 | inherit! :search_paths
52 | # Pods for testing
53 | end
54 |
55 | end
56 |
--------------------------------------------------------------------------------
/examples/react-native/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - boost-for-react-native (1.63.0)
3 | - DoubleConversion (1.1.6)
4 | - EXConstants (10.1.3):
5 | - UMConstantsInterface
6 | - UMCore
7 | - EXFileSystem (11.0.2):
8 | - UMCore
9 | - UMFileSystemInterface
10 | - EXGL (8.4.0):
11 | - EXGL_CPP
12 | - UMCameraInterface
13 | - UMCore
14 | - UMFileSystemInterface
15 | - EXGL_CPP (8.4.0):
16 | - EXGL_CPP/EXGLContext (= 8.4.0)
17 | - EXGL_CPP/EXGLContext (8.4.0)
18 | - EXImageLoader (2.1.1):
19 | - React-Core
20 | - UMCore
21 | - UMImageLoaderInterface
22 | - EXPermissions (12.0.1):
23 | - UMCore
24 | - UMPermissionsInterface
25 | - FBLazyVector (0.61.5)
26 | - FBReactNativeSpec (0.61.5):
27 | - Folly (= 2018.10.22.00)
28 | - RCTRequired (= 0.61.5)
29 | - RCTTypeSafety (= 0.61.5)
30 | - React-Core (= 0.61.5)
31 | - React-jsi (= 0.61.5)
32 | - ReactCommon/turbomodule/core (= 0.61.5)
33 | - Folly (2018.10.22.00):
34 | - boost-for-react-native
35 | - DoubleConversion
36 | - Folly/Default (= 2018.10.22.00)
37 | - glog
38 | - Folly/Default (2018.10.22.00):
39 | - boost-for-react-native
40 | - DoubleConversion
41 | - glog
42 | - glog (0.3.5)
43 | - RCTRequired (0.61.5)
44 | - RCTTypeSafety (0.61.5):
45 | - FBLazyVector (= 0.61.5)
46 | - Folly (= 2018.10.22.00)
47 | - RCTRequired (= 0.61.5)
48 | - React-Core (= 0.61.5)
49 | - React (0.61.5):
50 | - React-Core (= 0.61.5)
51 | - React-Core/DevSupport (= 0.61.5)
52 | - React-Core/RCTWebSocket (= 0.61.5)
53 | - React-RCTActionSheet (= 0.61.5)
54 | - React-RCTAnimation (= 0.61.5)
55 | - React-RCTBlob (= 0.61.5)
56 | - React-RCTImage (= 0.61.5)
57 | - React-RCTLinking (= 0.61.5)
58 | - React-RCTNetwork (= 0.61.5)
59 | - React-RCTSettings (= 0.61.5)
60 | - React-RCTText (= 0.61.5)
61 | - React-RCTVibration (= 0.61.5)
62 | - React-Core (0.61.5):
63 | - Folly (= 2018.10.22.00)
64 | - glog
65 | - React-Core/Default (= 0.61.5)
66 | - React-cxxreact (= 0.61.5)
67 | - React-jsi (= 0.61.5)
68 | - React-jsiexecutor (= 0.61.5)
69 | - Yoga
70 | - React-Core/CoreModulesHeaders (0.61.5):
71 | - Folly (= 2018.10.22.00)
72 | - glog
73 | - React-Core/Default
74 | - React-cxxreact (= 0.61.5)
75 | - React-jsi (= 0.61.5)
76 | - React-jsiexecutor (= 0.61.5)
77 | - Yoga
78 | - React-Core/Default (0.61.5):
79 | - Folly (= 2018.10.22.00)
80 | - glog
81 | - React-cxxreact (= 0.61.5)
82 | - React-jsi (= 0.61.5)
83 | - React-jsiexecutor (= 0.61.5)
84 | - Yoga
85 | - React-Core/DevSupport (0.61.5):
86 | - Folly (= 2018.10.22.00)
87 | - glog
88 | - React-Core/Default (= 0.61.5)
89 | - React-Core/RCTWebSocket (= 0.61.5)
90 | - React-cxxreact (= 0.61.5)
91 | - React-jsi (= 0.61.5)
92 | - React-jsiexecutor (= 0.61.5)
93 | - React-jsinspector (= 0.61.5)
94 | - Yoga
95 | - React-Core/RCTActionSheetHeaders (0.61.5):
96 | - Folly (= 2018.10.22.00)
97 | - glog
98 | - React-Core/Default
99 | - React-cxxreact (= 0.61.5)
100 | - React-jsi (= 0.61.5)
101 | - React-jsiexecutor (= 0.61.5)
102 | - Yoga
103 | - React-Core/RCTAnimationHeaders (0.61.5):
104 | - Folly (= 2018.10.22.00)
105 | - glog
106 | - React-Core/Default
107 | - React-cxxreact (= 0.61.5)
108 | - React-jsi (= 0.61.5)
109 | - React-jsiexecutor (= 0.61.5)
110 | - Yoga
111 | - React-Core/RCTBlobHeaders (0.61.5):
112 | - Folly (= 2018.10.22.00)
113 | - glog
114 | - React-Core/Default
115 | - React-cxxreact (= 0.61.5)
116 | - React-jsi (= 0.61.5)
117 | - React-jsiexecutor (= 0.61.5)
118 | - Yoga
119 | - React-Core/RCTImageHeaders (0.61.5):
120 | - Folly (= 2018.10.22.00)
121 | - glog
122 | - React-Core/Default
123 | - React-cxxreact (= 0.61.5)
124 | - React-jsi (= 0.61.5)
125 | - React-jsiexecutor (= 0.61.5)
126 | - Yoga
127 | - React-Core/RCTLinkingHeaders (0.61.5):
128 | - Folly (= 2018.10.22.00)
129 | - glog
130 | - React-Core/Default
131 | - React-cxxreact (= 0.61.5)
132 | - React-jsi (= 0.61.5)
133 | - React-jsiexecutor (= 0.61.5)
134 | - Yoga
135 | - React-Core/RCTNetworkHeaders (0.61.5):
136 | - Folly (= 2018.10.22.00)
137 | - glog
138 | - React-Core/Default
139 | - React-cxxreact (= 0.61.5)
140 | - React-jsi (= 0.61.5)
141 | - React-jsiexecutor (= 0.61.5)
142 | - Yoga
143 | - React-Core/RCTSettingsHeaders (0.61.5):
144 | - Folly (= 2018.10.22.00)
145 | - glog
146 | - React-Core/Default
147 | - React-cxxreact (= 0.61.5)
148 | - React-jsi (= 0.61.5)
149 | - React-jsiexecutor (= 0.61.5)
150 | - Yoga
151 | - React-Core/RCTTextHeaders (0.61.5):
152 | - Folly (= 2018.10.22.00)
153 | - glog
154 | - React-Core/Default
155 | - React-cxxreact (= 0.61.5)
156 | - React-jsi (= 0.61.5)
157 | - React-jsiexecutor (= 0.61.5)
158 | - Yoga
159 | - React-Core/RCTVibrationHeaders (0.61.5):
160 | - Folly (= 2018.10.22.00)
161 | - glog
162 | - React-Core/Default
163 | - React-cxxreact (= 0.61.5)
164 | - React-jsi (= 0.61.5)
165 | - React-jsiexecutor (= 0.61.5)
166 | - Yoga
167 | - React-Core/RCTWebSocket (0.61.5):
168 | - Folly (= 2018.10.22.00)
169 | - glog
170 | - React-Core/Default (= 0.61.5)
171 | - React-cxxreact (= 0.61.5)
172 | - React-jsi (= 0.61.5)
173 | - React-jsiexecutor (= 0.61.5)
174 | - Yoga
175 | - React-CoreModules (0.61.5):
176 | - FBReactNativeSpec (= 0.61.5)
177 | - Folly (= 2018.10.22.00)
178 | - RCTTypeSafety (= 0.61.5)
179 | - React-Core/CoreModulesHeaders (= 0.61.5)
180 | - React-RCTImage (= 0.61.5)
181 | - ReactCommon/turbomodule/core (= 0.61.5)
182 | - React-cxxreact (0.61.5):
183 | - boost-for-react-native (= 1.63.0)
184 | - DoubleConversion
185 | - Folly (= 2018.10.22.00)
186 | - glog
187 | - React-jsinspector (= 0.61.5)
188 | - React-jsi (0.61.5):
189 | - boost-for-react-native (= 1.63.0)
190 | - DoubleConversion
191 | - Folly (= 2018.10.22.00)
192 | - glog
193 | - React-jsi/Default (= 0.61.5)
194 | - React-jsi/Default (0.61.5):
195 | - boost-for-react-native (= 1.63.0)
196 | - DoubleConversion
197 | - Folly (= 2018.10.22.00)
198 | - glog
199 | - React-jsiexecutor (0.61.5):
200 | - DoubleConversion
201 | - Folly (= 2018.10.22.00)
202 | - glog
203 | - React-cxxreact (= 0.61.5)
204 | - React-jsi (= 0.61.5)
205 | - React-jsinspector (0.61.5)
206 | - React-RCTActionSheet (0.61.5):
207 | - React-Core/RCTActionSheetHeaders (= 0.61.5)
208 | - React-RCTAnimation (0.61.5):
209 | - React-Core/RCTAnimationHeaders (= 0.61.5)
210 | - React-RCTBlob (0.61.5):
211 | - React-Core/RCTBlobHeaders (= 0.61.5)
212 | - React-Core/RCTWebSocket (= 0.61.5)
213 | - React-jsi (= 0.61.5)
214 | - React-RCTNetwork (= 0.61.5)
215 | - React-RCTImage (0.61.5):
216 | - React-Core/RCTImageHeaders (= 0.61.5)
217 | - React-RCTNetwork (= 0.61.5)
218 | - React-RCTLinking (0.61.5):
219 | - React-Core/RCTLinkingHeaders (= 0.61.5)
220 | - React-RCTNetwork (0.61.5):
221 | - React-Core/RCTNetworkHeaders (= 0.61.5)
222 | - React-RCTSettings (0.61.5):
223 | - React-Core/RCTSettingsHeaders (= 0.61.5)
224 | - React-RCTText (0.61.5):
225 | - React-Core/RCTTextHeaders (= 0.61.5)
226 | - React-RCTVibration (0.61.5):
227 | - React-Core/RCTVibrationHeaders (= 0.61.5)
228 | - ReactCommon/jscallinvoker (0.61.5):
229 | - DoubleConversion
230 | - Folly (= 2018.10.22.00)
231 | - glog
232 | - React-cxxreact (= 0.61.5)
233 | - ReactCommon/turbomodule/core (0.61.5):
234 | - DoubleConversion
235 | - Folly (= 2018.10.22.00)
236 | - glog
237 | - React-Core (= 0.61.5)
238 | - React-cxxreact (= 0.61.5)
239 | - React-jsi (= 0.61.5)
240 | - ReactCommon/jscallinvoker (= 0.61.5)
241 | - UMAppLoader (2.1.0)
242 | - UMBarCodeScannerInterface (6.1.0):
243 | - UMCore
244 | - UMCameraInterface (6.1.0):
245 | - UMCore
246 | - UMConstantsInterface (6.1.0):
247 | - UMCore
248 | - UMCore (7.1.0)
249 | - UMFaceDetectorInterface (6.1.0)
250 | - UMFileSystemInterface (6.1.0)
251 | - UMFontInterface (6.1.0)
252 | - UMImageLoaderInterface (6.1.0)
253 | - UMPermissionsInterface (6.1.0):
254 | - UMCore
255 | - UMReactNativeAdapter (6.2.2):
256 | - React-Core
257 | - UMCore
258 | - UMFontInterface
259 | - UMSensorsInterface (6.1.0):
260 | - UMCore
261 | - UMTaskManagerInterface (6.1.0):
262 | - UMCore
263 | - Yoga (1.14.0)
264 |
265 | DEPENDENCIES:
266 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
267 | - EXConstants (from `../node_modules/expo-constants/ios`)
268 | - EXFileSystem (from `../node_modules/expo-file-system/ios`)
269 | - EXGL (from `../node_modules/expo-gl/ios`)
270 | - EXGL_CPP (from `../node_modules/expo-gl-cpp/cpp`)
271 | - EXImageLoader (from `../node_modules/expo-image-loader/ios`)
272 | - EXPermissions (from `../node_modules/expo-permissions/ios`)
273 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
274 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
275 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
276 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
277 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
278 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
279 | - React (from `../node_modules/react-native/`)
280 | - React-Core (from `../node_modules/react-native/`)
281 | - React-Core/DevSupport (from `../node_modules/react-native/`)
282 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
283 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
284 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
285 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
286 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
287 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
288 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
289 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
290 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
291 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
292 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
293 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
294 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
295 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
296 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
297 | - ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
298 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
299 | - UMAppLoader (from `../node_modules/unimodules-app-loader/ios`)
300 | - UMBarCodeScannerInterface (from `../node_modules/unimodules-barcode-scanner-interface/ios`)
301 | - UMCameraInterface (from `../node_modules/unimodules-camera-interface/ios`)
302 | - UMConstantsInterface (from `../node_modules/unimodules-constants-interface/ios`)
303 | - "UMCore (from `../node_modules/@unimodules/core/ios`)"
304 | - UMFaceDetectorInterface (from `../node_modules/unimodules-face-detector-interface/ios`)
305 | - UMFileSystemInterface (from `../node_modules/unimodules-file-system-interface/ios`)
306 | - UMFontInterface (from `../node_modules/unimodules-font-interface/ios`)
307 | - UMImageLoaderInterface (from `../node_modules/unimodules-image-loader-interface/ios`)
308 | - UMPermissionsInterface (from `../node_modules/unimodules-permissions-interface/ios`)
309 | - "UMReactNativeAdapter (from `../node_modules/@unimodules/react-native-adapter/ios`)"
310 | - UMSensorsInterface (from `../node_modules/unimodules-sensors-interface/ios`)
311 | - UMTaskManagerInterface (from `../node_modules/unimodules-task-manager-interface/ios`)
312 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
313 |
314 | SPEC REPOS:
315 | trunk:
316 | - boost-for-react-native
317 |
318 | EXTERNAL SOURCES:
319 | DoubleConversion:
320 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
321 | EXConstants:
322 | :path: "../node_modules/expo-constants/ios"
323 | EXFileSystem:
324 | :path: "../node_modules/expo-file-system/ios"
325 | EXGL:
326 | :path: "../node_modules/expo-gl/ios"
327 | EXGL_CPP:
328 | :path: "../node_modules/expo-gl-cpp/cpp"
329 | EXImageLoader:
330 | :path: "../node_modules/expo-image-loader/ios"
331 | EXPermissions:
332 | :path: "../node_modules/expo-permissions/ios"
333 | FBLazyVector:
334 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
335 | FBReactNativeSpec:
336 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
337 | Folly:
338 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
339 | glog:
340 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
341 | RCTRequired:
342 | :path: "../node_modules/react-native/Libraries/RCTRequired"
343 | RCTTypeSafety:
344 | :path: "../node_modules/react-native/Libraries/TypeSafety"
345 | React:
346 | :path: "../node_modules/react-native/"
347 | React-Core:
348 | :path: "../node_modules/react-native/"
349 | React-CoreModules:
350 | :path: "../node_modules/react-native/React/CoreModules"
351 | React-cxxreact:
352 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
353 | React-jsi:
354 | :path: "../node_modules/react-native/ReactCommon/jsi"
355 | React-jsiexecutor:
356 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
357 | React-jsinspector:
358 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
359 | React-RCTActionSheet:
360 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
361 | React-RCTAnimation:
362 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
363 | React-RCTBlob:
364 | :path: "../node_modules/react-native/Libraries/Blob"
365 | React-RCTImage:
366 | :path: "../node_modules/react-native/Libraries/Image"
367 | React-RCTLinking:
368 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
369 | React-RCTNetwork:
370 | :path: "../node_modules/react-native/Libraries/Network"
371 | React-RCTSettings:
372 | :path: "../node_modules/react-native/Libraries/Settings"
373 | React-RCTText:
374 | :path: "../node_modules/react-native/Libraries/Text"
375 | React-RCTVibration:
376 | :path: "../node_modules/react-native/Libraries/Vibration"
377 | ReactCommon:
378 | :path: "../node_modules/react-native/ReactCommon"
379 | UMAppLoader:
380 | :path: "../node_modules/unimodules-app-loader/ios"
381 | UMBarCodeScannerInterface:
382 | :path: "../node_modules/unimodules-barcode-scanner-interface/ios"
383 | UMCameraInterface:
384 | :path: "../node_modules/unimodules-camera-interface/ios"
385 | UMConstantsInterface:
386 | :path: "../node_modules/unimodules-constants-interface/ios"
387 | UMCore:
388 | :path: "../node_modules/@unimodules/core/ios"
389 | UMFaceDetectorInterface:
390 | :path: "../node_modules/unimodules-face-detector-interface/ios"
391 | UMFileSystemInterface:
392 | :path: "../node_modules/unimodules-file-system-interface/ios"
393 | UMFontInterface:
394 | :path: "../node_modules/unimodules-font-interface/ios"
395 | UMImageLoaderInterface:
396 | :path: "../node_modules/unimodules-image-loader-interface/ios"
397 | UMPermissionsInterface:
398 | :path: "../node_modules/unimodules-permissions-interface/ios"
399 | UMReactNativeAdapter:
400 | :path: "../node_modules/@unimodules/react-native-adapter/ios"
401 | UMSensorsInterface:
402 | :path: "../node_modules/unimodules-sensors-interface/ios"
403 | UMTaskManagerInterface:
404 | :path: "../node_modules/unimodules-task-manager-interface/ios"
405 | Yoga:
406 | :path: "../node_modules/react-native/ReactCommon/yoga"
407 |
408 | SPEC CHECKSUMS:
409 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
410 | DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
411 | EXConstants: c00cd53a17a65b2e53ddb3890e4e74d3418e406e
412 | EXFileSystem: 4bdd642677111e1ddcac33afc555b068d2efd63c
413 | EXGL: 83453233aaba23a1511ec9ea9d8eada517aa8c5e
414 | EXGL_CPP: 6c376b940e21db279e5cd8ffb620c4d86ebffb0b
415 | EXImageLoader: 1ad8b491fd0f3200b57b37ecb1801abeb6549926
416 | EXPermissions: ea8d63dd052737765bd350b2ca7cee9bcfd5e18e
417 | FBLazyVector: aaeaf388755e4f29cd74acbc9e3b8da6d807c37f
418 | FBReactNativeSpec: 118d0d177724c2d67f08a59136eb29ef5943ec75
419 | Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
420 | glog: 1f3da668190260b06b429bb211bfbee5cd790c28
421 | RCTRequired: b153add4da6e7dbc44aebf93f3cf4fcae392ddf1
422 | RCTTypeSafety: 9aa1b91d7f9310fc6eadc3cf95126ffe818af320
423 | React: b6a59ef847b2b40bb6e0180a97d0ca716969ac78
424 | React-Core: 688b451f7d616cc1134ac95295b593d1b5158a04
425 | React-CoreModules: d04f8494c1a328b69ec11db9d1137d667f916dcb
426 | React-cxxreact: d0f7bcafa196ae410e5300736b424455e7fb7ba7
427 | React-jsi: cb2cd74d7ccf4cffb071a46833613edc79cdf8f7
428 | React-jsiexecutor: d5525f9ed5f782fdbacb64b9b01a43a9323d2386
429 | React-jsinspector: fa0ecc501688c3c4c34f28834a76302233e29dc0
430 | React-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76
431 | React-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360
432 | React-RCTBlob: d89293cc0236d9cb0933d85e430b0bbe81ad1d72
433 | React-RCTImage: 6b8e8df449eb7c814c99a92d6b52de6fe39dea4e
434 | React-RCTLinking: 121bb231c7503cf9094f4d8461b96a130fabf4a5
435 | React-RCTNetwork: fb353640aafcee84ca8b78957297bd395f065c9a
436 | React-RCTSettings: 8db258ea2a5efee381fcf7a6d5044e2f8b68b640
437 | React-RCTText: 9ccc88273e9a3aacff5094d2175a605efa854dbe
438 | React-RCTVibration: a49a1f42bf8f5acf1c3e297097517c6b3af377ad
439 | ReactCommon: 198c7c8d3591f975e5431bec1b0b3b581aa1c5dd
440 | UMAppLoader: aae896b81e3fcaa6528992e2e19ec8db38c2cedd
441 | UMBarCodeScannerInterface: 96a01d81ff0c7febbfefc2d7396db9e7462d8c68
442 | UMCameraInterface: 8ad433fdadca22703ebeb614d42b814092d38d69
443 | UMConstantsInterface: 55c79ca258a3ede70480fed85e3843899cd47ea3
444 | UMCore: fa8360bafce09c33041df0cdead98ab1198b22b8
445 | UMFaceDetectorInterface: 4db950a25e785796a237bcebb8fff05078c4fb61
446 | UMFileSystemInterface: 4a92ee36e6c2757833031718f8496690fa931280
447 | UMFontInterface: 81a951117d03f57aa636fba3992adefd0191f200
448 | UMImageLoaderInterface: 5cd09b41630dc8aef7619fabc497c01c0f6b715c
449 | UMPermissionsInterface: 4351145563e703c521fe2299e08227bc3584b94a
450 | UMReactNativeAdapter: e89ade57da1cd2a8ee605f5f7c17e654b8ae8249
451 | UMSensorsInterface: 50439b47826e716a514cbd7384aebe9ab4fde5f4
452 | UMTaskManagerInterface: 482155764886069beb1bc7fcf6036f12e4ad0751
453 | Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b
454 |
455 | PODFILE CHECKSUM: 79845e83f853010445a21a254135fb08099a467c
456 |
457 | COCOAPODS: 1.8.4
458 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters-tvOS/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 | NSExceptionDomains
28 |
29 | localhost
30 |
31 | NSExceptionAllowsInsecureHTTPLoads
32 |
33 |
34 |
35 |
36 | NSLocationWhenInUseUsageDescription
37 |
38 | UILaunchStoryboardName
39 | LaunchScreen
40 | UIRequiredDeviceCapabilities
41 |
42 | armv7
43 |
44 | UISupportedInterfaceOrientations
45 |
46 | UIInterfaceOrientationPortrait
47 | UIInterfaceOrientationLandscapeLeft
48 | UIInterfaceOrientationLandscapeRight
49 |
50 | UIViewControllerBasedStatusBarAppearance
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters-tvOSTests/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 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00E356F31AD99517003FC87E /* imagefiltersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* imagefiltersTests.m */; };
11 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
12 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
15 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
16 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
17 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
18 | 2DCD954D1E0B4F2C00145EB5 /* imagefiltersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* imagefiltersTests.m */; };
19 | 300961EDFA518152FF479E19 /* libPods-imagefilters-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F4E98908E462CD8C9E2F8EB /* libPods-imagefilters-tvOSTests.a */; };
20 | 87EA122FF8D2ED8D610DEA06 /* libPods-imagefilters-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BACA58EE60998B824FB7E39A /* libPods-imagefilters-tvOS.a */; };
21 | 8F0F1F5CCBD6C8716E16DCAD /* libPods-imagefilters.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 74661D81FBC18A32A5995B8C /* libPods-imagefilters.a */; };
22 | F626E3AF3D4CB15919EAE6F0 /* libPods-imagefiltersTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DFEA77246E3D2D456BF11911 /* libPods-imagefiltersTests.a */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXContainerItemProxy section */
26 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
27 | isa = PBXContainerItemProxy;
28 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
29 | proxyType = 1;
30 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
31 | remoteInfo = imagefilters;
32 | };
33 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
34 | isa = PBXContainerItemProxy;
35 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
36 | proxyType = 1;
37 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
38 | remoteInfo = "imagefilters-tvOS";
39 | };
40 | /* End PBXContainerItemProxy section */
41 |
42 | /* Begin PBXFileReference section */
43 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
44 | 00E356EE1AD99517003FC87E /* imagefiltersTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = imagefiltersTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
45 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
46 | 00E356F21AD99517003FC87E /* imagefiltersTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = imagefiltersTests.m; sourceTree = ""; };
47 | 13B07F961A680F5B00A75B9A /* imagefilters.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = imagefilters.app; sourceTree = BUILT_PRODUCTS_DIR; };
48 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = imagefilters/AppDelegate.h; sourceTree = ""; };
49 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = imagefilters/AppDelegate.m; sourceTree = ""; };
50 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
51 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = imagefilters/Images.xcassets; sourceTree = ""; };
52 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = imagefilters/Info.plist; sourceTree = ""; };
53 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = imagefilters/main.m; sourceTree = ""; };
54 | 29B4246E0FA9F5885A5287F3 /* Pods-imagefiltersTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-imagefiltersTests.release.xcconfig"; path = "Target Support Files/Pods-imagefiltersTests/Pods-imagefiltersTests.release.xcconfig"; sourceTree = ""; };
55 | 2D02E47B1E0B4A5D006451C7 /* imagefilters-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imagefilters-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
56 | 2D02E4901E0B4A5D006451C7 /* imagefilters-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "imagefilters-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
57 | 35413F70F969E28786A24960 /* Pods-imagefilters-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-imagefilters-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-imagefilters-tvOSTests/Pods-imagefilters-tvOSTests.release.xcconfig"; sourceTree = ""; };
58 | 3A851C8DD55F13BB75D545E5 /* Pods-imagefilters-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-imagefilters-tvOS.release.xcconfig"; path = "Target Support Files/Pods-imagefilters-tvOS/Pods-imagefilters-tvOS.release.xcconfig"; sourceTree = ""; };
59 | 4F4E98908E462CD8C9E2F8EB /* libPods-imagefilters-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-imagefilters-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
60 | 5C3DA0062DB975C7F62B6F39 /* Pods-imagefilters.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-imagefilters.release.xcconfig"; path = "Target Support Files/Pods-imagefilters/Pods-imagefilters.release.xcconfig"; sourceTree = ""; };
61 | 74661D81FBC18A32A5995B8C /* libPods-imagefilters.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-imagefilters.a"; sourceTree = BUILT_PRODUCTS_DIR; };
62 | 769BFE8676F3B9D17121CE53 /* Pods-imagefilters.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-imagefilters.debug.xcconfig"; path = "Target Support Files/Pods-imagefilters/Pods-imagefilters.debug.xcconfig"; sourceTree = ""; };
63 | 8B22F3D15153582D8CCF559E /* Pods-imagefilters-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-imagefilters-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-imagefilters-tvOS/Pods-imagefilters-tvOS.debug.xcconfig"; sourceTree = ""; };
64 | B5C799AFEE1A01B1AA276492 /* Pods-imagefiltersTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-imagefiltersTests.debug.xcconfig"; path = "Target Support Files/Pods-imagefiltersTests/Pods-imagefiltersTests.debug.xcconfig"; sourceTree = ""; };
65 | BACA58EE60998B824FB7E39A /* libPods-imagefilters-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-imagefilters-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
66 | DFEA77246E3D2D456BF11911 /* libPods-imagefiltersTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-imagefiltersTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
67 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
68 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
69 | F7722D456E4DCC8D87DA3EF5 /* Pods-imagefilters-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-imagefilters-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-imagefilters-tvOSTests/Pods-imagefilters-tvOSTests.debug.xcconfig"; sourceTree = ""; };
70 | /* End PBXFileReference section */
71 |
72 | /* Begin PBXFrameworksBuildPhase section */
73 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
74 | isa = PBXFrameworksBuildPhase;
75 | buildActionMask = 2147483647;
76 | files = (
77 | F626E3AF3D4CB15919EAE6F0 /* libPods-imagefiltersTests.a in Frameworks */,
78 | );
79 | runOnlyForDeploymentPostprocessing = 0;
80 | };
81 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
82 | isa = PBXFrameworksBuildPhase;
83 | buildActionMask = 2147483647;
84 | files = (
85 | 8F0F1F5CCBD6C8716E16DCAD /* libPods-imagefilters.a in Frameworks */,
86 | );
87 | runOnlyForDeploymentPostprocessing = 0;
88 | };
89 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
90 | isa = PBXFrameworksBuildPhase;
91 | buildActionMask = 2147483647;
92 | files = (
93 | 87EA122FF8D2ED8D610DEA06 /* libPods-imagefilters-tvOS.a in Frameworks */,
94 | );
95 | runOnlyForDeploymentPostprocessing = 0;
96 | };
97 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
98 | isa = PBXFrameworksBuildPhase;
99 | buildActionMask = 2147483647;
100 | files = (
101 | 300961EDFA518152FF479E19 /* libPods-imagefilters-tvOSTests.a in Frameworks */,
102 | );
103 | runOnlyForDeploymentPostprocessing = 0;
104 | };
105 | /* End PBXFrameworksBuildPhase section */
106 |
107 | /* Begin PBXGroup section */
108 | 00E356EF1AD99517003FC87E /* imagefiltersTests */ = {
109 | isa = PBXGroup;
110 | children = (
111 | 00E356F21AD99517003FC87E /* imagefiltersTests.m */,
112 | 00E356F01AD99517003FC87E /* Supporting Files */,
113 | );
114 | path = imagefiltersTests;
115 | sourceTree = "";
116 | };
117 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
118 | isa = PBXGroup;
119 | children = (
120 | 00E356F11AD99517003FC87E /* Info.plist */,
121 | );
122 | name = "Supporting Files";
123 | sourceTree = "";
124 | };
125 | 0F89785885D561C7BD1B650B /* Pods */ = {
126 | isa = PBXGroup;
127 | children = (
128 | 769BFE8676F3B9D17121CE53 /* Pods-imagefilters.debug.xcconfig */,
129 | 5C3DA0062DB975C7F62B6F39 /* Pods-imagefilters.release.xcconfig */,
130 | 8B22F3D15153582D8CCF559E /* Pods-imagefilters-tvOS.debug.xcconfig */,
131 | 3A851C8DD55F13BB75D545E5 /* Pods-imagefilters-tvOS.release.xcconfig */,
132 | F7722D456E4DCC8D87DA3EF5 /* Pods-imagefilters-tvOSTests.debug.xcconfig */,
133 | 35413F70F969E28786A24960 /* Pods-imagefilters-tvOSTests.release.xcconfig */,
134 | B5C799AFEE1A01B1AA276492 /* Pods-imagefiltersTests.debug.xcconfig */,
135 | 29B4246E0FA9F5885A5287F3 /* Pods-imagefiltersTests.release.xcconfig */,
136 | );
137 | name = Pods;
138 | path = Pods;
139 | sourceTree = "";
140 | };
141 | 13B07FAE1A68108700A75B9A /* imagefilters */ = {
142 | isa = PBXGroup;
143 | children = (
144 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
145 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
146 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
147 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
148 | 13B07FB61A68108700A75B9A /* Info.plist */,
149 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
150 | 13B07FB71A68108700A75B9A /* main.m */,
151 | );
152 | name = imagefilters;
153 | sourceTree = "";
154 | };
155 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
156 | isa = PBXGroup;
157 | children = (
158 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
159 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
160 | 74661D81FBC18A32A5995B8C /* libPods-imagefilters.a */,
161 | BACA58EE60998B824FB7E39A /* libPods-imagefilters-tvOS.a */,
162 | 4F4E98908E462CD8C9E2F8EB /* libPods-imagefilters-tvOSTests.a */,
163 | DFEA77246E3D2D456BF11911 /* libPods-imagefiltersTests.a */,
164 | );
165 | name = Frameworks;
166 | sourceTree = "";
167 | };
168 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
169 | isa = PBXGroup;
170 | children = (
171 | );
172 | name = Libraries;
173 | sourceTree = "";
174 | };
175 | 83CBB9F61A601CBA00E9B192 = {
176 | isa = PBXGroup;
177 | children = (
178 | 13B07FAE1A68108700A75B9A /* imagefilters */,
179 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
180 | 00E356EF1AD99517003FC87E /* imagefiltersTests */,
181 | 83CBBA001A601CBA00E9B192 /* Products */,
182 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
183 | 0F89785885D561C7BD1B650B /* Pods */,
184 | );
185 | indentWidth = 2;
186 | sourceTree = "";
187 | tabWidth = 2;
188 | usesTabs = 0;
189 | };
190 | 83CBBA001A601CBA00E9B192 /* Products */ = {
191 | isa = PBXGroup;
192 | children = (
193 | 13B07F961A680F5B00A75B9A /* imagefilters.app */,
194 | 00E356EE1AD99517003FC87E /* imagefiltersTests.xctest */,
195 | 2D02E47B1E0B4A5D006451C7 /* imagefilters-tvOS.app */,
196 | 2D02E4901E0B4A5D006451C7 /* imagefilters-tvOSTests.xctest */,
197 | );
198 | name = Products;
199 | sourceTree = "";
200 | };
201 | /* End PBXGroup section */
202 |
203 | /* Begin PBXNativeTarget section */
204 | 00E356ED1AD99517003FC87E /* imagefiltersTests */ = {
205 | isa = PBXNativeTarget;
206 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "imagefiltersTests" */;
207 | buildPhases = (
208 | DE2EAD89E2C2E7D8B6B56DE9 /* [CP] Check Pods Manifest.lock */,
209 | 00E356EA1AD99517003FC87E /* Sources */,
210 | 00E356EB1AD99517003FC87E /* Frameworks */,
211 | 00E356EC1AD99517003FC87E /* Resources */,
212 | );
213 | buildRules = (
214 | );
215 | dependencies = (
216 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
217 | );
218 | name = imagefiltersTests;
219 | productName = imagefiltersTests;
220 | productReference = 00E356EE1AD99517003FC87E /* imagefiltersTests.xctest */;
221 | productType = "com.apple.product-type.bundle.unit-test";
222 | };
223 | 13B07F861A680F5B00A75B9A /* imagefilters */ = {
224 | isa = PBXNativeTarget;
225 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "imagefilters" */;
226 | buildPhases = (
227 | 7BE23698F2D119B0167F625B /* [CP] Check Pods Manifest.lock */,
228 | FD10A7F022414F080027D42C /* Start Packager */,
229 | 13B07F871A680F5B00A75B9A /* Sources */,
230 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
231 | 13B07F8E1A680F5B00A75B9A /* Resources */,
232 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
233 | );
234 | buildRules = (
235 | );
236 | dependencies = (
237 | );
238 | name = imagefilters;
239 | productName = imagefilters;
240 | productReference = 13B07F961A680F5B00A75B9A /* imagefilters.app */;
241 | productType = "com.apple.product-type.application";
242 | };
243 | 2D02E47A1E0B4A5D006451C7 /* imagefilters-tvOS */ = {
244 | isa = PBXNativeTarget;
245 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "imagefilters-tvOS" */;
246 | buildPhases = (
247 | BBFFD09A8D4232A692E9E866 /* [CP] Check Pods Manifest.lock */,
248 | FD10A7F122414F3F0027D42C /* Start Packager */,
249 | 2D02E4771E0B4A5D006451C7 /* Sources */,
250 | 2D02E4781E0B4A5D006451C7 /* Frameworks */,
251 | 2D02E4791E0B4A5D006451C7 /* Resources */,
252 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
253 | );
254 | buildRules = (
255 | );
256 | dependencies = (
257 | );
258 | name = "imagefilters-tvOS";
259 | productName = "imagefilters-tvOS";
260 | productReference = 2D02E47B1E0B4A5D006451C7 /* imagefilters-tvOS.app */;
261 | productType = "com.apple.product-type.application";
262 | };
263 | 2D02E48F1E0B4A5D006451C7 /* imagefilters-tvOSTests */ = {
264 | isa = PBXNativeTarget;
265 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "imagefilters-tvOSTests" */;
266 | buildPhases = (
267 | 8D9E7F80A51C515F6A93AE99 /* [CP] Check Pods Manifest.lock */,
268 | 2D02E48C1E0B4A5D006451C7 /* Sources */,
269 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */,
270 | 2D02E48E1E0B4A5D006451C7 /* Resources */,
271 | );
272 | buildRules = (
273 | );
274 | dependencies = (
275 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
276 | );
277 | name = "imagefilters-tvOSTests";
278 | productName = "imagefilters-tvOSTests";
279 | productReference = 2D02E4901E0B4A5D006451C7 /* imagefilters-tvOSTests.xctest */;
280 | productType = "com.apple.product-type.bundle.unit-test";
281 | };
282 | /* End PBXNativeTarget section */
283 |
284 | /* Begin PBXProject section */
285 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
286 | isa = PBXProject;
287 | attributes = {
288 | LastUpgradeCheck = 0940;
289 | ORGANIZATIONNAME = Facebook;
290 | TargetAttributes = {
291 | 00E356ED1AD99517003FC87E = {
292 | CreatedOnToolsVersion = 6.2;
293 | TestTargetID = 13B07F861A680F5B00A75B9A;
294 | };
295 | 2D02E47A1E0B4A5D006451C7 = {
296 | CreatedOnToolsVersion = 8.2.1;
297 | ProvisioningStyle = Automatic;
298 | };
299 | 2D02E48F1E0B4A5D006451C7 = {
300 | CreatedOnToolsVersion = 8.2.1;
301 | ProvisioningStyle = Automatic;
302 | TestTargetID = 2D02E47A1E0B4A5D006451C7;
303 | };
304 | };
305 | };
306 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "imagefilters" */;
307 | compatibilityVersion = "Xcode 3.2";
308 | developmentRegion = English;
309 | hasScannedForEncodings = 0;
310 | knownRegions = (
311 | en,
312 | Base,
313 | );
314 | mainGroup = 83CBB9F61A601CBA00E9B192;
315 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
316 | projectDirPath = "";
317 | projectRoot = "";
318 | targets = (
319 | 13B07F861A680F5B00A75B9A /* imagefilters */,
320 | 00E356ED1AD99517003FC87E /* imagefiltersTests */,
321 | 2D02E47A1E0B4A5D006451C7 /* imagefilters-tvOS */,
322 | 2D02E48F1E0B4A5D006451C7 /* imagefilters-tvOSTests */,
323 | );
324 | };
325 | /* End PBXProject section */
326 |
327 | /* Begin PBXResourcesBuildPhase section */
328 | 00E356EC1AD99517003FC87E /* Resources */ = {
329 | isa = PBXResourcesBuildPhase;
330 | buildActionMask = 2147483647;
331 | files = (
332 | );
333 | runOnlyForDeploymentPostprocessing = 0;
334 | };
335 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
336 | isa = PBXResourcesBuildPhase;
337 | buildActionMask = 2147483647;
338 | files = (
339 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
340 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
341 | );
342 | runOnlyForDeploymentPostprocessing = 0;
343 | };
344 | 2D02E4791E0B4A5D006451C7 /* Resources */ = {
345 | isa = PBXResourcesBuildPhase;
346 | buildActionMask = 2147483647;
347 | files = (
348 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
349 | );
350 | runOnlyForDeploymentPostprocessing = 0;
351 | };
352 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = {
353 | isa = PBXResourcesBuildPhase;
354 | buildActionMask = 2147483647;
355 | files = (
356 | );
357 | runOnlyForDeploymentPostprocessing = 0;
358 | };
359 | /* End PBXResourcesBuildPhase section */
360 |
361 | /* Begin PBXShellScriptBuildPhase section */
362 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
363 | isa = PBXShellScriptBuildPhase;
364 | buildActionMask = 2147483647;
365 | files = (
366 | );
367 | inputPaths = (
368 | );
369 | name = "Bundle React Native code and images";
370 | outputPaths = (
371 | );
372 | runOnlyForDeploymentPostprocessing = 0;
373 | shellPath = /bin/sh;
374 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
375 | };
376 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
377 | isa = PBXShellScriptBuildPhase;
378 | buildActionMask = 2147483647;
379 | files = (
380 | );
381 | inputPaths = (
382 | );
383 | name = "Bundle React Native Code And Images";
384 | outputPaths = (
385 | );
386 | runOnlyForDeploymentPostprocessing = 0;
387 | shellPath = /bin/sh;
388 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
389 | };
390 | 7BE23698F2D119B0167F625B /* [CP] Check Pods Manifest.lock */ = {
391 | isa = PBXShellScriptBuildPhase;
392 | buildActionMask = 2147483647;
393 | files = (
394 | );
395 | inputFileListPaths = (
396 | );
397 | inputPaths = (
398 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
399 | "${PODS_ROOT}/Manifest.lock",
400 | );
401 | name = "[CP] Check Pods Manifest.lock";
402 | outputFileListPaths = (
403 | );
404 | outputPaths = (
405 | "$(DERIVED_FILE_DIR)/Pods-imagefilters-checkManifestLockResult.txt",
406 | );
407 | runOnlyForDeploymentPostprocessing = 0;
408 | shellPath = /bin/sh;
409 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
410 | showEnvVarsInLog = 0;
411 | };
412 | 8D9E7F80A51C515F6A93AE99 /* [CP] Check Pods Manifest.lock */ = {
413 | isa = PBXShellScriptBuildPhase;
414 | buildActionMask = 2147483647;
415 | files = (
416 | );
417 | inputFileListPaths = (
418 | );
419 | inputPaths = (
420 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
421 | "${PODS_ROOT}/Manifest.lock",
422 | );
423 | name = "[CP] Check Pods Manifest.lock";
424 | outputFileListPaths = (
425 | );
426 | outputPaths = (
427 | "$(DERIVED_FILE_DIR)/Pods-imagefilters-tvOSTests-checkManifestLockResult.txt",
428 | );
429 | runOnlyForDeploymentPostprocessing = 0;
430 | shellPath = /bin/sh;
431 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
432 | showEnvVarsInLog = 0;
433 | };
434 | BBFFD09A8D4232A692E9E866 /* [CP] Check Pods Manifest.lock */ = {
435 | isa = PBXShellScriptBuildPhase;
436 | buildActionMask = 2147483647;
437 | files = (
438 | );
439 | inputFileListPaths = (
440 | );
441 | inputPaths = (
442 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
443 | "${PODS_ROOT}/Manifest.lock",
444 | );
445 | name = "[CP] Check Pods Manifest.lock";
446 | outputFileListPaths = (
447 | );
448 | outputPaths = (
449 | "$(DERIVED_FILE_DIR)/Pods-imagefilters-tvOS-checkManifestLockResult.txt",
450 | );
451 | runOnlyForDeploymentPostprocessing = 0;
452 | shellPath = /bin/sh;
453 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
454 | showEnvVarsInLog = 0;
455 | };
456 | DE2EAD89E2C2E7D8B6B56DE9 /* [CP] Check Pods Manifest.lock */ = {
457 | isa = PBXShellScriptBuildPhase;
458 | buildActionMask = 2147483647;
459 | files = (
460 | );
461 | inputFileListPaths = (
462 | );
463 | inputPaths = (
464 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
465 | "${PODS_ROOT}/Manifest.lock",
466 | );
467 | name = "[CP] Check Pods Manifest.lock";
468 | outputFileListPaths = (
469 | );
470 | outputPaths = (
471 | "$(DERIVED_FILE_DIR)/Pods-imagefiltersTests-checkManifestLockResult.txt",
472 | );
473 | runOnlyForDeploymentPostprocessing = 0;
474 | shellPath = /bin/sh;
475 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
476 | showEnvVarsInLog = 0;
477 | };
478 | FD10A7F022414F080027D42C /* Start Packager */ = {
479 | isa = PBXShellScriptBuildPhase;
480 | buildActionMask = 2147483647;
481 | files = (
482 | );
483 | inputFileListPaths = (
484 | );
485 | inputPaths = (
486 | );
487 | name = "Start Packager";
488 | outputFileListPaths = (
489 | );
490 | outputPaths = (
491 | );
492 | runOnlyForDeploymentPostprocessing = 0;
493 | shellPath = /bin/sh;
494 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
495 | showEnvVarsInLog = 0;
496 | };
497 | FD10A7F122414F3F0027D42C /* Start Packager */ = {
498 | isa = PBXShellScriptBuildPhase;
499 | buildActionMask = 2147483647;
500 | files = (
501 | );
502 | inputFileListPaths = (
503 | );
504 | inputPaths = (
505 | );
506 | name = "Start Packager";
507 | outputFileListPaths = (
508 | );
509 | outputPaths = (
510 | );
511 | runOnlyForDeploymentPostprocessing = 0;
512 | shellPath = /bin/sh;
513 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
514 | showEnvVarsInLog = 0;
515 | };
516 | /* End PBXShellScriptBuildPhase section */
517 |
518 | /* Begin PBXSourcesBuildPhase section */
519 | 00E356EA1AD99517003FC87E /* Sources */ = {
520 | isa = PBXSourcesBuildPhase;
521 | buildActionMask = 2147483647;
522 | files = (
523 | 00E356F31AD99517003FC87E /* imagefiltersTests.m in Sources */,
524 | );
525 | runOnlyForDeploymentPostprocessing = 0;
526 | };
527 | 13B07F871A680F5B00A75B9A /* Sources */ = {
528 | isa = PBXSourcesBuildPhase;
529 | buildActionMask = 2147483647;
530 | files = (
531 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
532 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
533 | );
534 | runOnlyForDeploymentPostprocessing = 0;
535 | };
536 | 2D02E4771E0B4A5D006451C7 /* Sources */ = {
537 | isa = PBXSourcesBuildPhase;
538 | buildActionMask = 2147483647;
539 | files = (
540 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */,
541 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */,
542 | );
543 | runOnlyForDeploymentPostprocessing = 0;
544 | };
545 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = {
546 | isa = PBXSourcesBuildPhase;
547 | buildActionMask = 2147483647;
548 | files = (
549 | 2DCD954D1E0B4F2C00145EB5 /* imagefiltersTests.m in Sources */,
550 | );
551 | runOnlyForDeploymentPostprocessing = 0;
552 | };
553 | /* End PBXSourcesBuildPhase section */
554 |
555 | /* Begin PBXTargetDependency section */
556 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
557 | isa = PBXTargetDependency;
558 | target = 13B07F861A680F5B00A75B9A /* imagefilters */;
559 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
560 | };
561 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
562 | isa = PBXTargetDependency;
563 | target = 2D02E47A1E0B4A5D006451C7 /* imagefilters-tvOS */;
564 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
565 | };
566 | /* End PBXTargetDependency section */
567 |
568 | /* Begin PBXVariantGroup section */
569 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
570 | isa = PBXVariantGroup;
571 | children = (
572 | 13B07FB21A68108700A75B9A /* Base */,
573 | );
574 | name = LaunchScreen.xib;
575 | path = imagefilters;
576 | sourceTree = "";
577 | };
578 | /* End PBXVariantGroup section */
579 |
580 | /* Begin XCBuildConfiguration section */
581 | 00E356F61AD99517003FC87E /* Debug */ = {
582 | isa = XCBuildConfiguration;
583 | baseConfigurationReference = B5C799AFEE1A01B1AA276492 /* Pods-imagefiltersTests.debug.xcconfig */;
584 | buildSettings = {
585 | BUNDLE_LOADER = "$(TEST_HOST)";
586 | GCC_PREPROCESSOR_DEFINITIONS = (
587 | "DEBUG=1",
588 | "$(inherited)",
589 | );
590 | INFOPLIST_FILE = imagefiltersTests/Info.plist;
591 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
592 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
593 | OTHER_LDFLAGS = (
594 | "-ObjC",
595 | "-lc++",
596 | "$(inherited)",
597 | );
598 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
599 | PRODUCT_NAME = "$(TARGET_NAME)";
600 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/imagefilters.app/imagefilters";
601 | };
602 | name = Debug;
603 | };
604 | 00E356F71AD99517003FC87E /* Release */ = {
605 | isa = XCBuildConfiguration;
606 | baseConfigurationReference = 29B4246E0FA9F5885A5287F3 /* Pods-imagefiltersTests.release.xcconfig */;
607 | buildSettings = {
608 | BUNDLE_LOADER = "$(TEST_HOST)";
609 | COPY_PHASE_STRIP = NO;
610 | INFOPLIST_FILE = imagefiltersTests/Info.plist;
611 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
612 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
613 | OTHER_LDFLAGS = (
614 | "-ObjC",
615 | "-lc++",
616 | "$(inherited)",
617 | );
618 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
619 | PRODUCT_NAME = "$(TARGET_NAME)";
620 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/imagefilters.app/imagefilters";
621 | };
622 | name = Release;
623 | };
624 | 13B07F941A680F5B00A75B9A /* Debug */ = {
625 | isa = XCBuildConfiguration;
626 | baseConfigurationReference = 769BFE8676F3B9D17121CE53 /* Pods-imagefilters.debug.xcconfig */;
627 | buildSettings = {
628 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
629 | CURRENT_PROJECT_VERSION = 1;
630 | DEAD_CODE_STRIPPING = NO;
631 | INFOPLIST_FILE = imagefilters/Info.plist;
632 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
633 | OTHER_LDFLAGS = (
634 | "$(inherited)",
635 | "-ObjC",
636 | "-lc++",
637 | );
638 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
639 | PRODUCT_NAME = imagefilters;
640 | VERSIONING_SYSTEM = "apple-generic";
641 | };
642 | name = Debug;
643 | };
644 | 13B07F951A680F5B00A75B9A /* Release */ = {
645 | isa = XCBuildConfiguration;
646 | baseConfigurationReference = 5C3DA0062DB975C7F62B6F39 /* Pods-imagefilters.release.xcconfig */;
647 | buildSettings = {
648 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
649 | CURRENT_PROJECT_VERSION = 1;
650 | INFOPLIST_FILE = imagefilters/Info.plist;
651 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
652 | OTHER_LDFLAGS = (
653 | "$(inherited)",
654 | "-ObjC",
655 | "-lc++",
656 | );
657 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
658 | PRODUCT_NAME = imagefilters;
659 | VERSIONING_SYSTEM = "apple-generic";
660 | };
661 | name = Release;
662 | };
663 | 2D02E4971E0B4A5E006451C7 /* Debug */ = {
664 | isa = XCBuildConfiguration;
665 | baseConfigurationReference = 8B22F3D15153582D8CCF559E /* Pods-imagefilters-tvOS.debug.xcconfig */;
666 | buildSettings = {
667 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
668 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
669 | CLANG_ANALYZER_NONNULL = YES;
670 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
671 | CLANG_WARN_INFINITE_RECURSION = YES;
672 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
673 | DEBUG_INFORMATION_FORMAT = dwarf;
674 | ENABLE_TESTABILITY = YES;
675 | GCC_NO_COMMON_BLOCKS = YES;
676 | INFOPLIST_FILE = "imagefilters-tvOS/Info.plist";
677 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
678 | OTHER_LDFLAGS = (
679 | "$(inherited)",
680 | "-ObjC",
681 | "-lc++",
682 | );
683 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.imagefilters-tvOS";
684 | PRODUCT_NAME = "$(TARGET_NAME)";
685 | SDKROOT = appletvos;
686 | TARGETED_DEVICE_FAMILY = 3;
687 | TVOS_DEPLOYMENT_TARGET = 9.2;
688 | };
689 | name = Debug;
690 | };
691 | 2D02E4981E0B4A5E006451C7 /* Release */ = {
692 | isa = XCBuildConfiguration;
693 | baseConfigurationReference = 3A851C8DD55F13BB75D545E5 /* Pods-imagefilters-tvOS.release.xcconfig */;
694 | buildSettings = {
695 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
696 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
697 | CLANG_ANALYZER_NONNULL = YES;
698 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
699 | CLANG_WARN_INFINITE_RECURSION = YES;
700 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
701 | COPY_PHASE_STRIP = NO;
702 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
703 | GCC_NO_COMMON_BLOCKS = YES;
704 | INFOPLIST_FILE = "imagefilters-tvOS/Info.plist";
705 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
706 | OTHER_LDFLAGS = (
707 | "$(inherited)",
708 | "-ObjC",
709 | "-lc++",
710 | );
711 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.imagefilters-tvOS";
712 | PRODUCT_NAME = "$(TARGET_NAME)";
713 | SDKROOT = appletvos;
714 | TARGETED_DEVICE_FAMILY = 3;
715 | TVOS_DEPLOYMENT_TARGET = 9.2;
716 | };
717 | name = Release;
718 | };
719 | 2D02E4991E0B4A5E006451C7 /* Debug */ = {
720 | isa = XCBuildConfiguration;
721 | baseConfigurationReference = F7722D456E4DCC8D87DA3EF5 /* Pods-imagefilters-tvOSTests.debug.xcconfig */;
722 | buildSettings = {
723 | BUNDLE_LOADER = "$(TEST_HOST)";
724 | CLANG_ANALYZER_NONNULL = YES;
725 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
726 | CLANG_WARN_INFINITE_RECURSION = YES;
727 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
728 | DEBUG_INFORMATION_FORMAT = dwarf;
729 | ENABLE_TESTABILITY = YES;
730 | GCC_NO_COMMON_BLOCKS = YES;
731 | INFOPLIST_FILE = "imagefilters-tvOSTests/Info.plist";
732 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
733 | OTHER_LDFLAGS = (
734 | "$(inherited)",
735 | "-ObjC",
736 | "-lc++",
737 | );
738 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.imagefilters-tvOSTests";
739 | PRODUCT_NAME = "$(TARGET_NAME)";
740 | SDKROOT = appletvos;
741 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/imagefilters-tvOS.app/imagefilters-tvOS";
742 | TVOS_DEPLOYMENT_TARGET = 10.1;
743 | };
744 | name = Debug;
745 | };
746 | 2D02E49A1E0B4A5E006451C7 /* Release */ = {
747 | isa = XCBuildConfiguration;
748 | baseConfigurationReference = 35413F70F969E28786A24960 /* Pods-imagefilters-tvOSTests.release.xcconfig */;
749 | buildSettings = {
750 | BUNDLE_LOADER = "$(TEST_HOST)";
751 | CLANG_ANALYZER_NONNULL = YES;
752 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
753 | CLANG_WARN_INFINITE_RECURSION = YES;
754 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
755 | COPY_PHASE_STRIP = NO;
756 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
757 | GCC_NO_COMMON_BLOCKS = YES;
758 | INFOPLIST_FILE = "imagefilters-tvOSTests/Info.plist";
759 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
760 | OTHER_LDFLAGS = (
761 | "$(inherited)",
762 | "-ObjC",
763 | "-lc++",
764 | );
765 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.imagefilters-tvOSTests";
766 | PRODUCT_NAME = "$(TARGET_NAME)";
767 | SDKROOT = appletvos;
768 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/imagefilters-tvOS.app/imagefilters-tvOS";
769 | TVOS_DEPLOYMENT_TARGET = 10.1;
770 | };
771 | name = Release;
772 | };
773 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
774 | isa = XCBuildConfiguration;
775 | buildSettings = {
776 | ALWAYS_SEARCH_USER_PATHS = NO;
777 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
778 | CLANG_CXX_LIBRARY = "libc++";
779 | CLANG_ENABLE_MODULES = YES;
780 | CLANG_ENABLE_OBJC_ARC = YES;
781 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
782 | CLANG_WARN_BOOL_CONVERSION = YES;
783 | CLANG_WARN_COMMA = YES;
784 | CLANG_WARN_CONSTANT_CONVERSION = YES;
785 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
786 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
787 | CLANG_WARN_EMPTY_BODY = YES;
788 | CLANG_WARN_ENUM_CONVERSION = YES;
789 | CLANG_WARN_INFINITE_RECURSION = YES;
790 | CLANG_WARN_INT_CONVERSION = YES;
791 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
792 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
793 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
794 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
795 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
796 | CLANG_WARN_STRICT_PROTOTYPES = YES;
797 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
798 | CLANG_WARN_UNREACHABLE_CODE = YES;
799 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
800 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
801 | COPY_PHASE_STRIP = NO;
802 | ENABLE_STRICT_OBJC_MSGSEND = YES;
803 | ENABLE_TESTABILITY = YES;
804 | GCC_C_LANGUAGE_STANDARD = gnu99;
805 | GCC_DYNAMIC_NO_PIC = NO;
806 | GCC_NO_COMMON_BLOCKS = YES;
807 | GCC_OPTIMIZATION_LEVEL = 0;
808 | GCC_PREPROCESSOR_DEFINITIONS = (
809 | "DEBUG=1",
810 | "$(inherited)",
811 | );
812 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
813 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
814 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
815 | GCC_WARN_UNDECLARED_SELECTOR = YES;
816 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
817 | GCC_WARN_UNUSED_FUNCTION = YES;
818 | GCC_WARN_UNUSED_VARIABLE = YES;
819 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
820 | MTL_ENABLE_DEBUG_INFO = YES;
821 | ONLY_ACTIVE_ARCH = YES;
822 | SDKROOT = iphoneos;
823 | };
824 | name = Debug;
825 | };
826 | 83CBBA211A601CBA00E9B192 /* Release */ = {
827 | isa = XCBuildConfiguration;
828 | buildSettings = {
829 | ALWAYS_SEARCH_USER_PATHS = NO;
830 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
831 | CLANG_CXX_LIBRARY = "libc++";
832 | CLANG_ENABLE_MODULES = YES;
833 | CLANG_ENABLE_OBJC_ARC = YES;
834 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
835 | CLANG_WARN_BOOL_CONVERSION = YES;
836 | CLANG_WARN_COMMA = YES;
837 | CLANG_WARN_CONSTANT_CONVERSION = YES;
838 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
839 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
840 | CLANG_WARN_EMPTY_BODY = YES;
841 | CLANG_WARN_ENUM_CONVERSION = YES;
842 | CLANG_WARN_INFINITE_RECURSION = YES;
843 | CLANG_WARN_INT_CONVERSION = YES;
844 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
845 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
846 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
847 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
848 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
849 | CLANG_WARN_STRICT_PROTOTYPES = YES;
850 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
851 | CLANG_WARN_UNREACHABLE_CODE = YES;
852 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
853 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
854 | COPY_PHASE_STRIP = YES;
855 | ENABLE_NS_ASSERTIONS = NO;
856 | ENABLE_STRICT_OBJC_MSGSEND = YES;
857 | GCC_C_LANGUAGE_STANDARD = gnu99;
858 | GCC_NO_COMMON_BLOCKS = YES;
859 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
860 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
861 | GCC_WARN_UNDECLARED_SELECTOR = YES;
862 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
863 | GCC_WARN_UNUSED_FUNCTION = YES;
864 | GCC_WARN_UNUSED_VARIABLE = YES;
865 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
866 | MTL_ENABLE_DEBUG_INFO = NO;
867 | SDKROOT = iphoneos;
868 | VALIDATE_PRODUCT = YES;
869 | };
870 | name = Release;
871 | };
872 | /* End XCBuildConfiguration section */
873 |
874 | /* Begin XCConfigurationList section */
875 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "imagefiltersTests" */ = {
876 | isa = XCConfigurationList;
877 | buildConfigurations = (
878 | 00E356F61AD99517003FC87E /* Debug */,
879 | 00E356F71AD99517003FC87E /* Release */,
880 | );
881 | defaultConfigurationIsVisible = 0;
882 | defaultConfigurationName = Release;
883 | };
884 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "imagefilters" */ = {
885 | isa = XCConfigurationList;
886 | buildConfigurations = (
887 | 13B07F941A680F5B00A75B9A /* Debug */,
888 | 13B07F951A680F5B00A75B9A /* Release */,
889 | );
890 | defaultConfigurationIsVisible = 0;
891 | defaultConfigurationName = Release;
892 | };
893 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "imagefilters-tvOS" */ = {
894 | isa = XCConfigurationList;
895 | buildConfigurations = (
896 | 2D02E4971E0B4A5E006451C7 /* Debug */,
897 | 2D02E4981E0B4A5E006451C7 /* Release */,
898 | );
899 | defaultConfigurationIsVisible = 0;
900 | defaultConfigurationName = Release;
901 | };
902 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "imagefilters-tvOSTests" */ = {
903 | isa = XCConfigurationList;
904 | buildConfigurations = (
905 | 2D02E4991E0B4A5E006451C7 /* Debug */,
906 | 2D02E49A1E0B4A5E006451C7 /* Release */,
907 | );
908 | defaultConfigurationIsVisible = 0;
909 | defaultConfigurationName = Release;
910 | };
911 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "imagefilters" */ = {
912 | isa = XCConfigurationList;
913 | buildConfigurations = (
914 | 83CBBA201A601CBA00E9B192 /* Debug */,
915 | 83CBBA211A601CBA00E9B192 /* Release */,
916 | );
917 | defaultConfigurationIsVisible = 0;
918 | defaultConfigurationName = Release;
919 | };
920 | /* End XCConfigurationList section */
921 | };
922 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
923 | }
924 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters.xcodeproj/xcshareddata/xcschemes/imagefilters-tvOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
92 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
113 |
119 |
120 |
121 |
122 |
124 |
125 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters.xcodeproj/xcshareddata/xcschemes/imagefilters.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
92 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
113 |
119 |
120 |
121 |
122 |
124 |
125 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 | #import
11 |
12 | @interface AppDelegate : UMAppDelegateWrapper
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import "AppDelegate.h"
9 |
10 | #import
11 | #import
12 | #import
13 |
14 | #import
15 | #import
16 | #import
17 |
18 | @interface AppDelegate ()
19 |
20 | @property (nonatomic, strong) UMModuleRegistryAdapter *moduleRegistryAdapter;
21 |
22 | @end
23 |
24 | @implementation AppDelegate
25 |
26 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
27 | {
28 | self.moduleRegistryAdapter = [[UMModuleRegistryAdapter alloc] initWithModuleRegistryProvider:[[UMModuleRegistryProvider alloc] init]];
29 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
30 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
31 | moduleName:@"imagefilters"
32 | initialProperties:nil];
33 |
34 | if (@available(iOS 13.0, *)) {
35 | rootView.backgroundColor = [UIColor systemBackgroundColor];
36 | } else {
37 | rootView.backgroundColor = [UIColor whiteColor];
38 | }
39 |
40 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
41 | UIViewController *rootViewController = [UIViewController new];
42 | rootViewController.view = rootView;
43 | self.window.rootViewController = rootViewController;
44 | [self.window makeKeyAndVisible];
45 | [super application:application didFinishLaunchingWithOptions:launchOptions];
46 | return YES;
47 | }
48 |
49 | - (NSArray> *)extraModulesForBridge:(RCTBridge *)bridge
50 | {
51 | NSArray> *extraModules = [_moduleRegistryAdapter extraModulesForBridge:bridge];
52 | // If you'd like to export some custom RCTBridgeModules that are not Expo modules, add them here!
53 | return extraModules;
54 | }
55 |
56 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
57 | {
58 | #if DEBUG
59 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
60 | #else
61 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
62 | #endif
63 | }
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters/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 | }
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | imagefilters
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSAllowsArbitraryLoads
30 |
31 | NSExceptionDomains
32 |
33 | localhost
34 |
35 | NSExceptionAllowsInsecureHTTPLoads
36 |
37 |
38 |
39 |
40 | NSLocationWhenInUseUsageDescription
41 |
42 | UILaunchStoryboardName
43 | LaunchScreen
44 | UIRequiredDeviceCapabilities
45 |
46 | armv7
47 |
48 | UISupportedInterfaceOrientations
49 |
50 | UIInterfaceOrientationPortrait
51 | UIInterfaceOrientationLandscapeLeft
52 | UIInterfaceOrientationLandscapeRight
53 |
54 | UIViewControllerBasedStatusBarAppearance
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefilters/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 |
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefiltersTests/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 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/react-native/ios/imagefiltersTests/imagefiltersTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 |
11 | #import
12 | #import
13 |
14 | #define TIMEOUT_SECONDS 600
15 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
16 |
17 | @interface imagefiltersTests : XCTestCase
18 |
19 | @end
20 |
21 | @implementation imagefiltersTests
22 |
23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
24 | {
25 | if (test(view)) {
26 | return YES;
27 | }
28 | for (UIView *subview in [view subviews]) {
29 | if ([self findSubviewInView:subview matching:test]) {
30 | return YES;
31 | }
32 | }
33 | return NO;
34 | }
35 |
36 | - (void)testRendersWelcomeScreen
37 | {
38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
40 | BOOL foundElement = NO;
41 |
42 | __block NSString *redboxError = nil;
43 | #ifdef DEBUG
44 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
45 | if (level >= RCTLogLevelError) {
46 | redboxError = message;
47 | }
48 | });
49 | #endif
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 | #ifdef DEBUG
64 | RCTSetLogFunction(RCTDefaultLogFunction);
65 | #endif
66 |
67 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
68 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
69 | }
70 |
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/examples/react-native/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | module.exports = {
9 | transformer: {
10 | getTransformOptions: async () => ({
11 | transform: {
12 | experimentalImportSupport: false,
13 | inlineRequires: false,
14 | },
15 | }),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/examples/react-native/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "imagefilters",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "start": "react-native start",
9 | "test": "jest",
10 | "lint": "eslint ."
11 | },
12 | "dependencies": {
13 | "gl-react": "^4.0.1",
14 | "gl-react-native": "^4.0.1",
15 | "native-base": "^2.15.2",
16 | "react": "16.9.0",
17 | "react-native": "0.61.5",
18 | "react-native-gl-image-filters": "^0.4.0",
19 | "react-native-unimodules": "^0.13.3"
20 | },
21 | "devDependencies": {
22 | "@babel/core": "^7.8.4",
23 | "@babel/runtime": "^7.8.4",
24 | "@react-native-community/eslint-config": "^0.0.7",
25 | "babel-jest": "^25.1.0",
26 | "eslint": "^6.8.0",
27 | "jest": "^25.1.0",
28 | "metro-react-native-babel-preset": "^0.58.0",
29 | "react-test-renderer": "16.9.0"
30 | },
31 | "jest": {
32 | "preset": "react-native"
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/examples/web/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/examples/web/README.md:
--------------------------------------------------------------------------------
1 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
2 |
3 | ## Available Scripts
4 |
5 | In the project directory, you can run:
6 |
7 | ### `yarn start`
8 |
9 | Runs the app in the development mode.
10 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
11 |
12 | The page will reload if you make edits.
13 | You will also see any lint errors in the console.
14 |
15 | ### `yarn test`
16 |
17 | Launches the test runner in the interactive watch mode.
18 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
19 |
20 | ### `yarn build`
21 |
22 | Builds the app for production to the `build` folder.
23 | It correctly bundles React in production mode and optimizes the build for the best performance.
24 |
25 | The build is minified and the filenames include the hashes.
26 | Your app is ready to be deployed!
27 |
28 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
29 |
30 | ### `yarn eject`
31 |
32 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
33 |
34 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
35 |
36 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
37 |
38 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
39 |
40 | ## Learn More
41 |
42 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
43 |
44 | To learn React, check out the [React documentation](https://reactjs.org/).
45 |
46 | ### Code Splitting
47 |
48 | This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
49 |
50 | ### Analyzing the Bundle Size
51 |
52 | This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
53 |
54 | ### Making a Progressive Web App
55 |
56 | This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
57 |
58 | ### Advanced Configuration
59 |
60 | This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
61 |
62 | ### Deployment
63 |
64 | This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
65 |
66 | ### `yarn build` fails to minify
67 |
68 | This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
69 |
--------------------------------------------------------------------------------
/examples/web/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example-web",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@material-ui/core": "^4.9.8",
7 | "gl-react": "^4.0.1",
8 | "gl-react-dom": "^4.0.1",
9 | "react": "^16.13.1",
10 | "react-color": "^2.19.3",
11 | "react-dom": "^16.13.1",
12 | "react-native-gl-image-filters": "file:../../",
13 | "react-native-web": "^0.12.2",
14 | "react-scripts": "4.0.2"
15 | },
16 | "scripts": {
17 | "preinstall": "cd ../.. && npm run compile",
18 | "start": "react-scripts start",
19 | "build": "react-scripts build",
20 | "test": "react-scripts test",
21 | "eject": "react-scripts eject"
22 | },
23 | "eslintConfig": {
24 | "extends": "react-app"
25 | },
26 | "browserslist": {
27 | "production": [
28 | ">0.2%",
29 | "not dead",
30 | "not op_mini all"
31 | ],
32 | "development": [
33 | "last 1 chrome version",
34 | "last 1 firefox version",
35 | "last 1 safari version"
36 | ]
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/examples/web/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/web/public/favicon.ico
--------------------------------------------------------------------------------
/examples/web/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 |
28 |
29 |
30 | React App
31 |
32 |
33 |
34 |
35 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/examples/web/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/web/public/logo192.png
--------------------------------------------------------------------------------
/examples/web/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/2ea2950d929cf691fe5e57734ce4d5fdddfa34ec/examples/web/public/logo512.png
--------------------------------------------------------------------------------
/examples/web/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/examples/web/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/examples/web/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | --width: 400px;
3 | background-color: white;
4 | min-height: 100vh;
5 | display: flex;
6 | flex-direction: column;
7 | align-items: center;
8 | }
9 | .App-header {
10 | padding: 15px 0 15px 0;
11 | }
12 | .App-slider {
13 | width: 200px;
14 | }
15 | .App-button {
16 | width: var(--width);
17 | margin-top: 15px !important;
18 | }
--------------------------------------------------------------------------------
/examples/web/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Surface } from 'gl-react-dom';
3 | import { AppBar, Button, Toolbar, Typography } from '@material-ui/core';
4 |
5 | import ImageFilters, { Constants } from 'react-native-gl-image-filters';
6 |
7 | import Filter from './Filter';
8 |
9 | import './App.css';
10 |
11 | const SURFACE_SIZE = 300;
12 |
13 | const settings = [
14 | {
15 | name: 'hue',
16 | minValue: -100.0,
17 | maxValue: 100.0,
18 | },
19 | {
20 | name: 'blur',
21 | maxValue: 6.0,
22 | },
23 | {
24 | name: 'sepia',
25 | maxValue: 2.0,
26 | },
27 | {
28 | name: 'sharpen',
29 | maxValue: 2.0,
30 | },
31 | {
32 | name: 'negative',
33 | maxValue: 2.0,
34 | },
35 | {
36 | name: 'contrast',
37 | maxValue: 2.0,
38 | },
39 | {
40 | name: 'saturation',
41 | maxValue: 2.0,
42 | },
43 | {
44 | name: 'brightness',
45 | maxValue: 2.0,
46 | },
47 | {
48 | name: 'temperature',
49 | minValue: 1000.0,
50 | maxValue: 40000.0,
51 | },
52 | {
53 | name: 'exposure',
54 | step: 0.05,
55 | minValue: -1.0,
56 | maxValue: 1.0,
57 | },
58 | {
59 | component: 'Spacer',
60 | },
61 | {
62 | name: 'colorOverlay',
63 | component: 'ColorPicker',
64 | }
65 | ];
66 |
67 | export default class App extends Component {
68 | constructor(props) {
69 | super(props);
70 |
71 | this.state = {
72 | ...settings,
73 | ...Constants.DefaultValues,
74 | };
75 | };
76 |
77 | saveImage = () => {
78 | if (!this.image) return;
79 |
80 | const result = this.image.captureAsDataURL()
81 | console.warn(result);
82 | };
83 |
84 | resetImage = () => {
85 | this.setState({
86 | ...Constants.DefaultValues,
87 | });
88 | }
89 |
90 | render() {
91 | return (
92 |
93 |
94 |
95 |
96 | Image Filters
97 |
98 |
99 |
100 |
101 | (this.image = ref)}
103 | width={SURFACE_SIZE}
104 | height={SURFACE_SIZE}
105 | webglContextAttributes={{preserveDrawingBuffer: true}}
106 | >
107 |
112 | https://i.imgur.com/5EOyTDQ.jpg
113 |
114 |
115 |
116 | {settings.map(filter => (
117 |
this.setState({[filter.name]: value})}
126 | />
127 | ))}
128 |
136 |
144 |
145 | );
146 | }
147 | }
148 |
--------------------------------------------------------------------------------
/examples/web/src/Filter.js:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react';
2 | import { Slider } from '@material-ui/core';
3 | import { ChromePicker } from 'react-color';
4 |
5 | const Container = ({ name, children }) => (
6 |
7 |
{name}
8 | {children}
9 |
29 |
30 | );
31 |
32 | export const ColorPicker = ({
33 | value,
34 | onChange
35 | }) => {
36 | const [isPickerVisible, setPickerVisible] = useState(false);
37 |
38 | const handleClick = () => {
39 | setPickerVisible(true);
40 | };
41 |
42 | const handleClose = () => {
43 | setPickerVisible(false);
44 | }
45 |
46 | const handleChange = (color) => {
47 | const { rgb } = color;
48 |
49 | onChange([rgb.r, rgb.g, rgb.b, rgb.a]);
50 | }
51 |
52 | return (
53 | <>
54 |
55 | {
56 | isPickerVisible ?
57 |
69 | : null
70 | }
71 |
85 | >
86 | );
87 | }
88 |
89 | export default ({
90 | name,
91 | value,
92 | defaultValue,
93 | minimum = 0,
94 | maximum,
95 | step = 0.1,
96 | component = 'Slider',
97 | onChange
98 | }) => {
99 | const renderComponent = () => {
100 | if (component === 'Spacer') {
101 | return null;
102 | }
103 |
104 | if (component === 'Slider') {
105 | return (
106 | onChange(value)}
115 | />
116 | )
117 | }
118 |
119 | if (component === 'ColorPicker') {
120 | return (
121 |
125 | )
126 | }
127 |
128 | return null;
129 | }
130 |
131 | return (
132 |
133 | {renderComponent()}
134 |
135 | );
136 | }
137 |
--------------------------------------------------------------------------------
/examples/web/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
--------------------------------------------------------------------------------
/examples/web/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import * as serviceWorker from './serviceWorker';
6 |
7 | ReactDOM.render(
8 |
9 |
10 | ,
11 | document.getElementById('root')
12 | );
13 |
14 | // If you want your app to work offline and load faster, you can change
15 | // unregister() to register() below. Note this comes with some pitfalls.
16 | // Learn more about service workers: https://bit.ly/CRA-PWA
17 | serviceWorker.unregister();
18 |
--------------------------------------------------------------------------------
/examples/web/src/serviceWorker.js:
--------------------------------------------------------------------------------
1 | // This optional code is used to register a service worker.
2 | // register() is not called by default.
3 |
4 | // This lets the app load faster on subsequent visits in production, and gives
5 | // it offline capabilities. However, it also means that developers (and users)
6 | // will only see deployed updates on subsequent visits to a page, after all the
7 | // existing tabs open on the page have been closed, since previously cached
8 | // resources are updated in the background.
9 |
10 | // To learn more about the benefits of this model and instructions on how to
11 | // opt-in, read https://bit.ly/CRA-PWA
12 |
13 | const isLocalhost = Boolean(
14 | window.location.hostname === 'localhost' ||
15 | // [::1] is the IPv6 localhost address.
16 | window.location.hostname === '[::1]' ||
17 | // 127.0.0.0/8 are considered localhost for IPv4.
18 | window.location.hostname.match(
19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
20 | )
21 | );
22 |
23 | export function register(config) {
24 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
25 | // The URL constructor is available in all browsers that support SW.
26 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
27 | if (publicUrl.origin !== window.location.origin) {
28 | // Our service worker won't work if PUBLIC_URL is on a different origin
29 | // from what our page is served on. This might happen if a CDN is used to
30 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374
31 | return;
32 | }
33 |
34 | window.addEventListener('load', () => {
35 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
36 |
37 | if (isLocalhost) {
38 | // This is running on localhost. Let's check if a service worker still exists or not.
39 | checkValidServiceWorker(swUrl, config);
40 |
41 | // Add some additional logging to localhost, pointing developers to the
42 | // service worker/PWA documentation.
43 | navigator.serviceWorker.ready.then(() => {
44 | console.log(
45 | 'This web app is being served cache-first by a service ' +
46 | 'worker. To learn more, visit https://bit.ly/CRA-PWA'
47 | );
48 | });
49 | } else {
50 | // Is not localhost. Just register service worker
51 | registerValidSW(swUrl, config);
52 | }
53 | });
54 | }
55 | }
56 |
57 | function registerValidSW(swUrl, config) {
58 | navigator.serviceWorker
59 | .register(swUrl)
60 | .then(registration => {
61 | registration.onupdatefound = () => {
62 | const installingWorker = registration.installing;
63 | if (installingWorker == null) {
64 | return;
65 | }
66 | installingWorker.onstatechange = () => {
67 | if (installingWorker.state === 'installed') {
68 | if (navigator.serviceWorker.controller) {
69 | // At this point, the updated precached content has been fetched,
70 | // but the previous service worker will still serve the older
71 | // content until all client tabs are closed.
72 | console.log(
73 | 'New content is available and will be used when all ' +
74 | 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
75 | );
76 |
77 | // Execute callback
78 | if (config && config.onUpdate) {
79 | config.onUpdate(registration);
80 | }
81 | } else {
82 | // At this point, everything has been precached.
83 | // It's the perfect time to display a
84 | // "Content is cached for offline use." message.
85 | console.log('Content is cached for offline use.');
86 |
87 | // Execute callback
88 | if (config && config.onSuccess) {
89 | config.onSuccess(registration);
90 | }
91 | }
92 | }
93 | };
94 | };
95 | })
96 | .catch(error => {
97 | console.error('Error during service worker registration:', error);
98 | });
99 | }
100 |
101 | function checkValidServiceWorker(swUrl, config) {
102 | // Check if the service worker can be found. If it can't reload the page.
103 | fetch(swUrl, {
104 | headers: { 'Service-Worker': 'script' },
105 | })
106 | .then(response => {
107 | // Ensure service worker exists, and that we really are getting a JS file.
108 | const contentType = response.headers.get('content-type');
109 | if (
110 | response.status === 404 ||
111 | (contentType != null && contentType.indexOf('javascript') === -1)
112 | ) {
113 | // No service worker found. Probably a different app. Reload the page.
114 | navigator.serviceWorker.ready.then(registration => {
115 | registration.unregister().then(() => {
116 | window.location.reload();
117 | });
118 | });
119 | } else {
120 | // Service worker found. Proceed as normal.
121 | registerValidSW(swUrl, config);
122 | }
123 | })
124 | .catch(() => {
125 | console.log(
126 | 'No internet connection found. App is running in offline mode.'
127 | );
128 | });
129 | }
130 |
131 | export function unregister() {
132 | if ('serviceWorker' in navigator) {
133 | navigator.serviceWorker.ready
134 | .then(registration => {
135 | registration.unregister();
136 | })
137 | .catch(error => {
138 | console.error(error.message);
139 | });
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/index.d.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | import * as React from 'react';
3 |
4 | export type IFiltersProps = {
5 | /**
6 | * Value of hue
7 | */
8 | hue?: number;
9 | /**
10 | * Value of blur
11 | */
12 | blur?: number,
13 | /**
14 | * Value of sepia
15 | */
16 | sepia?: number,
17 | /**
18 | * Value of sharpen
19 | */
20 | sharpen?: number,
21 | /**
22 | * Value of negative
23 | */
24 | negative?: number,
25 | /**
26 | * Value of contrast
27 | */
28 | contrast?: number,
29 | /**
30 | * Value of saturation
31 | */
32 | saturation?: number,
33 | /**
34 | * Value of brightness
35 | */
36 | brightness?: number,
37 | /**
38 | * Value of temperature
39 | */
40 | temperature?: number,
41 | /**
42 | * Value of exposure
43 | */
44 | exposure?: number,
45 | /**
46 | * Value of color overlay
47 | */
48 | colorOverlay?: Array,
49 | }
50 |
51 | export type IImageFiltersProps = IFiltersProps & {
52 | /**
53 | * A floating-point number that determines width of image container
54 | */
55 | width: number;
56 | /**
57 | * A floating-point number that determines height of image container
58 | */
59 | height: number;
60 | /**
61 | * Content of the overlay
62 | */
63 | children: React.ReactElement | { uri: string };
64 | }
65 |
66 | export default function ImageFilters(props: IImageFiltersProps): React.ReactElement<{}>;
67 |
68 | type IDefaultPreset = {
69 | name: string;
70 | description: string;
71 | preset: IFiltersProps;
72 | }
73 |
74 | export interface Constants {
75 | DefaultValues: Required;
76 | DefaultPresets: Array;
77 | }
78 |
79 | export interface Presets {
80 | NoPreset: IFiltersProps;
81 | AmaroPreset: IFiltersProps;
82 | ClarendonPreset: IFiltersProps;
83 | DogpatchPreset: IFiltersProps;
84 | GinghamPreset: IFiltersProps;
85 | GinzaPreset: IFiltersProps;
86 | HefePreset: IFiltersProps;
87 | LudwigPreset: IFiltersProps;
88 | SkylinePreset: IFiltersProps;
89 | SlumberPreset: IFiltersProps;
90 | SierraPreset: IFiltersProps;
91 | StinsonPreset: IFiltersProps;
92 | }
93 |
94 | export interface Utils {
95 | createPreset: (properties: IFiltersProps) => IFiltersProps;
96 | }
97 |
98 | export default function ImageFilters(props: IImageFiltersProps): React.ReactElement<{}>;
99 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-gl-image-filters",
3 | "version": "0.5.0",
4 | "description": "React-Native image filters using gl-react",
5 | "main": "lib/index.js",
6 | "types": "index.d.ts",
7 | "scripts": {
8 | "lint": "eslint src",
9 | "compile": "rm -rf lib/ && babel --presets es2015,stage-1,react,minify --source-maps -d lib src",
10 | "prepublish": "npm run compile"
11 | },
12 | "repository": {
13 | "type": "git",
14 | "url": "git+https://github.com/GregoryNative/react-native-gl-image-filters.git"
15 | },
16 | "author": "Gregory ",
17 | "license": "MIT",
18 | "bugs": {
19 | "url": "https://github.com/GregoryNative/react-native-gl-image-filters/issues"
20 | },
21 | "homepage": "https://github.com/GregoryNative/react-native-gl-image-filters#readme",
22 | "peerDependencies": {
23 | "buffer": "^5.4.3",
24 | "gl-react": "^4.0.1",
25 | "gl-react-dom": "^4.0.1",
26 | "gl-react-native": "^4.0.1",
27 | "react": "*",
28 | "react-native-unimodules": "^0.7.0"
29 | },
30 | "devDependencies": {
31 | "babel-cli": "6.4.5",
32 | "babel-eslint": "^10.1.0",
33 | "babel-preset-es2015": "6.3.13",
34 | "babel-preset-minify": "0.5.1",
35 | "babel-preset-react": "6.3.13",
36 | "babel-preset-stage-1": "6.3.13",
37 | "eslint": "^7.18.0",
38 | "eslint-plugin-import": "^2.22.1",
39 | "eslint-plugin-react": "^7.22.0"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/ImageFiltersComponent.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Shaders, Node, GLSL } from 'gl-react';
3 |
4 | import Sepia from './filters/Sepia';
5 | import Hue from './filters/Hue';
6 | import Blur from './filters/Blur';
7 | import Sharpen from './filters/Sharpen';
8 | import Negative from './filters/Negative';
9 | import Temperature from './filters/Temperature';
10 | import ContrastSaturationBrightness from './filters/ContrastSaturationBrightness';
11 | import Exposure from './filters/Exposure';
12 | import ColorOverlay from './filters/ColorOverlay';
13 |
14 | import { isUndefinedOrNull } from './utils/isUndefinedOrNull';
15 | import { createConditionalWrapper } from './utils/createConditionalWrapper';
16 |
17 | const ImageFiltersComponent = ({
18 | children,
19 | width,
20 | height,
21 | hue,
22 | blur,
23 | sepia,
24 | sharpen,
25 | negative,
26 | contrast,
27 | saturation,
28 | brightness,
29 | temperature,
30 | exposure,
31 | colorOverlay
32 | }) => {
33 | const SepiaConditional = createConditionalWrapper({
34 | FilterComponent: Sepia,
35 | condition: isUndefinedOrNull(sepia),
36 | factor: sepia,
37 | });
38 |
39 | const HueConditional = createConditionalWrapper({
40 | FilterComponent: Hue,
41 | condition: isUndefinedOrNull(hue),
42 | factor: hue,
43 | });
44 |
45 | const ExposureConditional = createConditionalWrapper({
46 | FilterComponent: Exposure,
47 | condition: isUndefinedOrNull(exposure),
48 | exposure,
49 | });
50 |
51 | const NegativeConditional = createConditionalWrapper({
52 | FilterComponent: Negative,
53 | condition: isUndefinedOrNull(negative),
54 | factor: negative,
55 | });
56 |
57 | const TemperatureConditional = createConditionalWrapper({
58 | FilterComponent: Temperature,
59 | condition: isUndefinedOrNull(temperature),
60 | factor: temperature,
61 | });
62 |
63 | const ContrastSaturationBrightnessConditional = createConditionalWrapper({
64 | FilterComponent: ContrastSaturationBrightness,
65 | condition: isUndefinedOrNull(contrast) || isUndefinedOrNull(saturation) || isUndefinedOrNull(brightness),
66 | contrast,
67 | saturation,
68 | brightness,
69 | });
70 |
71 | const ColorOverlayConditional = createConditionalWrapper({
72 | FilterComponent: ColorOverlay,
73 | condition: isUndefinedOrNull(colorOverlay),
74 | factor: colorOverlay,
75 | });
76 |
77 | const BlurConditional = createConditionalWrapper({
78 | FilterComponent: Blur,
79 | condition: isUndefinedOrNull(blur),
80 | factor: blur,
81 | passes: 4,
82 | height,
83 | width,
84 | });
85 |
86 | const SharpenConditional = createConditionalWrapper({
87 | FilterComponent: Sharpen,
88 | condition: isUndefinedOrNull(sharpen),
89 | factor: sharpen,
90 | height,
91 | width,
92 | });
93 |
94 | return (
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 | {children}
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 | );
115 | };
116 |
117 | export default ImageFiltersComponent;
118 |
--------------------------------------------------------------------------------
/src/constants/DefaultValues.js:
--------------------------------------------------------------------------------
1 | import { DefaultValue as SepiaDefaultValue } from '../filters/Sepia';
2 | import { DefaultValue as HueDefaultValue } from '../filters/Hue';
3 | import { DefaultValue as BlurDefaultValue } from '../filters/Blur';
4 | import { DefaultValue as SharpenDefaultValue } from '../filters/Sharpen';
5 | import { DefaultValue as NegativeDefaultValue } from '../filters/Negative';
6 | import { DefaultValue as TemperatureDefaultValue } from '../filters/Temperature';
7 | import { DefaultValue as ContrastSaturationBrightnessDefaultValue } from '../filters/ContrastSaturationBrightness';
8 | import { DefaultValue as ExposureDefaultValue } from '../filters/Exposure';
9 | import { DefaultValue as ColorOverlayDefaultValue } from '../filters/ColorOverlay';
10 |
11 | const DefaultValues = Object.freeze({
12 | sepia: SepiaDefaultValue,
13 | hue: HueDefaultValue,
14 | blur: BlurDefaultValue,
15 | sharpen: SharpenDefaultValue,
16 | negative: NegativeDefaultValue,
17 | temperature: TemperatureDefaultValue,
18 | brightness: ContrastSaturationBrightnessDefaultValue.brightness,
19 | contrast: ContrastSaturationBrightnessDefaultValue.contrast,
20 | saturation: ContrastSaturationBrightnessDefaultValue.saturation,
21 | exposure: ExposureDefaultValue,
22 | colorOverlay: ColorOverlayDefaultValue,
23 | });
24 |
25 | export default DefaultValues;
26 |
--------------------------------------------------------------------------------
/src/constants/Presets.js:
--------------------------------------------------------------------------------
1 | import { default as AmaroPreset } from '../presets/AmaroPreset';
2 | import { default as ClarendonPreset } from '../presets/ClarendonPreset';
3 | import { default as DogpatchPreset } from '../presets/DogpatchPreset';
4 | import { default as GinghamPreset } from '../presets/GinghamPreset';
5 | import { default as GinzaPreset } from '../presets/GinzaPreset';
6 | import { default as HefePreset } from '../presets/HefePreset';
7 | import { default as LudwigPreset } from '../presets/LudwigPreset';
8 | import { default as SierraPreset } from '../presets/SierraPreset';
9 | import { default as SkylinePreset } from '../presets/SkylinePreset';
10 | import { default as SlumberPreset } from '../presets/SlumberPreset';
11 | import { default as StinsonPreset } from '../presets/StinsonPreset';
12 |
13 | function Preset(name, description, preset) {
14 | return { name, description, preset };
15 | }
16 |
17 | const DefaultPresets = [
18 | Preset('Amaro', 'Adds light to an image, with the focus on the centre', AmaroPreset),
19 | Preset('Clarendon', 'Adds light to lighter areas and dark to darker areas', ClarendonPreset),
20 | Preset('Dogpatch', 'Increases the contrast, while washing out the lighter colors', DogpatchPreset),
21 | Preset('Gingham', 'Vintage-inspired, taking some color out', GinghamPreset),
22 | Preset('Ginza', 'Brightens and adds a warm glow', GinzaPreset),
23 | Preset('Hefe', 'High contrast and saturation, with a similar effect to Lo-Fi but not quite as dramatic', HefePreset),
24 | Preset('Ludwig', 'A slight hint of desaturation that also enhances light', LudwigPreset),
25 | Preset('Sierra', 'Gives a faded, softer look', SierraPreset),
26 | Preset('Skyline', 'Brightens to the image pop', SkylinePreset),
27 | Preset('Slumber', 'Desaturates the image as well as adds haze for a retro, dreamy look – with an emphasis on blacks and blues', SlumberPreset),
28 | Preset('Stinson', 'Washing out the colors ever so slightly', StinsonPreset),
29 | ];
30 |
31 | export default DefaultPresets;
32 |
--------------------------------------------------------------------------------
/src/constants/index.js:
--------------------------------------------------------------------------------
1 | import DefaultValues from './DefaultValues';
2 | import DefaultPresets from './Presets';
3 |
4 | const Constants = Object.freeze({
5 | DefaultValues,
6 | DefaultPresets,
7 | });
8 |
9 | export default Constants;
10 |
--------------------------------------------------------------------------------
/src/filters/Blur.js:
--------------------------------------------------------------------------------
1 | import { Shaders, Node, GLSL } from 'gl-react';
2 | import React from 'react';
3 |
4 | import directionForPassDefault from '../utils/directionForPassDefault';
5 |
6 | const shaders = Shaders.create({
7 | blur: {
8 | frag: GLSL`
9 | precision highp float;
10 | varying vec2 uv;
11 | uniform sampler2D t;
12 | uniform vec2 direction, resolution;
13 |
14 | vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) {
15 | vec4 color = vec4(0.0);
16 | vec2 off1 = vec2(1.3846153846) * direction;
17 | vec2 off2 = vec2(3.2307692308) * direction;
18 | color += texture2D(image, uv) * 0.2270270270;
19 | color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162;
20 | color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162;
21 | color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703;
22 | color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703;
23 | return color;
24 | }
25 |
26 | void main () {
27 | gl_FragColor = blur9(t, uv, resolution, direction);
28 | }
29 | `
30 | }
31 | });
32 |
33 | export const DefaultValue = 0;
34 |
35 | export default function Blur({
36 | width,
37 | height,
38 | factor = DefaultValue,
39 | children,
40 | passes = 2,
41 | directionForPass = directionForPassDefault
42 | }) {
43 | const rec = pass =>
44 | pass <= 0 ? (
45 | children
46 | ) : (
47 |
57 | );
58 |
59 | return rec(passes);
60 | }
61 |
--------------------------------------------------------------------------------
/src/filters/ColorOverlay.js:
--------------------------------------------------------------------------------
1 | import { Shaders, Node, GLSL } from 'gl-react';
2 | import React from 'react';
3 |
4 | import * as ShadersFunctions from '../utils/shaders-functions';
5 |
6 | const shaders = Shaders.create({
7 | ColorOverlay: {
8 | frag: GLSL`
9 | precision highp float;
10 |
11 | varying vec2 uv;
12 | uniform sampler2D t;
13 | uniform vec4 factor;
14 |
15 | ${ShadersFunctions.Mix}
16 | ${ShadersFunctions.ClampRGBVec3}
17 |
18 | void main() {
19 | vec4 c = texture2D(t, uv);
20 |
21 | vec3 passedColor = ClampRGBVec3(factor.rgb);
22 | gl_FragColor = vec4(Mix(c.rgb, passedColor, factor.a), 1.0);
23 | }
24 | `
25 | }
26 | });
27 |
28 | export const DefaultValue = [.0, .0, .0, .0];
29 |
30 | export default function ColorOverlay({
31 | factor = DefaultValue,
32 | children: t
33 | }) {
34 | return (
35 |
42 | )
43 | }
44 |
--------------------------------------------------------------------------------
/src/filters/ContrastSaturationBrightness.js:
--------------------------------------------------------------------------------
1 | import { Shaders, Node, GLSL } from 'gl-react';
2 | import React from 'react';
3 |
4 | const shaders = Shaders.create({
5 | csb: {
6 | frag: GLSL`
7 | precision highp float;
8 | varying vec2 uv;
9 | uniform sampler2D t;
10 |
11 | uniform float contrast;
12 | uniform float saturation;
13 | uniform float brightness;
14 |
15 | const vec3 L = vec3(0.2125, 0.7154, 0.0721);
16 |
17 | void main() {
18 | vec4 c = texture2D(t, uv);
19 | vec3 brt = c.rgb * brightness;
20 | gl_FragColor = vec4(
21 | mix(
22 | vec3(0.5),
23 | mix(vec3(dot(brt, L)), brt, saturation),
24 | contrast
25 | ),
26 | c.a
27 | );
28 | }
29 | `
30 | }
31 | });
32 |
33 | export const DefaultValue = Object.freeze({
34 | brightness: 1,
35 | contrast: 1,
36 | saturation: 1,
37 | });
38 |
39 | export default function ContrastSaturationBrightness({
40 | brightness = DefaultValue.brightness,
41 | contrast = DefaultValue.contrast,
42 | saturation = DefaultValue.saturation,
43 | children: t
44 | }) {
45 | return (
46 |
55 | )
56 | }
57 |
--------------------------------------------------------------------------------
/src/filters/Exposure.js:
--------------------------------------------------------------------------------
1 | import { Shaders, Node, GLSL } from 'gl-react';
2 | import React from 'react';
3 |
4 | import * as ShadersFunctions from '../utils/shaders-functions';
5 |
6 | const shaders = Shaders.create({
7 | exposure: {
8 | frag: GLSL`
9 | precision highp float;
10 | varying vec2 uv;
11 | float gamma = 0.0;
12 |
13 | uniform sampler2D t;
14 | uniform float factor;
15 |
16 | ${ShadersFunctions.ramp}
17 | ${ShadersFunctions.Lum}
18 | ${ShadersFunctions.ClipColor}
19 | ${ShadersFunctions.SetLum}
20 | ${ShadersFunctions.Sat}
21 | ${ShadersFunctions.SetSat}
22 |
23 | vec3 Exposure(vec3 base, float exposure, float gamma) {
24 | float amt = mix(0.009, 0.98, exposure);
25 | vec3 res, blend;
26 |
27 | if (amt < 0.0) {
28 | res = mix(vec3(0.0), base, amt + 1.0);
29 | blend = mix(base, vec3(0.0), amt + 1.0);
30 | res = min(res / (1.0 - blend*0.9), 1.0);
31 | } else {
32 | res = mix(base, vec3(1.0), amt);
33 | blend = mix(vec3(1.0), pow(base, vec3(1.0/0.7)), amt);
34 | res = max(1.0 - ((1.0 - res) / blend), 0.0);
35 | }
36 |
37 | return pow(
38 | SetLum(SetSat(base, Sat(res)), Lum(res)),
39 | vec3(ramp(1.0 - (gamma + 1.0) / 2.0))
40 | );
41 | }
42 |
43 | void main() {
44 | float exposure = factor;
45 | vec4 c = texture2D(t, uv);
46 | vec3 result = c.rgb;
47 |
48 | result = Exposure(result, exposure, gamma);
49 | result = mix(c.rgb, result, c.a);
50 |
51 | gl_FragColor = vec4(result, c.a);
52 | }
53 | `
54 | }
55 | });
56 |
57 | export const DefaultValue = 0;
58 |
59 | export default function Exposure({ exposure = DefaultValue, children: t }) {
60 | return (
61 |
68 | )
69 | }
70 |
--------------------------------------------------------------------------------
/src/filters/Hue.js:
--------------------------------------------------------------------------------
1 | import { Shaders, Node, GLSL } from 'gl-react';
2 | import React from 'react';
3 |
4 | const shaders = Shaders.create({
5 | hue: {
6 | frag: GLSL`
7 | precision highp float;
8 | varying vec2 uv;
9 | uniform sampler2D t;
10 | uniform float hue;
11 |
12 | const mat3 rgb2yiq = mat3(0.299, 0.587, 0.114, 0.595716, -0.274453, -0.321263, 0.211456, -0.522591, 0.311135);
13 | const mat3 yiq2rgb = mat3(1.0, 0.9563, 0.6210, 1.0, -0.2721, -0.6474, 1.0, -1.1070, 1.7046);
14 |
15 | void main() {
16 | vec4 c = texture2D(t, uv);
17 | vec3 yColor = rgb2yiq * c.rgb;
18 | float originalHue = atan(yColor.b, yColor.g);
19 | float finalHue = originalHue + hue;
20 | float chroma = sqrt(yColor.b*yColor.b+yColor.g*yColor.g);
21 | vec3 yFinalColor = vec3(yColor.r, chroma * cos(finalHue), chroma * sin(finalHue));
22 |
23 | gl_FragColor = vec4(yiq2rgb * yFinalColor, c.a);
24 | }
25 | `
26 | }
27 | });
28 |
29 | export const DefaultValue = 0;
30 |
31 | export default function Hue({ factor = DefaultValue, children: t }) {
32 | return (
33 |
40 | )
41 | }
42 |
--------------------------------------------------------------------------------
/src/filters/Negative.js:
--------------------------------------------------------------------------------
1 | import { Shaders, Node, GLSL } from 'gl-react';
2 | import React from 'react';
3 |
4 | const shaders = Shaders.create({
5 | negative: {
6 | frag: GLSL`
7 | precision highp float;
8 | varying vec2 uv;
9 | uniform sampler2D t;
10 | uniform float factor;
11 |
12 | void main() {
13 | vec4 c = texture2D(t, uv);
14 |
15 | gl_FragColor = vec4(mix(c.rgb, 1.0 - c.rgb, factor), c.a);
16 | }
17 | `
18 | }
19 | });
20 |
21 | export const DefaultValue = 0;
22 |
23 | export default function Negative({ factor = DefaultValue, children: t }) {
24 | return (
25 |
32 | )
33 | }
34 |
--------------------------------------------------------------------------------
/src/filters/Noop.js:
--------------------------------------------------------------------------------
1 | import { Shaders, Node, GLSL } from 'gl-react';
2 | import React from 'react';
3 |
4 | const shaders = Shaders.create({
5 | noop: {
6 | frag: GLSL`
7 | precision highp float;
8 | varying vec2 uv;
9 | uniform sampler2D t;
10 |
11 | void main() {
12 | gl_FragColor = texture2D(t, uv);
13 | }
14 | `
15 | }
16 | });
17 |
18 | export default function NoopFilter({ children: t }) {
19 | return (
20 |
26 | )
27 | }
28 |
--------------------------------------------------------------------------------
/src/filters/Sepia.js:
--------------------------------------------------------------------------------
1 | import { Shaders, Node, GLSL } from 'gl-react';
2 | import React from 'react';
3 |
4 | import mixArrays from '../utils/mixArrays';
5 |
6 | const shaders = Shaders.create({
7 | sepia: {
8 | frag: GLSL`
9 | precision highp float;
10 | varying vec2 uv;
11 | uniform sampler2D t;
12 | uniform mat4 sepia;
13 |
14 | void main () {
15 | gl_FragColor = sepia * texture2D(t, uv);
16 | }
17 | `
18 | }
19 | });
20 |
21 | export const DefaultValue = 0;
22 |
23 | export default function Sepia({ factor = DefaultValue, children: t }) {
24 | const sepia = mixArrays([
25 | 1, 0, 0, 0,
26 | 0, 1, 0, 0,
27 | 0, 0, 1, 0,
28 | 0, 0, 0, 1
29 | ], [
30 | .3, .3, .3, 0,
31 | .6, .6, .6, 0,
32 | .1, .1, .1, 0,
33 | 0.2, 0, -0.2, 1
34 | ], factor);
35 |
36 | return (
37 |
44 | )
45 | }
46 |
--------------------------------------------------------------------------------
/src/filters/Sharpen.js:
--------------------------------------------------------------------------------
1 | import { Shaders, Node, GLSL } from 'gl-react';
2 | import React from 'react';
3 |
4 | const shaders = Shaders.create({
5 | sharpen: {
6 | frag: GLSL`
7 | precision highp float;
8 | varying vec2 uv;
9 | uniform sampler2D t;
10 | uniform float factor;
11 | uniform vec2 resolution;
12 |
13 | void main() {
14 | float test = factor;
15 | vec2 step = 1.0 / resolution;
16 |
17 | vec3 texA = texture2D( t, uv + vec2(-step.x, -step.y) * 1.5 ).rgb;
18 | vec3 texB = texture2D( t, uv + vec2( step.x, -step.y) * 1.5 ).rgb;
19 | vec3 texC = texture2D( t, uv + vec2(-step.x, step.y) * 1.5 ).rgb;
20 | vec3 texD = texture2D( t, uv + vec2( step.x, step.y) * 1.5 ).rgb;
21 |
22 | vec3 around = 0.25 * (texA + texB + texC + texD);
23 | vec3 center = texture2D( t, uv ).rgb;
24 | vec3 col = center + (center - around) * factor;
25 |
26 | gl_FragColor = vec4(col, 1.0);
27 | }
28 | `
29 | }
30 | });
31 |
32 | export const DefaultValue = 0;
33 |
34 | export default function Sharpen({ factor = DefaultValue, width, height, children: t }) {
35 | return (
36 |
44 | )
45 | }
46 |
--------------------------------------------------------------------------------
/src/filters/Temperature.js:
--------------------------------------------------------------------------------
1 | import { Shaders, Node, GLSL } from 'gl-react';
2 | import React from 'react';
3 |
4 | const shaders = Shaders.create({
5 | temperature: {
6 | frag: GLSL`
7 | precision highp float;
8 | varying vec2 uv;
9 | uniform sampler2D t;
10 | uniform float temp;
11 | uniform vec2 resolution;
12 |
13 | const float LuminancePreservationFactor = 1.0;
14 | const float PI2 = 6.2831853071;
15 |
16 | vec3 colorTemperatureToRGB(const in float temperature){
17 | mat3 m = (temperature <= 6500.0) ? mat3(vec3(0.0, -2902.1955373783176, -8257.7997278925690),
18 | vec3(0.0, 1669.5803561666639, 2575.2827530017594),
19 | vec3(1.0, 1.3302673723350029, 1.8993753891711275)) :
20 | mat3(vec3(1745.0425298314172, 1216.6168361476490, -8257.7997278925690),
21 | vec3(-2666.3474220535695, -2173.1012343082230, 2575.2827530017594),
22 | vec3(0.55995389139931482, 0.70381203140554553, 1.8993753891711275));
23 | return mix(
24 | clamp(vec3(m[0] / (vec3(clamp(temperature, 1000.0, 40000.0)) + m[1]) + m[2]),
25 | vec3(0.0), vec3(1.0)), vec3(1.0), smoothstep(1000.0, 0.0, temperature)
26 | );
27 | }
28 |
29 | void main() {
30 | float temperature = temp;
31 | float temperatureStrength = 1.0;
32 |
33 | vec3 inColor = texture2D(t, uv).xyz;
34 | vec3 outColor = mix(inColor, inColor * colorTemperatureToRGB(temperature), temperatureStrength);
35 | #ifdef WithQuickAndDirtyLuminancePreservation
36 | outColor *= mix(1.0, dot(inColor, vec3(0.2126, 0.7152, 0.0722)) /
37 | max(dot(outColor, vec3(0.2126, 0.7152, 0.0722)), 1e-5), LuminancePreservationFactor);
38 | #endif
39 |
40 | gl_FragColor = vec4(outColor, 1.0);
41 | }
42 | `
43 | }
44 | });
45 |
46 | export const DefaultValue = 6500;
47 |
48 | export default function Temperature({ factor = DefaultValue, children: t }) {
49 | return (
50 |
57 | )
58 | }
59 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import ImageFiltersComponent from './ImageFiltersComponent';
2 |
3 | export Constants from './constants';
4 | export Presets from './presets';
5 | export Utils from './utils';
6 |
7 | export default ImageFiltersComponent;
8 |
--------------------------------------------------------------------------------
/src/presets/AmaroPreset.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from '../utils/preset';
2 |
3 | export default createPreset({
4 | brightness: .15,
5 | saturation: .3,
6 | });
7 |
--------------------------------------------------------------------------------
/src/presets/ClarendonPreset.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from '../utils/preset';
2 |
3 | export default createPreset({
4 | brightness: .1,
5 | contrast: .1,
6 | saturation: .15,
7 | });
8 |
--------------------------------------------------------------------------------
/src/presets/DogpatchPreset.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from '../utils/preset';
2 |
3 | export default createPreset({
4 | contrast: .15,
5 | brightness: .1,
6 | });
7 |
--------------------------------------------------------------------------------
/src/presets/GinghamPreset.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from '../utils/preset';
2 |
3 | export default createPreset({
4 | sepia: .04,
5 | contrast: -.15,
6 | });
7 |
--------------------------------------------------------------------------------
/src/presets/GinzaPreset.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from '../utils/preset';
2 |
3 | export default createPreset({
4 | sepia: .06,
5 | brightness: .1,
6 | });
7 |
--------------------------------------------------------------------------------
/src/presets/HefePreset.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from '../utils/preset';
2 |
3 | export default createPreset({
4 | contrast: .1,
5 | saturation: .15,
6 | });
7 |
--------------------------------------------------------------------------------
/src/presets/LudwigPreset.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from '../utils/preset';
2 |
3 | export default createPreset({
4 | brightness: .05,
5 | saturation: -.03,
6 | });
7 |
--------------------------------------------------------------------------------
/src/presets/NoPreset.js:
--------------------------------------------------------------------------------
1 | export default {};
2 |
--------------------------------------------------------------------------------
/src/presets/SierraPreset.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from '../utils/preset';
2 |
3 | export default createPreset({
4 | contrast: -.15,
5 | saturation: .1,
6 | });
7 |
--------------------------------------------------------------------------------
/src/presets/SkylinePreset.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from '../utils/preset';
2 |
3 | export default createPreset({
4 | saturation: .35,
5 | brightness: .1,
6 | });
7 |
--------------------------------------------------------------------------------
/src/presets/SlumberPreset.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from '../utils/preset';
2 |
3 | export default createPreset({
4 | brightness: .1,
5 | saturation: -.5,
6 | });
7 |
--------------------------------------------------------------------------------
/src/presets/StinsonPreset.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from '../utils/preset';
2 |
3 | export default createPreset({
4 | brightness: .1,
5 | sepia: .3,
6 | });
7 |
--------------------------------------------------------------------------------
/src/presets/index.js:
--------------------------------------------------------------------------------
1 | import { default as NoPreset } from './NoPreset';
2 | import { default as AmaroPreset } from './AmaroPreset';
3 | import { default as ClarendonPreset } from './ClarendonPreset';
4 | import { default as DogpatchPreset } from './DogpatchPreset';
5 | import { default as GinghamPreset } from './GinghamPreset';
6 | import { default as GinzaPreset } from './GinzaPreset';
7 | import { default as HefePreset } from './HefePreset';
8 | import { default as LudwigPreset } from './LudwigPreset';
9 | import { default as SkylinePreset } from './SkylinePreset';
10 | import { default as SlumberPreset } from './SlumberPreset';
11 | import { default as SierraPreset } from './SierraPreset';
12 | import { default as StinsonPreset } from './StinsonPreset';
13 |
14 | const Presets = Object.freeze({
15 | NoPreset,
16 | AmaroPreset,
17 | ClarendonPreset,
18 | DogpatchPreset,
19 | GinghamPreset,
20 | GinzaPreset,
21 | HefePreset,
22 | LudwigPreset,
23 | SkylinePreset,
24 | SlumberPreset,
25 | SierraPreset,
26 | StinsonPreset,
27 | });
28 |
29 | export default Presets;
30 |
--------------------------------------------------------------------------------
/src/utils/createConditionalWrapper.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import NoopFilter from '../filters/Noop';
4 |
5 | const ConditionalWrapper = ({ condition, wrapper, children }) =>
6 | condition ? wrapper(children) : {children}
7 |
8 | export const createConditionalWrapper = ({ FilterComponent, condition, ...props }) => {
9 | return ({ children }) => (
10 | {children}}
13 | >
14 | {children}
15 |
16 | );
17 | };
18 |
--------------------------------------------------------------------------------
/src/utils/directionForPassDefault.js:
--------------------------------------------------------------------------------
1 | const NORM = Math.sqrt(2) / 2;
2 |
3 | export default function directionForPassDefault(p, factor, total) {
4 | const f = factor * 2 * Math.ceil(p / 2) / total;
5 | switch ((p - 1) % 4) {
6 | case 0:
7 | return [f, 0];
8 | case 1:
9 | return [0, f];
10 | case 2:
11 | return [f * NORM, f * NORM];
12 | case 3:
13 | return [f * NORM, -f * NORM];
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/utils/index.js:
--------------------------------------------------------------------------------
1 | import { createPreset } from './preset';
2 |
3 | const Utils = {
4 | createPreset,
5 | };
6 |
7 | export default Utils;
8 |
--------------------------------------------------------------------------------
/src/utils/isUndefinedOrNull.js:
--------------------------------------------------------------------------------
1 | export const isUndefinedOrNull = value => value !== undefined || value !== null;
2 |
--------------------------------------------------------------------------------
/src/utils/mixArrays.js:
--------------------------------------------------------------------------------
1 | const mixArrays = (arr1, arr2, m) =>
2 | arr1.map((v, i) => (1-m) * v + m * arr2[i]);
3 |
4 | export default mixArrays;
5 |
--------------------------------------------------------------------------------
/src/utils/preset.js:
--------------------------------------------------------------------------------
1 | import DefaultValues from '../constants/DefaultValues';
2 |
3 | export function createPreset(filters) {
4 | return Object.keys(filters).reduce((result, filterItem) => {
5 | result[filterItem] = DefaultValues[filterItem] + filters[filterItem];
6 |
7 | return result;
8 | }, {});
9 | }
10 |
--------------------------------------------------------------------------------
/src/utils/shaders-functions.js:
--------------------------------------------------------------------------------
1 | export const ramp = `
2 | float ramp(float t){
3 | t *= 2.0;
4 | if (t >= 1.0) {
5 | t -= 1.0;
6 | t = log(0.5) / log(0.5*(1.0-t) + 0.9332*t);
7 | }
8 | return clamp(t, 0.001, 10.0);
9 | }
10 | `;
11 |
12 | export const Lum = `
13 | float Lum(vec3 c){
14 | return 0.299*c.r + 0.587*c.g + 0.114*c.b;
15 | }
16 | `;
17 |
18 | export const ClipColor = `
19 | vec3 ClipColor(vec3 c){
20 | float l = Lum(c);
21 | float n = min(min(c.r, c.g), c.b);
22 | float x = max(max(c.r, c.g), c.b);
23 |
24 | if (n < 0.0) c = (c-l)*l / (l-n) + l;
25 | if (x > 1.0) c = (c-l) * (1.0-l) / (x-l) + l;
26 |
27 | return c;
28 | }
29 | `;
30 |
31 | export const SetLum = `
32 | vec3 SetLum(vec3 c, float l){
33 | float d = l - Lum(c);
34 |
35 | c.r = c.r + d;
36 | c.g = c.g + d;
37 | c.b = c.b + d;
38 |
39 | return ClipColor(c);
40 | }
41 | `;
42 |
43 | export const Sat = `
44 | float Sat(vec3 c){
45 | float n = min(min(c.r, c.g), c.b);
46 | float x = max(max(c.r, c.g), c.b);
47 |
48 | return x - n;
49 | }
50 | `;
51 |
52 | export const SetSat = `
53 | vec3 SetSat(vec3 c, float s){
54 | float cmin = min(min(c.r, c.g), c.b);
55 | float cmax = max(max(c.r, c.g), c.b);
56 |
57 | vec3 res = vec3(0.0);
58 |
59 | if (cmax > cmin) {
60 |
61 | if (c.r == cmin && c.b == cmax) { // R min G mid B max
62 | res.r = 0.0;
63 | res.g = ((c.g-cmin)*s) / (cmax-cmin);
64 | res.b = s;
65 | }
66 | else if (c.r == cmin && c.g == cmax) { // R min B mid G max
67 | res.r = 0.0;
68 | res.b = ((c.b-cmin)*s) / (cmax-cmin);
69 | res.g = s;
70 | }
71 | else if (c.g == cmin && c.b == cmax) { // G min R mid B max
72 | res.g = 0.0;
73 | res.r = ((c.r-cmin)*s) / (cmax-cmin);
74 | res.b = s;
75 | }
76 | else if (c.g == cmin && c.r == cmax) { // G min B mid R max
77 | res.g = 0.0;
78 | res.b = ((c.b-cmin)*s) / (cmax-cmin);
79 | res.r = s;
80 | }
81 | else if (c.b == cmin && c.r == cmax) { // B min G mid R max
82 | res.b = 0.0;
83 | res.g = ((c.g-cmin)*s) / (cmax-cmin);
84 | res.r = s;
85 | }
86 | else { // B min R mid G max
87 | res.b = 0.0;
88 | res.r = ((c.r-cmin)*s) / (cmax-cmin);
89 | res.g = s;
90 | }
91 |
92 | }
93 |
94 | return res;
95 | }
96 | `;
97 |
98 | export const Mix = `
99 | vec3 Mix(vec3 a, vec3 b, float opacity) {
100 | return mix(a, b, opacity);
101 | }
102 | `;
103 |
104 | export const ClampRGBVec3 = `
105 | vec3 ClampRGBVec3(vec3 c) {
106 | return clamp(c / 255.0, 0.0, 1.0);
107 | }
108 | `;
109 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "include": ["src/**/*"],
3 | "exclude": [
4 | "node_modules"
5 | ],
6 | "compilerOptions": {
7 | "lib": ["es5", "es6", "esnext.asynciterable"],
8 | "allowSyntheticDefaultImports": false,
9 | "esModuleInterop": false,
10 | "jsx": "react",
11 | "moduleResolution": "node",
12 | "strict": true,
13 | "target": "esnext",
14 | "resolveJsonModule": true,
15 | "outDir": "./lib",
16 | "declaration": true
17 | }
18 | }
--------------------------------------------------------------------------------