Skip to content

refactor: context in 1 variable #502

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
Nov 8, 2024
Merged

refactor: context in 1 variable #502

merged 1 commit into from
Nov 8, 2024

Conversation

lajbel
Copy link
Member

@lajbel lajbel commented Nov 8, 2024

Description

Issues or related

  • Related Issue #
  • Closes #

Copy link

pkg-pr-new bot commented Nov 8, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/kaplayjs/kaplay@502

commit: f9f3e97

@lajbel lajbel merged commit 55ca35a into master Nov 8, 2024
3 checks passed
Copy link
Member

@mflerackers mflerackers left a comment

Choose a reason for hiding this comment

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

See comments

@@ -20,17 +20,17 @@ export function opacity(a: number): OpacityComp {
return {
id: "opacity",
opacity: a ?? 1,
fadeIn(time = 1, easeFunc = k.easings.linear): TweenController {
return game.root.tween(
fadeIn(time = 1, easeFunc = _k.k.easings.linear): TweenController {
Copy link
Member

Choose a reason for hiding this comment

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

_k.k ?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep, _k also contains the k handler


export function dt() {
return app.dt() * debug.timeScale;
Copy link
Member

Choose a reason for hiding this comment

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

debug.timeScale is no longer needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

no because app.dt() already did it, it was dupplied

Copy link
Member

Choose a reason for hiding this comment

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

😱

@lajbel lajbel deleted the context-in-one-var-4000 branch March 12, 2025 12:00
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.

2 participants