You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{create,globals}from'webgpu';Object.assign(globalThis,globals);asyncfunctionmain(){constnavigator={gpu: create([])};constadapter=awaitnavigator.gpu.requestAdapter();if(!adapter){return;}// do some webgpuconstdevice=awaitadapter.requestDevice();consttexture=device.createTexture({usage: GPUTextureUsage.TEXTURE_BINDING,size: [2],format: 'r16float',});texture.destroy();device.destroy();awaitnewPromise(r=>setTimeout(r,1000));}main();
Trying to import
global
fromwebgpu
results in a compiler error in TypeScript:TS2305: Module '"webgpu"' has no exported member 'globals'.
.The text was updated successfully, but these errors were encountered: