Route Graphics renders from aliases, not from raw URLs in the middle of a render call. The intended flow is:
createAssetBufferManager().app.loadAssets(...).circle-red or video-sample from elements[] and audio[].import createRouteGraphics, {
createAssetBufferManager,
spritePlugin,
videoPlugin,
soundPlugin,
} from "/RouteGraphics.js";
const assets = {
"hero-texture": { url: "/public/hero.png", type: "image/png" },
"intro-video": { url: "/public/intro.mp4", type: "video/mp4" },
"bgm-main": { url: "/public/bgm.mp3", type: "audio/mpeg" },
};
const assetBufferManager = createAssetBufferManager();
await assetBufferManager.load(assets);
const app = createRouteGraphics();
await app.init({
width: 1280,
height: 720,
plugins: {
elements: [spritePlugin, videoPlugin],
audio: [soundPlugin],
},
});
await app.loadAssets(assetBufferManager.getBufferMap());
Assets and can be used by sprite, slider, animated-sprite, text-revealing, and particle textures.sound nodes or interaction props such as soundSrc.video elements.FontFace; the alias key becomes the textStyle.fontFamily value.assetBufferManager.load() is cached, so calling it again with the same aliases does not refetch them.render(...) does not fetch missing assets for you. Load before render.Try the built-in examples in the Playground, video demo, and sound demo.