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

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

1. WebSocket通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...于处理图像像素数据、音频样本等以字节为单位的数据;Float32Array 构造函数则可创建一个按 32 位浮点数来读取和处理数据的数组,常用于科学计算、图形处理等对精度和性能要求较高的场景。 借助 TypedArray,开发者能够避免直...

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

2. 网络通信 · LayaAir3文档 · LAYABOX [ 92%]

...his.byte.writeInt16(20); //写入一个32位的浮点数据 this.byte.writeFloat32(20.5); // 写入一个字符串; this.byte.writeUTFString("hello"); //这里声明一个临时Byte类型 var by:Laya.Byte = new Laya.Byte(); //设置endian; by.endian = Laya.Byte.LITTLE_ENDIAN; //写入一个int32...

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

3. 2D网格渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 89%]

..._NAME baseRender2D #if defined(GL_FRAGMENT_PRECISION_HIGH) precision highp float; #else precision mediump float; #endif #include "Sprite2DFrag.glsl"; void main() { clip(); vec4 textureColor = texture2D(u_baseRender2DTexture, v_texcoord); // 计算渐变因子 float gradientFactor = dot(v_texcoord, n...

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

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

..._createColorBufferData() { //随机给20个颜色值 let colorBuffer = new Float32Array(20 * 4); for (var i = 0; i < this._colorNums; i++) { let offset = i * 4; colorBuffer[offset] = Math.random(); colorBuffer[offset + 1] = Math.random(); colorBuffer[offset + 2] = Math.random(); colorBuffer[offse...

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

5. 组件装饰器说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 67%]

...Array、Uint8Array、Int16Array、Uint16Array、Int32Array、Uint32ArrayFloat32Array 支持7种类型化数组类型 数组类型 ["number"]、["string"] 用中括号包含数组元素类型, 使用示例代码如下: const { regClass, property } = Laya; //枚举 enum TestEnum { A, B, C }; //...

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

6. 2D精灵光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 65%]

...esAndUV(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; vertice...

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

7. 2D光遮挡器与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 55%]

...esAndUV(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; vertice...

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