Interface IUseAnimationFrameProps

Hierarchy

  • Pick<NAnimationFrame.IChangeableProps, "fps" | "autoFpsFrames">
    • IUseAnimationFrameProps

Properties

autoFpsFrames?: number

The number of frames to test for detecting the real FPS when 'auto' is selected. This determines how many frames are measured before calculating the average FPS.

Default

10
fps?: number | "auto"

Frames per second (FPS) for the animation. If set to 'auto', the FPS will be dynamically determined based on the system's performance.

Default

'auto'

Event triggered on each animation frame

onPause?: (() => void)

Type declaration

    • (): void
    • Event triggered when the animation is paused

      Returns void

onPlay?: (() => void)

Type declaration

    • (): void
    • Event triggered when the animation starts playing

      Returns void