mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-11 21:56:25 +00:00
fix typo and adjust touch roulette timings
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "life-trinket",
|
"name": "life-trinket",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.9.6",
|
"version": "0.9.7",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18",
|
"node": ">=18",
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ const getOrientation = () => {
|
|||||||
: 'landscape';
|
: 'landscape';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const ANIMATION_INTRO_LENGTH = 500;
|
||||||
|
|
||||||
|
const BEFORE_INTRO_TIMER_LENGTH = 100;
|
||||||
|
|
||||||
export const FingerGame = () => {
|
export const FingerGame = () => {
|
||||||
const { players } = usePlayers();
|
const { players } = usePlayers();
|
||||||
|
|
||||||
@@ -34,7 +38,7 @@ export const FingerGame = () => {
|
|||||||
aboutToStartTimerRef.current = setTimeout(() => {
|
aboutToStartTimerRef.current = setTimeout(() => {
|
||||||
setSelectedTouchPoint(undefined);
|
setSelectedTouchPoint(undefined);
|
||||||
setPlaying(true);
|
setPlaying(true);
|
||||||
}, 500);
|
}, ANIMATION_INTRO_LENGTH);
|
||||||
|
|
||||||
setTimerStarted(true);
|
setTimerStarted(true);
|
||||||
return;
|
return;
|
||||||
@@ -46,7 +50,7 @@ export const FingerGame = () => {
|
|||||||
const randomIndex = Math.floor(Math.random() * touchPoints.length);
|
const randomIndex = Math.floor(Math.random() * touchPoints.length);
|
||||||
const randomTouchPoint = touchPoints[randomIndex];
|
const randomTouchPoint = touchPoints[randomIndex];
|
||||||
setSelectedTouchPoint(randomTouchPoint);
|
setSelectedTouchPoint(randomTouchPoint);
|
||||||
}, 250);
|
}, BEFORE_INTRO_TIMER_LENGTH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,7 +103,7 @@ export const FingerGame = () => {
|
|||||||
aboutToStartTimerRef.current = setTimeout(() => {
|
aboutToStartTimerRef.current = setTimeout(() => {
|
||||||
setSelectedTouchPoint(undefined);
|
setSelectedTouchPoint(undefined);
|
||||||
setPlaying(true);
|
setPlaying(true);
|
||||||
}, 500);
|
}, ANIMATION_INTRO_LENGTH);
|
||||||
setTimerStarted(true);
|
setTimerStarted(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -180,7 +184,7 @@ export const FingerGame = () => {
|
|||||||
key={`touch-point-${index}`}
|
key={`touch-point-${index}`}
|
||||||
data-is-selected={selectedTouchPoint?.id === point.id}
|
data-is-selected={selectedTouchPoint?.id === point.id}
|
||||||
data-unloading={timerStarted}
|
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]
|
h-[75px] w-[75px]
|
||||||
data-[unloading=false]:data-[is-selected=true]:h-[250px] data-[unloading=false]:data-[is-selected=true]:w-[250px]
|
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]
|
data-[unloading=true]:h-[0px] data-[unloading=true]:w-[0px] data-[unloading=true]:duration-[400ms]
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ const questions = [
|
|||||||
'Who has the most piercings?',
|
'Who has the most piercings?',
|
||||||
'Who has the most expensive shoes?',
|
'Who has the most expensive shoes?',
|
||||||
'Who has the most most amount of teeth?',
|
'Who has the most most amount of teeth?',
|
||||||
'Who has the most least amount of teeth?',
|
'Who has the least amount of teeth?',
|
||||||
'Who has the most least amount of teeth?',
|
|
||||||
'Who lives closest to the equator?',
|
'Who lives closest to the equator?',
|
||||||
'Who is the tallest person in the group?',
|
'Who is the tallest person in the group?',
|
||||||
'Who is the shortest person in the group?',
|
'Who is the shortest person in the group?',
|
||||||
|
|||||||
Reference in New Issue
Block a user