Színkorrekciók

This commit is contained in:
Walke committed 2025-08-23 00:05:18 +02:00
1 parent 34a6df5949
commit a1ff3beb35
471 files changed
+63615 -6

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import { frame, cancelFrame } from '../frameloop/frame.mjs';
function observeTimeline(update, timeline) {
let prevProgress;
const onFrame = () => {
const { currentTime } = timeline;
const percentage = currentTime === null ? 0 : currentTime.value;
const progress = percentage / 100;
if (prevProgress !== progress) {
update(progress);
}
prevProgress = progress;
};
frame.preUpdate(onFrame, true);
return () => cancelFrame(onFrame);
}
export { observeTimeline };