Transition.js 446 Bytes
Newer Older
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
const React = require("react-native");
const GL = require("gl-react-native");

class Transition extends React.Component {
  render () {
    const { width, height, shader, progress, from, to, uniforms } = this.props;
    return <GL.View
      shader={shader}
      style={{ width, height }}
      opaque={false}
      uniforms={{
        progress,
        from,
        to,
        ...uniforms
      }}
    />;
  }
}

module.exports = Transition;