Add dampScalar function to runtime-host.ts

This commit is contained in:
2026-04-11 19:07:37 +02:00
parent 030068cc39
commit f338c8cd48

View File

@@ -115,6 +115,10 @@ const FALLBACK_FACE_COLOR = 0xf2ece2;
const BOX_FACE_MATERIAL_COUNT = 6;
const WATER_REFLECTION_UPDATE_INTERVAL_MS = 96;
function dampScalar(current: number, target: number, rate: number, dt: number) {
return current + (target - current) * Math.min(1, dt * rate);
}
export interface RuntimeSceneLoadState {
status: "loading" | "ready" | "error";
message: string | null;