diff --git a/src/hooks/useAnimationLoop/useAnimationLoop.stories.tsx b/src/hooks/useAnimationLoop/useAnimationLoop.stories.tsx
index 06a2770..b2c87dc 100644
--- a/src/hooks/useAnimationLoop/useAnimationLoop.stories.tsx
+++ b/src/hooks/useAnimationLoop/useAnimationLoop.stories.tsx
@@ -9,16 +9,11 @@ export default {
};
function DemoComponent(): ReactElement {
- const [delta, setDelta] = useState(0);
- const [currentTimestamp, setCurrentTimestamp] = useState(0);
-
+ const [timestamp, setTimestamp] = useState(0);
const [isRunning, toggleIsRunning] = useToggle(true);
- useAnimationLoop(() => {
- const timestamp = Date.now();
-
- setDelta(timestamp - currentTimestamp);
- setCurrentTimestamp(timestamp);
+ useAnimationLoop((_timestamp: DOMHighResTimeStamp) => {
+ setTimestamp(_timestamp);
}, isRunning);
return (
@@ -30,8 +25,7 @@ function DemoComponent(): ReactElement {
Test Area
-
Current time: {currentTimestamp}
-
Delta: {delta}
+
Timestamp: {timestamp}