大约有 617 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0041 秒)
Laya_社区(371) Laya3.0_api(64) Laya2.0_api(59) laya_api(55) Laya2.0_文档(24) Laya2.0_示例(19) Laya_示例(19) Laya3.0_文档(6)
...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
...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
...到一个图集中,然后分别调用是推荐的方式。 #### 2.5 用loadImages直接播放图集中指定的动画 除了用静态方法`createFrames()`创建动画模板外,还可以用loadImages()方法来实现播放图集中指定的眩晕动画效果。我们先看一下`loadImages()`的...
来源: Laya2.0_文档 发布时间: 20210715
...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
... 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
...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
...写错了 _transformImgUrl方法里最底的一行代码, thisLoader._loadImage(url, false); 应该为: thisLoader._loadImage(url, true); 该错误会导致微信小游戏上,设置了URL.basePath的时候,部分图片会加载不到 ————————————————...
来源: Laya_社区 发布时间: 20191120
...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
...= 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
...到一个图集中,然后分别调用是推荐的方式。 #### 2.5 用loadImages直接播放图集中指定的动画 除了用静态方法`createFrames()`创建动画模板外,还可以用loadImages()方法来实现播放图集中指定的眩晕动画效果。我们先看一下`loadImages()`的...
来源: Laya2.0_文档 发布时间: 20210715