Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import React, {Component} from "react";
  2. import {View, AppRegistry} from "react-native";
  3. import {Surface} from "gl-react-native";
  4. import GL from "gl-react";
  5. const Dimensions = require('Dimensions');
  6. const window = Dimensions.get('window');
  7. import Triangle from './triangle';
  8.  
  9. export default class GLExample extends Component {
  10. render () {
  11. return <View>
  12. <Surface width={window.width} height={window.height}>
  13. <GL.Node
  14. shader={{
  15. frag: Triangle
  16. }}
  17. />
  18. </Surface>
  19. </View>;
  20. }
  21. }
  22.  
  23. AppRegistry.registerComponent('GLExample', () => GLExample);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement