Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ycw committed May 12, 2024
1 parent a564aa9 commit 1d3b95b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editor/js/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,16 @@ Editor.prototype = {

const existingUuid = this.camera.uuid;
const incomingUuid = camera.uuid;

// copy all properties, including uuid
this.camera.copy( camera );
this.camera.uuid = incomingUuid;

// remove entry [oldUuid, this.camera]
delete this.cameras[ existingUuid ];
// add entry [newUuid, this.camera]
this.cameras[ incomingUuid ] = this.camera;

this.signals.cameraResetted.dispatch();

this.history.fromJSON( json.history );
Expand Down

0 comments on commit 1d3b95b

Please sign in to comment.