Speed up grid animations
This commit is contained in:
parent
429fab8582
commit
acb3926381
@ -15,7 +15,6 @@ export default function PhotoGrid({
|
|||||||
photos,
|
photos,
|
||||||
selectedPhoto,
|
selectedPhoto,
|
||||||
photoPriority,
|
photoPriority,
|
||||||
fast,
|
|
||||||
animate = true,
|
animate = true,
|
||||||
canStart,
|
canStart,
|
||||||
animateOnFirstLoadOnly,
|
animateOnFirstLoadOnly,
|
||||||
@ -30,7 +29,6 @@ export default function PhotoGrid({
|
|||||||
photos: Photo[]
|
photos: Photo[]
|
||||||
selectedPhoto?: Photo
|
selectedPhoto?: Photo
|
||||||
photoPriority?: boolean
|
photoPriority?: boolean
|
||||||
fast?: boolean
|
|
||||||
animate?: boolean
|
animate?: boolean
|
||||||
canStart?: boolean
|
canStart?: boolean
|
||||||
animateOnFirstLoadOnly?: boolean
|
animateOnFirstLoadOnly?: boolean
|
||||||
@ -62,8 +60,8 @@ export default function PhotoGrid({
|
|||||||
)}
|
)}
|
||||||
type={animate === false ? 'none' : undefined}
|
type={animate === false ? 'none' : undefined}
|
||||||
canStart={canStart}
|
canStart={canStart}
|
||||||
duration={fast ? 0.3 : undefined}
|
duration={0.8}
|
||||||
staggerDelay={0.075}
|
staggerDelay={0.04}
|
||||||
distanceOffset={40}
|
distanceOffset={40}
|
||||||
animateOnFirstLoadOnly={animateOnFirstLoadOnly}
|
animateOnFirstLoadOnly={animateOnFirstLoadOnly}
|
||||||
staggerOnFirstLoadOnly={staggerOnFirstLoadOnly}
|
staggerOnFirstLoadOnly={staggerOnFirstLoadOnly}
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import { formatFocalLength } from '@/focal';
|
|||||||
import { getNextImageUrlForRequest } from '@/platforms/next-image';
|
import { getNextImageUrlForRequest } from '@/platforms/next-image';
|
||||||
import { photoHasFilmData } from '@/film';
|
import { photoHasFilmData } from '@/film';
|
||||||
import {
|
import {
|
||||||
HIGH_DENSITY_GRID,
|
|
||||||
IS_PREVIEW,
|
IS_PREVIEW,
|
||||||
SHOW_EXIF_DATA,
|
SHOW_EXIF_DATA,
|
||||||
SHOW_FILMS,
|
SHOW_FILMS,
|
||||||
@ -33,12 +32,10 @@ export const INFINITE_SCROLL_FEED_MULTIPLE =
|
|||||||
process.env.NODE_ENV === 'development' ? 2 : 24;
|
process.env.NODE_ENV === 'development' ? 2 : 24;
|
||||||
|
|
||||||
// INFINITE SCROLL: GRID
|
// INFINITE SCROLL: GRID
|
||||||
export const INFINITE_SCROLL_GRID_INITIAL = HIGH_DENSITY_GRID
|
export const INFINITE_SCROLL_GRID_INITIAL =
|
||||||
? process.env.NODE_ENV === 'development' ? 12 : 48
|
process.env.NODE_ENV === 'development' ? 12 : 48;
|
||||||
: process.env.NODE_ENV === 'development' ? 12 : 48;
|
export const INFINITE_SCROLL_GRID_MULTIPLE =
|
||||||
export const INFINITE_SCROLL_GRID_MULTIPLE = HIGH_DENSITY_GRID
|
process.env.NODE_ENV === 'development' ? 12 : 48;
|
||||||
? process.env.NODE_ENV === 'development' ? 12 : 48
|
|
||||||
: process.env.NODE_ENV === 'development' ? 12 : 48;
|
|
||||||
|
|
||||||
// Thumbnails below large photos on pages like /p/[photoId]
|
// Thumbnails below large photos on pages like /p/[photoId]
|
||||||
export const RELATED_GRID_PHOTOS_TO_SHOW = 12;
|
export const RELATED_GRID_PHOTOS_TO_SHOW = 12;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user