Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wcandillon/react-native-shader


https://github.com/wcandillon/react-native-shader

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# react-native-shader

React Native Shader Library

⚠️ **DOT NOT USE THIS.** Check out [react-native-skia](https://shopify.github.io/react-native-skia/).

## Installation

```sh
npm install react-native-shader
```

## Usage

```js
import * as React from 'react';

import { StyleSheet, View, Dimensions } from 'react-native';
import Shader from 'react-native-shader';

const { width } = Dimensions.get('window');

const hue = `
void main() {
gl_FragColor = vec4(v_tex_coord.x, v_tex_coord.y, 0.5 + 0.5 * cos(u_time * 1000 / 500.0), 1.0);
}`;

export default function App() {
return (



);
}

const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
box: {
width: width,
height: width,
marginVertical: 20,
},
});
```

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT