|
@@ -58,13 +58,13 @@
|
|
|
|
|
|
scene = new THREE.Scene();
|
|
scene = new THREE.Scene();
|
|
|
|
|
|
- camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 0.1, 200 );
|
|
|
|
- camera.position.set( 0, 10, 25 );
|
|
|
|
|
|
+ camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 0.1, 100 );
|
|
|
|
+ camera.position.set( 0, 1, 3 );
|
|
camera.lookAt( scene.position );
|
|
camera.lookAt( scene.position );
|
|
|
|
|
|
//
|
|
//
|
|
|
|
|
|
- const geometry = new THREE.TorusKnotGeometry( 8, 3, 256, 32, 2, 3 );
|
|
|
|
|
|
+ const geometry = new THREE.TorusKnotGeometry( 1, 0.3, 256, 32 );
|
|
const material = new THREE.MeshPhongMaterial( { color: 0xffff00 } );
|
|
const material = new THREE.MeshPhongMaterial( { color: 0xffff00 } );
|
|
|
|
|
|
const mesh = new THREE.Mesh( geometry, material );
|
|
const mesh = new THREE.Mesh( geometry, material );
|
|
@@ -72,10 +72,10 @@
|
|
|
|
|
|
//
|
|
//
|
|
|
|
|
|
- const ambientLight = new THREE.AmbientLight( 0xe7e7e7, 0.4 );
|
|
|
|
|
|
+ const ambientLight = new THREE.AmbientLight( 0xe7e7e7 );
|
|
scene.add( ambientLight );
|
|
scene.add( ambientLight );
|
|
|
|
|
|
- const pointLight = new THREE.PointLight( 0xffffff, 0.8 );
|
|
|
|
|
|
+ const pointLight = new THREE.PointLight( 0xffffff, 20 );
|
|
camera.add( pointLight );
|
|
camera.add( pointLight );
|
|
scene.add( camera );
|
|
scene.add( camera );
|
|
|
|
|
|
@@ -84,6 +84,7 @@
|
|
renderer = new THREE.WebGLRenderer();
|
|
renderer = new THREE.WebGLRenderer();
|
|
renderer.setPixelRatio( window.devicePixelRatio );
|
|
renderer.setPixelRatio( window.devicePixelRatio );
|
|
renderer.setSize( window.innerWidth, window.innerHeight );
|
|
renderer.setSize( window.innerWidth, window.innerHeight );
|
|
|
|
+ renderer.useLegacyLights = false;
|
|
document.body.appendChild( renderer.domElement );
|
|
document.body.appendChild( renderer.domElement );
|
|
|
|
|
|
// postprocessing
|
|
// postprocessing
|
|
@@ -108,8 +109,7 @@
|
|
composer.addPass( effectSobel );
|
|
composer.addPass( effectSobel );
|
|
|
|
|
|
const controls = new OrbitControls( camera, renderer.domElement );
|
|
const controls = new OrbitControls( camera, renderer.domElement );
|
|
- controls.minDistance = 10;
|
|
|
|
- controls.maxDistance = 100;
|
|
|
|
|
|
+ controls.enableZoom = false;
|
|
|
|
|
|
//
|
|
//
|
|
|
|
|