Core guide
Dynamic assets
Turn Blob and File values into GPU textures at runtime.
Live example
See Dynamic assets in action
Watch a File created at runtime decode into a texture and move across the canvas.
How it works
Use the same loading API for generated images and user-provided files. Decoding and upload honor AbortSignal, while the returned handle controls access and release.
Public types
BlobFileAbortSignalResourceHandle<WebGpuTexture>ImageDecodeError
Minimum viable example
const file = new File([png_bytes], "hero.png", { type: "image/png" });
const handle = await game.assets.load_texture(file, { signal });
renderer.draw_texture(handle.read()); Scope and limitations
Identical Blob and File values are loaded independently in Phase 2.