• Get the WebGPU device if available

    Parameters

    • Optional options: GPURequestAdapterOptions

      WebGPU adapter options

    Returns Promise<GPUDevice | null>

    Promise that resolves to GPUDevice or null if not available

    Example

    const device = await getWebGPUDevice();
    if (device) {
    console.log('WebGPU device available');
    }