Skip to content

fix: make offscreen() use global onUpdate(), when pause: true, so it can detect when it comes back onscreen #537

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 4 commits into from
Nov 27, 2024

Conversation

dragoncoder047
Copy link
Contributor

closes #536

I also added this behavior behind a new flag, unpause, so users that are already using pause: true, won't get broken suddenly

@dragoncoder047 dragoncoder047 changed the title make offscreen() use global onUpdate(), when pause: true, so it can detect when it comes back onscreen fix: make offscreen() use global onUpdate(), when pause: true, so it can detect when it comes back onscreen Nov 24, 2024
Copy link

pkg-pr-new bot commented Nov 24, 2024

Open in Stackblitz

npm i https://pkg.pr.new/kaplayjs/kaplay@537

commit: 5d7d59a

@lajbel
Copy link
Member

lajbel commented Nov 26, 2024

Could you update to latest commits and move the example to playtests?

Copy link
Member

@lajbel lajbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dragoncoder047
Copy link
Contributor Author

Bit busy right now but don't merge this pr until I fix the examples and merge master

@dragoncoder047
Copy link
Contributor Author

ok done

@lajbel lajbel merged commit 83d4eba into kaplayjs:master Nov 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug:offscreen({pause: true}) gets stuck once paused, must be unpaused manually
2 participants