aaaaaa
This commit is contained in:
committed by
Clément Le Bihan
parent
2781276c12
commit
69329118f7
@@ -5,7 +5,6 @@ volumes:
|
|||||||
scoro_logs:
|
scoro_logs:
|
||||||
meilisearch:
|
meilisearch:
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
back:
|
back:
|
||||||
#platform: linux/amd64
|
#platform: linux/amd64
|
||||||
@@ -22,7 +21,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
meilisearch:
|
meilisearch:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
env_file:
|
env_file:
|
||||||
@@ -93,15 +92,14 @@ services:
|
|||||||
- "4567:4567"
|
- "4567:4567"
|
||||||
|
|
||||||
meilisearch:
|
meilisearch:
|
||||||
image: getmeili/meilisearch:v1.4
|
image: getmeili/meilisearch:v1.5
|
||||||
volumes:
|
volumes:
|
||||||
- meilisearch:/meili_data
|
- meilisearch:/meili_data
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
|
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
|
|||||||
@@ -35,9 +35,8 @@ const getCursorToPlay = (
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (let i = cursorInfos.length - 1; i > currentCurIdx; i--) {
|
for (let i = cursorInfos.length - 1; i > currentCurIdx; i--) {
|
||||||
const cursorInfo = cursorInfos[i]!;
|
if (cursorInfos[i]!.timestamp <= timestamp) {
|
||||||
if (cursorInfo.timestamp <= timestamp) {
|
onCursorMove(cursorInfos[i]!, i);
|
||||||
onCursorMove(cursorInfo, i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -186,7 +185,7 @@ const PartitionMagic = ({
|
|||||||
}, [data?.cursors, melodySound.current?._loaded]);
|
}, [data?.cursors, melodySound.current?._loaded]);
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (!shouldPlay && playType != 'practice') return;
|
if (!shouldPlay) return;
|
||||||
if (!piano.current || !isPianoLoaded) return;
|
if (!piano.current || !isPianoLoaded) return;
|
||||||
if (!data || data?.cursors.length === 0) return;
|
if (!data || data?.cursors.length === 0) return;
|
||||||
getCursorToPlay(
|
getCursorToPlay(
|
||||||
@@ -194,6 +193,8 @@ const PartitionMagic = ({
|
|||||||
currentCurIdx.current,
|
currentCurIdx.current,
|
||||||
timestamp + transitionDuration,
|
timestamp + transitionDuration,
|
||||||
(cursor, idx) => {
|
(cursor, idx) => {
|
||||||
|
console.log(data.cursors)
|
||||||
|
console.log("b ", timestamp, cursor, currentCurIdx.current)
|
||||||
currentCurIdx.current = idx;
|
currentCurIdx.current = idx;
|
||||||
partitionOffset.value = withTiming(
|
partitionOffset.value = withTiming(
|
||||||
-(cursor.x - data!.cursors[0]!.x) / partitionDims[0],
|
-(cursor.x - data!.cursors[0]!.x) / partitionDims[0],
|
||||||
@@ -202,7 +203,7 @@ const PartitionMagic = ({
|
|||||||
easing: Easing.inOut(Easing.ease),
|
easing: Easing.inOut(Easing.ease),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (playType == 'practice') return;
|
if (playType === 'practice') return;
|
||||||
cursor.notes.forEach((note) => {
|
cursor.notes.forEach((note) => {
|
||||||
piano.current?.start({
|
piano.current?.start({
|
||||||
note: note.note,
|
note: note.note,
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const ScoreModal = (props: ScoreModalProps) => {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Row>
|
</Row>
|
||||||
<Text fontSize="3xl">{Math.max(score, 0)}%</Text>
|
<Text fontSize="3xl">{Math.max(score, 0).toFixed(2)}%</Text>
|
||||||
<Row w="100%" style={{ justifyContent: 'space-between' }}>
|
<Row w="100%" style={{ justifyContent: 'space-between' }}>
|
||||||
<Translate translationKey="precision" />
|
<Translate translationKey="precision" />
|
||||||
<Text>{props.precision}%</Text>
|
<Text>{props.precision}%</Text>
|
||||||
|
|||||||
@@ -336,7 +336,10 @@ const PlayView = ({ songId }: PlayViewProps) => {
|
|||||||
style={{}}
|
style={{}}
|
||||||
type="outlined"
|
type="outlined"
|
||||||
title={translate('practiceBtn')}
|
title={translate('practiceBtn')}
|
||||||
onPress={async () => setPlayType('practice')}
|
onPress={async () => {
|
||||||
|
setPlayType('practice');
|
||||||
|
setShouldPlay(true);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<ButtonBase
|
<ButtonBase
|
||||||
style={{}}
|
style={{}}
|
||||||
|
|||||||
Reference in New Issue
Block a user