imodeljs / frontend-sample-showcase

MIT License
17 stars 9 forks source link

Scientific viz improvements #278

Closed Josh-Schifter closed 2 years ago

Josh-Schifter commented 2 years ago

Hide the default timeline which a) interferes with the showcase floating widgets and b) confusingly animates even for the static analysis styles. Now the sample shows how to control the analysis fraction yourself which I think is an improvement anyway.

Also, I added a bunch of code comments.

Josh-Schifter commented 2 years ago

After changing from an actively animated displacement to a static one, the slider will move when interacting with drop down controls.

Now, I reset the fraction to zero whenever a new channel is selected. Please check if this addresses the issue.

Ellord207 commented 2 years ago

After changing from an actively animated displacement to a static one, the slider will move when interacting with drop down controls.

Now, I reset the fraction to zero whenever a new channel is selected. Please check if this addresses the issue.

This did not fix the issue. I'm guessing the issue is that the animator is not getting cancelled when that the analysis style is applied. You can clear the current animator with veiwport.setAnimator(undefined).

I would suggest reverting the previous change. It could create a nice effect changing animation channels to see a smooth transition.