Final state

State A
State B
State C
(final)

You can configure a final state, which when entered indicates the system has reached the end:

final: 'c'

This can be detected by:

This example uses a change handler to update the animation, and a complete handler to log to the console.