Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
5
VApp/node_modules/worker-timers-worker/build/es2019/helpers/timer.d.ts
generated
vendored
Normal file
5
VApp/node_modules/worker-timers-worker/build/es2019/helpers/timer.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export declare const clearScheduledInterval: (timerId: number) => void;
|
||||
export declare const clearScheduledTimeout: (timerId: number) => void;
|
||||
export declare const scheduleInterval: (delay: number, timerId: number, nowInMainThread: number) => void;
|
||||
export declare const scheduleTimeout: (delay: number, timerId: number, nowInMainThread: number) => void;
|
||||
//# sourceMappingURL=timer.d.ts.map
|
1
VApp/node_modules/worker-timers-worker/build/es2019/helpers/timer.d.ts.map
generated
vendored
Normal file
1
VApp/node_modules/worker-timers-worker/build/es2019/helpers/timer.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"timer.d.ts","sourceRoot":"","sources":["../../../src/helpers/timer.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB,YAAa,MAAM,SASrD,CAAC;AAEF,eAAO,MAAM,qBAAqB,YAAa,MAAM,SASpD,CAAC;AA0BF,eAAO,MAAM,gBAAgB,UAAW,MAAM,WAAW,MAAM,mBAAmB,MAAM,SAOvF,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,MAAM,WAAW,MAAM,mBAAmB,MAAM,SAOtF,CAAC"}
|
50
VApp/node_modules/worker-timers-worker/build/es2019/helpers/timer.js
generated
vendored
Normal file
50
VApp/node_modules/worker-timers-worker/build/es2019/helpers/timer.js
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
const scheduledIntervalIdentifiers = new Map();
|
||||
const scheduledTimeoutIdentifiers = new Map();
|
||||
export const clearScheduledInterval = (timerId) => {
|
||||
const identifier = scheduledIntervalIdentifiers.get(timerId);
|
||||
if (identifier !== undefined) {
|
||||
clearTimeout(identifier);
|
||||
scheduledIntervalIdentifiers.delete(timerId);
|
||||
}
|
||||
else {
|
||||
throw new Error(`There is no interval scheduled with the given id "${timerId}".`);
|
||||
}
|
||||
};
|
||||
export const clearScheduledTimeout = (timerId) => {
|
||||
const identifier = scheduledTimeoutIdentifiers.get(timerId);
|
||||
if (identifier !== undefined) {
|
||||
clearTimeout(identifier);
|
||||
scheduledTimeoutIdentifiers.delete(timerId);
|
||||
}
|
||||
else {
|
||||
throw new Error(`There is no timeout scheduled with the given id "${timerId}".`);
|
||||
}
|
||||
};
|
||||
const computeDelayAndExpectedCallbackTime = (delay, nowInMainThread) => {
|
||||
let now;
|
||||
let remainingDelay;
|
||||
const nowInWorker = performance.now();
|
||||
const elapsed = Math.max(0, nowInWorker - nowInMainThread);
|
||||
now = nowInWorker;
|
||||
remainingDelay = delay - elapsed;
|
||||
const expected = now + remainingDelay;
|
||||
return { expected, remainingDelay };
|
||||
};
|
||||
const setTimeoutCallback = (identifiers, timerId, expected, timerType) => {
|
||||
const now = performance.now();
|
||||
if (now > expected) {
|
||||
postMessage({ id: null, method: 'call', params: { timerId, timerType } });
|
||||
}
|
||||
else {
|
||||
identifiers.set(timerId, setTimeout(setTimeoutCallback, expected - now, identifiers, timerId, expected, timerType));
|
||||
}
|
||||
};
|
||||
export const scheduleInterval = (delay, timerId, nowInMainThread) => {
|
||||
const { expected, remainingDelay } = computeDelayAndExpectedCallbackTime(delay, nowInMainThread);
|
||||
scheduledIntervalIdentifiers.set(timerId, setTimeout(setTimeoutCallback, remainingDelay, scheduledIntervalIdentifiers, timerId, expected, 'interval'));
|
||||
};
|
||||
export const scheduleTimeout = (delay, timerId, nowInMainThread) => {
|
||||
const { expected, remainingDelay } = computeDelayAndExpectedCallbackTime(delay, nowInMainThread);
|
||||
scheduledTimeoutIdentifiers.set(timerId, setTimeout(setTimeoutCallback, remainingDelay, scheduledTimeoutIdentifiers, timerId, expected, 'timeout'));
|
||||
};
|
||||
//# sourceMappingURL=timer.js.map
|
1
VApp/node_modules/worker-timers-worker/build/es2019/helpers/timer.js.map
generated
vendored
Normal file
1
VApp/node_modules/worker-timers-worker/build/es2019/helpers/timer.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../../src/helpers/timer.ts"],"names":[],"mappings":"AAEA,MAAM,4BAA4B,GAAwB,IAAI,GAAG,EAAE,CAAC;AACpE,MAAM,2BAA2B,GAAwB,IAAI,GAAG,EAAE,CAAC;AAEnE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAe,EAAE,EAAE;IACtD,MAAM,UAAU,GAAG,4BAA4B,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAE7D,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC3B,YAAY,CAAC,UAAU,CAAC,CAAC;QACzB,4BAA4B,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;SAAM,CAAC;QACJ,MAAM,IAAI,KAAK,CAAC,qDAAqD,OAAO,IAAI,CAAC,CAAC;IACtF,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAe,EAAE,EAAE;IACrD,MAAM,UAAU,GAAG,2BAA2B,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAE5D,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC3B,YAAY,CAAC,UAAU,CAAC,CAAC;QACzB,2BAA2B,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;SAAM,CAAC;QACJ,MAAM,IAAI,KAAK,CAAC,oDAAoD,OAAO,IAAI,CAAC,CAAC;IACrF,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,mCAAmC,GAAG,CAAC,KAAa,EAAE,eAAuB,EAAE,EAAE;IACnF,IAAI,GAAW,CAAC;IAChB,IAAI,cAAsB,CAAC;IAC3B,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IACtC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,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