feature/comparison-slider #19
@@ -19,7 +19,11 @@ interface Props {
|
||||
/**
|
||||
* Is element fully visible
|
||||
*/
|
||||
isVisible: boolean;
|
||||
isFullyVisible: boolean;
|
||||
/**
|
||||
* Is element partially visible
|
||||
*/
|
||||
isPartiallyVisible: boolean;
|
||||
/**
|
||||
* From 0 to 1
|
||||
*/
|
||||
@@ -30,7 +34,7 @@ interface Props {
|
||||
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));
|
||||
let timeoutId = $state<NodeJS.Timeout | null>(null);
|
||||
@@ -49,7 +53,7 @@ const bloom = new Spring(0, {
|
||||
|
||||
// Sync spring to proximity for a "Lens" effect
|
||||
$effect(() => {
|
||||
bloom.target = isVisible ? 1 : 0;
|
||||
bloom.target = isPartiallyVisible ? 1 : 0;
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
|
||||
Reference in New Issue
Block a user