From 63aace2b076dac1d88fbcc90265a9d3e03dbbe98 Mon Sep 17 00:00:00 2001 From: Vikeo Date: Sun, 7 Apr 2024 23:58:39 +0200 Subject: [PATCH] fix typo and adjust touch roulette timings --- package.json | 2 +- src/Components/PreStartGame/Games/FingerGame.tsx | 12 ++++++++---- src/Components/PreStartGame/Games/Trivia.tsx | 3 +-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 25334e8..5a497bd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "life-trinket", "private": true, - "version": "0.9.6", + "version": "0.9.7", "type": "commonjs", "engines": { "node": ">=18", diff --git a/src/Components/PreStartGame/Games/FingerGame.tsx b/src/Components/PreStartGame/Games/FingerGame.tsx index 8696c22..4282140 100644 --- a/src/Components/PreStartGame/Games/FingerGame.tsx +++ b/src/Components/PreStartGame/Games/FingerGame.tsx @@ -14,6 +14,10 @@ const getOrientation = () => { : 'landscape'; }; +const ANIMATION_INTRO_LENGTH = 500; + +const BEFORE_INTRO_TIMER_LENGTH = 100; + export const FingerGame = () => { const { players } = usePlayers(); @@ -34,7 +38,7 @@ export const FingerGame = () => { aboutToStartTimerRef.current = setTimeout(() => { setSelectedTouchPoint(undefined); setPlaying(true); - }, 500); + }, ANIMATION_INTRO_LENGTH); setTimerStarted(true); return; @@ -46,7 +50,7 @@ export const FingerGame = () => { const randomIndex = Math.floor(Math.random() * touchPoints.length); const randomTouchPoint = touchPoints[randomIndex]; setSelectedTouchPoint(randomTouchPoint); - }, 250); + }, BEFORE_INTRO_TIMER_LENGTH); return; } @@ -99,7 +103,7 @@ export const FingerGame = () => { aboutToStartTimerRef.current = setTimeout(() => { setSelectedTouchPoint(undefined); setPlaying(true); - }, 500); + }, ANIMATION_INTRO_LENGTH); setTimerStarted(true); return; } @@ -180,7 +184,7 @@ export const FingerGame = () => { key={`touch-point-${index}`} data-is-selected={selectedTouchPoint?.id === point.id} data-unloading={timerStarted} - className="absolute rounded-full translate-x-[-50%] translate-y-[-50%] transition-all duration-1000 + className="absolute rounded-full translate-x-[-50%] translate-y-[-50%] transition-all duration-500 h-[75px] w-[75px] data-[unloading=false]:data-[is-selected=true]:h-[250px] data-[unloading=false]:data-[is-selected=true]:w-[250px] data-[unloading=true]:h-[0px] data-[unloading=true]:w-[0px] data-[unloading=true]:duration-[400ms] diff --git a/src/Components/PreStartGame/Games/Trivia.tsx b/src/Components/PreStartGame/Games/Trivia.tsx index c37e812..5c40511 100644 --- a/src/Components/PreStartGame/Games/Trivia.tsx +++ b/src/Components/PreStartGame/Games/Trivia.tsx @@ -8,8 +8,7 @@ const questions = [ 'Who has the most piercings?', 'Who has the most expensive shoes?', 'Who has the most most amount of teeth?', - 'Who has the most least amount of teeth?', - 'Who has the most least amount of teeth?', + 'Who has the least amount of teeth?', 'Who lives closest to the equator?', 'Who is the tallest person in the group?', 'Who is the shortest person in the group?',