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

大约有 278 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)

51. Sprite-容器 [ 73%]

...e = new Sprite(); ape.loadImage("../../res/apes/monkey" + i + ".png"); ape.pivot(55, 72); // 以圆周排列猩猩 ape.pos( Math.cos(radianUnit * i) * layoutRadius, Math.sin(radianUnit * i) * layoutRadius); apesCtn.addChild(ape); } apesCtn.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.timer...

来源: Laya_示例 发布时间: 20251130

52. laya.display.Sprite.graphics对象的旋转问题 [ 73%]

... cuixueying 赞同来自: 1、设置下你graphics线条的显示对象的pivot,也就是线条的中心点 2、然后针对你的显示对象进行rotate旋转 private function createTexts():void { var sp:Sprite=new Sprite(); Laya.stage.addChild(sp); sp.graphics.drawLine(0,0,200,200,'#FF00000'); ...

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

53. Laya2.7.1 UI的VIew锚点感觉出问题了。 [ 73%]

...图VIew编辑导出之后,src/ui/layaMaxUI.ts 并没有变化…… 将pivot设置为图片中心后,缩放结点,碰撞体和图片不是以相同锚点缩放 一个动画如何设置绕自身中心点旋转,我这么设置_ani.pivot(_ani.width/2,_ani.height/2);不行,而且也没有锚...

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

54. 计时器-间隔循环 [ 73%]

...ext(); t.text = text; t.fontSize = 30; t.color = "white"; t.bold = true; t.pivot(t.width / 2, t.height / 2); t.pos(x, y); Laya.stage.addChild(t); return t; } function animateTimeBased() { rotateTimeBasedText.rotation += 1; } function animateFrameRateBased() { rotateFrameRateBasedText.rotation += 1; ...

来源: Laya_示例 发布时间: 20251130

55. 鼠标交互-自定义事件 [ 72%]

...) { sp = new Sprite(); sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); sp.pivot(100, 100); sp.x = Laya.stage.width / 2; sp.y = Laya.stage.height / 2; sp.size(200, 200); Laya.stage.addChild(sp); sp.on(ROTATE, this, onRotate); // 侦听自定义的事件 sp.on(Event.CLICK, this, onSpriteClick); } fun...

来源: Laya_示例 发布时间: 20251130

56. 在tiledMap中使用了镜像,但是在laya里面无法显示 [ 72%]

...layaair里就是ScaleX跟ScaleY为负值,同时你要设置下对象的pivot值,要不一翻转就出去! 2016-12-24 0 0 分享 微博 QZONE 微信 qq_小P孩/拥抱 赞同来自:     tiledmap.rar Demo.rar 2016-12-24 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要...

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

57. 设置旋转特效后,旋转对象的位置跑偏了 [ 72%]

...zhuanEffect():void{             //             xuanzhuan.pivot(xuanzhuan.width/2,xuanzhuan.height/2);                       Laya.timer.frameLoop(1,this,onLoopRotation,[this.xuanzhuan]);         }         private function onLoopRotation(sp:Sprite):void  ...

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

58. 计时器-间隔循环 [ 72%]

...ext(); t.text = text; t.fontSize = 30; t.color = "white"; t.bold = true; t.pivot(t.width / 2, t.height / 2); t.pos(x, y); Laya.stage.addChild(t); return t; } animateTimeBased() { this.rotateTimeBasedText.rotation += 1; } animateFrameRateBased() { this.rotateFrameRateBasedText.rotation += 1; } } new ...

来源: Laya2.0_示例 发布时间: 20251130

59. 刚接触laya的一系列问题 [ 72%]

...网例子做的scalebutton缩放功能,锚点在左上角,使用this.pivot(this.width/2,this.height/2);修改没效果,是方法不对还是其他原因? 根据官方例子做的按钮缩放功能在快速点击的时候,按钮会出现卡在缩小状态,代码中确实添加了MOUSE_UP...

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

60. 设置label但是没有变化 [ 72%]

...定的值。 关于同为object层,层级设置无效的问题 transform.pivot = new Laya.Vector3(0,1,0); 设置pivot无效~~~~~~~~~~~~~ 新建View及背景图片自适应大小如何设置 LayaAir2自带的3D示例项目,项目设置“场景横竖屏”= vertical 后,layanative测试时黑...

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