Untitled
import { getDefaultTicker } from "~/librairies/Ticker.js"; /** * @param {Function} fn * @param {undefined|Number} priority */ export const useFrame = (fn, priority = undefined) => { const ticker = getDefaultTicker(); onMounted(() => { ticker.add(fn, priority); }); onUnmounted(() => { ticker.remove(fn); }); };