[]QQ玩一玩 API 中没有 BKLaya.tools.BinaryLoader 的定义

我的项目里面用到了 WebSocket, laya 引擎的 laya.bkadapter 有封装了 BKWebSocket,但是
/**
*...
*@author ww
*/
//class BKLaya.adptclass.BKWebSocket
var BKWebSocket=(function(){
function BKWebSocket(url){
this._socket=null;
this.onopen=null;
this.onmessage=null;
this.onclose=null;
this.onerror=null;
this._socket=new BK.WebSocket(url);
var _self;
_self=this;
this._socket.onClose=function (ws){
if (_self.onclose !=null){
_self.onclose();
}
}
this._socket.onOpen=function (ws){
if (_self.onopen !=null){
_self.onopen();
}
}
this._socket.onError=function (ws){
if (_self.onerror !=null){
_self.onerror();
}
}
this._socket.onMessage=function (ws,data){
if (data.isBinary){
data.data=[b]BKLaya.tools.BinaryLoader[/b].BufferToArrayBuffer(data.data);
}
if (_self.onmessage !=null){
_self.onmessage(data);
}
}
}
//...............

BKLaya.tools.BinaryLoader 这个 类是没有定义的
已邀请:

qian

赞同来自:

改成BKLaya.adptclass.utils.BKBufferTool

该问题目前已经被锁定, 无法添加新回复

商务合作
商务合作