how use colyseus.js in Cocos Creator ?
var Colyseus = require("colyseus");
cc.Class({
extends: cc.Component,
// use this for initialization
onLoad: function () {
var client = new Colyseus.Client('ws://localhost:2657');
}
});
Colyseus == undefined