大约有 317 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0049 秒)
Laya_社区(99) Laya3.0_api(64) Laya2.0_api(59) laya_api(55) Laya2.0_示例(13) Laya_示例(12) Laya2.0_文档(11) Laya3.0_文档(4)
...创建完毕,此方法只执行一次 */ onAwake(): void { this.sprite.loadImage("atlas/comp/image.png"); //纹理:图片路径 this.sprite.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置:屏幕中心 this.sprite.x = Laya.stage.width/2; //x、y分别设置位置 this.s...
来源: Laya3.0_文档 发布时间: 20251010
...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_示例 发布时间: 20251130
...q25 赞同来自: 最后的解决方法 是canvas转base64 在用sprite的 loadImage方法进行加载 不知道有没有更好的方法 2018-04-14 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 missccq25 相关问题 btn 鼠标移动上...
来源: Laya_社区 发布时间: 20180413
...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
...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_示例 发布时间: 20251130
怎么裁剪一张图片 let tmp = new Laya.Sprite(); tmp.loadImage("test.png", 0, 0, 30, 52); 我这么写,裁不出30*52的区域。请问要怎么写 2018-09-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复...
来源: Laya_社区 发布时间: 20180906
...自: 第二个问题 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
...complete回调和addChild的顺序? 2. new Handler (在加载图片loadImage时可行)和new Laya.Handler(在from的Props的update回调函数时可行) 和 Laya.Handler.create (在加载图集和from的complete回调函数时可行)的区别?为什么会在交替使用时失败? 2018-06-20 ...
来源: Laya_社区 发布时间: 20180620
...+ '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
...().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