| | |
| | | // this.renderer.toneMapping = THREE.CineonToneMapping; // 色调 |
| | | this.renderer.setSize(window.innerWidth, window.innerHeight); |
| | | this.renderer.setPixelRatio( window.devicePixelRatio ); |
| | | this.renderer.shadowMap.enabled = true; |
| | | this.renderer.shadowMap.enabled = false; |
| | | this.renderer.shadowMap.type = THREE.BasicShadowMap; |
| | | this.dom = document.getElementById("container"); |
| | | this.dom.appendChild(this.renderer.domElement); |
| | |
| | | } |
| | | this.initBackground = function () { |
| | | if (this.backgroundType) { |
| | | this.scene.background = new THREE.Color( 0xf0f0f0 ); |
| | | // this.scene.background = new THREE.Color( 0xf0f0f0 ); |
| | | this.scene.background = new THREE.Color( 0x333333 ); |
| | | } else { |
| | | const cubeTextureLoader = new THREE.CubeTextureLoader(); |
| | | cubeTextureLoader.setPath( '../static/img/skybox0/' ); |