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

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

1561. 如何在项目中加载ttf字体? [ 62%]

...的, Laya.loader.load("font/本墨竟圆-常规.ttf",Laya.Handler.create(this,OnComplete_FontLoad),null,Laya.Loader.BUFFER); function OnComplete_FontLoad() { console.log("加载字体"); var newFont = Laya.loader.getRes("font/本墨竟圆-常规.ttf"); if(Laya.Browser.window.conch) { console.log("...

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

1562. 自适应问题 [ 62%]

...oad("http://localhost/layabox/layabox/layabox/res/bg.png'", Handler.create(this, function () {         var t = Laya.loader.getRes(skin);         var _sprite = new Sprite();         _sprite.graphics.drawTexture(t, 0, 0);         Laya.stage.addChild(_sprite); }); 但是出来的效果...

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

1563. 关于stage的size问题 [ 62%]

...([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Laya.Handler.create(this, this.onLoaded)); function onLoaded(): void { var sprite = new Laya.Sprite(); sprite.loadImage('comp/bg.png'); Laya.stage.addChild(sprite); } 上面这段代码如果把Laya.stage.size这行的注释去掉,运行时不...

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

1564. drawcall优化问题 [ 62%]

... 2018-01-22 23:37 Laya.loader.load( 'res/atlas/comp.json', Handler.create(this, function(){ container = new Laya.Sprite(); var x = 0,y =80; Laya.stage.addChild(container); for(var i=0;i<1200;i++){ var role = new Laya.Sprite(); x = x+0.1; y = y+0.1 role.x = x; role.y = y; role.loadImage('comp/bg.p...

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

1565. 使用HttpRequest向外部链接请求ip所在省份时,遇到 No 'Access-Control-Allow-Origin' header错误 [ 62%]

...Request = new HttpRequest();             req.once(Event.COMPLETE, this, function():void             {                 trace(req.data);             });             req.once(Event.ERROR, this, function():void             {             ...

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

1566. 取handler有概率取错 [ 62%]

...method.$_TID || (method.$_TID = (ILaya.Timer._mid++) );         return this._map[cid +'_'+ mid];     }     set 方法也要这样改,参照附件文件 CallLater.rar 2019-09-03 0 1 分享 微博 QZONE 微信 1553654448用户 赞同来自: 拿number当key 不可避免的会出现两个不...

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

1567. 求救:proto解析 _i会变成I [ 62%]

...ptional string packet_iidiid = 4; } 通过 ProtoBuf.load("protocol.proto", this.onLoaded); function onLoaded(err:any, root:any):void{ if (err) throw err; // Obtain message types var msgDefine:any = = root.lookup("protocols.packetc2g_select_gate"); var newMessage:any = msgDefine.create(); } 然后发...

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

1568. 使用blendMode=add模式时,某些手机上无法正常显示,出现黑底 [ 62%]

...    var index:int = 0;             Laya.stage.timerLoop(1, this, function():void{index++;image.alpha = Math.sin(Math.PI*2*(index/24))})              var image:Image = new Image();             image.blendMode = "add";             image.skin = "res/...

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

1569. drawToCanvas的问题 [ 62%]

...链接 提交 1 个回复 Laya_Aaron 赞同来自: Laya.timer.frameLoop(1, this, ()=> { angle +=1; if(angle > 360) { angle = 0; } sp.graphics.clear(); sp.graphics.drawPie(128,128,128,0,angle,"0xff0000"); var tex = sp.drawToTexture(256,256,0,0); //var html:Laya.HTMLCanvas = sp.drawToCanvas(256,...

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

1570. htmlCanvas.toBase64在iPhone上转换结果错误 [ 62%]

...ageUI.instance.saveBase64.texture = texture; htmlCanvas.toBase64("png",0.8,this.getBase64); }  getBase64(base64){ StageUI.instance.saveBase64.loadImage(base64); } 附件 : --> TongDaoTieTu.zip 2019-01-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与...

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