瀏覽代碼

Handle damping when switching cameras

WestLangley 6 年之前
父節點
當前提交
bfad2b4ffd
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      examples/webgl_materials_channels.html

+ 3 - 2
examples/webgl_materials_channels.html

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