Browse Source

Scale adjustment from centimeter to meter (#26260)

sunag 2 years ago
parent
commit
2c56c08c42

BIN
examples/screenshots/webgl_video_panorama_equirectangular.jpg


+ 4 - 3
examples/webgl_video_panorama_equirectangular.html

@@ -50,7 +50,7 @@
 				onPointerDownLon = 0,
 				onPointerDownLat = 0;
 
-			const distance = 50;
+			const distance = .5;
 
 			init();
 			animate();
@@ -59,11 +59,11 @@
 
 				const container = document.getElementById( 'container' );
 
-				camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 1100 );
+				camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, .25, 10 );
 
 				scene = new THREE.Scene();
 
-				const geometry = new THREE.SphereGeometry( 500, 60, 40 );
+				const geometry = new THREE.SphereGeometry( 5, 60, 40 );
 				// invert the geometry on the x-axis so that all of the faces point inward
 				geometry.scale( - 1, 1, 1 );
 
@@ -78,6 +78,7 @@
 				scene.add( mesh );
 
 				renderer = new THREE.WebGLRenderer();
+				renderer.useLegacyLights = false;
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				container.appendChild( renderer.domElement );