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

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

61. Sprite-显示图片 [ 86%]

...s/monkey1.png", monkey2Path = "./res/apes/monkey2.png"; // 方法1:使用loadImage let ape = new Laya.Sprite(); Laya.stage.addChild(ape); ape.loadImage(monkey1Path); // 方法2:使用drawTexture Laya.loader.load(monkey2Path, Laya.Handler.create(this, function () { let monkey2 = Laya.loader.getRe...

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

62. 飞机大战地图滚动报错,麻烦看下? [ 86%]

...Laya.stage.addChild(box);     bg1 = new laya.display.Sprite();     bg1.loadImage("res/bg1.png");     box.addChild(bg1);     bg2 = new laya.display.Sprite();     bg2.loadImage("res/bg1.png");     bg2.pos(650, 0);     box.addChild(bg2);     Laya.timer.frameLoop(1, this, bg_loop()); } f...

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

63. 图集动画(TypeScript-LayaAir基础篇(TS)-动画基础) [ 86%]

...到一个图集中,然后分别调用是推荐的方式。 #### 2.5 用loadImages直接播放图集中指定的动画 除了用静态方法`createFrames()`创建动画模板外,还可以用loadImages()方法来实现播放图集中指定的眩晕动画效果。我们先看一下`loadImages()`的...

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

64. Sprite-节点控制 [ 85%]

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

65. 关于切换图片的问题 [ 85%]

... constructor() { Laya.init(1000,800); this.img = new Laya.Sprite; this.img.loadImage(this.plane1); Laya.stage.addChild(this.img); this.img.graphics.clear(); this.img.loadImage(this.plane2); Laya.stage.addChild(this.img) } } new Main(); 出来的结果是两张图合并到了一起, 于是我再尝...

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

66. Sprite-轴心点 [ 85%]

...es(); })(); function createApes() { var gap = 300; sp1 = new Sprite(); sp1.loadImage("../../res/apes/monkey2.png", 0, 0); sp1.pos((Laya.stage.width - gap) / 2, Laya.stage.height / 2); //设置轴心点为中心 sp1.pivot(55, 72); Laya.stage.addChild(sp1); //不设置轴心点默认为左上角 sp2 =...

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

67. 2.3.1的laya.wxmini.js有个地方写错了 [ 85%]

...写错了 _transformImgUrl方法里最底的一行代码,   thisLoader._loadImage(url, false); 应该为: thisLoader._loadImage(url, true);   该错误会导致微信小游戏上,设置了URL.basePath的时候,部分图片会加载不到   ————————————————...

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

68. Sprite-节点控制 [ 85%]

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

69. Sprite-轴心点 [ 85%]

...= 150; this.ape1 = new Sprite(); Laya.stage.addChild(this.ape1); this.ape1.loadImage(monkey2Path); // 设置轴心点为中心 this.ape1.pivot(55, 72); this.ape1.pos(Laya.stage.width / 2 - gap, Laya.stage.height / 2); // 不设置轴心点默认为左上角 this.ape2 = new Sprite(); Laya.stage.addCh...

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

70. 图集动画(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 85%]

...到一个图集中,然后分别调用是推荐的方式。 #### 2.5 用loadImages直接播放图集中指定的动画 除了用静态方法`createFrames()`创建动画模板外,还可以用loadImages()方法来实现播放图集中指定的眩晕动画效果。我们先看一下`loadImages()`的...

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