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

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

941. 移动端h5项目如何获取多点触摸的坐标 [ 55%]

...ya.Event;   // 手机上才有 touches 属性 let touches = e.touches;   if (touches && touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].stageX);   Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); } } 2019-09-25 0...

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

942. loop 我想在回调里暂停,然后在开启 [ 55%]

... ? i + 1 : 0;       this.noticeList.scrollBar.value = i * 5        if (i % 6 == 0) {         console.log("在这里停止", i)        }       else{ console.log("在这里开始", i)        }  });   2017-07-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...

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

943. 移动端横竖屏适配(类似锁屏效果)? [ 55%]

...,this,onResize); } private function onResize():void { //横屏显示调整 if(Browser.width>Browser.height) { fillWidth=Browser.width; fillHeight=Browser.height; } //竖屏显示向横屏调整 else { fillWidth=Browser.height; fillHeight=Browser.width; } } } } 2016-07-18 0 0 分享 微博 QZONE ...

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

944. 关于打包App后Texture.getPixels此方法不能使用 [ 55%]

...n getPixels(x:Number, y:Number, width:Number, height:Number):Array {     if (Render.isWebGL) {        return RunDriver.getTexturePixels(this, x, y, width, height);     } else {       Browser.canvas.size(width, height);       Browser.canvas.clear();       Browser.context.drawTexture(...

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

945. 如何获取list下单元格的坐标点? [ 55%]

...andler(this,onClick); } private function onClick(e:Event,index:int):void { if(e.type==Event.CLICK) { trace("xy:"+list.getCell(index).x,list.getCell(index).y); } }上面的坐标是相对于list本身的,如果你想取得全局坐标可以通过localToGlobal方法来得到。 2016-12-15 1 1 分享...

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

946. 自定义shader 在未指定webgl 模式下 setIBVB参数应该如何设置 [ 55%]

... this.animeValue; let webgl2d = context.ctx instanceof Laya.WebGLContext2D if( webgl2d) (context.ctx as Laya.WebGLContext2D).setIBVB( x, y, this.iBuffer, this.vBuffer, this.iNum,null, WaterFlowShader.shader, this.shaderValue, 0, 0); } 2018-07-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

947. laya2.0如何暂停游戏 [ 55%]

...9 11:17 怎么重新打开啊? 叮当(H5研发) • 2019-08-15 03:25 if(Laya.stage.renderingEnabled==true){ Laya.stage.renderingEnabled=false//停止渲染 Laya.updateTimer.pause() //停止onUpdate Laya.physicsTimer.pause() //停止物理 }else{ Laya.stage.renderingEnabled=true//恢复渲染 L...

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

948. 自定义loadingView [ 55%]

...化引擎 Laya.init(600, 400); //判断是否在加速器端 __JS__("if(window.conch)") { //获取loadingview的实例 dd=__JS__("window.loadingView"); 通过loading方法进行进度值传参 dd.loading(50); } //加载引擎需要的资源 Laya.loader.load([{url: "res/atlas...

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

949. 有没有SoundChannel的示例? [ 55%]

...nction soundClick(evt:Event){ alert("channel.isStoped:"+channel.isStoped); if (channel.isStoped){ channel.play(); }else{ channel.stop(); } } channel.isStoped输出是:undefined 2017-01-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的...

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

950. 鼠标滚轮滚动事件 [ 55%]

...动 private mouseRoll(e: Laya.Event): void { let value: number = e.delta; if (value > 0) {//滚轮滑动增量大于0,向上滚动 } else {//滚轮滑动增量小于0,向下滚动 } console.log(`____________鼠标滚动___________${e.delta}______`); }   2018-04-11 2 0 分享 微博 QZONE 微信 ...

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