This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<component :is="DynamicComponent" /> | |
</template> | |
<script setup lang="ts"> | |
import { defineAsyncComponent } from 'vue'; | |
const props = defineProps<{ | |
path: string, | |
}>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="game"> | |
<div class="stats"> | |
<p class="points">P1: {{ points.p1 }} / P2: {{ points.p2 }}</p> | |
<p class="frames">Frames: {{ frames }} / {{ renderedFrames }}</p> | |
<p class="clear pull-right" @click="clear">Clear</p> | |
<p class="reset pull-right" @click="reset()">Reset</p> | |
</div> | |
<div v-if="!running" class="startscreen"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const downloadFile = async (uri, path, folder) => { | |
return new Promise(async (resolve, reject) => { | |
try { | |
const file_request = await fetch(uri, { | |
method: 'GET', | |
credentials: 'include', | |
mode: 'cors', | |
}); | |
const file_blob = await file_request.blob(); |