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

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

1. 资源加载 · LayaAir3.4 · 引擎文档 · LAYABOX [ 100%]

...ader.JSON json JSON类型 Laya.Loader.XML xml XML类型 Laya.Loader.BUFFER arraybuffer 二进制类型 Laya.Loader.IMAGE image 纹理类型 Laya.Loader.SOUND sound 声音类型 Laya.Loader.VIDEO video 视频类型 Laya.Loader.ATLAS atlas 图集类型,加载完成后返回图集json信息(并创建...

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

2. WebSocket通信 · LayaAir3.4 · 引擎文档 · LAYABOX [ 98%]

...据类型 在WebSocket协议中,支持的基础二进制类型有Blob和ArrayBuffer。 Blob 侧重于存储和传输文件,主要是应用于网页交互场景等。而 ArrayBuffer 更适用于数据处理,例如游戏数据的交互。 由于ArrayBuffer在游戏引擎中是最优的选择,...

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

3. 网络通信 · LayaAir3文档 · LAYABOX [ 97%]

...sponse varies 响应实体的类型由 responseType 来指定, 可以是 ArrayBuffer ,Blob, Document, JavaScript 对象 (即 “json”), 或者是字符串。如果请求未完成或失败,则该值为 null responseText DOMString 此次请求的响应为文本,或是当请求未成功...

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

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

...被添加到舞台后 onEnable(): void { // 给List对象赋值 var data: Array<any> = []; for (var m: number = 0; m < 20; m++) { data.push({ m_label: "No." + m }); } this.list.array = data; } } 代码中,m_label的命名要与List列表项下的Label组件命名相同。 1.2.5 运行查...

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

5. 2D网格渲染器 · LayaAir3.4 · 引擎文档 · LAYABOX [ 83%]

...// 2π const twoPi = Math.PI * 2; // 顶点数组 let vertexs = new Float32Array((numSegments + 1) * 5); // 索引数组 let index = new Uint16Array((numSegments + 1) * 3); var pos = 0; // 生成圆周上的顶点 for (let i = 0; i < numSegments; i++, pos += 5) { const angle = twoPi * i / numSegm...

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

6. ProtocolBuffer通信 · LayaAir3.4 · 引擎文档 · LAYABOX [ 82%]

...s.socket = new WebSocket("ws://localhost:8080"); this.socket.binaryType = "arraybuffer"; // 连接成功时发送测试消息 this.socket.onopen = () => { console.log("WebSocket connected"); // 发送 ChatMessage 类型的打招呼消息,user 字段表示消息发送者的用户名。message ...

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

7. 2D精灵光 · LayaAir3.4 · 引擎文档 · LAYABOX [ 80%]

...(width: number, height: number): Laya.Mesh2D { const vertices = new Float32Array(4 * 5); const indices = new Uint16Array(2 * 3); let index = 0; vertices[index++] = 0; vertices[index++] = 0; vertices[index++] = 0; vertices[index++] = 0; vertices[index++] = 0; vertices[index++] = width; vertices[index...

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

8. 2D光遮挡器与阴影 · LayaAir3.4 · 引擎文档 · LAYABOX [ 75%]

...(width: number, height: number): Laya.Mesh2D { const vertices = new Float32Array(4 * 5); const indices = new Uint16Array(2 * 3); let index = 0; vertices[index++] = 0; vertices[index++] = 0; vertices[index++] = 0; vertices[index++] = 0; vertices[index++] = 0; vertices[index++] = width; vertices[index...

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

9. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 65%]

....grid[1][2]; var result = astar.search(graph, start, end); // result is an array containing the shortest path 1,graph 是A*类中的地形数据类,数据中1表示可以通过的地块,0表示不可以通过的地块,因此这个数据表明了角色的可行走和不可行走节点,同...

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

10. 3D性能优化 · LayaAir3.4 · 引擎文档 · LAYABOX [ 61%]

...体LOD属性信息, 然后将Volume中的所有物体按照LOD Cull Rate Array的物体LOD等级划分为不同的LOD渲染对象 图6-3 图6-4 7.基于节点的材质合批功能 7.1表现效果 基于节点的材质合批功能可以通过图7-1和图7-2来展示其表现,本测试案例的场...

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