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

Merge pull request #11416 from tszyszko/dev

Camera.copy() recursive support
Mr.doob 8 лет назад
Родитель
Сommit
b7de83f20f
3 измененных файлов с 6 добавлено и 6 удалено
  1. 2 2
      src/cameras/Camera.js
  2. 2 2
      src/cameras/OrthographicCamera.js
  3. 2 2
      src/cameras/PerspectiveCamera.js

+ 2 - 2
src/cameras/Camera.js

@@ -26,9 +26,9 @@ Camera.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 	isCamera: true,
 
-	copy: function ( source ) {
+	copy: function ( source, recursive ) {
 
-		Object3D.prototype.copy.call( this, source );
+		Object3D.prototype.copy.call( this, source, recursive );
 
 		this.matrixWorldInverse.copy( source.matrixWorldInverse );
 		this.projectionMatrix.copy( source.projectionMatrix );

+ 2 - 2
src/cameras/OrthographicCamera.js

@@ -33,9 +33,9 @@ OrthographicCamera.prototype = Object.assign( Object.create( Camera.prototype ),
 
 	isOrthographicCamera: true,
 
-	copy: function ( source ) {
+	copy: function ( source, recursive ) {
 
-		Camera.prototype.copy.call( this, source );
+		Camera.prototype.copy.call( this, source, recursive );
 
 		this.left = source.left;
 		this.right = source.right;

+ 2 - 2
src/cameras/PerspectiveCamera.js

@@ -38,9 +38,9 @@ PerspectiveCamera.prototype = Object.assign( Object.create( Camera.prototype ),
 
 	isPerspectiveCamera: true,
 
-	copy: function ( source ) {
+	copy: function ( source, recursive ) {
 
-		Camera.prototype.copy.call( this, source );
+		Camera.prototype.copy.call( this, source, recursive );
 
 		this.fov = source.fov;
 		this.zoom = source.zoom;