大约有 7 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0042 秒)
...equest(); xhr.open("get", "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(i...
来源: Laya3.0_文档 发布时间: 20230303
...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
...sponse varies 响应实体的类型由 responseType 来指定, 可以是 ArrayBuffer ,Blob, Document, JavaScript 对象 (即 “json”), 或者是字符串。如果请求未完成或失败,则该值为 null responseText DOMString 此次请求的响应为文本,或是当请求未成功...
来源: Laya3.0_文档 发布时间: 20250104
...xt")Web 服务器的响应类型,可设置为 "text"、"json"、"xml"、"arraybuffer"。 * @param headers (default = null) HTTP 请求的头部信息。参数形如key-value数组:key是头部的名称,不应该包括空白、冒号或换行;value是头部的值,不应该包括换行。比...
来源: Laya3.0_文档 发布时间: 20251010
...rate of the AudioContext var frameCount = audioCtx.sampleRate * 2.0; var myArrayBuffer = audioCtx.createBuffer(2, frameCount, audioCtx.sampleRate); window.onclick = function() { // Fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels...
来源: Laya3.0_文档 发布时间: 20251010
...s.socket = new WebSocket("ws://localhost:8080"); this.socket.binaryType = "arraybuffer"; // 连接成功时发送测试消息 this.socket.onopen = () => { console.log("WebSocket connected"); // 发送 ChatMessage 类型的打招呼消息,user 字段表示消息发送者的用户名。message ...
来源: Laya3.0_文档 发布时间: 20251010
...text", data: "this is demo text" }; type参数的可选值有text/json/xml/arraybuffer/bytes/filePath/custom,特别的,filePath是一个文件的绝对路径,custom可以指定一个自定义的回调函数。 如果资源不需要输出,那可以直接将输出内容置为空数组,即:...
来源: Laya3.0_文档 发布时间: 20251010