Archive update v0.55.2

This commit is contained in:
Eliot Partridge
2019-10-04 10:23:00 -05:00
parent a9bbd552a3
commit 1971e2c962
25 changed files with 407 additions and 106 deletions
+15
View File
@@ -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;
}