creator 有精灵裁剪接口吗?
var sp = this.node.getChildByName("pao").getComponent(cc.Sprite)
sp.trim = true;
sp.spriteFrame.setRect(cc.rect(0,0,40,118))
这样使用没什么用。
creator 有精灵裁剪接口吗?
var sp = this.node.getChildByName("pao").getComponent(cc.Sprite)
sp.trim = true;
sp.spriteFrame.setRect(cc.rect(0,0,40,118))
这样使用没什么用。
这个是裁剪透明区域吧,你想怎么裁剪
let sf = new cc.SpriteFrame(texture, new cc.Rect(x, y, w, h));