mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 23:00:03 +00:00
feat(runtime): apply color grading in preview and render
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user