|
@@ -45,23 +45,27 @@
|
|
renderer = new THREE.WebGLRenderer( { antialias: true } );
|
|
renderer = new THREE.WebGLRenderer( { antialias: true } );
|
|
renderer.setPixelRatio( window.devicePixelRatio );
|
|
renderer.setPixelRatio( window.devicePixelRatio );
|
|
renderer.setSize( window.innerWidth, window.innerHeight );
|
|
renderer.setSize( window.innerWidth, window.innerHeight );
|
|
- renderer.setAnimationLoop( render );
|
|
|
|
|
|
+ document.body.appendChild( renderer.domElement );
|
|
|
|
+
|
|
renderer.shadowMap.enabled = true;
|
|
renderer.shadowMap.enabled = true;
|
|
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
|
|
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
|
|
|
|
+
|
|
renderer.outputEncoding = THREE.sRGBEncoding;
|
|
renderer.outputEncoding = THREE.sRGBEncoding;
|
|
|
|
+
|
|
renderer.toneMapping = THREE.ACESFilmicToneMapping;
|
|
renderer.toneMapping = THREE.ACESFilmicToneMapping;
|
|
- document.body.appendChild( renderer.domElement );
|
|
|
|
|
|
+ renderer.toneMappingExposure = 1;
|
|
|
|
|
|
|
|
+ renderer.setAnimationLoop( render );
|
|
|
|
|
|
scene = new THREE.Scene();
|
|
scene = new THREE.Scene();
|
|
|
|
|
|
- camera = new THREE.PerspectiveCamera( 35, window.innerWidth / window.innerHeight, 1, 1000 );
|
|
|
|
- camera.position.set( 76, 50, 10 );
|
|
|
|
- camera.rotation.set( - 1.29, 1.15, 1.26 );
|
|
|
|
|
|
+ camera = new THREE.PerspectiveCamera( 40, window.innerWidth / window.innerHeight, 1, 1000 );
|
|
|
|
+ camera.position.set( 70, 50, 10 );
|
|
|
|
|
|
const controls = new OrbitControls( camera, renderer.domElement );
|
|
const controls = new OrbitControls( camera, renderer.domElement );
|
|
controls.minDistance = 20;
|
|
controls.minDistance = 20;
|
|
- controls.maxDistance = 500;
|
|
|
|
|
|
+ controls.maxDistance = 100;
|
|
|
|
+ controls.maxPolarAngle = Math.PI / 2;
|
|
controls.target.set( 0, 18, 0 );
|
|
controls.target.set( 0, 18, 0 );
|
|
controls.update();
|
|
controls.update();
|
|
|
|
|
|
@@ -86,7 +90,7 @@
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- spotLight = new THREE.SpotLight( 0xffffff, 10 );
|
|
|
|
|
|
+ spotLight = new THREE.SpotLight( 0xffffff, 5 );
|
|
spotLight.position.set( 25, 50, 25 );
|
|
spotLight.position.set( 25, 50, 25 );
|
|
spotLight.angle = Math.PI / 6;
|
|
spotLight.angle = Math.PI / 6;
|
|
spotLight.penumbra = 1;
|
|
spotLight.penumbra = 1;
|
|
@@ -107,8 +111,6 @@
|
|
|
|
|
|
//
|
|
//
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
const geometry = new THREE.PlaneGeometry( 1000, 1000 );
|
|
const geometry = new THREE.PlaneGeometry( 1000, 1000 );
|
|
const material = new THREE.MeshLambertMaterial( { color: 0x808080 } );
|
|
const material = new THREE.MeshLambertMaterial( { color: 0x808080 } );
|
|
|
|
|