Színkorrekciók

This commit is contained in:
2025-08-23 00:05:18 +02:00
parent 34a6df5949
commit a1ff3beb35
471 changed files with 63615 additions and 6 deletions
+13
View File
@@ -0,0 +1,13 @@
import { cancelFrame, frame } from '../frameloop/frame.mjs';
function subscribeValue(inputValues, outputValue, getLatest) {
const update = () => outputValue.set(getLatest());
const scheduleUpdate = () => frame.preRender(update, false, true);
const subscriptions = inputValues.map((v) => v.on("change", scheduleUpdate));
outputValue.on("destroy", () => {
subscriptions.forEach((unsubscribe) => unsubscribe());
cancelFrame(update);
});
}
export { subscribeValue };