Blur.js 450 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
const React = require("react-native");
const GL = require("gl-react-native");
const Blur1D = require("./Blur1D");

class Blur extends GL.Component {
  render () {
    const { width, height, factor, children } = this.props;
    return <Blur1D width={width} height={height} direction={[ factor, 0 ]}>
      <Blur1D width={width} height={height} direction={[ 0, factor ]}>
        {children}
      </Blur1D>
    </Blur1D>;
  }
}

module.exports = Blur;