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

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

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

... mArmature = mFactory.buildArmature(1); mArmature.play(0,true); Laya.stage.addChild(mArmature); mArmature.pos(300,600); var rect:Rectangle=new Rectangle(-420,-680,420,680); mArmature.hitArea=rect; mArmature.on(Event.CLICK,this,onClick);    2016-11-22 0 0 分享 微博 QZONE 微信 asdf131 赞同...

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

762. Hbox Vbox 创建的数量多了后不是按创建的顺序显示 [ 69%]

...置下x方向的值,VBox同理: var hbox:HBox=new HBox(); Laya.stage.addChild(hbox); for(var i:int=0;i<20;i++) { var label:Label=new Label(); label.text='label:'+i; label.y=i*10; label.x=i*20; hbox.addChild(label); } 懒懒 • 2017-06-21 10:29 @cuixueying:建议能按添加的顺序排序,...

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

763. 物理引擎-牛顿摆 [ 69%]

...esize); } function initMatter() { var gameWorld = new Sprite(); Laya.stage.addChild(gameWorld); // 初始化物理引擎 engine = Matter.Engine.create( { enableSleeping: true }); Matter.Engine.run(engine); var render = LayaRender.create( { engine: engine, container: gameWorld, width: stageWidth, hei...

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

764. 求助,屏幕旋转后滚动条没有跟随旋转 [ 69%]

...(638, 527); panel.vScrollBarSkin = "CommDialog/vscroll.png"; this.sp_wanfa.addChild(panel); let t = new Laya.Label(); t.width = 638; t.fontSize = 25; t.wordWrap = true; t.color = "#976A4F"; t.overflow = "scroll" t.leading = 20; t.text =WanF.xinxi; panel.addChild(t); } public static xinxi = ` 信息...

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

765. 请问怎么制作一个layabox js版本的加载效果 [ 69%]

...5,5,5"; // progressBar.changeHandler = new Handler(this, null); Laya.stage.addChild(progressBar); Laya.timer.loop(300, this, changeValue); } function changeValue() { if (progressBar.value >= 1){ progressBar.value = 0; Laya.stage.removeSelf(); //将登录页面从内存销毁 // Laya.stage.destroy...

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

766. 这种进度条怎么实现? [ 69%]

...is.CIRCLE_WIDTH) >> 1, (this.DEF_SIZE - 20) >> 1, "#fff") this.addChild(this.$circleSprite) this.start() } public start() { this.timerLoop(2, this, this.draw) } public draw() { if (this.startY >= 270) { this.clearTimer(this, this.draw) } this.startY++ this.graphics.clear() this.graphi...

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

767. 1.7.8版本Sprite3D.load问题 [ 69%]

...的子节点。 *@param url */ __proto.loadHierarchy=function(url){ this.addChild(laya.d3.core.Sprite3D.load(url)); } 这个函数也是会出问题的 2017-08-09 0 0 分享 微博 QZONE 微信 183*****755 赞同来自: 请使用最新版引擎,如果还有问题,留下简单复现示例 2017-08...

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

768. 急急急,如何设置按钮点击加载ani [ 69%]

...      var btn:Button = new Button(skin);          Laya.stage.addChild(btn);             btn.pos(100,100);             //按钮被点击的回调             btn.clickHandler=new Handler(this, onClickButton)      }      private function onClic...

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

769. 场景切换造成的FPS下降的优化思路请教 [ 69%]

...化思路请教 现在不同场景都是继承的Sprite,原来是通过addChild和removeChild直接管控不同场景的显示和隐藏的,但是发现发布到手机后FPS会瞬间掉到个位数,然后再恢复到原来一样。今天想到能否使用visible直接控制显示隐藏,发现...

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

770. 显示对象的mask缩放为0时遮罩效果不生效 [ 69%]

... 0, testSp.width, testSp.height, '#FF0000'); testSp.mask = tmpMask; testSp.addChild(tmpMask); Laya.stage.addChild(testSp); let i = 0; tmpMask.scaleX = i / 3; Laya.stage.on(Laya.Event.CLICK, this, ()=>{ i = (i + 1) % 4; tmpMask.scaleX = i / 3; }); 附件 : --> 2020-04-21 添加评论 免费帖 -->...

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