Skip to content

Latest commit

 

History

History
executable file
·
42 lines (29 loc) · 1.26 KB

README.md

File metadata and controls

executable file
·
42 lines (29 loc) · 1.26 KB

gl-react-blurhash runs with expo

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.