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

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

11. Sprite.loadImage在Android平台无法卡死,web和iOS平台正常 [ 89%]

Sprite.loadImage在Android平台无法卡死,web和iOS平台正常 在Android平台使用Spirte.loadImage方法初始Sprite卡死,log中一直打印日志“JCGraphicsCmdDispath::calcBoundingBox Wrong command number!,cmd=-65536” 同样的代码和图片地址在web和iOS平台正常; 代码...

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

12. Sprite-节点控制 [ 87%]

...es() { //显示两只猩猩 ape1 = new Sprite(); ape2 = new Sprite(); ape1.loadImage("../../res/apes/monkey2.png"); ape2.loadImage("../../res/apes/monkey2.png"); ape1.pivot(55, 72); ape2.pivot(55, 72); ape1.pos(Laya.stage.width / 2, Laya.stage.height / 2); ape2.pos(200, 0); //一只猩猩在舞台...

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

13. loadImage后为什么不能获得图片的宽度与高度 [ 87%]

loadImage后为什么不能获得图片的宽度与高度 通过loadImage后 输出sprite的宽与高结果是0; var sf =new Laya.sprte(); sf.loadImage("res/kk.png"); console.log(sf.width,sf.height) 2018-05-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀...

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

14. 输入设备-摇一摇 [ 87%]

...e(); })(); function showShakePic() { var shakePic = new Sprite(); shakePic.loadImage("../../res/inputDevice/shake.png"); Laya.stage.addChild(shakePic); } function showConsoleText() { console = new Text(); Laya.stage.addChild(console); console.y = picH + 10; console.width = Laya.stage.width; console....

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

15. Sprite-节点控制 [ 87%]

...onkey2.png"; this.ape1 = new Sprite(); this.ape2 = new Sprite(); this.ape1.loadImage(monkey2Path); this.ape2.loadImage(monkey2Path); this.ape1.pivot(55, 72); this.ape2.pivot(55, 72); this.ape1.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.ape2.pos(200, 0); // 一只猩猩在舞台上,另...

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

16. 使用sprite的loadImage遇到的两个问题 [ 87%]

使用sprite的loadImage遇到的两个问题 1、loadImage设置的坐标,宽高,显示没问题,为什么获取sprite的x,y,width,height都和设置的不相符? 2、先loadImage加载图片,再设置宽高无效 2019-02-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...

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

17. Sprite-新手引导 [ 87%]

...色方块,不被抠图 var gameContainer = new Sprite(); gameContainer.loadImage("../../res/guide/crazy_snowball.png"); Laya.stage.addChild(gameContainer); // 引导所在容器 guideContainer = new Sprite(); // 设置容器为画布缓存 guideContainer.cacheAs = "bitmap"; Laya.stage.addChild(gui...

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

18. 获取sprite对象的 width和height为0 [ 86%]

...t:Laya.Sprite; constructor() { super() this.bt = new Laya.Sprite() this.bt.loadImage("res/boat.png") this.addChild(this.bt) } } /** * 游戏背景 */ class BackGround extends Laya.Sprite { //背景图 private bg:Laya.Sprite; constructor(){ super(); this.init(); } init():void{ this.bg = new Laya.Spri...

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

19. Sprite-新手引导 [ 86%]

...ontainer = new Sprite(); Laya.stage.addChild(gameContainer); gameContainer.loadImage("res/guide/crazy_snowball.png"); gameContainer.on(Laya.Event.CLICK, this, this.nextStep); // 引导所在容器 guideContainer = new Sprite(); Laya.stage.addChild(guideContainer); guideContainer.cacheAs = "bitmap"; ...

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

20. 滤镜-发光滤镜 [ 86%]

...ateApe(); applayFilter(); } function createApe() { ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.x = (Laya.stage.width - texture.width) / 2; ape.y = (Laya.stage.height - texture.height) / 2; Laya.stage.addChild(ape); } function applayFilter() { //创建...

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