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

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

541. 射线检测-选取物体 [ 41%]

...ction():void { var str:String = ""; for (var i:int = 0; i < _outHitAllInfo.length; i++) { str += _outHitAllInfo[i].sprite3D.name + " "; } if (_outHitAllInfo.length == 0){ str = "点击选取的几何体"; } label.text = str; }); } } }

来源: Laya_示例 发布时间: 20260303

542. LayaAirID 打包app测试 apk无法开启webgl。用浏览器扫码进入就没问题 [ 41%]

...&amp;&amp; index &gt;-1 &amp;&amp; index &lt; this.currSlotData.displayArr.length){ this.displayIndex=index; this.currDisplayData=this.currSlotData.displayArr[index]; if (this.currDisplayData){ var tName=this.currDisplayData.name; this.currTexture=this.templet.getTexture(tName); if (this.currTexture...

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

543. 射线形状检测shapeCastAll返回的检测结果只第一次有效 [ 40%]

... PhysicsSimulation._btTempTransform1; var sweepShape = shape._btShape; out.length = 0; bt.btVector3_setValue(convexPosFrom, -fromPosition.x, fromPosition.y, fromPosition.z); bt.btVector3_setValue(convexPosTo, -toPosition.x, toPosition.y, toPosition.z); bt.ConvexResultCallback_set_m_collisionFilterGr...

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

544. 针对2.0.0 beta5 setLoadingPage 做增强 [ 40%]

...rogress), otherHandler()]).then(res =&gt; { let nextScene = res[0] if (res.length &gt; 1) param = .concat((param || ), [res[1]]) nextScene.open(closeOther, param) if (complete) complete.runWith(nextScene) // 重新设置loadingPage 并隐藏 Laya.Scene.setLoadingPage(this._loadScene) Laya.Scene.hide...

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

545. 3d资源释放的问题 [ 39%]

...组) var arr:any = Laya.loader.getRes(assetsUrl); for(var i:number = arr.length - 1;i&gt;-1;i--){ //根据资源路径获取资源(Resource为材质、贴图、网格等的基类) var resource:Laya.Resource = Laya.loader.getRes(arr[i].url); //资源释放 resource.dispose(); } 检验资源文...

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

546. 【简单跑酷--JS版】---Lv.6 终篇 [ 38%]

...前物品列表里面是否有 有的话 就从里面拿 if(this.itemList.length &gt; 0){ item = this.itemList.shift(); item.visible = true; }else{ //对象池中拿Item var item = Pool.getItemByClass("item",Item); } //是否有特殊物品 如果有 我们就生成特殊物品 if(randNum &gt; 0.95 ...

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

547. 批量销毁释放内存(JavaScript-3D基础(JS)-LayaAir3D的内存管理) [ 38%]

... for (var i:int = 0; i < skinnedmesh.skinnedMeshRenderer.sharedMaterials.length;i++ ){ skinnedmesh.skinnedMeshRenderer.sharedMaterials[i].lock = true; } })); ``` ##### 3D批量加载时,资源上锁 ​ 在批量加载资源的时候,无法拿到回调值。这时候就需要开发者通过 `Lay...

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

548. 网格像素线 · LayaAir3.4 · 引擎文档 · LAYABOX [ 38%]

... = mesh.getSubMesh(0).getIndices(); for (var i: number = 0; i &lt; indices.length; i += 3) { var vertex0: Laya.Vector3 = positions[indices[i]]; var vertex1: Laya.Vector3 = positions[indices[i + 1]]; var vertex2: Laya.Vector3 = positions[indices[i + 2]]; Laya.Vector3.transformCoordinate(vertex0, spri...

来源: Laya3.0_文档 发布时间: 20251010

549. 输入文本组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 37%]

...private onLoadComplete(): void { for (var i: number = 0; i &lt; this.skins.length; ++i) { var input: Laya.TextInput = this.createInput(this.skins[i]); input.prompt = 'Type:'; input.x = (Laya.stage.width - input.width) / 2; input.y = i * this.SPACING + this.Y_OFFSET; } } private createInput(skin: str...

来源: Laya3.0_文档 发布时间: 20251010

550. 和原生Dom交互 · LayaAir3.4 · 引擎文档 · LAYABOX [ 37%]

....window.FileReader(); file.onchange = function(e:any):void { if(file.files.length){ fileReader.readAsDataURL(file.files[0]); } }; fileReader.onload = function(evt):void { if(Laya.Browser.window.FileReader.DONE == fileReader.readyState) { var sp:Laya.Sprite = new Laya.Sprite(); sp.loadImage(fileReade...

来源: Laya3.0_文档 发布时间: 20251010