Skip to content

Allow waves to change direction seamlessly (From TheDan64) - #43

Merged
Neopallium merged 4 commits into
mainfrom
TheDan64-wave-dir
Jan 17, 2026
Merged

Neopallium merged 4 commits into
mainfrom
TheDan64-wave-dir

Conversation

@Neopallium

Copy link
Copy Markdown
Owner

Updated PR #42

Comment thread src/water.rs
Comment on lines +71 to +74
// Snapshot current blended state as "old" direction
self.dir_a = self.current_blended();
self.dir_b = normalized;
self.blend = 0.0;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Might want to change how "snapshotting" the old blend works here.

Maybe something like:

  1. If blend <= ~0.5, don't change dir_a.
  2. If blend >= ~0.5, set dir_a = dir_b.

Also if the old blend is close to halfway, maybe start the new blend at about the same. It might make the visual jump smaller.

@Neopallium
Neopallium merged commit 08c74ca into main Jan 17, 2026
@Neopallium

Copy link
Copy Markdown
Owner Author

@TheDan64 Merged and released as version 0.18.

@TheDan64

Copy link
Copy Markdown
Contributor

@Neopallium Thank you!!

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