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

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

1001. 窗口组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 66%]

...和使用窗口: let win = new GWindow(); win.contentPane = ((await Laya.loader.load("Examples/windows/Window1.lh")) as Laya.Prefab).create(); window.show(); 也可以扩展GWindow类使用: class MyWindow extends Laya.GWindow { protected onInit() { this.contentPane = ((await Laya.loader.load("E...

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

1002. UI-FontClip [ 66%]

...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(assets, Laya.Handler.create(this, this.ShowContent)); } ShowContent() { const FontClip = Laya.FontClip; var clipnum= new FontClip(assets[0]); var fontClip = new FontClip(assets[1]); var TestFontClip = new FontClip...

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

1003. 更新到1.7.6beta之后,HBox有bug [ 65%]

... 分享 微博 QZONE 微信 lusky 赞同来自: Laya.init(1200, 400); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { var hbox: laya.ui.HBox = new laya.ui.HBox(); for (var i: number = 0; i < 10; i++) { var sk...

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

1004. iframe页面嵌套下失焦(焦点在父窗口被聚焦),playMusic背景音乐播放无声音 [ 65%]

...) return null; } var tSound:Sound; if (!Browser.onMiniGame) { tSound= Laya.loader.getRes(url); } if (!soundClass) soundClass = _soundClass; if (!tSound) { tSound = new soundClass(); tSound.load(url); if (!Browser.onMiniGame) { Loader.cacheRes(url, tSound); } } var channel:SoundChannel; channel = tSo...

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

1005. Oppo加载.ls资源错误 [ 65%]

Oppo加载.ls资源错误 Laya.loader.create("res/scenes/LayaScene_game/game.ls", Laya.Handler.create(this, () => { let gameScene = Laya.loader.getRes("res/scenes/LayaScene_game/game.ls") as Laya.Scene; Laya.stage.addChild(gameScene); }, null), Laya.Handler.create(this, (progress) => { consol...

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

1006. [LayaAirIDE3]skel骨骼动画播放失败,编辑器预览没问题 [ 65%]

...el骨骼动画播放失败,编辑器预览没问题 复现代码: Laya.loader.load("https://hlsgs.sanguosha.com/re ... ot%3B, Laya.Loader.SPINE).then((templet: Laya.SpineTemplet) => { this.skeleton = new Laya.SpineSkeleton();     this.skeleton.templet = templet;     console.log("动画数...

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

1007. Sprite3D添加组件或脚本(JavaScript-3D基础(JS)-LayaAir3D之精灵) [ 65%]

...source:Array = ["res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh"]; Laya.loader.create(resource, Laya.Handler.create(this, this.onComplete)); } onComplete(){ //记载场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //加载相机 var camera = scene.addChild(new Laya.Camera(0, 0.1, 100))...

来源: Laya2.0_文档 发布时间: 20210714

1008. 循环添加一组按钮事件无法正常使用 [ 65%]

...[0]+eggLoc[i][1]);                 b.graphics.drawTexture(Laya.loader.getRes(Res),tx-45,ty-45);                 b.size(92,96);                 b.name = "egg"+i;                 Laya.stage.addChild(b);                 b.on(Event.MOUSE_DOWN, ...

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

1009. [LayaAir3]LayaAir3 预制体销毁时如何回收其依赖的资源 [ 65%]

...销毁时如何回收其依赖的资源   //加载预制体 var win; Laya.loader.load("prefab/loginScene/LoginScene.lh").then(res=>{             win:LoginSceneRT = res.create();             mainRT.SceneLayer.addChild(win); }); //销毁预制提 win.destroy(); //如何回收此预制...

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

1010. 关于cacheAsBitmap如果有动态内容,最好和静态内容分开,以便只缓存静态内容的理解 [ 65%]

...合批报错. 请教下微信小游戏的内存和数据缓存? 请问下loader如何强制加载一个文件,避免浏览器的缓存 Animation 的createFrames 使用已经加载的图集缓存动画失败 请问Laya.loader.load资源缓存在哪里?能不能把这个缓存目录里的资源...

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