Skip to content

feat: add dynamic fps option #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2025
Merged

feat: add dynamic fps option #3

merged 1 commit into from
Jun 14, 2025

Conversation

ivodolenc
Copy link
Member

Type of Change

  • New feature
  • Types

Request Description

Adds the ability to dynamically set the fps limit. Super useful for situations where you need to set the fps after frame init.

const frame = createFrame()

console.log(frame.fps) // undefined

frame.fps = 60

console.log(frame.fps) // 60

frame.update((state) => console.log(state), { loop: true }) // runs at `60fps`

Bundlesize

  • Compact: 1.36 KB minified, 753 B gzip

@ivodolenc ivodolenc added feat New feature types TS types labels Jun 14, 2025
@ivodolenc ivodolenc merged commit e667a25 into main Jun 14, 2025
@ivodolenc ivodolenc deleted the feat/fps branch June 14, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature types TS types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant