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

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

891. drawToCanvas绘制显示不全 [ 89%]

...constructor() {         super();     }     onAwake() {         this.nativeImg = new Image();         let style = this.nativeImg.style;         style.position = 'absolute';         style.visibility = 'hidden';         style.zIndex = 9999;         style.height = screen....

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

892. SpineSkeleton3.8.loadAni如果加载失败一定会引发LAYA底层报错 [ 89%]

...报错,,底层代码:     loop() {             if (this.assetManager.isLoadingComplete()) { //这里应该先判断加载是否成功,否则失败了也会满足条件                 this.parseSpineAni();//在处理失败资源会报错          ...

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

893. laya2.0 截图功能分享,直接截取屏幕上所有对象 [ 89%]

...dth, height, x, y) { if (!SwitchHelper.screenDraw) { return null; }  if (!this.tempTexture2D) { this.tempTexture2D = new Laya.Texture2D(system.width, system.height); } if (!this.tempTexture) { this.tempTexture = new Laya.Texture(this.tempTexture2D); } let cans = document.getElementById("layaCanvas"...

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

894. startDrag 被拖拽物体所在view发生旋转后的bug [ 89%]

...        __proto.loop=function(){             var point=this._parent.getMousePoint();             var mouseX=point.x;             var mouseY=point.y;             var offsetX=mouseX-this._lastX;             var offsetY=mouseY-this._la...

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

895. TypeScript Json 数据解析 [ 89%]

...te on2DComplete(): void { Laya.loader.load("zxc.json", Laya.Handler.create(this,this. onLoadConfigComplete),null,Laya.Loader.JSON); } wayPoints:JSON; private onLoadConfigComplete(): void { this.wayPoints = Laya.loader.getRes("zxc.json") as JSON; console.log(this.wayPoints.name); //这里会报name ...

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

896. 播放视频只有声音没有图像 [ 89%]

...ginGame extends Laya.Scene { constructor() { super(); LoginGame.instance = this; Laya.MouseManager.multiTouchEnabled = false; this.loadScene("LoginGame.scene"); } onEnable() { SoundManager.playMusic("audio/梅林茂 - 静かな古都.mp3", 0); this.login_game_button.on(Laya.Event.CLICK, this,this.on...

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

897. 对话框点击空白处无法关闭 [ 89%]

...话框var testUI=(function(_super){ function testUI(){ testUI.__super.call(this); } CLASS$(testUI,'ui.testUI',_super); var __proto__=testUI.prototype; __proto__.createChildren=function(){ laya.ui.Component.prototype.createChildren.call(this); this.createView(testUI.uiView); } testUI.uiView={"type":"...

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

898. 使用bind移除事件报错 [ 89%]

使用bind移除事件报错 在侦听事件中添加了bind,如下: this.parent["timer1"].addEventListener(TimerEvent.TIMER,bind(this,this.timer))? 2015-11-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 c...

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

899. 设置后box2d 的 worldRoot 后平移场景 物理世界原地不动 [ 88%]

... 是要模仿镜头移动功能吗,这样可以 onAwake() { const self = this; self.gameObj = self.owner as Laya.Sprite; Laya.Physics.I.worldRoot = self.gameObj; this.cameraRect = new Laya.Rectangle(0, 0, 2000, 1000); this.gameObj.scrollRect = this.cameraRect; } onUpdate() { this.cameraRect.x = th...

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

900. 小游戏安卓不支持filters [ 88%]

...lters.GlowFilter("#00CCFF", 10, 0, 0); //设置滤镜集合为发光滤镜 this.cutLayer.filters = [glowFilter]; 测试了一下 最新的引擎版本 给一个sprite对象版定一个filter 安卓木有办法显示  上面的cutLayer 是一个sprite对象 我会通过手指的移动去绘制线条...

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