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