Skip to content
A template for combining Three JS and React
JavaScript CSS HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
models
scenes
.gitignore
README.md
hover-block.gif
index.html
index.scss
package-lock.json
package.json

README.md

Three-React

Three-React is a small example template for combining Interactive Three JS elements with React. The gif below shows a user hovering on Three JS cubes, triggering a react popup, then using the popup to alter the color of the 3d cube.

Three-React

Instructions to Run:

  1. Run npm install
  2. Build with parcel. Run npm install -g parcel-bundler, then parcel index.html
  3. Start a server, run cd dist && python -m SimpleHTTPServer 8080
  4. View the page at http://localhost:8080

ThreeJS Template:

The ThreeJS scene creation used for this project is copied from the ThreeJS example 'WebGL Interactive Cubes' Demo: https://threejs.org/examples/webgl_interactive_cubes.html Source: https://github.com/mrdoob/three.js/blob/master/examples/webgl_interactive_cubes.html

You can’t perform that action at this time.