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

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

231. Laya中使用shader的问题 [ 57%]

...uniform vec4 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: click uniform samplerXX  iChannel0..3; // input channel. XX = 2D/Cube  uniform vec4 iDate; // (year, month, day, time in seconds)   2017-05-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...

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

232. 点击区域问题 [ 57%]

.../        btn_bottom[i].hitArea = rect;          btn_bottom[i].on("click", this, bottomClick, [i]);[/i][/i][/i][/i][/i] 不加hitArea时,点击区域在左上方一小块,加了后完全无效   附件 : --> test2.rar 2016-12-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没...

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

233. 分享:Dragonbones/Spine的换肤操作 [ 57%]

...事件,务必设置好size,也就是鼠标的相应区域 btn.on(Event.CLICK,this,onChangeSkin); Laya.stage.addChild(btn); var text:Text=new Text(); text.text='切换皮肤'; text.fontSize=20; btn.addChild(text); text.pos(35,5); } private function onChangeSkin():void { curNum++; if(curNum%2!=0) ...

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

234. [LayaAir2] 在使用videoDom创建视频元素后iPad跟iPhone中位置不一样 [ 57%]

...eoDom { htmlvideo:Laya.HtmlVideo; constructor() { Laya.stage.on(Laya.Event.CLICK,this,this.onClick); } onClick(){ this.initVideo(); } initVideo() { this.htmlvideo = new Laya.HtmlVideo(); this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.addEventListener("loa...

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

235. 父元素,子元素,兄弟元素 [ 57%]

...数有阻止点击事件冒泡 点击事件: this.btnHome.on(Laya.Event.CLICK, this, this.homeClick);   private homeClick(e) { //防止点击事件穿透 e.stopPropagation(); } 2018-10-12 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起...

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

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

...("res/img/m1.jpg",100,100,100,100);   ctn2.addChild(gq); gq.on(Laya.Event.CLICK,this,Is);   }  function Is(){ console.log(1); } 2018-08-06 0 0 分享 微博 QZONE 微信 叔年心~厌世 赞同来自: 点击图片的左上所有区域都触发点击事件?为什么 2018-08-06 0 1 分享 微...

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

237. 对象监听另外一个脚本的执行方法不被执行 [ 57%]

...息按钮监听 this.AllTitleButton.on(Laya.Event.MOUSE_DOWN, this, ButtonClickManager.clickinstance.AllTitleButtonClick);   而在另外的一个单例脚本中单例分离了执行方法 因为按钮监听太多 需要分离 监听和执行 /** * 基础信息按钮监听 */ public AffirmButton1Cl...

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

238. hitArea用法问题 [ 57%]

...a = closeRect;  // closeBtn 为 Laya.Button 实例 this.closeBtn.on(Event.CLICK,this,this.closeWin); private closeWin():void {     console.log("the window has closed..."); } 2017-09-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

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

239. drawToTexture截大图有问题,会丢失 [ 56%]

...      Laya.stage.addChild(this.nsp);         this.nsp.on(Laya.Event.CLICK,this,this.drawImg,null)     }     drawImg(e:Event=null):void{         var copySpr:Laya.Sprite=new Laya.Sprite();         copySpr.texture=this.nsp.drawToTexture(1600,1600,0,0) as Laya.Texture;         thi...

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

240. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 56%]

....ape.pos(100,50); // 显示默认纹理 this.switchTexture(); this.ape.on("click", this, this.switchTexture); } private switchTexture(): void { var textureUrl: string = (this.flag = !this.flag) ? this.texture1 : this.texture2; // 更换纹理 this.ape.graphics.clear(); var texture: Texture = Laya.lo...

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