• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 12 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0028 秒)

1. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么不动? [ 100%]

...Lel].h); // 球体和城堡的矩形显示区域 var boundBall = this.ball.getBounds(); var boundTower = this.tower.getBounds(); var boundAeroboat = this.aeroboat.getBounds(); var boundMountain = this.mountain.getBounds(); var boundStatue = this.statue.getBounds(); var boundAngel = this.angel.getBou...

来源: Laya_社区 发布时间: 20170720

2. movieClip,如何获取宽度,width、getbounds 都为零,但是他显示了 [ 96%]

movieClip,如何获取宽度,width、getbounds 都为零,但是他显示了 附件 : --> 2018-02-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: https://ask.layabox.com/question/1814 ...

来源: Laya_社区 发布时间: 20180211

3. 图片居中的问题 [ 94%]

...dth/2,image.height/2,image的宽高需要自己手动设置或者通过getBounds获取。 2016-11-18 0 0 分享 微博 QZONE 微信 shaouXie 赞同来自: var bg = new Laya.Sprite(); bg.loadImage("res/bg-480x720.jpg"); Laya.stage.on(Laya.Event.RESIZE,this,onResize);   function onResize() {   ...

来源: Laya_社区 发布时间: 20161118

4. 没有预加载的图片怎么获取width和height ? [ 88%]

...lder.scaleY,older.rotation,older.x,older.y, older.width,older.height,older.getBounds().width,older.getBounds().height);      older.scale(2,2);     console.log(older.scaleX,older.scaleY,older.rotation,older.x,older.y, older.width,older.height,older.getGraphicBounds().width,older.getGraphicBou...

来源: Laya_社区 发布时间: 20170118

5. 一个动画我想设置它的大小该怎么取设置啊 [ 88%]

...容相关的链接 提交 4 个回复 cuixueying 赞同来自: 使用ani.getBounds().width,,,ani.getBounds().height即可! 2017-06-29 0 0 分享 微博 QZONE 微信 z298959 赞同来自: 获取宽高2个方式都获取得出来,我的意思是怎么去重新设置这个动画的大小   ...

来源: Laya_社区 发布时间: 20170629

6. HTML如何实现文本中某个字符转换成图片显示? [ 81%]

...tmlDivElement.y得到当前的位置坐标!也可以通过htmlDivElement.getBounds().x,htmlDivElement.getBounds().y来获取,你那边是掉不了这些方法吗? 2017-04-17 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 lh48075012...

来源: Laya_社区 发布时间: 20170417

7. animation在loadATL的回调中,animation.width=0,为什么为0?我想拿到宽度怎么做 [ 80%]

...调中,animation.width=0,为什么为0?我想拿到宽度怎么做?getBounds也为0 2018-01-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: 通过getBound方法获取当前帧的Rectan...

来源: Laya_社区 发布时间: 20180131

8. setBounds()后无法碰撞 [ 78%]

... demo后,如下,把注释掉的代码去了就碰撞不起来,原生getBounds()是可以碰的   附件 : --> myLaya.zip 2016-12-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: ...

来源: Laya_社区 发布时间: 20161211

9. 龙骨skeleton鼠标点击区域的设置 [ 74%]

...可以直接使用hitArea来设置龙骨动画的点击区域 首先通过getBounds获取龙骨动画的width和height(可以通过延迟timer来获取) 然后这是龙骨的hitArea(-width,-height,width,height) 参考示例: mArmature = mFactory.buildArmature(1); mArmature.play(0,tru...

来源: Laya_社区 发布时间: 20161122

10. 分享:图集资源做位图文本的工具类(知道fontclip组件的可以略过了,之前一直没注意到这个组件) [ 71%]

...; length; i++) { let c = chars[i]; c.x = preX + preW; preX = c.x; preW = c.getBounds().width + this.padding; } } /** * 靠左排列 */ private sortOnLeft(): void { this.sortChars(0, 0); } /** * 靠右排列 */ private sortOnRight(): void { let chars = this.chars; let length = chars.length; let prex ...

来源: Laya_社区 发布时间: 20180302