Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
3people committed Apr 6, 2024
2 parents 321e6d5 + fc3f3e3 commit 59d55da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hooks/use-player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const usePlayer = (
}

const addBlock = () => {
// currentBlockRef.value = createBlock(4, widthRef.value / 2, 60, ratioRef.value, true)
// currentBlock = createBlock(9, width / 2, 60, ratio, true)
currentBlock = createBlock(nextBlockRef.value, width / 2, 60, ratio, true)
isSetBlock = false
World.add(engine.world, currentBlock)
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/use-timer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ref} from 'vue'
import { ref } from 'vue'

export const useTimer = (limit: number, callback: () => void) => {
const count = ref<undefined | number>(undefined)
Expand All @@ -12,10 +12,10 @@ export const useTimer = (limit: number, callback: () => void) => {
}

const start = () => {
count.value = limit
if (interval) {
return
}
count.value = limit
interval = setInterval(() => {
if (count.value) {
count.value = count.value - 1
Expand All @@ -32,5 +32,5 @@ export const useTimer = (limit: number, callback: () => void) => {
clear()
}

return {count, reset, start}
return { count, reset, start }
}

0 comments on commit 59d55da

Please sign in to comment.