Merge branch 'archive' into archive-update-v0.55.2

This commit is contained in:
Eliot Partridge
2019-10-04 10:31:47 -05:00
24 changed files with 406 additions and 105 deletions
+15
View File
@@ -1380,6 +1380,7 @@ export interface BodyAnimation {
fps: number;
frames: BodyAnimationFrame[];
shadow?: BodyShadow[];
disableHeadTurnFrames: number;
}
export interface HeadAnimationFrame {
@@ -1855,3 +1856,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;
}