[]创建动画时画布的width和height与 实例化后的ani.size(width, height) 有什么区别

如题
已邀请:

Monica - 知识达人

赞同来自:

你是说在IDE中创建动画页面的那个宽高吗?这个宽高实际是用不到的,只是作为参考的
ani.size设置的是动画的真实宽高

unclepi

赞同来自:

我设置的一个 240x240的动画,代码如下
_proto_.onAnimation_BirdSing = function () {
this.aniBirdSing = new Laya.Animation();
this.aniBirdSing.loadAtlas("res/atlas/birdsing.json");
this.aniBirdSing.interval = 35; // 设置播放间隔(单位:毫秒)
this.aniBirdSing.index = 0; // 当前播放索引
this.aniBirdSing.zOrder = 1;
this.aniBirdSing.play();

this.aniBirdSing.pivot(0, 120);
this.aniBirdSing.pos(94+0, 259+120);
this.aniBirdSing.size(120, 120);
console.log(this.aniBirdSing.width, this.aniBirdSing.height);
this.aniBirdSing.mouseEnable = true;
Laya.stage.addChild(this.aniBirdSing);

}

根据这个代码,我认为鼠标点击区域在图片左下区域,但结果是图片左上区域,求解?
如果我想让图片的点击区域是图片左下区域,应该如何出来,谢谢

要回复问题请先

商务合作
商务合作