Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    • Shape-narrow a Renderer to THREE.WebGLRenderer. Used in createRendererCapabilities to gate raw-GL probes. The check is structural rather than instanceof so we don't have to runtime-import WebGPURenderer just to type-test against it (the import would force eager loading of three/webgpu even when WebGL is the active backend).

      Uses the positive isWebGLRenderer flag that THREE.WebGLRenderer's constructor sets on this. A negative check (!isWebGPURenderer) would mis-identify any future renderer type that doesn't carry the WebGPU flag. Probing for .getContext would mis-identify a WebGPURenderer running on its internal WebGL2 fallback because that path's getContext() also delegates to a WebGL2 context.

      Parameters

      Returns renderer is WebGLRenderer