feature/comparison-slider #19

Merged
ilia merged 129 commits from feature/comparison-slider into main 2026-02-02 09:23:46 +00:00
Showing only changes of commit 4a94f7bd09 - Show all commits

View File

@@ -19,7 +19,11 @@ interface Props {
/** /**
* Is element fully visible * Is element fully visible
*/ */
isVisible: boolean; isFullyVisible: boolean;
/**
* Is element partially visible
*/
isPartiallyVisible: boolean;
/** /**
* From 0 to 1 * From 0 to 1
*/ */
@@ -30,7 +34,7 @@ interface Props {
children: Snippet<[font: UnifiedFont]>; children: Snippet<[font: UnifiedFont]>;
} }
const { font, isVisible, proximity, children }: Props = $props(); const { font, isFullyVisible, isPartiallyVisible, proximity, children }: Props = $props();
const selected = $derived(selectedFontsStore.has(font.id)); const selected = $derived(selectedFontsStore.has(font.id));
let timeoutId = $state<NodeJS.Timeout | null>(null); let timeoutId = $state<NodeJS.Timeout | null>(null);
@@ -49,7 +53,7 @@ const bloom = new Spring(0, {
// Sync spring to proximity for a "Lens" effect // Sync spring to proximity for a "Lens" effect
$effect(() => { $effect(() => {
bloom.target = isVisible ? 1 : 0; bloom.target = isPartiallyVisible ? 1 : 0;
}); });
$effect(() => { $effect(() => {