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

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

131. 仅在Android微信小游戏下图片错乱 [ 80%]

...小游戏下图片错乱 static preLoadPublicAssets(){ this.sAssetList = Loader.getRes("file_list.json") Laya.loader.load("res/ui/share@atlas0.png", Handler.create(this, this.onLoaded), null, Loader.IMAGE, 1, true, null, true) } static onLoaded(res){ console.log("public assets inited !!!!") console....

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

132. 预加载音频文件遇到的问题 [ 80%]

...载音频的代码(JS飞机大战示例), //加载声音资源 Laya.loader.load("res/sound/bloodstream_bg.mp3", Laya.Handler.create(this, onLoadedSound), null, Laya.Loader.SOUND); // })(); function onLoadedSound(){ Laya.SoundManager.playMusic("res/sound/bloodstream_bg.mp3", 0, Laya.Handler.cre...

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

133. 滤镜-发光滤镜 [ 80%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Handler.create(this, setup)); })(); function setup() { createApe(); applayFilter(); } function createApe() { ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.x = ...

来源: Laya_示例 发布时间: 20251130

134. 性能测试-虫子(慎入) [ 80%]

...ng, Laya.stage.width + padding * 2, Laya.stage.height + padding * 2); Laya.loader.load(texturePath, Handler.create(this, onTextureLoaded)); })(); function onTextureLoaded() { maggotTexture = Laya.loader.getRes(texturePath); initMaggots(); Laya.timer.frameLoop(1, this, animate); } function initMaggot...

来源: Laya_示例 发布时间: 20251130

135. 滤镜-发光滤镜 [ 80%]

...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Laya.Handler.create(this, this.setup)); } setup() { this.createApe(); this.applayFilter(); } createApe() { const Sprite = Laya.Sprite; this.ape = new Sprite(); Laya.stage.addChild(this.ape); let texture =...

来源: Laya2.0_示例 发布时间: 20251130

136. 动画-旧版骨骼动画 [ 80%]

...SkinAnimation(spirit3D._childs[i], index); } private loadUI(): void { Laya.loader.load(["../../res/threeDimen/ui/button.png"], Laya.Handler.create(this, function (): void { this.changeActionButton = Laya.stage.addChild(new Laya.Button("../../res/threeDimen/ui/button.png", "切换动作")) as Laya.Bu...

来源: Laya_示例 发布时间: 20251130

137. 关于loader加载Loader.JSON的一些问题 [ 80%]

关于loader加载Loader.JSON的一些问题 今天在处理本地JSON资源时,发现一个奇怪的问题: Laya.loader.load(resUrl, Laya.Handler.create(this, function (res) { //解析题目 log(res);   //放置方块 }), null, Laya.Loader.JSON); }   代码运行到这老是报错,报错...

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

138. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 80%]

....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

139. 在加载包含Animation的prefab后,动画没有显示 [ 80%]

...动画进行单独处理?还是不允许把动画放进预制体? Laya.loader.load("prefab/gk2v1.json",Laya.Handler.create(this,function(pref:Laya.Prefab){ var gkpref:Laya.Prefab = new Laya.Prefab(); gkpref.json = pref; var OBJ = Laya.Pool.getItemByCreateFun("gk2v1",gkpref.create,gkpref); this.S...

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

140. mac系统下 TypeScript 语言 ,声音无法播放? [ 80%]

...请: 与内容相关的链接 提交 1 个回复 纪龙 赞同来自: Laya.loader.load("res/sounds/light.mp3", Laya.Handler.create(this, ()=>{               console.log("load light.mp3");               Laya.SoundManager.playMusic("res/sounds/light.mp3");        ...

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