forked from EXT/VR180-Web-Player
@@ -273,6 +273,10 @@ function hidePanel() {
|
||||
vrPanelVisibility.hide();
|
||||
}
|
||||
|
||||
function getVisibleVrPanelInteractables() {
|
||||
return vrPanelVisibility.isVisible ? (vrPanel?.interactables ?? []) : [];
|
||||
}
|
||||
|
||||
function onWindowResize() {
|
||||
if (!renderer) return;
|
||||
|
||||
@@ -563,7 +567,10 @@ function renderXR(timestamp, frame) {
|
||||
if (vrPanelVisibility.isFading) {
|
||||
animatePanelFade(timestamp);
|
||||
}
|
||||
xrInputRig?.update(timestamp);
|
||||
const isInputHoveringVrPanel = xrInputRig?.update(timestamp, getVisibleVrPanelInteractables()) ?? false;
|
||||
if (isInputHoveringVrPanel) {
|
||||
vrPanelVisibility.show();
|
||||
}
|
||||
|
||||
if (!frame) {
|
||||
console.warn("renderXR called without an XRFrame. Skipping render.");
|
||||
|
||||
Reference in New Issue
Block a user