forked from LeenkxTeam/LNXSDK
Update
This commit is contained in:
@ -133,7 +133,7 @@ class VrInterface extends kha.vr.VrInterface {
|
||||
canvas = kha_SystemImpl.khanvas;
|
||||
}
|
||||
} catch (e) {
|
||||
trace('kha_SystemImpl access failed: ' + e.message;
|
||||
trace('kha_SystemImpl access failed: ' + e.message);
|
||||
}
|
||||
|
||||
if (!canvas) {
|
||||
@ -362,7 +362,7 @@ class VrInterface extends kha.vr.VrInterface {
|
||||
|
||||
self.currentFrame = frame;
|
||||
self.currentViews = views;
|
||||
self.currentViewerPose = pose; /
|
||||
self.currentViewerPose = pose;
|
||||
if (self.xrSession && self.xrSession.inputSources) {
|
||||
self.currentInputSources = self.xrSession.inputSources;
|
||||
}
|
||||
|
||||
@ -72,6 +72,8 @@ class CameraControls extends Trait {
|
||||
if (!enableUI) return;
|
||||
if (Input.getKeyboard().started(toggleKey)) {
|
||||
controlsVisible = !controlsVisible;
|
||||
if (!controlsVisible) Input.occupied = false;
|
||||
|
||||
if (controlsVisible && ui == null) {
|
||||
Data.getFont(Canvas.defaultFontName, function(font: kha.Font) {
|
||||
ui = new Zui({font: font});
|
||||
@ -79,8 +81,7 @@ class CameraControls extends Trait {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Input.occupied = controlsVisible;
|
||||
if (controlsVisible) Input.occupied = true;
|
||||
}
|
||||
|
||||
function render(g: Graphics) {
|
||||
|
||||
@ -14,7 +14,7 @@ import leenkx.ui.Canvas;
|
||||
* Light Controls Trait for parameter controls via ZUI
|
||||
*/
|
||||
|
||||
class LightControl extends Trait {
|
||||
class LightControls extends Trait {
|
||||
|
||||
@prop var enableUI: Bool = true;
|
||||
@prop var toggleKey: String = "l";
|
||||
@ -47,7 +47,8 @@ class LightControl extends Trait {
|
||||
|
||||
if (Input.getKeyboard().started(toggleKey)) {
|
||||
controlsVisible = !controlsVisible;
|
||||
|
||||
if (!controlsVisible) Input.occupied = false;
|
||||
|
||||
if (controlsVisible) {
|
||||
gatherLights();
|
||||
}
|
||||
@ -57,7 +58,7 @@ class LightControl extends Trait {
|
||||
});
|
||||
}
|
||||
}
|
||||
Input.occupied = controlsVisible;
|
||||
if (controlsVisible) Input.occupied = true;
|
||||
}
|
||||
|
||||
function render(g: Graphics) {
|
||||
Reference in New Issue
Block a user