Files
pihkaal-me/app/components/Credits/FadeToBlack.vue

18 lines
423 B
Vue

<script setup lang="ts">
const { onRender } = useScreen();
const store = useCreditsStore();
onRender((ctx) => {
if (!store.fadeToBlack.active) return;
if (store.fadeToBlack.isOutro && store.fadeToBlack.opacity === 0) return;
ctx.globalAlpha = store.fadeToBlack.opacity;
ctx.fillStyle = "#000000";
ctx.fillRect(0, 0, LOGICAL_WIDTH, LOGICAL_HEIGHT);
}, 9999);
defineOptions({
render: () => null,
});
</script>