You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes reactions trigger other reactions, especially in the case of derived signals. However, since we're using Bevy change detection, this will cause a 1-frame delay: when a reaction causes a mutation, we won't see the change until the next frame.
We can avoid this by putting the reactive logic in a separate schedule and running that schedule in a loop. This will need to check for convergence, however: the number of changes should decrease to zero in just a few iterations. We can count how many dependencies change each iteration, and insure that that number generally decreases - it may increase sometimes, but not too often.
Quill had a similar algorithm that used atomic ints, but it should be possible to get this to work with Bevy changes.
The text was updated successfully, but these errors were encountered:
Sometimes reactions trigger other reactions, especially in the case of derived signals. However, since we're using Bevy change detection, this will cause a 1-frame delay: when a reaction causes a mutation, we won't see the change until the next frame.
We can avoid this by putting the reactive logic in a separate schedule and running that schedule in a loop. This will need to check for convergence, however: the number of changes should decrease to zero in just a few iterations. We can count how many dependencies change each iteration, and insure that that number generally decreases - it may increase sometimes, but not too often.
Quill had a similar algorithm that used atomic ints, but it should be possible to get this to work with Bevy changes.
The text was updated successfully, but these errors were encountered: