Skip to content

Instantly share code, notes, and snippets.

@toxicFork
Last active March 2, 2016 21:22
Show Gist options
  • Save toxicFork/262c88dffbf5b2c7c14a to your computer and use it in GitHub Desktop.
Save toxicFork/262c88dffbf5b2c7c14a to your computer and use it in GitHub Desktop.

Main render:

<React3/>
  <scene>
    {this.state.gameStarted ? <Game/> : <Title/>}
  </scene>
<React3>

Title:

  <object3D>
    <resources>
      //textures and meshes and stuff for title
    </resources>
    <mesh/> // title mesh and stuff?
  </object3D>

Game:

  <object3D>
    <resources>
      // textures and meshes and stuff for both active game and paused states?
    </resources>
    <GameScreen/>
    {isPaused ? <PauseScreen/> : null}
  </object3D>

PauseScreen:

  <object3D>
    <mesh/> // some meshes
    <mesh/> // etc
  </object3D>

GameScreen:

  <object3D>
    <mesh/> // actual game thingies here
  </object3D>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment