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

大约有 3 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0014 秒)

1. Sprite-容器 [ 100%]

...#232628"; createApes(); })(); function createApes() { // 每只猩猩距离中心点150像素 var layoutRadius = 150; var radianUnit = Math.PI / 2; apesCtn = new Sprite(); Laya.stage.addChild(apesCtn); // 添加4张猩猩图片 for (var i = 0; i < 4; i++) { var ape = new Sprite(); ape.loadImage("../...

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

2. Sprite-轴心点 [ 98%]

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

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

3. UI-Button [ 96%]

...utton-5.png", "../../res/ui/button-6.png" ]; // 计算将Button至于舞台中心的偏移量 xOffset = (Laya.stage.width - HORIZONTAL_SPACING * (COLUMNS - 1) - BUTTON_WIDTH) / 2; yOffset = (Laya.stage.height - VERTICAL_SPACING * (skins.length / COLUMNS - 1) - BUTTON_HEIGHT) / 2; Laya.loader.load(sk...

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