mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
Merge pull request #88 from storytold/feature/camera-bug-fix
added bug fix for camera
This commit is contained in:
1 file changed
+10
-4
@@ -150,7 +150,6 @@ class Editor {
|
||||
this.raycaster;
|
||||
this.mouse;
|
||||
this.selected;
|
||||
|
||||
this.last_selected;
|
||||
this.transform_interaction;
|
||||
this.rendering = false;
|
||||
@@ -861,18 +860,25 @@ class Editor {
|
||||
this.camera.position.copy(this.cam_obj.position);
|
||||
this.camera.rotation.copy(this.cam_obj.rotation);
|
||||
}
|
||||
|
||||
this.cam_obj.visible = false;
|
||||
}
|
||||
}
|
||||
else if (this.cam_obj){
|
||||
this.cam_obj.visible = true;
|
||||
}
|
||||
|
||||
if (this.render_camera && this.cam_obj) {
|
||||
this.render_camera.position.copy(this.cam_obj.position);
|
||||
this.render_camera.rotation.copy(this.cam_obj.rotation);
|
||||
this.cam_obj.scale.copy(new THREE.Vector3(1,1,1));
|
||||
}
|
||||
|
||||
this.updateSelectedUI();
|
||||
|
||||
|
||||
if(this.timeline.is_playing){
|
||||
this.timeline.update();
|
||||
}
|
||||
else if (this.last_scrub == this.timeline.scrubber_frame_position){
|
||||
this.updateSelectedUI();
|
||||
}
|
||||
|
||||
this.last_scrub = this.timeline.scrubber_frame_position;
|
||||
|
||||
Reference in new issue
Block a user