import { detectWebGpu, inspectGraphicsCapabilities } from '@datamoc/mw_games/two-d/render';
const detected = await detectWebGpu();
const capabilities = inspectGraphicsCapabilities({ webgpu: detected.webgpu, wgsl: detected.wgsl });
console.log(capabilities.wgsl); // true only if a real WGSL shader actually compiled
The real, asynchronous WebGPU/WGSL check
inspectGraphicsCapabilitiescannot do synchronously: requests an actual adapter and device, then compiles an actual shader module and reads back its compilation diagnostics. Feed the result toinspectGraphicsCapabilitiesviaprobe.webgpu/probe.wgslonce resolved.