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

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

41. HTTP通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 49%]

...xt")Web 服务器的响应类型,可设置为 "text"、"json"、"xml"、"arraybuffer"。 * @param headers (default = null) HTTP 请求的头部信息。参数形如key-value数组:key是头部的名称,不应该包括空白、冒号或换行;value是头部的值,不应该包括换行。比...

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

42. texture2D的setPixel纹理rgba数据之后会随着窗口的缩放,渐变成黑色 [ 48%]

... false; private refreshCamera(){ this.curStatus =!this.curStatus; let data:ArrayBuffer = Laya.Loader.getRes(this.AllPng[this.curStatus ? 0: 1]);//pic-001 const x2 = new Uint8Array(data); let p = new window['PNG'](x2); let getData = p.decode();//rgba数组序列 this.texture.setPixels(getData); } pri...

来源: Laya_社区 发布时间: 20220815

43. socket大型项目回调 [ 45%]

...ew Laya.Byte(); // this.socket.input.readBytes(byte); if (event instanceof ArrayBuffer){ var byte:Laya.Byte = new Laya.Byte(event); this.socket.input.clear(); this.processPackage(this._package.decode(byte)); } } private sendMessage(reqId, route, msg) { var byte:Laya.Byte; // var msgbuffer = Protocol...

来源: Laya_社区 发布时间: 20180119

44. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 36%]

...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; c...

来源: Laya2.0_文档 发布时间: 20210715

45. 和原生Dom交互 · LayaAir3.3 · 引擎文档 · LAYABOX [ 36%]

...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 &lt; channels...

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

46. ProtocolBuffer通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 34%]

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

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

47. 微信小游戏加载资源问题 [ 25%]

... data.imgNativeUrl; } } static getUrlEncode(url, type) { if (type == &quot;arraybuffer&quot;) return &quot;&quot;; return &quot;utf8&quot;; } static downLoadFile(fileUrl, fileType = &quot;&quot;, callBack = null, encoding = &quot;utf8&quot;) { var fileObj = MiniFileMgr.getFileInfo(fileUrl); if (!fil...

来源: Laya_社区 发布时间: 20200103

48. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 21%]

...text", data: "this is demo text" }; type参数的可选值有text/json/xml/arraybuffer/bytes/filePath/custom,特别的,filePath是一个文件的绝对路径,custom可以指定一个自定义的回调函数。 如果资源不需要输出,那可以直接将输出内容置为空数组,即:...

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