Camera 的 zoomRatio 能不能用 Action 缓动?

Camera 的 zoomRatio 能不能用 Action 缓动?

动作列表中未找到。。@panda

官方有个带相机缓动的例子 不过是老版本的

目前用的是creator1.10.1版本

请问2.0的Camera 的 zoomRatio 能用 Action 缓动实现么?

估计是无解。。。。

请问现在可以用缓动实现了吗

可以,这是2.1.1的demoNewProject_3.zip (733.8 KB)

曾经想过有那么一个action,可以操作任意属性,本来呢,是很容易解决的事情,直接继承ActionInterval就可以实现,但是奈何JSB绑定那里缺少了继承的东西,导致无法用……所以自己另外实现了一个对任意属性进行缓动的东西,实现方法就不说了,挺恶心的,反正目前我用没啥问题。直接放出来吧,import/require引入脚本,直接用其静态函数就可以。直接暴露了缓动过程的进度参数,剩余插值自己传入函数处理就可以。
xTween.rar (1.8 KB)

好吧,用它来简单来实现个“打字机”

this._loadingStr = this.labelLoading.string;
xTween.tween(0.8, (alpha)=>{
this.labelLoading.string = this._loadingStr.substr(0, Math.floor(alpha*this._loadingStr.length));
}).loop(999999);

用tween可以实现

cc.tween(this.camera).to(duration, { zoomRatio: targetZoom}).start()