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

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

1. 绘制能力 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

..., offset || Point.EMPTY, color)); else return null; } 代码示例: Laya.loader.load("resources/layaAir.png").then((res: Laya.Texture) => { let sp = new Laya.Sprite(); // 绘制填充纹理 sp.graphics.fillTexture(res, 0, 0, 500, 500, "repeat"); this.owner.addChild(sp); }); 运行效果: (...

来源: Laya3.0_文档 发布时间: 20251010

2. 自动图集配置 · LayaAir3.3 · 引擎文档 · LAYABOX [ 67%]

...在构建发布配置项里手动添加为始终包含的资源目录 Laya.loader.load("resources/aaa/test.atlas").then(() => {//更多资源加载方式,可查看《资源加载》文档 this.owner.skin = "resources/aaa/image.png"; //将图集路径+名称视为小图的资源目录,小图...

来源: Laya3.0_文档 发布时间: 20251128

3. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 46%]

... Texture; set texture(value: Texture); 我们来看看代码示例: Laya.loader.load("atlas/comp/image.png").then(() => { let sprite = new Laya.Sprite(); //精灵设置纹理并居中显示 let res = Laya.loader.getRes("atlas/comp/image.png"); sprite.pos(Laya.stage.width >> 1, Laya.stage....

来源: Laya3.0_文档 发布时间: 20251010