-
-
Save JacobMuchow/4023d868386b3ee6c3991d895e435fc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import * as THREE from "three" | |
const navigationBarHeight = 100 | |
... | |
async componentDidMount() { | |
const mainView = this.mainViewRef.current | |
this.renderer = new THREE.WebGLRenderer({ antialias: true }) | |
this.renderer.setSize(window.innerWidth, window.innerHeight - navigationBarHeight) | |
this.renderer.outputEncoding = THREE.sRGBEncoding | |
this.renderer.toneMapping = THREE.ACESFilmicToneMapping | |
mainView.appendChild(this.renderer.domElement) | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment