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

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

71. Laya.Handler.create 加载图片回调参数问题 [ 70%]

Laya.Handler.create 加载图片回调参数问题 我想在调用loadImage加载图片完成之后把某个参数带到Handler里,但是按网上的说法我一直是失败, 示例代码: //初始化微信小游戏 Laya.MiniAdpter.init(); //程序入口 Laya.init(Laya.Browser.width, Laya.Brows...

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

72. 其他引擎的Demo-Example_23 [ 69%]

...caleMode = Stage.SCALE_NOBORDER; // create a background texture Laya.stage.loadImage("../../res/pixi/laserBG.jpg"); Laya.stage.frameLoop(1, this, animate); })(); function animate() { if (tick > frequency) { tick = 0; // iterate through the dudes and update the positions var laser = new Sprite(); las...

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

73. htmlCanvas 像素级操作 [ 69%]

...q25 赞同来自: 最后的解决方法 是canvas转base64 在用sprite的 loadImage方法进行加载 不知道有没有更好的方法 2018-04-14 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 missccq25 相关问题 btn 鼠标移动上...

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

74. sprite添加click监听事件反应迟钝 [ 68%]

...awyuan.graphics.drawCircle(0,0,50,"#232628");//反应非常迟钝 drawyuan.loadImage("../laya/assets/comp/textinput.png");//反应没有问题 drawyuan.size(100, 100); var x = Math.random() * Laya.stage.width; var y = Math.random() * Laya.stage.height; console.log(x + "" + y); drawyuan.pos(x,y); ret...

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

75. 其他引擎的Demo-Example_23 [ 68%]

...gColor = "#232628"; Stat.show(); // create a background texture Laya.stage.loadImage("res/pixi/laserBG.jpg"); Laya.stage.frameLoop(1, this, this.animate); } animate() { const Sprite = Laya.Sprite, Point = Laya.Point; let laser; if (tick > frequency) { tick = 0; // iterate through the dudes and updat...

来源: Laya2.0_示例 发布时间: 20240929

76. 怎么裁剪一张图片 [ 68%]

怎么裁剪一张图片 let tmp = new Laya.Sprite(); tmp.loadImage("test.png", 0, 0, 30, 52); 我这么写,裁不出30*52的区域。请问要怎么写 2018-09-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复...

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

77. 两个问题都关于LayaAir的ios真机 [ 68%]

...自: 第二个问题 var mask:Sprite=new Sprite();            mask.loadImage("gametable/头像背景.png");var mask:Sprite=new Sprite(); mask.loadImage("gametable/头像背景.png"); var photo:Sprite=new Sprite(); photo.loadImage(AppConfig.httpPhotoUrl+UserData.username,0,0,gui.imgPhoto.width,...

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

78. 关于缓动函数from的一些问题记录 [ 68%]

...complete回调和addChild的顺序?     2. new Handler (在加载图片loadImage时可行)和new Laya.Handler(在from的Props的update回调函数时可行) 和 Laya.Handler.create (在加载图集和from的complete回调函数时可行)的区别?为什么会在交替使用时失败? 2018-06-20 ...

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

79. 使用webgl之后toDataUrl返回黑色的图像 [ 67%]

...().toDataURL();返回的是base64,你可以把这串base64当作url传给loadImage,也是OK的,请参考以下代码 package { import laya.display.Sprite; import laya.events.Event; import laya.utils.Browser; import laya.utils.Stat; import laya.webgl.WebGL; public class LayaAirDemo { private va...

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

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

...+ 'I like ' + '' + 'cheese' + '' + '' + ''; var sp = new Laya.Sprite(); sp.loadImage(data, 0, 0, 200, 200); Laya.stage.addChild(sp); ``` 通过data来当做url传递给loadImage这个方法引擎就会帮我们加载并解码显示出来。loadImage这个方法中的参数不仅仅有接收地址的...

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