gl-react-blurhash
v2.0.0
Published
Universal gl-react module that implements BlurHash in OpenGL
Downloads
47
Readme
gl-react-blurhash
Universal gl-react
module that implements BlurHash in OpenGL.
Installation
Expo
Add the following dependencies:
expo add gl-react gl-react-expo expo-gl buffer gl-react-blurhash
React Native
First setup react-native-unimodules
, then add the following dependencies:
yarn add gl-react gl-react-native buffer gl-react-blurhash
Usage
import React from 'react';
import { Surface } from 'gl-react-expo'; // 'gl-react-native' for React Native
import { Blurhash } from 'gl-react-blurhash';
export default function App {
return (
<Surface style={{ width: 300, height: 200 }}>
<Blurhash hash="LPKA$w{H_c05b{Nqwbx^grotMnNf" />
</Surface>
);
}
Example
See example
subfolder for a full example.
This example is also available on snack.expo.io.