feat(frame): add OLD FILM LANDSCAPE and OLD FILM PORTRAIT from old_film.png

This commit is contained in:
2026-10-02 19:46:06 +07:00
parent 256fe6c2e2
commit 84b8e64652
8 changed files with 68 additions and 4 deletions
+9 -2
View File
@@ -34,13 +34,20 @@ export function probeGpu(): boolean {
export async function loadEngine(): Promise<{ assets: RenderAssets; gpu: boolean }> {
await initSkia({ locateFile: (file) => `/wasm/${file}` });
if (!assets) {
const [textFont, emojiFont, wallframePng, markFonts] = await Promise.all([
const [textFont, emojiFont, wallframePng, oldFilmPng, markFonts] = await Promise.all([
buf('/assets/Cousine-Regular.ttf'),
buf('/assets/NotoEmoji-GPS.ttf'),
buf('/assets/wallframe.png'),
buf('/assets/old_film.png'),
Promise.all(MARK_FACES.map(async (face) => ({ family: face.family, bytes: await buf(face.file) }))),
]);
assets = { textFont, emojiFont, wallframe: new Uint8Array(wallframePng), markFonts };
assets = {
textFont,
emojiFont,
wallframe: new Uint8Array(wallframePng),
oldFilm: new Uint8Array(oldFilmPng),
markFonts,
};
}
return { assets, gpu: probeGpu() };
}