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

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

1. Laya2自动同步cullingMask方案以及灯光裁剪补丁 [ 100%]

..._scene.lightCullingMask && this._scene.lightCullingMask instanceof Function){this._scene.lightCullingMask(scene,this);} 3、对想要开启灯光裁剪的场景调用 LightCullingMask.enableLightCullingMask(scene3d)即可 //注意 ExtCullingMask并不是针对对象进行,而是对摄相...

来源: Laya_社区 发布时间: 20200110

2. Windows扩展 · LayaAir3.4 · 引擎文档 · LAYABOX [ 99%]

...env env, jsvm_value exp) { //注册新的函数 jsvm_value fn; jsvm_create_function(env, "testAdd", SIZE_MAX, jsAdd, nullptr, &fn); jsvm_set_named_property(env, exp, "nativeAdd", fn); jsvm_value fn1; jsvm_create_function(env, "testStr", SIZE_MAX, jsStr, nullptr, &fn1); jsvm_set_named_propert...

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

3. AI编码环境:CodingMCP · LayaAir3.4 · 引擎文档 · LAYABOX [ 92%]

....ts) 入口函数结构固定,禁止修改: ```typescript export async function main() { /* 正式初始化逻辑 */ } ``` ❌ 禁止提交测试代码到 `main` 函数 --- ## 版本与 API 查询 - 查询 API 时附加 `<LAYA_VERSION>` 版本号 - 迁移时对比 `<LAYA_PRE_VERSION>...

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

4. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 92%]

...res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }...

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

5. 脚本编译 · LayaAir3.4 · 引擎文档 · LAYABOX [ 91%]

...脚本必须是一个异步的main函数,不能修改命名 export async function main() { console.log("Hello LayaAir!"); //示例:加载场景并打开场景 Laya.Scene.open('Scene.ls'); } 避免在 main 函数中编写测试代码,保持启动逻辑简洁 遵循 LayaAir 引擎的启动流程...

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

6. 列表组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 82%]

...一种回调的方式。首先为列表定义一个回调函数,例如: function renderListItem(index:number, obj:GButton) { obj.title = "" + index; } 如果使用了对象池,意回调函数可能为同一个对象重复调用,所以在回调函数里注册事件侦听需要非常小心,避...

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

7. 开放数据域组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 65%]

...ge方法中执行getFriendCloudStorage方法,修改后的方法如下: function init() { wx.onMessage((data) => { console.log("onMessage", data); if (data.type === "updateViewPort") { Layout.updateViewPort(data.box); draw(POWERRANK); } else if (data.type === 'close') { Layout.clear(); } /** *...

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

8. 缓动 · LayaAir3.4 · 引擎文档 · LAYABOX [ 58%]

...ation(1000).to("x", 600).ease(myEase); //开发者自定义的缓动函数 function myEase(t: number, b: number, c: number, d: number) : number { //... } 3.5 串行和并行 本节主要介绍两个方法:chain()和parallel()。 chain():当开发者想要顺序执行多个缓动效果时,就...

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

9. 3D粒子 · LayaAir3.4 · 引擎文档 · LAYABOX [ 52%]

...ath = ""; } Pool.getInstance().ClearGroup("Particle3D@" + root_path, this, function(particle_3d:Particle3D) { particle_3d.Clean(); }); } } 5.2 自定义对象池类 export class Pool { private _poolDic:{[key: string]: any;} = {}; private InPoolSign: string = "__InPool"; constructor() { } private sta...

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

10. 3D粒子编辑模块 · LayaAir3文档 · LAYABOX [ 52%]

...ath = ""; } Pool.getInstance().ClearGroup("Particle3D@" + root_path, this, function(particle_3d:Particle3D) { particle_3d.Clean(); }); } } 5.2 自定义对象池类 export class Pool { private _poolDic:{[key: string]: any;} = {}; private InPoolSign: string = "__InPool"; constructor() { } private sta...

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