大约有 7 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0033 秒)
...sponse varies 响应实体的类型由 responseType 来指定, 可以是 ArrayBuffer ,Blob, Document, JavaScript 对象 (即 “json”), 或者是字符串。如果请求未完成或失败,则该值为 null responseText DOMString 此次请求的响应为文本,或是当请求未成功...
来源: Laya3.0_文档 发布时间: 20250104
...据类型 在WebSocket协议中,支持的基础二进制类型有Blob和ArrayBuffer。 Blob 侧重于存储和传输文件,主要是应用于网页交互场景等。而 ArrayBuffer 更适用于数据处理,例如游戏数据的交互。 由于ArrayBuffer在游戏引擎中是最优的选择,...
来源: Laya3.0_文档 发布时间: 20251010
...型只会被序列化,不能显示和编辑。 类型化数组类型 Int8Array、Uint8Array、Int16Array、Uint16Array、Int32Array、Uint32Array、Float32Array 支持7种类型化数组类型 数组类型 ["number"]、["string"] 用中括号包含数组元素类型, 使用示例代码如下: ...
来源: Laya3.0_文档 发布时间: 20251010
...// 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
...s.socket = new WebSocket("ws://localhost:8080"); this.socket.binaryType = "arraybuffer"; // 连接成功时发送测试消息 this.socket.onopen = () => { console.log("WebSocket connected"); // 发送 ChatMessage 类型的打招呼消息,user 字段表示消息发送者的用户名。message ...
来源: Laya3.0_文档 发布时间: 20251010
...(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
...(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