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

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

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

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

322. 图片通过drawTexture平铺出现缝隙 [ 52%]

...      this.addChild(this.darwSprite);         var t: Texture = Laya.loader.getRes("load/0.png");         this.darwSprite.graphics.drawTexture(t,0,0);         this.darwSprite.graphics.drawTexture(t,176,0);         this.darwSprite.graphics.drawTexture(t,176*2,0);   采用这方式...

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

323. LayaAir和原生DOM交互(JavaScript-2D进阶篇(JS)-扩展模块) [ 52%]

...ript //初始化引擎 Laya.init(100,100); var skins = ["res/a.png"]; Laya.loader.load(skins,Laya.Handler.create(this,onUIAssetsLoaded)); function onUIAssetsLoaded(){ var btn = new Laya.Button("res/a.png"); Laya.stage.addChild(btn); //创建隐藏的file并且把它和按钮对齐。达到位置一...

来源: Laya2.0_文档 发布时间: 20210714

324. 微信小游戏中iPhoneX的适配问题 [ 52%]

...uot;../../res/apes/monkey3.png"); // 方法2:使用drawTexture 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); Laya.stage.a...

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

325. Laya.load在OPPO小游戏端无法加载带有不安全字符的图片网址 [ 52%]

...能找到错误 let _url = "https://lupic.cdn.bcebos.com/2 ... 3B%3B Laya.loader.load(_url, Laya.Handler.create(this, res => { let a = new Laya.Image(_url); Laya.stage.addChild(a); })) 以下是安卓层面输出日志:09-22 11:08:10.811 27895-28111/? D/jswrapper: JS: [WARN]: [warn]Retry to loa...

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

326. 和原生Dom交互 · LayaAir3.3 · 引擎文档 · LAYABOX [ 51%]

... //初始化引擎 Laya.init(100,100); var skins:any = ["res/a.png"]; Laya.loader.load(skins,Laya.Handler.create(this,this.onUIAssetsLoaded)); } private onUIAssetsLoaded():void{ var btn:Laya.Button = new Laya.Button("res/a.png"); Laya.stage.addChild(btn); //创建隐藏的file并且把它和按钮...

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

327. 求问sprite放大后,graphics绘制的图像位置偏移 [ 51%]

...偏移 let sprite: Sprite = new Sprite(); let texture: Laya.Texture = Laya.loader.getRes(this.skin_img1); sprite.graphics.drawTexture(texture, 0, 0, texture.width, texture.height); sprite.size(texture.width, texture.height); let x: number = 300; let y: number = 100; let scaleRatio: number = 1.3; spr...

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

328. load方法加载cdn上面的图片资源的时候直接报了跨域不同源的问题,怎么破? [ 51%]

... ]; this.isFirst = true; console.log('Gzdaze='); console.log(Gzdaze); Laya.loader.load(Gzdaze.dialogList, Handler.create(this, this.startLoaded)); 代码是这样的 报错 Access to Image at 'http://caifu-1251177394.file.myqcloud.com/beta/book/bookLaya/img/progressBar$bar.png' from origin 'http://b...

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

329. laya底层的加载为什么可以new两次 [ 51%]

laya底层的加载为什么可以new两次 laya.net.Loader.as  第222行 new HTMLImage.create(url, {onload: onload, onerror: onerror, onCreate: function(img:*):void { image = img; //增加引用,防止垃圾回收 imgCache[url] = img; }}); 这里的调用create本身就是返回一个对象了...

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

330. iphone自带浏览器问题 [ 51%]

...hone自带浏览器页面怎么锁定 IDE创建的UI 层级问题 请问下loader如何强制加载一个文件,避免浏览器的缓存 两个问题 有元件支援视频流渲染吗? Image元件读不了资料流 问题状态 最新活动: 2017-10-18 14:59 浏览: 998 关注: 3 人 rgxianzhan ...

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