feat(frame): add OLD FILM LANDSCAPE and OLD FILM PORTRAIT from old_film.png
This commit is contained in:
@@ -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() };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user