大约有 1,300 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0075 秒)
Laya_社区(1024) Laya2.0_文档(79) Laya3.0_文档(59) Laya_示例(51) Laya3.0_api(44) Laya2.0_示例(39) laya_api(2) Laya2.0_api(2)
...bgColor="#EEFFCC"; //预加载button的资源,用于tab的项皮肤 Laya.loader.load("button-4.png",Handler.create(this,onLoaded)); } private function onLoaded():void { //添加tab容器 var tab:Tab=new Tab(); Laya.stage.addChild(tab); for(var i:int=0;i<6;i++)//为tab容器添加button { var bt...
来源: Laya_社区 发布时间: 20170626
...怎么调用下载到本地的资源 cuixueying • 2017-05-18 17:10 Laya.loader.load可以对服务器的资源进行预加载,并缓存到本地,Laya.loader.getRes可以获取缓存下的资源文件! 我盼乙卯 • 2018-05-31 15:42 @cuixueying:请问这个缓存到本地是缓存到硬盘...
来源: Laya_社区 发布时间: 20170319
...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // 创建罗盘 this.createCompass(); // 创建方位指示器 this.createDirectionIndicator(); //...
来源: Laya2.0_示例 发布时间: 20260303
修复图片加载跨域问题 使用loader.load加载图片出现跨域问题; 看了laya.core.js源码发现图片是用Image对象加载,按道理应该不会出现,尝试去除crossOrigin=""; 发现不出现跨域问题,微信头像可以正常加载 注释掉下面这几行 line:1104...
来源: Laya_社区 发布时间: 20170204
...j.com/api/player/auth/img?key=testpng oppo小游戏下 无法显示 Laya.loader .load( "https://sh.mudgj.com/api/playe ... ot%3B, Laya.Loader.IMAGE ) .then((res: Laya.Texture) => { let sp = new Laya.Sprite(); sp.texture = res; sp.pos(0, 200); this.addChild(sp); });无法正常显示 检查发...
来源: Laya_社区 发布时间: 20250818
...叠 要回复问题请先登录 发起人 F7537488CX 相关问题 请问下loader如何强制加载一个文件,避免浏览器的缓存 请教下微信小游戏的内存和数据缓存? Animation 的createFrames 使用已经加载的图集缓存动画失败 ide出现问题了,左侧总是被...
来源: Laya_社区 发布时间: 20180124
...nMouseClick(): void { //使用Prefab,需要转换根节点为Dialog Laya.loader.load("resources/Prefab2D.lh").then(res => { let dlg: Laya.Dialog = res.create(); dlg.open(); }); } } 运行效果如下: (动图) 二、通过代码创建Dialog 在进行书写代码的时候,免不了通过...
来源: Laya3.0_文档 发布时间: 20251024
...00631用户 赞同来自: //加载IDE指定的场景 Laya.loader.load([{url:"minastc.config.json",type:Laya.Loader.JSON}],new Laya.Handler(this,function(){ this.astcconfig = Laya.loader.getRes("minastc.config.json"); for(var key in this.astcconfig...
来源: Laya_社区 发布时间: 20221013
...后_referenceCount不会变成0,2.0版本是正常的可以变为0 Laya.loader.load('resources/UI/role/mxxxx.png', Laya.Loader.IMAGE).then((res: Laya.Texture) => { let sp = new Laya.Sprite(); sp.texture = res; Laya.stage.addChild(sp); setTimeout(() => { sp.destroy() }, 1000); });重现代码...
来源: Laya_社区 发布时间: 20231130
...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load("res/logo.png",Handler.create(this,onLoaded)); } private function onLoaded():void { img=new Image(); img.skin="res/logo.png"; Laya.stage.addChild(img); Laya.timer.once(500,this,onClick); //Laya.stage.on(Event.CLIC...
来源: Laya_社区 发布时间: 20170704