如何转换laya写法为cocos写法

这种laya写法怎么翻译成cocos写法

好像cocos得Texture2D没有从一张大图创建一个小图的api

得用SpriteFrame

用meshsprite

可以使用 SpriteFrame.setRect 设置纹理矩形区域