From 12a0409251efe4a1017b306dc7f925194bde6a55 Mon Sep 17 00:00:00 2001 From: elmarti Date: Thu, 24 Nov 2022 17:52:19 +0000 Subject: [PATCH] :memo: fix parallax tilt demo --- src/Joystick.stories.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Joystick.stories.tsx b/src/Joystick.stories.tsx index 382e023..6e9440d 100644 --- a/src/Joystick.stories.tsx +++ b/src/Joystick.stories.tsx @@ -107,7 +107,8 @@ joystickStories.add("Controlling a react-parallax-tilt ", () => { const [[manualTiltAngleX, manualTiltAngleY], setManualTiltAngle] = useState([0, 0] as Array); const onMove = (stick:IJoystickUpdateEvent) => { - setManualTiltAngle([stick.y, stick.x]); + //@ts-ignore + setManualTiltAngle([stick.y * 100, stick.x * 100]); }; const onStop = () => {