feat(credits): add in both nds and repo
This commit is contained in:
17
app/components/Credits/FadeToBlack.vue
Normal file
17
app/components/Credits/FadeToBlack.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user