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

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

51. 用最新版本的IDE开发,用AS语言开发,用HttpRequest加载图片报错,用JS语言开发却可以加载 [ 87%]

...入了四个字节的数据 //.......解密逻辑开始处理数据。 var byte:Byte = new Byte(data);//Byte数组接收arraybuffer byte.writeArrayBuffer(data,4);//从第四个字节开始读取数据 var blob:Object = new Browser.window.Blob([byte.buffer], { type: "image/png" }); var url:String = B...

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

52. 关于从网络异步加载图片的问题 [ 87%]

...?nav=zh-as-3-1-0   在官网上这个示例 《二进制图片》中 var byte:Byte = new Byte(data);//Byte数组接收arraybufferbyte.writeArrayBuffer(data,4);//从第四个字节开始读取数据var blob:Object = new Browser.window.Blob([byte.buffer], { type: "image/png" });var url:String = Brow...

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

53. 与服务端通讯,怎么发送ByteArray里的数据? [ 85%]

与服务端通讯,怎么发送ByteArray里的数据? 与netty服务端通讯,怎么把 ByteArray 中的数据写入 Byte 中,Byte.writeArrayBuffer(byteArr); 中 服务端读取不到数据。用 Byte的就可以正常,要怎么写才正确?             var byteArr:ByteArray...

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

54. 两个问题 有元件支援视频流渲染吗? Image元件读不了资料流 [ 85%]

...理想 LayaAir内有没有能直接渲染mpeg的元件 另外就是 我把Byte流转成base64却没办法在Image上渲染 有没有具体解决办法 附上转换码function _arrayBufferToBase64( buffer ) { var binary = ''; var bytes = new Uint8Array( buffer ); var len = bytes.byteLength; for (var ...

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

55. websocket连接, ws 时没问题,改成 wss 没反应 [ 85%]

...么改?或者哪里有连接 wss 的代码片段?谢谢!     this.byte = new Laya.Byte();     this.byte.endian = Laya.Byte.LITTLE_ENDIAN;  //这里我们采用小端     this.socket = new Laya.Socket();     this.socket.endian = Laya.Byte.LITTLE_ENDIAN;  //这里我们采用小端   ...

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

56. 静态protobuf [ 84%]

...g.encode(msg).finish() this.socket.send(buffer)   收消息时要先装到byte里再decode出来 private receiveHandler(msg): void {    this.byte.clear() this.byte.writeArrayBuffer(msg) this.byte.pos = 0 let aMsg = msgScheme.AMsg.decode(this.byte.readUint8Array(0, 100000)) 2019-03-27 0 0 分享 ...

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

57. WebSocket connection to 'ws://192.168.0.8:8102/' failed: Invalid frame header [ 84%]

... How long are the message you are trying to send If it's larger than 125 bytes you need to encode the length in a different manner i.e you must take the extended payload length into consideration. – Cyclonecode Jul 7 '15 at 10:22 Right, of course, so i need to use the next two (or eight) bytes...

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

58. socket与node服务端连不上?按照官方案例 [ 84%]

...?按照官方案例 //初始化引擎 Laya.init(600,400,Laya.WebGL); this.byte = new Laya.Byte(); //这里我们采用小端 this.byte.endian = Laya.Byte.LITTLE_ENDIAN; this.socket = new Laya.Socket(); //这里我们采用小端 this.socket.endian = Laya.Byte.LITTLE_ENDIAN; //建立连接 this.socke...

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

59. 1.7.18beta少方法? [ 84%]

...TURE_2D, 0, xoffset - 1, yoffset, WebGLContext.RGBA, WebGLContext.UNSIGNED_BYTE, bitmap)); (xoffset + 1 <= _w) && (gl.texSubImage2DEx(true, WebGLContext.TEXTURE_2D, 0, xoffset + 1, yoffset, WebGLContext.RGBA, WebGLContext.UNSIGNED_BYTE, bitmap)); (yoffset - 1 >= 0) && (gl.texSu...

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

60. websocket连接出错 [ 83%]

...(800,600,Laya.WebGL); // var socket = io.connect('10.10.1.103:8081'); this.byte = new Laya.Byte(); this.byte.endian = Laya.Byte.LITTLE_ENDIAN; this.socket = new Laya.Socket(); this.socket.endian = Laya.Byte.LITTLE_ENDIAN; //建立连接 this.socket.connectByUrl("ws://10.10.1.103:8888"); // this.sock...

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