diff --git a/apps/dotlottie-viewer/src/pages/perf.tsx b/apps/dotlottie-viewer/src/pages/perf.tsx index e47472bb..d98b96bd 100644 --- a/apps/dotlottie-viewer/src/pages/perf.tsx +++ b/apps/dotlottie-viewer/src/pages/perf.tsx @@ -135,12 +135,16 @@ export const Perf = (): JSX.Element => { const [player, setPlayer] = useState(playerOptions[0]); const [animationList, setAnimationList] = useState([]); const [text, setText] = useState(''); + const [useFrameInterpolation, setUseFrameInterpolation] = useState(true); useEffect(() => { const params = new URLSearchParams(window.location.search); const playerParam = params.get('player'); const countParam = params.get('count'); const seed = params.get('seed'); + const frameInterpolation = params.get('frame-interpolation'); + + setUseFrameInterpolation(frameInterpolation === null || frameInterpolation === 'true'); const selectedCount = countOptions.find((c) => c.name === countParam) || countOptions[1]; const selectedPlayer = playerOptions.find((p) => p.name === playerParam) || playerOptions[0]; @@ -265,6 +269,21 @@ export const Perf = (): JSX.Element => { > Set +
+ {(player.id === 0 || player.id === 1) && ( +
+ { + setQueryStringParameter('frame-interpolation', e.target.checked.toString()); + window.location.reload(); + }} + /> + Use Frame Interpolation +
+ )} +
@@ -287,8 +306,24 @@ export const Perf = (): JSX.Element => {