Explorar o código

Handle damping when switching cameras

WestLangley %!s(int64=6) %!d(string=hai) anos
pai
achega
bfad2b4ffd
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      examples/webgl_materials_channels.html

+ 3 - 2
examples/webgl_materials_channels.html

@@ -274,15 +274,16 @@
 
 
 					case 'perspective':
 					case 'perspective':
 						camera = cameraPerspective;
 						camera = cameraPerspective;
-						controlsPerspective.update();
 						break;
 						break;
 					case 'ortho':
 					case 'ortho':
 						camera = cameraOrtho;
 						camera = cameraOrtho;
-						controlsOrtho.update();
 						break;
 						break;
 
 
 				}
 				}
 
 
+				controlsPerspective.update();
+				controlsOrtho.update(); // must update both controls for damping to complete
+
 				renderer.render( scene, camera );
 				renderer.render( scene, camera );
 
 
 			}
 			}