主要用作动画,示例:

 cc.tween(this.stretch)
            .to(0.1,{}).call(()=>{this.arrow.scale = scale})
            .to(0.5, { x: x },{easing:"sineOut"})
            .call(() => {
                this.inOrOut = !this.inOrOut;
            })
            .start();

官方文档具体效果参考地址:http://docs.cocos.com/creator/api/zh/classes/Easing.html#elasticout
替换代码实例中的"sineOut"即可

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐