mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 21:55:52 +02:00
Archive update v0.55.2
This commit is contained in:
@@ -1378,6 +1378,7 @@ export interface BodyAnimation {
|
||||
fps: number;
|
||||
frames: BodyAnimationFrame[];
|
||||
shadow?: BodyShadow[];
|
||||
disableHeadTurnFrames: number;
|
||||
}
|
||||
|
||||
export interface HeadAnimationFrame {
|
||||
@@ -1853,3 +1854,17 @@ export const enum UpdateFlags {
|
||||
SwitchRegion = 2048,
|
||||
// max 32768
|
||||
}
|
||||
|
||||
export let counterNow: () => number;
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
counterNow = performance.now;
|
||||
} else {
|
||||
const hrtime = process.hrtime;
|
||||
const getNanoSeconds = () => {
|
||||
const hr = hrtime();
|
||||
return hr[0] * 1e9 + hr[1];
|
||||
};
|
||||
const nodeLoadTime = getNanoSeconds() - process.uptime() * 1e9;
|
||||
counterNow = () => (getNanoSeconds() - nodeLoadTime) / 1e6;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user