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

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

1. Sprite-节点控制 [ 100%]

...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_示例 发布时间: 20240930

2. Sprite-轴心点 [ 99%]

...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_示例 发布时间: 20240930

3. 性能测试-卡通人物2 [ 99%]

...reateAnimation = function(images) { animation = new Animation(); animation.loadImages(images); animation.interval = 70; animation.play(0); this.addChild(animation); } Character.prototype.createBloodBar = function() { bloodBar = new Sprite(); bloodBar.loadImage("../../res/cartoon2/blood_1_r.png"); bl...

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

4. Sprite-旋转缩放 [ 92%]

...232628"; createApe(); })(); function createApe() { ape = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; Laya.timer.frameLoop(1, this, animate); } function animate(e) { ape.rotation +...

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

5. 其他引擎的Demo-Example_23 [ 90%]

...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_示例 发布时间: 20240930

6. Sprite-容器 [ 90%]

...4张猩猩图片 for (var i = 0; i < 4; i++) { var ape = new Sprite(); ape.loadImage("../../res/apes/monkey" + i + ".png"); ape.pivot(55, 72); // 以圆周排列猩猩 ape.pos( Math.cos(radianUnit * i) * layoutRadius, Math.sin(radianUnit * i) * layoutRadius); apesCtn.addChild(ape); } apesCtn.pos(Lay...

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