0.0.1 • Published 6 years ago

argl-react v0.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

argl-react

ArGL react wrapper

Install

yarn add -D argl-react

Usage

import React, { Component } from 'react'
import ReArGL from 'argl-react'

export default DotsSuzanne extends Component {
  init(argl) {
    // create shaders, camera and load models, textures here
  }
  draw(time) {
    // your draw func executes in render circle
  }
  render() {
    return (
      <ReArGL
        className="DotsSuzanne"
        width={960}
        height={540}
        init={this.init.bind(this)}
        draw={this.draw.bind(this)}
        options={
          // ArGL options here
        }/>
    )
  }

check test folder for a complete example.