大约有 16 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0029 秒)
...e === Keyboard.H) { sp.visible = false; //隐藏界面,清理资源 Laya.loader.clearTextureRes("res/bg.jpg"); Laya.loader.clearTextureRes("res/fighter.atlas"); } else if (e.keyCode === Keyboard.S) { //显示界面,资源会自动恢复 sp.visible = true; } } } } ``` **clearTextureRes** 销毁Te...
来源: Laya2.0_文档 发布时间: 20210714
...e === Keyboard.H) { sp.visible = false; //隐藏界面,清理资源 Laya.loader.clearTextureRes("res/bg.jpg"); Laya.loader.clearTextureRes("res/fighter.atlas"); } else if (e.keyCode === Keyboard.S) { //显示界面,资源会自动恢复 sp.visible = true; } } } } ``` **clearTextureRes** 销毁Te...
来源: Laya2.0_文档 发布时间: 20200929
...引擎 Laya.init(500,500); var skins:Array = [ "res/button-1.png" ]; Laya.loader.load(skins, Handler.create(this, onUIAssetsLoaded)); } public function onUIAssetsLoaded():void { var btn:Button = new Button("res/button-1.png"); Laya.stage.addChild(btn); //创建隐藏的file并且把它和按钮对...
来源: Laya2.0_文档 发布时间: 20210715
...。 ```typescript //初始化3D场景 var scene = Laya.stage.addChild(Laya.Loader.getRes("res/threeDimen/scene/ChangeMaterialDemo/Conventional/scene.ls")); //获取球型精灵 var sphere = scene.getChildByName("Sphere"); //获取精灵的mesh var sphereMesh = sphere.meshFilter.sharedMesh; //此时...
来源: Laya2.0_文档 发布时间: 20210714
...。 ```typescript //初始化3D场景 var scene = Laya.stage.addChild(Laya.Loader.getRes("res/threeDimen/scene/ChangeMaterialDemo/Conventional/scene.ls")); //获取球型精灵 var sphere = scene.getChildByName("Sphere"); //获取精灵的mesh var sphereMesh = sphere.meshFilter.sharedMesh; //此时...
来源: Laya2.0_文档 发布时间: 20210715
........前面摄影机,猴子精灵相关操作忽略 var heightMap = Laya.Loader.getRes("res/threeDimen/scene/TerrainScene/Assets/HeightMap.png"); //初始化MeshTerrainSprite3D this.terrainSprite = MeshTerrainSprite3D.createFromMeshAndHeightMap(meshSprite3D.meshFilter.sharedMesh as Mesh, heightMap...
来源: Laya2.0_文档 发布时间: 20210714
... ```typescript //初始化3D场景 var scene:Scene3D = Laya.stage.addChild(Loader.getRes("res/threeDimen/scene/ChangeMaterialDemo/Conventional/scene.ls")) as Scene3D; //获取球型精灵 var sphere:MeshSprite3D = scene.getChildByName("Sphere") as MeshSprite3D; //获取精灵的mesh var sphereMesh:M...
来源: Laya2.0_文档 发布时间: 20210714
........前面摄影机,猴子精灵相关操作忽略 var heightMap = Laya.Loader.getRes("res/threeDimen/scene/TerrainScene/Assets/HeightMap.png"); //初始化MeshTerrainSprite3D this.terrainSprite = MeshTerrainSprite3D.createFromMeshAndHeightMap(meshSprite3D.meshFilter.sharedMesh as Mesh, heightMap...
来源: Laya2.0_文档 发布时间: 20210715
...前面摄影机,猴子精灵相关操作忽略 var heightMap:Texture2D = Loader.getRes("res/threeDimen/scene/TerrainScene/Assets/HeightMap.png") as Texture2D; //初始化MeshTerrainSprite3D terrainSprite = MeshTerrainSprite3D.createFromMeshAndHeightMap(meshSprite3D.meshFilter.sharedMesh as Mesh, h...
来源: Laya2.0_文档 发布时间: 20210714
...正确获取宽高。 3. **直接调用size设置:** ```javascript Laya.loader.load("res/apes/monkey2.png", Handler.create(this, function() { var texture:Texture = Laya.loader.getRes("res/apes/monkey2.png"); var sp:Spirte = new Sprite(); sp.graphics.drawTexture(tex...
来源: Laya2.0_文档 发布时间: 20210715