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

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

221. swf在layaairts里播放的问题,播放不了,swf在群文件star.swf [ 63%]

...文档的例子试了不行 // 程序入口 module laya {     import Loader = Laya.Loader;     import Handler = Laya.Handler;     export class Loader_MultipleType {         private ROBOT_DATA_PATH: string = "res/swf/star.swf"; private ROBOT_DATA_PATHS: string = "res/swf/star.json...

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

222. 求教 JS项目的Promise如何使用 [ 63%]

...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.monkey2,Laya.Handler.create(this,graphicsImg)); function graphicsImg(){ var img = new Laya.Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(this.monkey2),100,50); /...

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

223. 微信环境下面Laya.Browser.window.protobuf.load不能读取本地的proto文件 [ 63%]

...72:13)     at http://127.0.0.1:53462/game/code.js:97630:17     at Laya.loader.load.Handler.create (http://127.0.0.1:53462/game/code.js:102231:13)     at Handler.__proto.runWith (http://127.0.0.1:53462/game/code.js:711:59)   查看了应该是微信自带的浏览器内核不支持Function.app...

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

224. 按照打地鼠教程来无法正常加载资源 [ 63%]

...as/ui.atlas"},                 {res:"res/ui/back.png",type:Loader.IMAGE}             ];             Laya.loader.load(resArr,Handler.create(this,this.onLoaded));         }         private function onLoaded():void{             //显...

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

225. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 63%]

...图片加密数据是在图片的前面写入了四个字节的数据 Laya.loader.fetch("resources/res/test.bin","arraybuffer").then((res)=>{ //获得res的ArrayBuffer数据 let arraybuffer: ArrayBuffer = res; //Byte数组接收arraybuffer let byte:Byte = new Byte(arraybuffer); //从第四个字...

来源: Laya3.0_文档 发布时间: 20230303

226. 图集打包后使用Texture不显示啊 [ 63%]

...=================================================== // 程序入口 import Loader = Laya.Loader; import Texture = Laya.Texture; import Handler = Laya.Handler; class GameMain{ constructor() { Laya.init(1080,1321); //设置适配模式 Laya.stage.scaleMode = "showall"; //设置剧中对齐 Laya.stage....

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

227. 关于stage的size问题 [ 63%]

...scaleMode = Laya.Stage.SCALE_NOSCALE; // Laya.stage.size(6000, 6000); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Laya.Handler.create(this, this.onLoaded)); function onLoaded(): void { var sprite = new Laya.Sprite(); sprite.loadImage('comp/bg.png'); Laya.stage.addChild(spr...

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

228. IDE动画 添加过程出现图片资源丢失 [ 63%]

...  代码:  var ress=[{url:"res/atlas/games/cxmj/shaizi.json",type:Laya.Loader.ATLAS}];                      Laya.loader.load(ress);                     var Animation = Laya.Animation;                     var dice=new Animation();              ...

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

229. Animation的createFrames为何加载不了有的图集资源 [ 63%]

...rt laya.ani.AnimationState; import laya.display.Animation; import laya.net.Loader; import laya.ui.Image; import laya.utils.Handler; import view.TestView; public class LayaUISample { public function LayaUISample() { //初始化引擎 Laya.init(600, 400); //Laya.loader.load([{url: "res/atlas/char_wuda...

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

230. playSound和playMusic结束时候有异常抛出 [ 63%]

playSound和playMusic结束时候有异常抛出 1. loader加载了{url:"res/music/Music_start.mp3",type:Laya.Loader.SOUND}资源 2. 加载结束后,调用Laya.SoundManager.playSound("res/music/Music_start.mp3") 3. 声音播放完成后,系统抛出异常__proto._tryClearBuffer=function(sourceN...

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