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

AnimationPlayer impacts multiple views #2427

Open
AnthonyGlt opened this issue Oct 7, 2024 · 0 comments
Open

AnimationPlayer impacts multiple views #2427

AnthonyGlt opened this issue Oct 7, 2024 · 0 comments
Assignees
Labels

Comments

@AnthonyGlt
Copy link
Contributor

Context

this.player = new AnimationPlayer();

The animationplayer is unique for every instance of globecontrols but the callback can be mixed up between multiple views.

for example, I have 2 different views here, and when I trigger an animation on VIEW-1, the VIEW-2 is also affected:

Screencast.from.07-10-2024.15.59.52.webm

Possible Cause/Fix/Solution

It seems to be this part of the code that is causing this issue:

if (this.enableDamping && state === this.states.ORBIT && this.player.isStopped() && (sphericalDelta.theta > EPS || sphericalDelta.phi > EPS)) {
this.player.setCallback(() => { this.update(this.states.ORBIT); });
this.player.playLater(durationDampingOrbital, 2);

But as we can notice, player.stop() is also called in a lot of places... Maybe some code cleanup can be done concerning this player.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants