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

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

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

...//加载声音资源 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.create(this, onComplete)); } function onComplete(){...

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

242. 关于Laya.loader.load和getRes的问题 [ 73%]

...2:使用drawTexture Laya.loader.load("../../../../res/apes/monkey2.png", Handler.create(this, function():void { var t:Texture = Laya.loader.getRes("../../../../res/apes/monkey2.png"); var ape:Sprite = new Sprite(); ape.graphics.drawTexture(t,0,0); Laya.stage.addChild(ape); ape.pos(200, 0); })); ...

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

243. 高级应用-实时阴影 [ 73%]

...ane.lh", "../../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh" ], Laya.Handler.create(this, onComplete)); var _quaternion = new Laya.Quaternion(); Laya.timer.frameLoop(1, null, function () { Laya.Quaternion.createFromYawPitchRoll(0.025, 0, 0, _quaternion); var _direction = directionLight.directi...

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

244. 微信资源加载问题 [ 73%]

...服务器上面,然后我用loader加载 Laya.loader.load(resArr, Laya.Handler.create(null, function () { var a = new Laya.Image('comp/bg.png') Laya.stage.addChild(a) }), Laya.Handler.create(null, function (value) { console.log('加载进度:' + value) }, null, false)) 项目是微信小游戏 ...

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

245. graphics使用matrix的异常情况 [ 73%]

...使用matrix的异常情况 Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); ape.graphics.scale(1.01, 1) Laya.stage.addChild(ape); ape.pos(200, 0); }))...

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

246. JS进度条加载问题 [ 73%]

... proArr = []; proArr[0]=pro1; proArr[1]=pro2; Laya.loader.load(proArr,Laya.Handler.create(this,onProLoaded)); if(Laya.Browser.onAndriod) { Laya.stage.scaleMode = Laya.Stage.SCALE_EXACTFIT; } else { Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; } Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.s...

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

247. Laya.Geolocation使用报错 [ 73%]

...Geolocation.enableHighAccuracy = true; Laya.Geolocation.watchPosition(Laya.Handler.create(this, this.updatePosition), Laya.Handler.create(this, this.onError)); 报错如下: TypeError: Cannot set property 'enableHighAccuracy' of undefined 会出现无法找到Laya.Geolocation的各类属性错误...

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

248. laya.net.LoaderManager [ 73%]

...载的内容全部停止加载。LoaderManager  create(url:*, complete:Handler = null, progress:Handler = null, type:String = null, constructParams:Array = null, propertyParams:Object = null, priority:int = 1, cache:Boolean = true):void 根据clas类型创建一个未初始化资源的对象,随...

来源: Laya2.0_api 发布时间: 20190513

249. 连续读取多个本地json文件 [ 73%]

...d { console.log("读数据"); Laya.loader.load("Json/shopLevel.json", Laya.Handler.create(this, this.shopJsonLoaded), null, Laya.Loader.JSON); Laya.loader.load("Json/menu.json", Laya.Handler.create(this, this.menuJsonLoaded), null, Laya.Loader.JSON); } //读取商店等级配置表 shopJsonLoaded( )...

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

250. 分享-js资源进度加载 [ 73%]

...las/Progress.json", type: Laya.Loader.ATLAS }]; Laya.loader.load(arr, Laya.Handler.create(this, this.onProgress)); } onProgress() { this.Progress = new Progress(); Laya.stage.addChild(this.Progress); //加载资源进度并且监听 Laya.loader.load(this.arr, Laya.Handler.create(this, this.onAssetsL...

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