How to use the gl-react.Visitor function in gl-react

To help you get started, we’ve selected a few gl-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gre / gl-react / packages / cookbook-expo / src / examples / glsledit / index.js View on Github external
constructor() {
    super();
    const visitor = new Visitor();
    visitor.onSurfaceDrawError = (error: Error) => {
      this.setState({ error });
      return true;
    };
    visitor.onSurfaceDrawEnd = () => this.setState({ error: null });
    this.state = { error: null, visitor };
  }
github gre / gl-react / cookbook / src / examples / glsledit / index.js View on Github external
constructor() {
    super();
    const visitor = new Visitor();
    visitor.onSurfaceDrawError = (error: Error) => {
      this.setState({ error });
      return true;
    };
    visitor.onSurfaceDrawEnd = () => this.setState({ error: null });
    this.state = { error: null, visitor };
  };
github gre / gl-react / examples / cookbook-expo / shared / examples / glsledit / index.js View on Github external
constructor() {
    super();
    const visitor = new Visitor();
    visitor.onSurfaceDrawError = (error: Error) => {
      this.setState({ error });
      return true;
    };
    visitor.onSurfaceDrawEnd = () => this.setState({ error: null });
    this.state = { error: null, visitor };
  }