chore: add zero-dependency static launcher
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
const statusElement = document.querySelector("#webgpu-status");
|
||||
|
||||
if (!(statusElement instanceof HTMLElement)) {
|
||||
throw new Error("WebGPU status element is missing.");
|
||||
}
|
||||
|
||||
if ("gpu" in navigator) {
|
||||
statusElement.textContent = "WebGPU 사용 가능";
|
||||
} else {
|
||||
statusElement.textContent = "CPU fallback 사용 예정";
|
||||
statusElement.classList.add("status-chip--warning");
|
||||
}
|
||||
Reference in New Issue
Block a user