Hello
I'm not sure I've fully understood your question. Be aware that you can write using you own langauge because on the bottom right of each message a translate button will quickly translate the message.
As Nate indicated to you in this post 3 days ago, to control the player viewport, you can use the viewport configuration as explained in here.
As far as I understood, you are asking in the following paragraph:
However, the problem is that when rolePlay('idle') is started after the move is finished, because need set size first, the move will be displayed on the idle size canvas (that is, 127*185) first, and then play the idle animation, there will be a process of role reduction and then enlargement. How can I show the idle animation directly after the move animation?
If you can show the animation right after without any viewport transition. If that is the question, you can supply the following config to the player
viewport: { transitionTime: 0 },
As the documentation explains:
When the player switches between animations, it interpolates the viewports of the old and new animation for 0.2 seconds. This viewport transition time can be set via the transitionTime property.
Regarding the other two questions:
Is it right to change containers to meet this requirement?
You should change the container size. The player calculates the viewport size to contain each animation. If you want to change the viewport size, just pass the desired global viewport size or the viewport size for each specific animation, as the documentation shows.
As Nate mentioned, you could also call directly the setViewport
method on the player.
How do I switch between two different sized animations?
You just call the player.setAnimation
as you already do.
If this does not answer your questions, please try to exaplin better your problem ️