Skip to content

Commit

Permalink
honor recursive argument in copy method of classes derived from Objec…
Browse files Browse the repository at this point in the history
…t3D (mrdoob#24119)

* honor recursive argument in copy method of classes derived from Object3D

* add recursive argument to copy method of classes inheriting from Object3D
  • Loading branch information
frading authored and abernier committed Sep 16, 2022
1 parent 8f065c3 commit 6c56a82
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions examples/jsm/misc/MorphAnimMesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ class MorphAnimMesh extends Mesh {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

this.mixer = new AnimationMixer( this );

Expand Down
4 changes: 2 additions & 2 deletions examples/jsm/objects/LightningStorm.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ class LightningStorm extends Object3D {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

this.stormParams.size = source.stormParams.size;
this.stormParams.minHeight = source.stormParams.minHeight;
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/BoxHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ class BoxHelper extends LineSegments {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

this.object = source.object;

Expand Down
4 changes: 2 additions & 2 deletions src/lights/HemisphereLight.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class HemisphereLight extends Light {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

this.groundColor.copy( source.groundColor );

Expand Down
4 changes: 2 additions & 2 deletions src/lights/Light.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Light extends Object3D {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

this.color.copy( source.color );
this.intensity = source.intensity;
Expand Down
4 changes: 2 additions & 2 deletions src/lights/PointLight.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class PointLight extends Light {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

this.distance = source.distance;
this.decay = source.decay;
Expand Down
4 changes: 2 additions & 2 deletions src/lights/SpotLight.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class SpotLight extends Light {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

this.distance = source.distance;
this.angle = source.angle;
Expand Down
4 changes: 2 additions & 2 deletions src/objects/InstancedMesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class InstancedMesh extends Mesh {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

this.instanceMatrix.copy( source.instanceMatrix );

Expand Down
4 changes: 2 additions & 2 deletions src/objects/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class Line extends Object3D {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

this.material = source.material;
this.geometry = source.geometry;
Expand Down
4 changes: 2 additions & 2 deletions src/objects/Mesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class Mesh extends Object3D {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

if ( source.morphTargetInfluences !== undefined ) {

Expand Down
4 changes: 2 additions & 2 deletions src/objects/Points.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class Points extends Object3D {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

this.material = source.material;
this.geometry = source.geometry;
Expand Down
4 changes: 2 additions & 2 deletions src/objects/SkinnedMesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class SkinnedMesh extends Mesh {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

this.bindMode = source.bindMode;
this.bindMatrix.copy( source.bindMatrix );
Expand Down
4 changes: 2 additions & 2 deletions src/objects/Sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ class Sprite extends Object3D {

}

copy( source ) {
copy( source, recursive ) {

super.copy( source );
super.copy( source, recursive );

if ( source.center !== undefined ) this.center.copy( source.center );

Expand Down

0 comments on commit 6c56a82

Please sign in to comment.