Explorar el Código

WebGL Fat Lines Example: Enable Damping (#26981)

WestLangley hace 1 año
padre
commit
f6ca510cc7
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      examples/webgl_lines_fat.html

+ 3 - 0
examples/webgl_lines_fat.html

@@ -66,6 +66,7 @@
 				camera2.position.copy( camera.position );
 
 				controls = new OrbitControls( camera, renderer.domElement );
+				controls.enableDamping = true;
 				controls.minDistance = 10;
 				controls.maxDistance = 500;
 
@@ -176,6 +177,8 @@
 
 				renderer.setViewport( 0, 0, window.innerWidth, window.innerHeight );
 
+				controls.update();
+
 				// renderer will set this eventually
 				matLine.resolution.set( window.innerWidth, window.innerHeight ); // resolution of the viewport