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

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

1511. 屏幕适配怎样实现铺满全屏,又不被拉伸? [ 81%]

...有UI的Y轴坐标及高度进行调整 Laya.stage.on(Laya.Event.RESIZE, this, this.onResize);  调整方法为,根据IDE里该UI的对齐模式相应调整。比如让UI始终按照预期的顶部对齐、底部对齐 实践方法:重载引擎的resetLayoutY方法   基本思路就是这样...

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

1512. VBOX动态增加的元素没有自动布局 [ 81%]

...印显示btn1_btn为null console.log(btn1_btn); // btn1_btn.label="first"; this.myvbox.addChild(btn1); var btn2=new ui.test.view_btnUI(); var btn2_btn:laya.ui.Button=btn2.getChildByName("btn") as laya.ui.Button; // btn2_btn.label="second"; this.myvbox.addChild(btn2); var btn3=new ui.test.view_btnUI(...

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

1513. 3d引擎 相同参数,碰撞结果不一致,同时水平施加冲量,会在上下方向运动 [ 80%]

... 墙体设有弹力: WestWall0.restitution = 0.8;//弹力 球设有: this.cubeRigids[i].linearDamping = 0.3;//线性阻力 this.cubeRigids[i].angularDamping = 0.3;//角阻力 this.cubeRigids[i].restitution = 0.8;//弹力 this.cubeRigids[i].friction = 0.6;//摩擦力 给白球施加相同方向...

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

1514. 预制体 · LayaAir3.4 · 引擎文档 · LAYABOX [ 80%]

...el: Laya.Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-6) 3.2 3D预制体 3D预制体的使用过程同2D预制体一样,在这里我们就不介绍如何制作预制体了,通过下面的示例来看...

来源: Laya3.0_文档 发布时间: 20251105

1515. IPHONE机,游戏之前有声音的,现在safari和CHROME上没有声音,UC上有 [ 80%]

...声音: Laya.SoundManager.playMusic("sounds/fish.mp3", 1, Handler.create(this, this.onComplete)); //Laya.SoundManager.playSound("sounds/fish.mp3", 1, Handler.create(this, this.onComplete),Laya.AudioSound); 后来在html里加了一个audio标签,看看原始的audio能不能播。 <audio src=...

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

1516. 材质-BlinnPhong-反射贴图 [ 80%]

...发语言、LayaAirIDE让项目开发更高效。Laya3D.init(0, 0, true); this.rotation = new Laya.Vector3(0, 0.01, 0); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = (sce...

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

1517. ToolTip鼠标悬停的使用 [ 80%]

...e.bgColor="#eeffcc"; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { this._testTip=new TestTipsUI();//务必在Laya.init后去new实例,不可直接在全局变量处实例化 //切记,无论何种鼠标提示方式,...

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

1518. 微信小游戏报错 the .lh file root type must be Scene [ 80%]

...he.ls"; public LoadScene3D(): Laya.Scene { console.log("screen#DPath = " + this.screen3DPath); let scene: Laya.Scene = Laya.Scene.load(this.screen3DPath); Laya.stage.addChildAt(scene, 0); this.InitCamera(scene); return scene; } 微信小游戏报错 Scene: the .lh file root type must be Scene,please...

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

1519. 如何使用javascript版本的加载模式 [ 80%]

...ad([ { url: config.layerUIJson, type: Laya.Loader.JSON } ], Handler.create(this, function () { this.gameScenes = new ui.layer.gameScenesUI(); this.addChildren(this.gameScenes); })); 但页面上却没有任何内容显示出来!求教!!我看了论坛里面的教程:https://ask.layabox.com/q...

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

1520. l龙骨动画内存上升 [ 80%]

...stage.bgColor = "#ffffff";             Laya.stage.on(Event.CLICK, this, play);         }                  function play():void {             Laya.timer.loop(5000, this, function():void {                 playDragonBonesAnimation("BigAward/BigAward.sk",0...

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