| | |
| | | |
| | | let PI_2 = Math.PI / 2; //used by controls below |
| | | |
| | | // let cameraInfoElement = document.getElementById('cameraInfo'); |
| | | // cameraInfoElement.style.cursor = "default"; |
| | | // cameraInfoElement.style.userSelect = "none"; |
| | | // cameraInfoElement.style.MozUserSelect = "none"; |
| | | |
| | | let mouseControl = true; |
| | | let pointerlockChange; |
| | | let fileLoader = new THREE.FileLoader(); |
| | |
| | | } // end function onWindowResize( event ) |
| | | |
| | | |
| | | |
| | | function init() |
| | | { |
| | | |
| | |
| | | document.addEventListener('webkitpointerlockchange', pointerlockChange, false); |
| | | |
| | | } // end if (mouseControl) |
| | | |
| | | |
| | | /* // Fullscreen API (optional) |
| | | document.addEventListener("click", function() |
| | | { |
| | | if ( !document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement ) |
| | | { |
| | | if (document.documentElement.requestFullscreen) |
| | | document.documentElement.requestFullscreen(); |
| | | else if (document.documentElement.mozRequestFullScreen) |
| | | document.documentElement.mozRequestFullScreen(); |
| | | else if (document.documentElement.webkitRequestFullscreen) |
| | | document.documentElement.webkitRequestFullscreen(); |
| | | } |
| | | }); */ |
| | | |
| | | |
| | | initTHREEjs(); // boilerplate: init necessary three.js items and scene/demo-specific objects |