How to animate resizing a cc.Layer?

Hi all,

I’m trying to understand how to animate changes to the size of a layer (a use case would be expanding the height of a panel when it is touched), but I cant find any example. I’ve had a try with cc.actionTween but getting an assertion with “target must implement ActionTweenDelegate”. I’m using cocos2d-js 3.6.1.

Grateful for any help!
Thanks

You can find an example in the test case:

LayerTest

Source code located in js-tests/LayerTest/

Thanks pandamicro, I can see the example where the size is being continuously updated in a touch event handler.

What I’m looking for is a way to animate the size of the layer using the action api, within a call to cc.Node.runAction, so that it can be combined with other animations (and cc.scaleTo isn’t an option because I do not want children to be scaled…)

Thanks

There is no example in that file (version checked: 3.15.1, 3.15, 3.14, 3.10)