Skip to content

Commit

Permalink
Expose scene to global context when in development
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-delgado committed Nov 7, 2018
1 parent 866d7ae commit 9c2dcf5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/three/ThreeContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ class ThreeContainer extends React.PureComponent {
const gridHelper = initGridHelper();

this.scene.add(this.group, floor, gridHelper, ...lights);

if (process.env.NODE_ENV === "development") {
// expose variable to window in order to be able to use Three.js inspector
window.scene = this.scene;
}
}

animate = () => {
Expand Down

0 comments on commit 9c2dcf5

Please sign in to comment.