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

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

1081. JSON文件加载成功后,怎么解析成Object对象 [ 45%]

...tage.height); txt.pos(10, 10); txt.fontSize = 30; txt.wordWrap = true; txt.color = "#FF9632"; Laya.stage.addChild(txt); var test:Object = JSON.parse('{"id": 0, "name": "Chen"}'); traceMsg(test['id']); traceMsg(test['name']); var jsonURL:String = "res/json/config.json"; traceMsg("加载: " + jsonURL)...

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

1082. LayaAir2.13中使用ASTC纹理显示异常,使用两个以上ktx纹理时报错。 [ 45%]

...processing applies before any             codec encoding swizzle, so color data must be in the RGB             components in the source image. 2022-09-21 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 你海哥 相关问题 ...

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

1083. 游戏在后台放置一段时间(大约一两个小时后)会黑屏,然后要等好长的一段时间才响应过来,我看log此时JS逻辑都没跑了。 苹果虽然不会黑屏,但画面会不动,失去响应,过一段时间JS逻辑才跑起来。 [ 45%]

...0px 0.0px 0.0px 0.0px; line-height: 19.0px; font: 13.0px 'Helvetica Neue'; color: #000000} 游戏在后台放置一段时间(大约一两个小时后)会黑屏,然后要等好长的一段时间才响应过来,我看log此时JS逻辑都没跑了。 苹果虽然不会黑屏,但画面会不...

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

1084. 图片使用pivotX参数后,再对图片添加遮罩会出现效果不对。 [ 45%]

...        Laya.stage.scaleMode = "showall";         Laya.stage.bgColor = "#232628";         Laya.loader.load("../../res/bg2.png", Handler.create(this, setup));     })();     function setup()     {         var bg = new Sprite();         bg.loadImage("../../res/bg2...

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

1085. 分包项目, 加载js时报错 [ 45%]

...置文本颜色为白色,默认颜色为黑色             txt.color = '#ffffff';             this.addChild(txt);                          var v:View = new View();             v.graphics.drawCircle(50, 50, 100, "#000000");             v.pos(100...

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

1086. laya3D 发部为android,只要一创建场景(包括空场景)就有如下报错,并且黑屏 [ 45%]

...回复 dfklegend 赞同来自: Laya3D.init(1704, 960, true); Laya.stage.bgColor = "#232628"; //适配模式 //Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_HEIGHT; Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.stage.alignH = Laya.Stage.ALIGN_CE...

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

1087. 为什么laya的Button渲染逻辑顺序是先渲染,再获取素材切片? [ 44%]

...p; (this._bitmap.source=this._sources[index]); if (this.label){ this._text.color=this._labelColors[index]; if (this._strokeColors)this._text.strokeColor=this._strokeColors[index]; } } __proto.changeClips=function(){ var img=Loader.getRes(this._skin); if (!img){ console.log("lose skin",this._skin); r...

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

1088. IOS的safari浏览器打开h5项目demo,游戏场景偏移(附件有完整demo) [ 44%]

...nction LayaSample() { //初始化引擎 Laya.init(1136, 640); Laya.stage.bgColor = "#235615"; //设置适配模式 Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; //实例一...

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

1089. 分享一个自己做的游戏公告功能,跑马灯效果 [ 44%]

....html.style.lineHeight = 55 this.html.style.align = "left" this.html.style.color = "#fff" this.html.innerHTML = "" this.hornBox.addChild(this.html) this.addChild(this.hornBox) } /** 滚动动画 */ private _animate(e: Event): void { const _w = this.html.width const _x = this.html.x if (_x < -_w) ...

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

1090. 2.0里面的组件(Laya.Script)的prop其中几个类型应该怎么设置 [ 44%]

... {name:checkType, tips:"", type:Check}*/ public checkType; /** @prop {name:colorType, tips:"", type:Color}*/ public colorType; /** @prop {name:nodeType, tips:"", type:Node}*/ public nodeType; /** @prop {name:prefabType, tips:"", type:Prefab}*/ public prefabType; /** @prop {name:sizeGridType, tips:""...

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