Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wcandillon/react-native-shader
https://github.com/wcandillon/react-native-shader
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wcandillon/react-native-shader
- Owner: wcandillon
- License: mit
- Created: 2021-06-11T06:02:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-20T11:42:40.000Z (9 months ago)
- Last Synced: 2024-10-14T05:27:04.455Z (2 months ago)
- Language: Java
- Size: 416 KB
- Stars: 107
- Watchers: 4
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
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