|
1 | 1 | <h1 align="center">
|
2 | 2 | <img width="32" alt="icon" src="https://raw.githubusercontent.com/GregoryNative/react-native-gl-image-filters/docusaurus/website/static/img/favicon_32.ico">
|
| 3 | + react-native-gl-image-filters |
3 | 4 | </h1>
|
4 | 5 |
|
5 | 6 | <p align="center">
|
|
15 | 16 | <a href="https://snack.expo.io/@gregoryrn/expo-gregorynative-react-native-gl-image-filters">
|
16 | 17 | <img src="https://badgen.net/badge/expo/snack/blue?icon=https://symbols.getvecta.com/stencil_79/82_expo-icon.11a3983570.svg" alt="Expo snack." />
|
17 | 18 | </a>
|
| 19 | + <a href="https://stackblitz.com/edit/react-native-gl-image-filters-web-example"> |
| 20 | + <img src="https://badgen.net/badge/web/blitz/purple?icon=bitcoin-lightning" alt="Expo snack." /> |
| 21 | + </a> |
18 | 22 | </p>
|
19 | 23 |
|
20 | 24 | [](https://badgen.net/badge/expo/snack/blue?icon=https://symbols.getvecta.com/stencil_79/82_expo-icon.11a3983570.svg)
|
@@ -305,71 +309,12 @@ yarn add gl-react-dom@^4.0.1
|
305 | 309 | ## Usage
|
306 | 310 |
|
307 | 311 | ### Usage with React Native
|
308 |
| -```javascript |
309 |
| -import React, { Component } from 'react'; |
310 |
| -import { |
311 |
| - StyleSheet, |
312 |
| - Text, |
313 |
| - View, |
314 |
| - Button |
315 |
| -} from 'react-native'; |
316 |
| -import { Surface } from 'gl-react-native'; |
317 |
| -import ImageFilters from 'react-native-gl-image-filters'; |
318 |
| - |
319 |
| -export default class App extends Component { |
320 |
| - save = async () => { |
321 |
| - if (!this.image) return; |
322 |
| - |
323 |
| - const result = await this.image.glView.capture(); |
324 |
| - console.warn(result); |
325 |
| - }; |
326 |
| - |
327 |
| - render() { |
328 |
| - return ( |
329 |
| - <View style={styles.container}> |
330 |
| - <Text style={styles.welcome}> |
331 |
| - Welcome to React Native Image Filters! |
332 |
| - </Text> |
333 |
| - <Surface |
334 |
| - width={300} |
335 |
| - height={300} |
336 |
| - ref={ref => (this.image = ref)} |
337 |
| - > |
338 |
| - <ImageFilters |
339 |
| - width={300} |
340 |
| - height={300} |
341 |
| - temperature={10000} |
342 |
| - sharpen={1} |
343 |
| - hue={0.5} |
344 |
| - blur={0.5} |
345 |
| - > |
346 |
| - {{ uri: 'https://i.imgur.com/5EOyTDQ.jpg' }} |
347 |
| - </ImageFilters> |
348 |
| - </Surface> |
349 |
| - <Button title="Save" onPress={this.save} /> |
350 |
| - </View> |
351 |
| - ); |
352 |
| - } |
353 |
| -} |
354 |
| - |
355 |
| -const styles = StyleSheet.create({ |
356 |
| - container: { |
357 |
| - flex: 1, |
358 |
| - justifyContent: 'center', |
359 |
| - alignItems: 'center', |
360 |
| - backgroundColor: '#F5FCFF', |
361 |
| - }, |
362 |
| - welcome: { |
363 |
| - fontSize: 20, |
364 |
| - textAlign: 'center', |
365 |
| - margin: 10, |
366 |
| - } |
367 |
| -}); |
368 |
| -``` |
| 312 | +Example here: [examples/react-native](https://github.com/GregoryNative/react-native-gl-image-filters/tree/master/examples/react-native) |
369 | 313 |
|
370 | 314 | ### Usage with Expo
|
371 | 315 | Snack: https://snack.expo.io/@gregoryrn/expo-gregorynative-react-native-gl-image-filters <br>
|
372 | 316 | Example here: [examples/expo](https://github.com/GregoryNative/react-native-gl-image-filters/tree/master/examples/expo)
|
373 | 317 |
|
374 | 318 | ### Usage with React web
|
| 319 | +Blitz: https://stackblitz.com/edit/react-native-gl-image-filters-web-example <br> |
375 | 320 | Example here: [examples/web](https://github.com/GregoryNative/react-native-gl-image-filters/tree/master/examples/web)
|
0 commit comments