Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.action.onClicked.addListener(async () => { | |
const adapter = await navigator.gpu.requestAdapter(); | |
const device = await adapter.requestDevice(); | |
const canvas = new OffscreenCanvas(256, 256); | |
const context = canvas.getContext("webgpu"); | |
const format = navigator.gpu.getPreferredCanvasFormat(); | |
context.configure({ device, format }); | |
const code = ` |
OlderNewer