aws-samples / amazon-sumerian-hosts

Amazon Sumerian Hosts (Hosts) is an experimental open source project that aims to make it easy to create interactive animated 3D characters for Babylon.js, three.js, and other web 3D frameworks. It leverages AWS services including Amazon Polly (text-to-speech) and Amazon Lex (chatbot).
MIT No Attribution
187 stars 82 forks source link

Interrupt currently playing animation to immediately play a new one? #38

Open roschler opened 3 years ago

roschler commented 3 years ago

I have noticed that if I try to play an animation with a host that is currently playing an animation, nothing happens. I can't play any new animations until the existing one stops. Is there a way to stop the existing animation so I can immediately play a new one?

Also, a giant thank you for creating this library. I have used it to create an automated, animated improv theater that uses OpenAI's GPT-3 natural language generation system to create animated scenes in real-time based on scene suggestions. If you want to see an example of this, check out this video:

https://www.youtube.com/watch?v=QL4QQ5NsPL8

Again, thank you for such a well designed and innovative software library!

jkerste commented 3 years ago

Hey @roschler, thanks for showing us what you have used this library to make!

With respect to your question, are you referring to the GestureFeature.playGesture() animations? If so there is a force option that can be set in the call options. This will cause the animation to play regardless of any currently playing animations: https://github.com/aws-samples/amazon-sumerian-hosts/blob/mainline/src/core/GestureFeature.js#L537