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

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

421. 微信小游戏iOS滑出控制中心或通知中心,导致音乐自动停止。 [ 71%]

...关的链接 提交 1 个回复 bpmf_d 赞同来自: // 失去焦点 Laya.stage.on(Laya.Event.BLUR,this,function(){}); // 获得焦点 Laya.stage.on(Laya.Event.FOCUS,this,function(){}); 可以试试这两个方法如果不行  就请提供一下可以复现的demo 2019-05-09 0 0 分享 微博 QZONE...

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

422. 用LayaAir引擎解析Tiled Map地图(JavaScript-2D进阶篇(JS)-扩展模块) [ 71%]

...地图放大3倍 this.tMap.scale = 3; this.MapX = 0; this.MapY = 0; Laya.stage.on(Laya.Event.RESIZE,this,resize); Laya.stage.on(Laya.Event.MOUSE_DOWN,this,mouseDown); Laya.stage.on(Laya.Event.MOUSE_UP,this,mouseUp); resize(); } /** * 移动地图视口 */ function mouseMove(){ var moveX = this.MapX ...

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

423. VRCameraScript中 stage 一直有mouse_up的监听事件,导致 Radio 按钮有点击穿透的问题,该如何进行stopPropagation()? [ 71%]

VRCameraScript中 stage 一直有mouse_up的监听事件,导致 Radio 按钮有点击穿透的问题,该如何进行stopPropagation()? VRCameraScript中 stage 一直有mouse_up的监听事件,导致 Radio 按钮有点击穿透的问题,该如何进行stopPropagation()? 2017-06-22 添加评...

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

424. laya.events.Event_API3.0 [ 71%]

...Accessors altKey charCode ctrlKey key keyCode keyLocation metaKey shiftKey stageX stageY touches Methods setTo stopPropagation isMouseEvent Constructors constructor new Event(): Event Defined in laya/events/Event.ts:195 Returns Event Properties button button: number = 0 Defined in laya/events/Event....

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

425. drawToTexture截大图有问题,会丢失 [ 71%]

...,1600,"#ff0000");         this.nsp.mouseThrough=true;         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....

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

426. animation动画结束后怎么监听? [ 71%]

....COMPLETE,this.onSplashComplete); this.owner.ani.play(0,false); this.owner.stage.on(Laya.Event.COMPLETE,this.onSplashComplete); 这两个侦听器都没有侦听到COMPLETE事件的发生。 FullyI • 2018-10-17 11:05 我用这个方法监听动画播放完成,有问题,会重复执行多次。...

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

427. 关于大量绘制 draw的性能优化问题 [ 71%]

...; Laya.init(800, 1030); Stat.show(0,0); var drawLayer = new Sprite(); Laya.stage.addChild(drawLayer); drawLayer.width = 800; drawLayer.height = 1030; drawLayer.on(Event.MOUSE_MOVE, this, mousemove); function  mousemove(e) {     drawLayer.graphics.drawCircle(e.target.mouseX,e.target.mouseY,20,"#ff...

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

428. HIERARCHY_LOADED 和 LOADED有什么区别?为什么对scene不起作用 [ 70%]

...和 LOADED有什么区别?为什么对scene不起作用 var scene = Laya.stage.addChild(new Laya.Scene()); scene.once(Laya.Event.HIERARCHY_LOADED, null, function (sprite) { console.log("scene HIERARCHY_LOADED"); }); scene.once(Laya.Event.LOADED, null, function (sprite) { console.log("scene LOADED"...

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

429. unity导出的场景.ls加载到laya3d中报错 [ 70%]

...LayaAir3D { constructor() { //初始化引擎 Laya3D.init(0, 0,true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); //添加3D场景 var scene = Laya.Scene.load("LayaScene_unity1/unity1.ls"); Laya.stage.addChild(scene); //创建摄像...

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

430. Animation类如何调用complete事件 [ 70%]

...adyAni.loadAnimation("Ready.ani"); readyAni.interval = 100; Laya.stage.addChild(readyAni); readyAni.play(0,false); readyAni.on(EVENT.COMPLETE, null, onComplete); } 在方法外有个 function onComplete() { console.log('3'); readyAni.destroy(); } 但是报错 chenhuanqi23 • 2017-09-27 15...

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