We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ec57f5 commit 12b9bdaCopy full SHA for 12b9bda
editor/js/Editor.js
@@ -659,7 +659,16 @@ Editor.prototype = {
659
var loader = new THREE.ObjectLoader();
660
var camera = await loader.parseAsync( json.camera );
661
662
+ const existingUuid = this.camera.uuid;
663
+ const incomingUuid = camera.uuid;
664
+
665
+ // copy all properties, including uuid
666
this.camera.copy( camera );
667
+ this.camera.uuid = incomingUuid;
668
669
+ delete this.cameras[ existingUuid ]; // remove old entry [existingUuid, this.camera]
670
+ this.cameras[ incomingUuid ] = this.camera; // add new entry [incomingUuid, this.camera]
671
672
this.signals.cameraResetted.dispatch();
673
674
this.history.fromJSON( json.history );
0 commit comments