Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function isFocusOnSceneCanvas

    • true when focus is on either the document body or the scene canvas, i.e. the user is "interacting with the scene" rather than a UI panel. Used to gate global keys like Space (fullscreen toggle) so they don't fire when the user has clicked into a panel button.

      Body-or-canvas instead of just canvas because most pages start with focus on body and never put it on the canvas explicitly.

      Parameters

      • activeElement: Element | null

        Currently focused element, typically document.activeElement.

      • canvas: Element | null

        The scene's WebGL canvas (renderer.domElement).

      Returns boolean