Blur.js 469 Bytes
Newer Older
1 2 3 4 5 6
const React = require("react-native");
const GL = require("gl-react-native");
const Blur1D = require("./Blur1D");

class Blur extends GL.Component {
  render () {
7 8
    const { width, height, factor, children, ...rest } = this.props;
    return <Blur1D {...rest} width={width} height={height} direction={[ factor, 0 ]}>
9 10 11 12 13 14 15 16
      <Blur1D width={width} height={height} direction={[ 0, factor ]}>
        {children}
      </Blur1D>
    </Blur1D>;
  }
}

module.exports = Blur;