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

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

3761. Spine 间隔一段时间卡顿5000毫秒左右,期间GPU占用极高, Demo已上传 [ 45%]

...o.removeSelf();   } });  })); }  genSpine(url, handler: Laya.Handler) { var templet = new Laya.SpineTemplet(Laya.SpineVersion.v4_0); templet.on(Laya.Event.COMPLETE, handler.caller, handler.method); templet.on(Laya.Event.ERROR, this, this.printError); templet.loadAni(url); }  printError(e) { cons...

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

3762. box2d动态创建绑定多个关节报错 Node:the component is singleton,can't add the second one. [ 45%]

...elf.owner.globalToLocal(potSelf);  other.owner.globalToLocal(potOther);  var distanceJoint = new Laya.DistanceJoint();   distanceJoint.otherBody = other.rigidBody; distanceJoint.otherAnchor = [potOther.x, potOther.y] distanceJoint.selfAnchor = [potSelf.x, potSelf.y];  this.owner.addComponentInta...

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

3763. ipad 声音管理无法暂停继续播放,只能从头开始,pc端正常,代码如下 [ 45%]

...的链接 提交 2 个回复 Laya_Aaron 赞同来自: 1987c private static var _useAudioMusic:Boolean = true; /**      * <code>SoundManager</code> 是一个声音管理类。提供了对背景音乐、音效的播放控制方法。      * 引擎默认有两套声音方案:WebAu...

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

3764. 微信小游戏想使用截图功能是使用canvasToTempFilePath()吗 [ 45%]

...C: Laya.HTMLCanvas = this.view.displayObject.drawToCanvas(100, 100, 0, 0); var canvas:Object = htmlC.getCanvas(); 问题现在貌似没有getCanvas这个api了 柒汐夜 • 2018-11-29 12:06 额。。为啥我这边的api有,没有也没事,你改成let htmlC:any = .....类型约束换掉即可 ...

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

3765. 用Geolocation获取地理位置信息(ActionScript-LayaAir基础篇(AS3)-硬件设备相关) [ 45%]

...m/s"); } // 获取位置失败后触发 function onError(err:Error):void { var errType:String; if (err.code = Geolocation.PERMISSION_DENIED) errType = "Permission Denied"; else if (err.code == Geolocation.POSITION_UNAVAILABLE) errType = "Position Unavailable"; else if (err.code == Geolocation.TIMEOU...

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

3766. 对staticCache的疑问 [ 45%]

...呢   2017-11-20 0 3 分享 微博 QZONE 微信 hujian0318 赞同来自: var sp:Sprite = new Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#ffff00"); Laya.stage.addChild(sp); sp.x = 50; trace(sp.x); // 输出50 sp.cacheAs = "bitmap"; sp.staticCache = true; sp.x = 100; trace(sp.x); // 输出100,...

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

3767. 给图片节点添加新创建的图片,会报这个错:node._setParent is not a function [ 45%]

...e(imgSrc); 这句之前,没有定义Image,应该要在之前加一句: var Image = Laya.Image; 2019-06-25 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 蓝冰 相关问题 请问LayaAir中如何使图片以圆形的方式显示? ...

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

3768. 微信小游戏常见问题汇总(10.25更新)(TypeScript-小游戏适配文档-微信小游戏) [ 45%]

...法示例仅做参考,视项目情况自行修改或拓展 public static var getUrlAndEncode:Function = function(url:String,type:String):String { if (url.indexOf(".fnt") != -1 || url.indexOf("xxx.json") != -1) { return "utf8"; } else if (type == "arraybuffer") { return ""; } return "ascii"; } ``` ...

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

3769. 1.7版本要初始化后有些代码才能用了 [ 45%]

...t;</script> </body> </html> <script> "use strict"; var test = {}; test.text = new laya.display.Text(); // in this line is error , so you can't defined class before "Laya.init" Laya.init(800,600); //test.text = new laya.display.Text(); // in this line is right test.text.text =...

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

3770. 求高人分享使用protobuff框架的游戏demo(TS版本或AS版本的) [ 45%]

...protobuff ts官方例子用不了 ”这篇提问一样;例如有代码 var protoBuf:any = Laya.Browser.window.ProtoBuf;   在调试时变量protoBuf 一直就是 undefined;Laya.Browser.window.ProtoBuf 好像根本取不到有效值;能帮我解决下这个问题吗? 2017-09-25 0 1 分享 ...

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