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

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

121. 使用getUserInfo获取的用户信息 [ 81%]

...getUserInfo({ withCredentials:false, lang: 'zh_CN', success: (res) => { console.log(res); // BigData.ins.user = res.data[0]; }, fail: () => { console.log("userInfo"+JSON.stringify("fail")); }, complete: () => { // console.log("userInfo"+JSON.stringify(selfData)); } Res打印出来时空的 ...

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

122. layaair获取xml信息出错 [ 81%]

...  代码: var configData:XmlDom = Loader.getRes(config_PATH) as XmlDom; console.log(configData); console.log(configData.attributes); console.log(configData.childNodes);   xml如下: <root>     <config>          <PATH>../h5/</PAHT>     </config> </r...

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

123. Socket能连接到服务器,客户端发请求也能收到服务端的数据,但是服务端主动推送数据,客户端就是收不到数据? [ 81%]

...n ;         }          ws.onopen = function() {             console.log("---open----");             //设置发信息送类型为:ArrayBuffer             ws.binaryType = "string";             if(SocketJS.OnOpenMsg!=null)SocketJS.OnOpenMsg();         }       ...

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

124. 加载-加载序列 [ 81%]

...is, this.onAssetLoaded), null, null, 2, false); } onAssetLoaded(texture) { console.log(texture.url); // 恢复默认并发加载个数。 if (++numLoaded == 3) { Laya.loader.maxLoader = 5; console.log("All done."); } } } new Loader_Sequence();module laya { import Texture = Laya.Texture; import Handl...

来源: Laya2.0_示例 发布时间: 20260303

125. laya的canvas缩放原理? [ 81%]

...     虽然说laya可以通过一些方法获取缩放的参数,例如 console.log(Laya.stage._canvasTransform); console.log(Laya.stage.clientScaleX); console.log(Laya.stage.clientScaleY);   但是,我的div,在laya还没初始化完成的时候,就已经有了吧。这时候,应该无...

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

126. async bug 导出小游戏 [ 81%]

...rmal; share.imageUrl = ShareImgUrl; let a = await share.shareAppMessage(); console.log(a) }   转换后代码   onShareClick() { // return __awaiter(this, void 0, void 0, function* () { // let share = SDKCenter.getShare(); // share.title = ShareNormal; // share.imageUrl = ShareImgUrl; // let a = y...

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

127. 请问laya中js如何继承自己写的类 [ 81%]

...unction t1(b) { this.b = b; } //父类方法a t1.prototype.a = function(){ console.log(this.b.x+""+this.b.y); } return t1; }());   ========================= /* * t2继承父类t1 */ var t2 = (function () { function t2() { t2.super(); } t2.prototype.a = function(){ console.log('2222'); } return t2; ...

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

128. [LayaAir3]Laya.loader.loadPackage加载分包,如果判断成功与失败 [ 81%]

...Laya.loader.loadPackage("sub1111").then(() => {                 console.log('pack sub1 loaded');                 new Subpack1().init();             }, (err) => {                 console.log('pack sub1 error', err);             }); 2025-09-09 添加评论 免...

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

129. destroy节点后,报错 [ 81%]

...@param node 节点 */ base_remove(node){ if(node.numChildren<=0)return; console.log('移除',node.name); let obj; for(let i=node.numChildren-1;i>=0;i--){ obj= node.getChildAt(i); obj.destroy(); } }   或者 /* 从舞台移除模型对象 @param node 节点 */ base_remove(node){ if(node.numChi...

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

130. layabox加载fairygui发布的二进制文件报错 [ 80%]

...fo,content){ var url=resInfo.url; //输出//////////////////////////////// console.log("url:"+url); content==null?console.log("content null"):console.log("content not null"); //输出//////////////////////////////// if (content==null){ var errorCount=this._failRes[url] || 0; if (errorCount < this...

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