mlabonne's picture
upload demo files (#1)
01488bc
raw
history blame contribute delete
327 Bytes
import { Color, Vector3 } from "three";
import { REFRESH_RATE } from "./constant";
export const hexToRgb = (hex: string) => {
const color = new Color(hex);
return new Vector3(color.r, color.g, color.b);
};
export const normalizeScreenHz = (value: number, dt: number) => {
return Math.pow(value, dt * REFRESH_RATE);
};