大约有 1,499 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0067 秒)
...atic _mainCol : number; inited : boolean = false; constructor() { super(); if(!this.inited) { CMat._mainTex = Laya.Shader3D.propertyNameToID("u_MainTex"); CMat._mainCol = Laya.Shader3D.propertyNameToID("u_MainCol"); CMat.initShader(); this.inited = true; } this.setShaderName("CMatShader"); } public ...
来源: Laya_社区 发布时间: 20190814
...ei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor; } this.owner.addChild(label); return label; } } 效果预览: (图2-1) Copyright ©Layabox 2026 all right reserved,powered by LayaAir En...
来源: Laya3.0_文档 发布时间: 20251010
... let e = str.charAt(i); if (e=="1"){ let ii= i+1; pos_arr.push(ii+""); } } return pos_arr; } private updateI...
来源: Laya_社区 发布时间: 20210122
...来加载指定文件资源。[size=14][code]// Loads the file at the specified path and uses it Laya.loader.create([{ url: "xx.zip", type:"ZIP",constructParams:["xx/xxx1.lh","xx/xxx2.lh"]}], Laya.Handler.create(this, () => { let player1 = Laya.loader.getRes("xx/xxx1.lh").clone(); let player2 = L...
来源: Laya_社区 发布时间: 20211227
...s.loadScene(); break; case 1: (e.target as Button).label = "加载场景"; if (this._scene)//_scene不为空表示场景已加载完成 this.garbageCollection(); break; } /** * @private 销毁场景并且释放资源 */ garbageCollection() { this._scene.destroy();//销毁场景 this._scene = null; L...
来源: Laya2.0_文档 发布时间: 20210715
...Sprite3D, lineSprite3D: Laya.PixelLineSprite3D, color: Laya.Color): void { if (sprite3D.getComponent(Laya.MeshFilter)) { var mesh: Laya.Mesh = sprite3D.getComponent(Laya.MeshFilter).sharedMesh; var positions: Array<Laya.Vector3> = []; mesh.getPositions(positions); var indices = mesh.getSubMesh...
来源: Laya3.0_文档 发布时间: 20251010
...ht即为当前角色所在位置高度 if (isNaN(mheight)) //非数字,则走到不走区域,做相应的逻辑判断即可 方案二:(使用方便,性能较差,不推荐) layaAir3D在下下个 版...
来源: Laya_社区 发布时间: 20170505
...; loadScene(); break; case 1: (e.target as Button).label = "加载场景"; if (_scene)//_scene不为空表示场景已加载完成 garbageCollection(); break; } /** * @private 销毁场景并且释放资源 */ public function garbageCollection():void { _scene.destroy();//销毁场景 _scene = null; ...
来源: Laya2.0_文档 发布时间: 20210715
...s.loadScene(); break; case 1: (e.target as Button).label = "加载场景"; if (this._scene)//_scene不为空表示场景已加载完成 this.garbageCollection(); break; } /** * @private 销毁场景并且释放资源 */ public garbageCollection():void { this._scene.destroy();//销毁场景 this._sce...
来源: Laya2.0_文档 发布时间: 20210715
...btn = playControls.getChild("packUI"); //获取运行预览的播放按钮 if (!btn) { btn = playControls.addChild(gui.UIPackage.createWidgetSync("~/ui/basic/Button/FlatIconButton.widget")); btn.name = "packUI"; btn.setSize(16, 16); btn.icon = "~/ui/icons/global.svg"; //这里可以换显示图标 b...
来源: Laya3.0_文档 发布时间: 20251216