Просмотр исходного кода

StereoCamera: Also store camera.id. See #9656.

Mr.doob 9 лет назад
Родитель
Сommit
73a407058f
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      src/cameras/StereoCamera.js

+ 3 - 2
src/cameras/StereoCamera.js

@@ -28,19 +28,20 @@ Object.assign( StereoCamera.prototype, {
 
 	update: ( function () {
 
-		var focus, fov, aspect, near, far, zoom;
+		var id, focus, fov, aspect, near, far, zoom;
 
 		var eyeRight = new Matrix4();
 		var eyeLeft = new Matrix4();
 
 		return function update( camera ) {
 
-			var needsUpdate = focus !== camera.focus || fov !== camera.fov ||
+			var needsUpdate = id !== camera.id || focus !== camera.focus || fov !== camera.fov ||
 												aspect !== camera.aspect * this.aspect || near !== camera.near ||
 												far !== camera.far || zoom !== camera.zoom;
 
 			if ( needsUpdate ) {
 
+				id = camera.id;
 				focus = camera.focus;
 				fov = camera.fov;
 				aspect = camera.aspect * this.aspect;