Skip to content
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

Interpolation between multiple 'deep' values. #9

Open
vkbsb opened this issue Feb 2, 2021 · 0 comments
Open

Interpolation between multiple 'deep' values. #9

vkbsb opened this issue Feb 2, 2021 · 0 comments

Comments

@vkbsb
Copy link

vkbsb commented Feb 2, 2021

I've seen the example where you can interpolate between just the players in the example for interpolation when the state is a nested object instead of just an array.

I have a use-case where i have to interpolate for other members of the state as well. I've been able to solve this by leveraging the snapshot.newer and snapshot.older fields to get the snapshots and interpolate between them using the percentage field provided by InterpolatedSnapshot interface.

I think it would help if the interface of InterpolatedSnapshot returned the snapshots directly instead of just the ids. This would help resolve the use-case very easily. I'm worried about the perf implications of using vault.getByID() for solving the same.

Another way of solving this would be to support multiple deep keys, but that would complicate the interpolate code.

What's your pref, i can raise a PR for changing the IDs to the actual snapshots if you are ok with it.

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

No branches or pull requests

1 participant