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

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

1. TiledMap地图 · LayaAir3.0文档 · LAYABOX [ 100%]

...因此建议开启缓存区块设置,并将缓存区块的大小设置为512像素左右,必须保持原小图区块的整数倍。 例如,本文示例中的单图区块大小为16*16,那么缓存区块可以设置 16的32倍,即为 512*512。 如果单图是15*15,缓存可区块可以...

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

2. 面板容器组件 · LayaAir3.0文档 · LAYABOX [ 79%]

...:200*200)。然后给Panel组件添加子节点,放入一张图片(512*313)。显示效果以及层级结构如图1-2所示。 (图1-2) 由图1-2可以看出放入的图片被裁剪了,图片最终所显示的宽高就是Panel容器的宽高(200*200)。开发者可以直接调整...

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

3. 二次开发 · LayaAir3.0文档 · LAYABOX [ 79%]

...ble testNumber(double value) { Log.d("JSBridge", "java: " + value); return 512; } public static boolean testBool(boolean value) { Log.d("JSBridge", "java: " + value); return value ? false : true; } public static void testAsyncCallback(String json) { //js thread try { JSONObject root = new JSONObject...

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

4. 通用发布 · LayaAir3.0文档 · LAYABOX [ 77%]

...的图集文件(多个图集)。 单图最大宽\高度: 默认值为512×512,超过这个尺寸的单图将不会被打包到图集中。 Tips:超过512×512的单图不建议打包到图集中,可以单独预加载此图,但是,加载单图也不能超过1024×1024,否则会对...

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

5. 组件属性的代码使用 · LayaAir3.0文档 · LAYABOX [ 57%]

...e : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如图1-2所示: (图1-2) 1.2 3D节点的基础使用 首先,如动图1-3所示,将场景中已经添加好的3D...

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

6. 纹理压缩 · LayaAir3.0文档 · LAYABOX [ 51%]

...说明。 使用IDE里Image组件自带的那张图,我们将宽高改成512*512后, 当舞台上什么显示也没有的时候,初始显存占用是2.31M,使用纹理压缩格式,只增加170K,加上初始大小最终为2.48M。而原图则增加1024K,达到3.31M。如图4-1所示。...

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

7. 使用3D摄像机 · LayaAir3.0文档 · LAYABOX [ 42%]

... this.renderTargetCamera.renderTarget = Laya.RenderTexture.createFromPool(512, 512, Laya.RenderTargetFormat.R8G8B8A8, Laya.RenderTargetFormat.DEPTH_16, false, 1); //渲染顺序 this.renderTargetCamera.renderingOrder = -1; //清除标记 this.renderTargetCamera.clearFlag = Laya.CameraClearFlags.Sky;...

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

8. 精灵 · LayaAir3.0文档 · LAYABOX [ 38%]

...y分别设置位置 this.sprite.y = Laya.stage.height/2; this.sprite.size(512, 313); //大小 this.sprite.width = 512; //宽、高分别设置大小 this.sprite.height = 313; this.sprite.pivot(this.sprite.width/2, this.sprite.height/2); //轴心点:sprite的中心 this.sprite.pivotX = this.sprite....

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

9. 实体组件系统 · LayaAir3.0文档 · LAYABOX [ 13%]

...e : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如图4-2所示: (图4-2) 4.1.2 3D节点的基础使用 首先,如动图4-3所示,将场景中已经添加好的3D...

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

10. 2D物理编辑 · LayaAir3.0文档 · LAYABOX [ 12%]

...指数 2的N次幂 指数 2的N次幂 0 1 8 256 16 65536 24 16777216 1 2 9 512 17 131072 25 33554432 2 4 10 1024 18 262144 26 67108864 3 8 11 2048 19 524288 27 134217728 4 16 12 4096 20 1048576 28 268435456 5 32 13 8192 21 2097152 29 536870912 6 64 14 16384 22 4194304 30 1073741824 7 128 15 32768 23...

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