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

大约有 820 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0063 秒)

361. img点击事件。点击图片外,也触发了事件。请问怎么解决 [ 62%]

...e.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.loader.load("res/img/m1.jpg",Laya.Handler.create(this,load)); function load(){ let ctn2=new Laya.Sprite(); Laya.stage.addChild(ctn2); var gq=new Laya.Sprite(); gq.loadImage("res/img/m1.jpg",100,100,100,100);   ctn2.addChild(gq); gq.on(Laya.Event.CLICK,this,I...

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

362. ViewStack属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 61%]

...,执行onLoaded回调方法 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //创建一个UI实例 this.comp = new ui.ComponentDemoUI(); //添加到舞台上显示 Laya.stage.addChild(this.comp); //点击Tab选择按钮的处理 this.com...

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

363. Unlit材质详解(TypeScript-3D基础(TS)-模型材质详解) [ 61%]

.../加载纹理 Laya.Texture2D.load("res/threeDimen/texture/earth.png", Laya.Handler.create(this, function(texture) { //设置反照率贴图 material2.albedoTexture = texture; })); earth2.meshRenderer.material = material2; ``` ![](img/1.png)(图1)

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

364. Unlit材质详解(JavaScript-3D基础(JS)-模型材质详解) [ 61%]

.../加载纹理 Laya.Texture2D.load("res/threeDimen/texture/earth.png", Laya.Handler.create(this, function(texture){ //设置反照率贴图 material2.albedoTexture = texture; })); earth2.meshRenderer.material = material2; ``` ![](img/1.png)(图1)

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

365. 微信开放数据域(TypeScript-小游戏适配文档-微信小游戏) [ 61%]

...图集 Laya.loader.load(["json/reward.json","res/atlas/test.atlas"],Laya.Handler.create(null,function(){ //加载完成 //使用接口将图集透传到子域 Laya.MiniAdpter.sendAtlasToOpenDataContext("res/atlas/test.atlas"); //使用接口将json投促函到子域 Laya.MiniAdpter.sendJsonDataToDat...

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

366. List选中项下滚会变 [ 61%]

...this.sList.selectEnable = true;//列表项是否可选 // this.sList.selectHandler = Laya.Handler.create(this,this.onSelect,null,false); this.sList.mouseHandler = new Laya.Handler(this,this.onMouse);//鼠标事件响应 } Laya.class(ServerListView,"ServerListView",_super); var _proto_ = ServerListVi...

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

367. laya.ui.List_API3.0 [ 61%]

...了一个 List 实例。 package { import laya.ui.List; import laya.utils.Handler; public class List_Example { public function List_Example() { Laya.init(640, 800, "false");//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load([...

来源: Laya3.0_api 发布时间: 20231115

368. 事件绑定不触发bug [ 61%]

... = Laya.Texture;         var Browser = Laya.Browser;         var Handler = Laya.Handler;         var WebGL   = Laya.WebGL;         var sp;                  function callback(event) {             console.log(" callback test");         }             ...

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

369. 将字节数组转为图片 [ 61%]

...ar url:String = "res/img.byte";             Laya.loader.load(url, Handler.create(this, byteLoadComplete,[url]),null,Loader.BUFFER); private function byteLoadComplete(url:String):void {             var buffer:ArrayBuffer = Laya.loader.getRes(url);             var byte:Byte ...

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

370. Laya.Sprite loadImage 参数问题 [ 61%]

... x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, complete:Handler = null) 官方文档也是这么用的:http://ldc.layabox.com/doc/?nav=zh-ts-1-3-2 我把文档的代码完整复制到vscode里,vs code会报错。IDE F6 运行也编译报错。 2020-05-22 添加评论 免费帖...

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