Tracking de l'application VApp (IHM du jeu)

This commit is contained in:
2025-05-11 18:04:12 +02:00
commit 89e9db9b62
17763 changed files with 3718499 additions and 0 deletions

View File

@ -0,0 +1,27 @@
// linear
export const linear = t => t;
// accelerating from zero velocity
export const easeInQuad = t => t ** 2;
// decelerating to zero velocity
export const easeOutQuad = t => t * (2 - t);
// acceleration until halfway, then deceleration
export const easeInOutQuad = t => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
// accelerating from zero velocity
export const easeInCubic = t => t ** 3;
// decelerating to zero velocity
export const easeOutCubic = t => --t ** 3 + 1;
// acceleration until halfway, then deceleration
export const easeInOutCubic = t => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;
// accelerating from zero velocity
export const easeInQuart = t => t ** 4;
// decelerating to zero velocity
export const easeOutQuart = t => 1 - --t ** 4;
// acceleration until halfway, then deceleration
export const easeInOutQuart = t => t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;
// accelerating from zero velocity
export const easeInQuint = t => t ** 5;
// decelerating to zero velocity
export const easeOutQuint = t => 1 + --t ** 5;
// acceleration until halfway, then deceleration
export const easeInOutQuint = t => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5;
//# sourceMappingURL=easing-patterns.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"easing-patterns.mjs","names":["linear","t","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint"],"sources":["../../../src/services/goto/easing-patterns.ts"],"sourcesContent":["export type EasingFunction = (t: number) => number\n\n// linear\nexport const linear = (t: number) => t\n// accelerating from zero velocity\nexport const easeInQuad = (t: number) => t ** 2\n// decelerating to zero velocity\nexport const easeOutQuad = (t: number) => t * (2 - t)\n// acceleration until halfway, then deceleration\nexport const easeInOutQuad = (t: number) => (t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t)\n// accelerating from zero velocity\nexport const easeInCubic = (t: number) => t ** 3\n// decelerating to zero velocity\nexport const easeOutCubic = (t: number) => --t ** 3 + 1\n// acceleration until halfway, then deceleration\nexport const easeInOutCubic = (t: number) => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1\n// accelerating from zero velocity\nexport const easeInQuart = (t: number) => t ** 4\n// decelerating to zero velocity\nexport const easeOutQuart = (t: number) => 1 - --t ** 4\n// acceleration until halfway, then deceleration\nexport const easeInOutQuart = (t: number) => (t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t)\n// accelerating from zero velocity\nexport const easeInQuint = (t: number) => t ** 5\n// decelerating to zero velocity\nexport const easeOutQuint = (t: number) => 1 + --t ** 5\n// acceleration until halfway, then deceleration\nexport const easeInOutQuint = (t: number) => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5\n"],"mappings":"AAEA;AACA,OAAO,MAAMA,MAAM,GAAIC,CAAS,IAAKA,CAAC;AACtC;AACA,OAAO,MAAMC,UAAU,GAAID,CAAS,IAAKA,CAAC,IAAI,CAAC;AAC/C;AACA,OAAO,MAAME,WAAW,GAAIF,CAAS,IAAKA,CAAC,IAAI,CAAC,GAAGA,CAAC,CAAC;AACrD;AACA,OAAO,MAAMG,aAAa,GAAIH,CAAS,IAAMA,CAAC,GAAG,GAAG,GAAG,CAAC,GAAGA,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAGA,CAAC,IAAIA,CAAE;AACzF;AACA,OAAO,MAAMI,WAAW,GAAIJ,CAAS,IAAKA,CAAC,IAAI,CAAC;AAChD;AACA,OAAO,MAAMK,YAAY,GAAIL,CAAS,IAAK,EAAEA,CAAC,IAAI,CAAC,GAAG,CAAC;AACvD;AACA,OAAO,MAAMM,cAAc,GAAIN,CAAS,IAAKA,CAAC,GAAG,GAAG,GAAG,CAAC,GAAGA,CAAC,IAAI,CAAC,GAAG,CAACA,CAAC,GAAG,CAAC,KAAK,CAAC,GAAGA,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAGA,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;AAC3G;AACA,OAAO,MAAMO,WAAW,GAAIP,CAAS,IAAKA,CAAC,IAAI,CAAC;AAChD;AACA,OAAO,MAAMQ,YAAY,GAAIR,CAAS,IAAK,CAAC,GAAG,EAAEA,CAAC,IAAI,CAAC;AACvD;AACA,OAAO,MAAMS,cAAc,GAAIT,CAAS,IAAMA,CAAC,GAAG,GAAG,GAAG,CAAC,GAAGA,CAAC,GAAGA,CAAC,GAAGA,CAAC,GAAGA,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAEA,CAAC,GAAGA,CAAC,GAAGA,CAAC,GAAGA,CAAE;AACpG;AACA,OAAO,MAAMU,WAAW,GAAIV,CAAS,IAAKA,CAAC,IAAI,CAAC;AAChD;AACA,OAAO,MAAMW,YAAY,GAAIX,CAAS,IAAK,CAAC,GAAG,EAAEA,CAAC,IAAI,CAAC;AACvD;AACA,OAAO,MAAMY,cAAc,GAAIZ,CAAS,IAAKA,CAAC,GAAG,GAAG,GAAG,EAAE,GAAGA,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAEA,CAAC,IAAI,CAAC"}

73
VApp/node_modules/vuetify/lib/services/goto/index.mjs generated vendored Normal file
View File

@ -0,0 +1,73 @@
// @ts-nocheck
/* eslint-disable */
// Extensions
// import { Service } from '../service'
// Utilities
import * as easingPatterns from "./easing-patterns.mjs";
import { getContainer, getOffset } from "./util.mjs"; // Types
function goTo(_target) {
let _settings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
const settings = {
container: document.scrollingElement || document.body || document.documentElement,
duration: 500,
offset: 0,
easing: 'easeInOutCubic',
appOffset: true,
..._settings
};
const container = getContainer(settings.container);
/* istanbul ignore else */
if (settings.appOffset && goTo.framework.application) {
const isDrawer = container.classList.contains('v-navigation-drawer');
const isClipped = container.classList.contains('v-navigation-drawer--clipped');
const {
bar,
top
} = goTo.framework.application;
settings.offset += bar;
/* istanbul ignore else */
if (!isDrawer || isClipped) settings.offset += top;
}
const startTime = performance.now();
let targetLocation;
if (typeof _target === 'number') {
targetLocation = getOffset(_target) - settings.offset;
} else {
targetLocation = getOffset(_target) - getOffset(container) - settings.offset;
}
const startLocation = container.scrollTop;
if (targetLocation === startLocation) return Promise.resolve(targetLocation);
const ease = typeof settings.easing === 'function' ? settings.easing : easingPatterns[settings.easing];
/* istanbul ignore else */
if (!ease) throw new TypeError(`Easing function "${settings.easing}" not found.`);
// Cannot be tested properly in jsdom
/* istanbul ignore next */
return new Promise(resolve => requestAnimationFrame(function step(currentTime) {
const timeElapsed = currentTime - startTime;
const progress = Math.abs(settings.duration ? Math.min(timeElapsed / settings.duration, 1) : 1);
container.scrollTop = Math.floor(startLocation + (targetLocation - startLocation) * ease(progress));
const clientHeight = container === document.body ? document.documentElement.clientHeight : container.clientHeight;
const reachBottom = clientHeight + container.scrollTop >= container.scrollHeight;
if (progress === 1 ||
// Need to go lower but reach bottom
targetLocation > container.scrollTop && reachBottom) {
return resolve(targetLocation);
}
requestAnimationFrame(step);
}));
}
// goTo.framework = {} as Record<string, VuetifyServiceContract>
// export class Goto extends Service {
// public static property: 'goTo' = 'goTo'
// constructor () {
// super()
// return goTo
// }
// }
//# sourceMappingURL=index.mjs.map

File diff suppressed because one or more lines are too long

39
VApp/node_modules/vuetify/lib/services/goto/util.mjs generated vendored Normal file
View File

@ -0,0 +1,39 @@
// @ts-nocheck
/* eslint-disable */
// Return target's cumulative offset from the top
export function getOffset(target) {
if (typeof target === 'number') {
return target;
}
let el = $(target);
if (!el) {
throw typeof target === 'string' ? new Error(`Target element "${target}" not found.`) : new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${type(target)} instead.`);
}
let totalOffset = 0;
while (el) {
totalOffset += el.offsetTop;
el = el.offsetParent;
}
return totalOffset;
}
export function getContainer(container) {
const el = $(container);
if (el) return el;
throw typeof container === 'string' ? new Error(`Container element "${container}" not found.`) : new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${type(container)} instead.`);
}
function type(el) {
return el == null ? el : el.constructor.name;
}
function $(el) {
if (typeof el === 'string') {
return document.querySelector(el);
} else if (el && el.__isVue) {
return el.$el;
} else if (el instanceof HTMLElement) {
return el;
} else {
return null;
}
}
//# sourceMappingURL=util.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"util.mjs","names":["getOffset","target","el","$","Error","TypeError","type","totalOffset","offsetTop","offsetParent","getContainer","container","constructor","name","document","querySelector","__isVue","$el","HTMLElement"],"sources":["../../../src/services/goto/util.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\nimport Vue from 'vue'\n\n// Return target's cumulative offset from the top\nexport function getOffset (target: any): number {\n if (typeof target === 'number') {\n return target\n }\n\n let el = $(target)\n if (!el) {\n throw typeof target === 'string'\n ? new Error(`Target element \"${target}\" not found.`)\n : new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${type(target)} instead.`)\n }\n\n let totalOffset = 0\n while (el) {\n totalOffset += el.offsetTop\n el = el.offsetParent as HTMLElement\n }\n\n return totalOffset\n}\n\nexport function getContainer (container: any): HTMLElement {\n const el = $(container)\n\n if (el) return el\n\n throw typeof container === 'string'\n ? new Error(`Container element \"${container}\" not found.`)\n : new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${type(container)} instead.`)\n}\n\nfunction type (el: any) {\n return el == null ? el : el.constructor.name\n}\n\nfunction $ (el: any): HTMLElement | null {\n if (typeof el === 'string') {\n return document.querySelector<HTMLElement>(el)\n } else if (el && el.__isVue) {\n return (el as Vue).$el as HTMLElement\n } else if (el instanceof HTMLElement) {\n return el\n } else {\n return null\n }\n}\n"],"mappings":"AAAA;AACA;;AAIA;AACA,OAAO,SAASA,SAASA,CAAEC,MAAW,EAAU;EAC9C,IAAI,OAAOA,MA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