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

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

101. Ts简单对象池 [ 82%]

...化则必须保证池中最少存在1个 if (this.m_ObjectPoolDic[key]){ console.log("初始化有误,该值已经有对应的 对象池了"); } else{ this.m_ObjectPoolDic[key]=new QueueT<Laya.MeshSprite3D>(); this.m_ObjectPoolDic[key].push(MeshSprite); } }  //按照编号取出对应对象...

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

102. linearVelocity 获取的线速度不正确 [ 82%]

...        this.rigidbody.linearVelocity = vectory;         console.log("施加的线速度:");         console.log(vectory);         console.log("获取得到的线速度:");         console.log(this.rigidbody.linearVelocity);     附件 : --> 2020-03-30...

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

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

...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

104. HttpRequest在网页上和APP上表现不一致 [ 82%]

...uest();     hr.http.timeout = 3000;     hr.http.ontimeout = function(){console.log("http timeout test: timeout")};     hr.once(Laya.Event.COMPLETE, this, ()=>{console.log("http timeout test: success");});     hr.once(Laya.Event.ERROR, this, (e: any)=>{console.log("http timeout test: er...

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

105. Laya.stage.mouseX; Laya.stage.mouseY取到的坐标用来赋给画曲线方法的起点;在左顶点正常,越往右下角起点就越偏移了 [ 82%]

...s.ps); } down2() { this.a = Laya.stage.mouseX; this.b = Laya.stage.mouseY; console.log("鼠标点击的点" + this.a, this.b) Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.move2) } move2() { this.path.push(Laya.stage.mouseX, Laya.stage.mouseY); // console.log("移动的点集合" + this.path); thi...

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

106. Layabox web 复制一段文字到剪贴板 [ 82%]

...t: function () { return str; } })  clipboard.on("success", function (e) { console.log("ok:") console.log(e) clipboard.destroy(); }) clipboard.on("error", function (e) { console.log("err:") console.log(e) clipboard.destroy(); })  //确认按钮 this.confirmBtn.onclick = function () { _this.CloseDiv...

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

107. 网络和格式-XML [ 81%]

...alue = "item aitem bsomethings..."; this.proessXML(xmlValueContainsError); console.log("\n"); this.proessXML(xmlValue); } // 使用xml proessXML(source) { const Utils = Laya.Utils; let xml; try { xml = Utils.parseXMLFromString(source); } catch (e) { console.log(e.massage); return; } this.printDirect...

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

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

...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

109. [LayaAir3]支付宝小游戏使用TTF字体异常 [ 81%]

...ontName;             this._defaultFont = fontName;             console.log("小游戏字体加载成功->" + fontName);//成功走到这里了 但是UI没效果         } else {             console.error("小游戏字体加载失败 字体路径=" + nativePath);         ...

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

110. 动态阴影被切割了?为啥没有显示完成的阴影 [ 81%]

...{ var box = scene.addChild(new myCube(0.1, 0.1, 11.5, colorCalc(), 0, 1)); console.log(box); } function addTestBox() { var box = scene.addChild(new myCube(0.1, 0.1, 11.5, colorCalc(), 0, 1)); console.log(box); } function addFirstBox() { var box = scene.addChild(new myCube(1, 1, 0.5, colorCalc(), 0))...

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