大约有 167 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0058 秒)
Laya_社区(135) Laya2.0_文档(13) Laya2.0_示例(6) Laya3.0_文档(4) Laya_示例(3) laya_api(2) Laya3.0_api(2) Laya2.0_api(2)
...9 10:59 直接用Laya.SoundManager.playSound,每次调用时,都会去Laya.loader.getRes一次,这样对于效率影响很大啊? 话说为什么不能调用SoundChannel的play()呢? Laya_Aaron • 2018-06-29 11:01 @138*****782:SoundManager.autoReleaseSound设置 false试一下。 138*****782 • 20...
来源: Laya_社区 发布时间: 20180628
...texture没有作用了。 如题,我特别喜欢使用sprite.texture = loader.getRes(url)的方法来修改已创建的sprite上的显示图片,但在打包以后发现这个方式没有改变其显示,一开始我以为是资源没有找到,但后来发现sprite.texture = null还有作用...
来源: Laya_社区 发布时间: 20190218
...tChildAt(13) as MeshSprite3D; var texture:Texture2D = Loader.getRes("res/heightMap.png") as Texture2D; //通过高度图纹理和最大高度最小高度生成MeshTerrainSprite3D var terrainSprite:MeshTerrainSprite3D = MeshTerrainSprite3...
来源: Laya_社区 发布时间: 20170505
...01-13 11:36 this.url = comp/lhjicon_5.png" this.cached_texture = Laya.loader.getRes(this.url) // 每次重新绘制的时候 this.graphics.clear() this.graphics.drawTexture(this.cached_texture) // 而不是每一次都 drawcanvas 然后再转成 texture,drawcanvas作用就跟截屏一样 kezh...
来源: Laya_社区 发布时间: 20180113
...下: ```typescript //先加载plf类型的合并后文件Image.json Laya.loader.load([{url: "res/Image.json", type: "plf"}], Handler.create(this, function():void { //在回调里,正常使用原来的图集 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, function():void { var img:T...
来源: Laya2.0_文档 发布时间: 20210714
...e = [{url: "Box/LayaScene_JJF/Conventional/JJF.lh"}]; Laya.loader.create(resource, Laya.Handler.create(this, this.onComplete)); } onComplete(){ //创建场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //创建相机 var camer...
来源: Laya_社区 发布时间: 20190605
... Texture; set texture(value: Texture); 我们来看看代码示例: Laya.loader.load("atlas/comp/image.png").then(() => { let sprite = new Laya.Sprite(); //精灵设置纹理并居中显示 let res = Laya.loader.getRes("atlas/comp/image.png"); sprite.pos(Laya.stage.width >> 1, Laya.stage....
来源: Laya3.0_文档 发布时间: 20251010