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

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

371. workerLoader问题 [ 51%]

...有问题 onmessage里面 var e = t.data; switch (e.type) { case "load": loadImage2(e); } e是url字符串,改好之后可以加载了,回调方法this指向有问题, (this as any as WorkerLoader).workerMessage(evt.data); 这里this指向的worker,而不是WorkerLoader demo.zip 2019-08-02 0 0...

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

372. [LayaAir3]OPPO小游戏下图片地址无法加载 [ 51%]

...ny = this; this.btn.onClick(function () { (Laya.Browser.window as any).jsb.loadImage( "https://sh.mudgj.com/api/playe ... ot%3B, (info: any) => { var filePath = Laya.PAL.g.saveImageTempSync({ data: info.data, width: info.width, height: info.height, fileType: "png", }); // 再使用filePath赋值...

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

373. "Background is not defined"怎么会没定义呢???求救 [ 51%]

...ckground(){ Background.super(this); this.bg1 = new Laya.Sprite(); this.bg1.loadImage("res/background.png"); this.addChild(this.bg1); } Laya.class(Background,"Background",_super); window.Background=Background; return Background; })(Laya.Sprite); 2017-04-20 0 2 分享 微博 QZONE 微信 为什么被...

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

374. 通过html的input类型file上传图片,然后通过FileReader获取图片数据之后设置laya的image.skin图片不显示 [ 51%]

...der.onload=function () {                         this.headIcon.loadImage(this.result); 或者 this.headIcon.skin=this.result;              }              reader.readAsDataURL(file);  } 2017-08-08 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结...

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

375. 怎么给List下的每个item中的button添加事件? [ 51%]

...s.btnBox); for(var i = 0; i < 5; i++){ var btn = new Laya.Sprite(); btn.loadImage("Key.jpg",i*100,800,100,60); btn.id= i; btns.push(btn); this.btnBox.addChild(btn); console.log(btn.id); } for(var i = 0; i < 5; i++){ btns[i].on(Laya.Event.CLICK,this,judge,[i]); } function judge(aa){ c...

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

376. 动画、界面处理效率方面的问题 [ 51%]

... 动画(1)与在 Flash 中“导出png序列”后使用 Animation 的 loadImages() 做成序列动画(2);导出png序列后多张图片的体积要比swf文 件大不少,这两者单从资源占用方面看 swf 似乎更有优势,但感觉 Animation 序列动画更方便控制些。...

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

377. Laya下的图片上传示例(完整版) [ 51%]

...width<100&&height<100){ var bgImg = new Laya.Sprite(); bgImg.loadImage(data); Laya.stage.addChild(bgImg) }else{ console.log("图片超标"+width+"--"+height); } }; img.src =data; } }; 2019-01-29 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...

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

378. 官方视频教程中飞机大战 "this.addChild is not a function" [ 51%]

...ckGround(){ BackGround.super(this); this.bg1 = new Laya.Sprite(); this.bg1.loadImage("war/background.png"); this.addChild(this.bg1); } Laya.class(BackGround,"BackGround",_super); return BackGround; })(Laya.Sprite);报错 "TypeError: this.addChild is not a function    at BackGround (file:///D:/test...

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

379. Animation创建动画模板问题 [ 51%]

...ildhood/EARLY_GAME_001/bin/libs/laya.core.js:11178:32) at Graphics.__proto.loadImage (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:1808:19) at Function.Animation.createFrames (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:16442:8) at new Character (file:///E:/Early...

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

380. 如何使用graphics绘画虚线 [ 51%]

...t;</g></svg>" var sp: Laya.Sprite = new Laya.Sprite(); sp.loadImage(data, 0, 0, 1280, 720,Handler.create(this,()=>{ sp.graphics.getBoundPoints().forEach(e=>{ console.log("_getBoundPointsM:",e); }); })); sp.x=0; sp.y=0; this._sptse=sp; Laya.stage.addChild(sp);

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