mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-02-01 16:08:17 +00:00
进入vr事件。
This commit is contained in:
parent
6e774b7b3e
commit
ad18e0c9d8
@ -90,10 +90,6 @@ function Viewport(app) {
|
||||
var controls = new THREE.EditorControls(camera, container.dom);
|
||||
editor.controls = controls;
|
||||
|
||||
this.app.on('enterVR.Viewport', function () {
|
||||
vrEffect.isPresenting ? vrEffect.exitPresent() : vrEffect.requestPresent();
|
||||
});
|
||||
|
||||
this.app.call('animate');
|
||||
};
|
||||
|
||||
|
||||
@ -29,11 +29,11 @@ VREvent.prototype.stop = function () {
|
||||
};
|
||||
|
||||
VREvent.prototype.onEnterVR = function () {
|
||||
|
||||
var groupVR = this.groupVR;
|
||||
var editor = this.app.editor;
|
||||
var viewport = this.app.viewport;
|
||||
var sidebar = this.app.sidebar;
|
||||
var vrEffect = editor.vrEffect;
|
||||
|
||||
if (groupVR == null) {
|
||||
|
||||
@ -67,6 +67,8 @@ VREvent.prototype.onEnterVR = function () {
|
||||
|
||||
}
|
||||
|
||||
vrEffect.isPresenting ? vrEffect.exitPresent() : vrEffect.requestPresent();
|
||||
|
||||
groupVR.visible = true;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user