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

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

31. Laya.Handler.create 回调参数问题 [ 74%]

...ite();     Laya.stage.addChild(ape); var ag = ["lsd",ape,1,"str"]; ape.loadImage("../laya/assets/res/to1.png",0,0,0,0,Laya.Handler.create(this,graphicsImg,ag));   graphicsImg(ag); }  function graphicsImg(args) { console.log(args); }   //loadImage 的回调函数只传递出来了第一个参...

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

32. 创建多个Sprite对象后,再次取出来的时候坐标全为0,0高宽跟创建时的也一样 [ 74%]

...bg_" + nums; userBoxSprite.addChild(sb); userBoxSprite.addChild(sp); // sb.loadImage(newBg1, x, y, singleWidth, singleHeight); sb.skin = newBg1; sb.pos(x,y); sb.size(singleWidth, singleHeight); // sp.loadImage(imgUrl, x, y, singleWidth, singleHeight); sp.skin = imgUrl; sp.pos(x,y); sp.size(singleWid...

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

33. 用图集打包出来的图片,只能用于 Image?? 能用于Sprite么? [ 74%]

...回复 Monica - 知识达人 赞同来自: var sp = new Laya.Sprite(); sp.loadImage("url"); Laya.stage.addChild(sp); 2017-12-26 0 3 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 qq408896436 相关问题 请问LayaAir中如何使图片以圆...

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

34. Sprite加载图片 是异步操作吗? [ 73%]

Sprite加载图片 是异步操作吗? this.bg_2.loadImage("background.png"); this.bg_2.pos(0,this.bg_2.height); 这时候 this.bg_2.height 的值打印出来是0 2017-10-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1...

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

35. 怎么上传并获取图片? [ 73%]

...片的base64编码,然后把数据当作url路径传递给layaAir下的loadImage()方法即可! 2017-04-18 0 5 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 ohkei as3、as2、h5 相关问题 请问LayaAir中如何使图片以圆形的...

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

36. laya animation播放图片集合,切换时会闪烁一下 [ 72%]

...n = new Laya.Animation(); this.ui.addChild(this.animation); this.animation.loadImages(images); this.animation.interval = 70; this.animation.play(0); return  this.animation } 我知道你是怎么做的。这样是没问题的 2019-03-25 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个...

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

37. 【laya2.0】加载并且显示图片,并且让该图片居于舞台中央,怎么写? [ 72%]

...同来自: var logo = new Laya.Sprite(); Laya.stage.addChild(logo); logo.loadImage("res/atlas/test.png", Laya.Handler.create(this, function(){ console.log("complete!!"); logo.x= Laya.stage.width/2-logo.width/2; logo.y= Laya.stage.height/2-logo.height/2; //logo.pos(Laya.stage.width/2-logo.width/2,Lay...

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

38. 没有预加载的图片怎么获取width和height ? [ 72%]

...交 2 个回复 浪货界扛把子 赞同来自: cuixueying 给精灵设置loadimage能直接获取它的大小;   问题:是是只有加载完图片在能真正获取他的width和height?   本人当前解决方法:提前加载资源,在回调中进行操作设置 text_load_wid...

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

39. 图片跨域加载[ 72%]

图片跨域加载吗 请问下 我用loadImage加载一个非同域名的图片 但是死活显示出来 是跨域了吗 但是在pc上可以 拿到我的红米上测试就死活出来 是咋回事 ,要显示qq头像 怎么办 用户量大的话 服务器把qq头像那都保存了 ...

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

40. 续飞机大战 [ 71%]

...背景1 this.bg1 = new Laya.Sprite(); //加载并显示背景图 this.bg1.loadImage("war/background.png"); //把背景1放到容器内 this.addChild(this.bg1); //创建背景2 this.bg2 = new Laya.Sprite(); //加载并显示背景图 this.bg2.loadImage("war/background.png"); //更改背景2,放到...

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