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

    Module tests/e2e/webgpu-project

    The chromium-webgpu Playwright project: what it changes, in one place.

    The default chromium project drives the viewer through THREE.WebGLRenderer, and the handful of specs that ask for ?renderer=webgpu there land on WebGPURenderer's internal WebGL2 backend, because Playwright's bundled headless Chromium has no hardware WebGPU adapter. So WGSL codegen, real adapter limits and the 256-byte readback row padding were exercised by no automated run at all.

    The chromium-webgpu project (opt-in, pnpm test:e2e:webgpu; see playwright.config.ts) runs the same specs on system Chrome with a real adapter. Three things make that a NATIVE run rather than a relabelled one:

    1. withWebGPURenderer: the shared fixture appends renderer=webgpu to every viewer URL the spec did not already pin with renderer=.
    2. waitForLuxarReady (helpers.ts) fails fast, through requiresNativeWebGPU, when such a page did not come up on a native, non-fallback WebGPU backend. It also rejects viewer pages that bypassed the URL rewrite. A silent WebGL2 fallback would turn the whole project into a second copy of the default one.
    3. skipUnlessWebGL keeps out the specs that drive raw WebGL (WEBGL_lose_context, a webgl2 context's own error queue), which have nothing to observe on a canvas already in webgpu mode.

    This module deliberately imports nothing from helpers.ts, which imports it.

    WEBGPU_PROJECT
    isWebGPUProject
    skipUnlessWebGL
    withWebGPURenderer
    requiresNativeWebGPU
    isUnpinnedViewerPage