Open alex-moon opened 1 year ago
It's clear we need a standard way to animate transforms as well, ie from one position and quaternion to another. The way to do this is to do a helper which stores animations against text keys. You probably put these keys in an enum. You call a method animate(key, positionFrom, quaternionFrom, positionTo, quaternionTo, seconds, delta) and it does the following:
Question: what if value for seconds changes? Well then I think it updates the target for seconds, right? But the value for seconds is liable to be the same for each key...
Question: could we do landing and launching this way?
Question: we will need to be able to queue these. It seems the animate call will have to return a promise.
For detecting when an animation has finished: https://stackoverflow.com/questions/42383681/verify-when-a-clipaction-animation-finished-playing-in-three-js
Nice to haves: