Spaces:
Running
Running
Download src/react-fluid-distortion/utils.ts from LiquidAI/LFM2-VL-WebGPU: direct link, hf CLI and curl.
- Browser
- Download file 327 Bytes
-
https://huggingface.co/spaces/LiquidAI/LFM2-VL-WebGPU/resolve/main/src/react-fluid-distortion/utils.ts
- Command line
-
hf download hf://spaces/LiquidAI/LFM2-VL-WebGPU/src/react-fluid-distortion/utils.ts
-
curl -L -o utils.ts https://huggingface.co/spaces/LiquidAI/LFM2-VL-WebGPU/resolve/main/src/react-fluid-distortion/utils.ts
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); | |
| }; | |