MCPcopy Create free account
hub / github.com/Moebytes/Frame-Player / animateFPS

Function animateFPS

components/VideoPlayer.tsx:635–654  ·  view source on GitHub ↗
(time: number)

Source from the content-addressed store, hash-verified

633 }
634
635 const animateFPS = (time: number) => {
636 if (!lastTime) lastTime = time
637 const delta = time - lastTime
638 lastTime = time
639
640 acc += delta
641
642 if (adjustedData) {
643 let delay = getDelay()
644
645 if (acc >= delay) {
646 update()
647 acc -= delay
648 }
649 }
650
651 draw()
652 if (paused) return
653 animationID = requestAnimationFrame(animateFPS)
654 }
655
656 const animateVideo = async () => {
657 if (!videoRef.current) return

Callers

nothing calls this directly

Calls 3

getDelayFunction · 0.85
updateFunction · 0.85
drawFunction · 0.85

Tested by

no test coverage detected