feat(runtime): apply color grading in preview and render

This commit is contained in:
ukimsanov
2026-06-16 13:41:32 -07:00
parent 8aaaaf1812
commit 1ad158d2f0
15 changed files with 1762 additions and 34 deletions
+7 -1
View File
@@ -17,6 +17,7 @@ const PICKER_BLOCK_SELECTOR = [
"[data-hyperframes-picker-block]",
"[data-hyper-shader-loading]",
].join(",");
const COLOR_GRADING_SOURCE_HIDDEN_ATTR = "data-hf-color-grading-source-hidden";
export type PickerModule = {
enablePickMode: () => void;
@@ -67,7 +68,12 @@ export function createPickerModule(deps: PickerModuleDeps): PickerModule {
if (computed.display === "none" || computed.visibility === "hidden") return true;
if (computed.pointerEvents === "none") return true;
const opacity = Number.parseFloat(computed.opacity);
if (Number.isFinite(opacity) && opacity <= 0.01) return true;
if (
Number.isFinite(opacity) &&
opacity <= 0.01 &&
!current.hasAttribute(COLOR_GRADING_SOURCE_HIDDEN_ATTR)
)
return true;
current = current.parentElement;
}
return false;