transitionTo

open override fun transitionTo(targetState: ViewportState, transition: ViewportTransition?, completionListener: CompletionListener?)

Executes a transition to requested state.

When started, goes to ViewportTransition and to the final ViewportState when ended.

If transition is canceled, state goes to IDLE.

Parameters

completionListener

The listener to observe the completion state.

targetState

The target ViewportState to transition to.

transition

The ViewportTransition that's used to transition to target state, if not specified, the ViewportPlugin.defaultTransition will be used.