GithubHelp home page GithubHelp logo

miguelramosfdz / gl-react-native Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gre/gl-react-native-v2

0.0 1.0 0.0 46.3 MB

OpenGL bindings for React Native to implement complex effects over images and components, in the descriptive VDOM paradigm

Home Page: http://projectseptemberinc.gitbooks.io/gl-react/content/

Objective-C 94.93% JavaScript 5.07%

gl-react-native's Introduction

Gitbook documentation / Github / gl-react / #gl-react on reactiflux

gl-react-native

OpenGL bindings for react-native to implement complex effects over images and components, in the descriptive VDOM paradigm.

More technically, gl-react-native allows you to write a fragment shader that covers a View. The shader can render: generated graphics/demos, effects on top of images, effects over any UI content... anything you can imagine!

gl-react-native is directly inspired from our other project, gl-react and implements the same API (so you can write "universal" code).

HelloGL Gist

const React = require("react-native");
const GL = require("gl-react-native");

const shaders = GL.Shaders.create({
  helloGL: {
    frag: `
precision highp float;
varying vec2 uv;
void main () {
  gl_FragColor = vec4(uv.x, uv.y, 0.5, 1.0);
}`
  }
});

class HelloGL extends GL.Component {
  render () {
    const { width, height } = this.props;
    return <GL.View
      shader={shaders.helloGL}
      width={width}
      height={height}
    />;
  }
}

Installation

a few steps are required to install gl-react-native:

Install the dependency to your React Native application:

npm i --save gl-react-native

Configure your React Native Application:

Influence / Credits

Documentation

Gitbook

gl-react-native's People

Contributors

gre avatar mrspeaker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.