大约有 744 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0057 秒)
Laya_社区(536) Laya2.0_文档(76) Laya_示例(48) Laya2.0_示例(39) Laya3.0_文档(24) Laya3.0_api(19) laya_api(1) Laya2.0_api(1)
...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); })(); function graphicsImg() { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.sta...
来源: Laya2.0_文档 发布时间: 20210715
... constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-...
来源: Laya3.0_文档 发布时间: 20251105
3D资源加载,进度显示问题 使用Laya.loader.create场景资源的时候(比如加载loveScence.ls),onProgress函数回掉监听不到,然后界面上的加载进度会一直停留在一个百分百进度,等场景里面的素材全部加载完,onProgress才会收到进度消...
来源: Laya_社区 发布时间: 20170920
...游戏加载不了,路径没问题,麻烦看下 加载代码 Laya.loader.load([ { url:"res/Bag_atlas0.png", type:Laya.Loader.IMAGE }, { url:"res/Bag_atlas0_1.png", type:Laya.Loader.IMAGE}, { url:"res/Bag.json", type:Laya.Loader.BUFFER} ...
来源: Laya_社区 发布时间: 20200429
....js 在之前的基础上增加加载图片的代码://加载图片 Laya.loader.load(["res/background.png", "res/m_background.png"], laya.utils.Handler.create(this, onLoaded), laya.utils.Handler.create(this, onLoading, null, false)); //加载进度 function onLoading(progress){ console.log("onLoad...
来源: Laya_社区 发布时间: 20160722
...kbox (4).png", "res/ui/checkbox (5).png", "res/ui/checkbox (6).png"]; Laya.loader.load(skins, Handler.create(this, this.onCheckBoxSkinLoaded)); } onCheckBoxSkinLoaded() { let cb; for (let i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alig...
来源: Laya2.0_示例 发布时间: 20251130
...Arr:Array=[ {url:"res/sound/music_gameplay.mp3", type:Loader.SOUND}, {url:"res/sound/button.mp3", type:Loader.SOUND}, {url:"res/sound/mob_true.mp3", type:Loader.SOUND}, {url:"res/sound/mob_hit.mp3", type:Loader.SOUND...
来源: Laya_社区 发布时间: 20181112
...ar.png"); skins.push("res/ui/vslider.png", "res/ui/vslider$bar.png"); Laya.loader.load(skins, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { this.placeHSlider(); this.placeVSlider(); } placeHSlider() { const HSlider = Laya.HSlider, Handler = Laya.Handler; let hs = new HSlider("res/...
来源: Laya2.0_示例 发布时间: 20251130
...", "../../res/ui/checkbox (5).png", "../../res/ui/checkbox (6).png"]; Laya.loader.load(skins, Handler.create(this, onCheckBoxSkinLoaded)); })(); function onCheckBoxSkinLoaded() { var cb; for (var i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.st...
来源: Laya_示例 发布时间: 20251130
...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); })(); function setup() { normalizeApe(); makeRedApe(); grayingApe(); } function normalizeApe() { var originalApe = createApe(); apeTexture = Laya.loader.getRes(ApePath); orig...
来源: Laya_示例 发布时间: 20251130