提交 068f7c15 编写于 作者: M Mr.doob

Editor: Restore camera when exiting VR.

上级 9522135f
......@@ -11,6 +11,8 @@ class VR {
const signals = editor.signals;
let group = null;
let camera = null;
let renderer = null;
this.currentSession = null;
......@@ -41,6 +43,8 @@ class VR {
}
camera = editor.camera.clone();
group.visible = true;
this.currentSession = session;
......@@ -48,9 +52,11 @@ class VR {
await renderer.xr.setSession( this.currentSession );
}
};
const onSessionEnded = async () => {
const onSessionEnded = async () => {
editor.camera.copy( camera );
group.visible = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册