Spaces:
Running
Running
File size: 327 Bytes
01488bc | 1 2 3 4 5 6 7 8 9 10 11 12 13 | 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);
};
|