大约有 9 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0045 秒)
...ITTLE_ENDIAN; //写入一个int32数据 by.writeInt32(5000); //写入一个uint16 数据 by.writeUint16(16); //把临时字节数据的数据写入byte中,这里注意写入的是by.buffer; this.byte.writeArrayBuffer(by.buffer); //这里是把字节数组的数据通过socket发送给服务器。 ...
来源: Laya3.0_文档 发布时间: 20250104
...编码为二进制格式(即序列化),通过.finish()返回一个 Uint8Array类型的二进制缓冲区。 const greetingBuffer = this.ChatMessage.encode(greetingMessage).finish(); //socket不为 null 或 undefined时,将二进制数据 greetingBuffer 通过 WebSocket 发送到服务器。 ...
来源: Laya3.0_文档 发布时间: 20251010
...数据,如果资源没有加密,第二个参数可以不写。 const uint8Array = new Uint8Array(message, 4); // 将 ArrayBuffer 转换为图片数据并加载到 LayaAir 引擎中 const img = new Laya.Image(); img.size(110, 145); // 设置图片显示大小 img.skin = Laya.Browser.window.URL.cr...
来源: Laya3.0_文档 发布时间: 20251010
...= 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 / numSegments; // 计算顶点坐标 var x = vertexs[pos + 0] = radius ...
来源: Laya3.0_文档 发布时间: 20251120
...影响渲染的性能和质量。 如图3-2所示,该属性有自动、UInt16位、UInt32位这三种选项。 (图3-2) 自动:自动是默认选项,该模式下,LayaAir会根据顶点数来自动决定使用哪一种数据格式,默认会优先使用UInt16,当顶点数超过65535时...
来源: Laya3.0_文档 发布时间: 20251010
...型 "int" 等价于 { type: Number, fractionDigits: 0 } 正整数类型 "uint" 等价于 { type: Number, fractionDigits: 0 , min: 0 } 多行字符串文本类型 "text" 等价于 { type: string, multiline: true } 任意类型 "any" 类型只会被序列化,不能显示和编辑。 类型化数组...
来源: Laya3.0_文档 发布时间: 20251010
...aya.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++] = 0; vertices[index++] = 0; ve...
来源: Laya3.0_文档 发布时间: 20251010
...aya.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++] = 0; vertices[index++] = 0; ve...
来源: Laya3.0_文档 发布时间: 20251010
... } private drawHandler():void { Laya.stage.graphics.clear(); var dataArray:Uint8Array = new Uint8Array(this.analyser.frequencyBinCount); this.analyser.getByteFrequencyData(dataArray); var step:number = Math.round(dataArray.length / 60); for (var i:number = 0; i < 40; i++) { var energy:number = (d...
来源: Laya3.0_文档 发布时间: 20251010