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

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

201. textinput(type=password)手机打开华为安全键盘后,无法关闭(官网的例子) [ 66%]

..../res/ui/input (3).png", "../../res/ui/input (4).png"];         Laya.loader.load(skins, Handler.create(this, onLoadComplete)); //加载资源。     })();     function onLoadComplete()     {         for (var i = 0; i < skins.length; ++i)         {             v...

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

202. 内存优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 65%]

...度进行显示,下面的编码为就是错误的。 ```javascript Laya.loader.load(urls, Handler.create(this, onAssetLoaded), Handler.create(this, onLoading)); ``` 在上面的代码中,使用`Handler.create(this, onLoading)`返回的回调方法,是要处理progress加载进度事件,...

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

203. 当使用Image作为一个对象的遮罩时,设置Image的ScaleX为0时遮罩失效! [ 65%]

... // 程序入口 class GameMain{ constructor() { Laya.init(1280,720); Laya.loader.load([{url:"res/atlas/comp.json",type:Laya.Loader.ATLAS}],Laya.Handler.create(this,this.loaded,null)); } private loaded():void{ var img:Laya.Image = new Laya.Image(); img.skin = "comp/img_pro.png"; Laya.stage.addChild(...

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

204. 不打包图片如何预加载 [ 65%]

... lvfy 赞同来自: 例如: var resArray = [{url:"test.png", type:Laya.Loader.IMAGE}]; Laya.loader.load(resArray, Laya.Handler.create(this, function(){ //处理添加背景 }));   2017-10-14 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发...

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

205. 分享:List相关(Item增删功能) [ 65%]

...ge { import laya.display.Sprite; import laya.events.Event; import laya.net.Loader; import laya.ui.Box; import laya.ui.CheckBox; import laya.ui.Clip; import laya.utils.Handler; import ui.test.ListPageUI; public class LayaUISample { private var listP:ListPageUI;//UI面板 private var arr:Array;//list...

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

206. worker如何使用 [ 65%]

worker如何使用 Laya.WorkerLoader.workerPath = "libs/worker.js"; //开启worker线程 Laya.WorkerLoader.enable = true; //加载引擎需要的资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, () => { alert("onLoaded!"); }), null, Laya.Loader.ATLAS, 1, true, null, false...

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

207. 分享个用美术资源做位图文本的方法。。。 [ 65%]

... class GameMain{ constructor() { Laya.init(600,400); var that = this; Laya.loader.load([{"url":"res/playerKpiFont.json","type":Laya.Loader.JSON}, {"url":"res/playerKpiFont.png","type":Laya.Loader.IMAGE}],new Laya.Handler(that,function(){ var jsonData = Laya.loader.getRes("res/playerKpiFont.json"); v...

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

208. 2D精灵光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 65%]

...例如节点被添加到舞台后 onEnable(): void { // 加载资源 Laya.loader.load("resources/spritelight.png", Laya.Loader.IMAGE).then(() => { this.setSpriteLight(); this.setDirectLight(); this.setBackground(); }); } // 配置精灵灯光 setSpriteLight(): void { this.spriteLight.pos(100,350)...

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

209. fillTexture使用问题 [ 65%]

... number = 1188; static height: number = 594; constructor() { super(); Laya.loader.load("res/images/map_01.png", Laya.Handler.create(this, this.bgLoaded)); } bgLoaded(): void { let t: Laya.Texture = Laya.loader.getRes("res/images/map_01.png"); this.width = 1000; this.height = 500; this.graphics.fillT...

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

210. 富文本使用图集 [ 64%]

... [error] Undefined class: ani 这是我哪里用的不对吗?   Laya.loader.load("res/1.json", Handler.create(this, createAnimation), null, Loader.ATLAS);  public function createAnimation():void         {             var appendHtml:HTMLDivElement=new HTMLDivElement();       ...

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