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

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

251. Effect材质详解(TypeScript-3D基础(TS)-模型材质详解) [ 68%]

...地球贴图 Laya.Texture2D.load("res/threeDimen/texture/earth.png", Laya.Handler.create(this, function(texture) { //设置纹理 material.texture = texture; })); earth.meshRenderer.material = material; ``` ![](img/1.gif)(图12)

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

252. 组件生命周期,混乱 [ 68%]

...之后无法运行 为什么官网例子里,UI组件的事件都用new Handler,而资源加载用Handler.create() 自定义组件发布之后报:can not create:ScaleButton ,发布之前正常,发布前后代码也被更改了 我想自定义组件 ,引入layaeditor.d.ts直接编译,居...

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

253. 使用IDE发布小游戏时,启用了版本管理会导致使用 Laya.MiniAdpter.nativefiles 定义的本地资源文件无法加载 [ 68%]

...reateImage(url,thisLoader,true); }else{ MiniFileMgr.downOtherFiles(url,new Handler(MiniImage,MiniImage.onDownImgCallBack,[url,thisLoader]),url); } } else MiniImage.onCreateImage(url,thisLoader,true); }else { MiniImage.onCreateImage(url,thisLoader,!isTransformUrl); }修改为: if (!MiniFileMgr.getF...

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

254. LayaNative中加载自己缓存的资源 [ 68%]

...时候始终读不了private function downloadFile(url:String,onComplete:Handler,onError:Handler=null):void{ if(window.conch) { var folder:String=window.conch.getCachePath()+"/download/"; if (!window.fs_exists(folder)) { window.fs_mkdir(folder); } var fileName:String = url.replace("http","").replace...

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

255. 在UI编辑器里可以看到位图字体,但是进入游戏后没有显示,怎么解决 [ 68%]

...fnt与png文件同名 this.mBitmapFont.loadFont("font/test.fnt",new Laya.Handler(this,onLoaded)); function onLoaded(){ init(); } function init(){ //如果位图字体中,没放空格,最好设置一个空格宽度 this.mBitmapFont.setSpaceWidth(10); Laya.Text.registerBitmapFont(this.mFontName,this.m...

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

256. 关于多个小动画打包到一个图集动画的问题 [ 68%]

...10:59 //加载图集 Laya.loader.load("res/atlas/hero.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS) //先把四张小图拿出来 var hero_down1=Laya.loader.getRes("hero/hero_down1.jpg"); var hero_down2=Laya.loader.getRes("hero/hero_down2.jpg"); var h...

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

257. 用二的幂次方图集非二的幂次方图集区别在哪? [ 68%]

...何获取图集下的小图资源? 图集的质量可以控制吗 Laya.Handler.createnew Laya.Handler有啥区别 我这样载入场景问题出现在哪呢?? spine动画播放后图集错乱 graphics矢量图svg矢量图有什么区别吗 问题状态 最新活动: 2017-09-04 17:31 浏...

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

258. 【紧急】laya2.0的loadImage方法为什么不触发complete? [ 68%]

...Laya.stage.addChild(logo); logo.loadImage("img/load_logo.png", 0, 0, 0, 0, Handler.create(this, function(){ trace("complete!!"); })); 我在laya1.0这么写,触发complete没毛病,为什么到了2.0这个complete不触发?谁给解释一下啊 2018-10-10 添加评论 免费帖 --> 分享 微...

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

259. 关于ASTC使用问题建议 [ 68%]

..."; 或者是 let tex = new Laya.Texture(); tex.load("ui/guide01.png", Laya.Handler.create(this, ()=>{   this.img.texture = tex; }));   但是如果使用ASTC纹理时就会报错,需要使用异步的方式来处理         Laya.loader.load("ui/guide01.ktx", Laya.Handler.create(this, (res...

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

260. laya.ui.CheckBox_API3.0 [ 67%]

... CheckBox 实例。 package { import laya.ui.CheckBox; import laya.utils.Handler; public class CheckBox_Example { public function CheckBox_Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load("resource/ui/check...

来源: Laya3.0_api 发布时间: 20231115