xushiting 3 năm trước cách đây
mục cha
commit
3875951961
6 tập tin đã thay đổi với 30 bổ sung26 xóa
  1. 25 25
      dist/js/index.js
  2. 1 1
      dist/js/index.js.map
  3. 1 0
      src/Preload.js
  4. 1 0
      src/Socket.js
  5. 1 0
      src/Stream.js
  6. 1 0
      src/XverseAvatar.js

+ 25 - 25
dist/js/index.js

@@ -5345,10 +5345,28 @@
 
   function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
 
+  var InternalError = /*#__PURE__*/function (_XverseError) {
+    _inherits(InternalError, _XverseError);
+
+    var _super = _createSuper$d(InternalError);
+
+    function InternalError(e) {
+      _classCallCheck(this, InternalError);
+
+      return _super.call(this, 1002, e || "\u5185\u90E8\u9519\u8BEF");
+    }
+
+    return _createClass(InternalError);
+  }(XverseError);
+
+  function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+  function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
   var Socket = /*#__PURE__*/function (_EventEmitter) {
     _inherits(Socket, _EventEmitter);
 
-    var _super = _createSuper$d(Socket);
+    var _super = _createSuper$c(Socket);
 
     function Socket(e) {
       var _this;
@@ -6804,14 +6822,14 @@
     return Workers;
   }();
 
-  function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+  function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
 
-  function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+  function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
 
   var Rtcp = /*#__PURE__*/function (_EventEmitter) {
     _inherits(Rtcp, _EventEmitter);
 
-    var _super = _createSuper$c(Rtcp);
+    var _super = _createSuper$b(Rtcp);
 
     function Rtcp(e) {
       var _this;
@@ -7113,24 +7131,6 @@
     return Stream;
   }();
 
-  function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
-
-  function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
-
-  var InternalError$1 = /*#__PURE__*/function (_XverseError) {
-    _inherits(InternalError, _XverseError);
-
-    var _super = _createSuper$b(InternalError);
-
-    function InternalError(e) {
-      _classCallCheck(this, InternalError);
-
-      return _super.call(this, 1002, e || "\u5185\u90E8\u9519\u8BEF");
-    }
-
-    return _createClass(InternalError);
-  }(XverseError);
-
   function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
 
   function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
@@ -7187,8 +7187,8 @@
         var _this2 = this;
 
         return new Promise(function (e, t) {
-          if (!_this2.rtcp.connected) return t(new InternalError$1("Game cannot load. Please refresh"));
-          if (!_this2.rtcp.inputReady) return t(new InternalError$1("Game is not ready yet. Please wait"));
+          if (!_this2.rtcp.connected) return t(new InternalError("Game cannot load. Please refresh"));
+          if (!_this2.rtcp.inputReady) return t(new InternalError("Game is not ready yet. Please wait"));
           _this2.socket.on("gameRoomAvailable", function (r) {
             _this2.setState("connected"), e(r), _this2.rtcp.heartbeat.start();
           }), _this2.socket.on("socketClosed", function (r) {
@@ -7263,7 +7263,7 @@
                     _this3.rtcp.on("rtcConnected", function () {
                       _this3.setState("connected"), t();
                     }), _this3.rtcp.on("rtcDisconnected", function () {
-                      logger$1.info("rtc disconnected"), _this3._state === "connecting" ? (_this3.setState("disconnected"), r(new InternalError$1("rtc connect failed"))) : (_this3.setState("disconnected"), logger$1.info("rtc disconnected, start to reconnect"), _this3.reconnect());
+                      logger$1.info("rtc disconnected"), _this3._state === "connecting" ? (_this3.setState("disconnected"), r(new InternalError("rtc connect failed"))) : (_this3.setState("disconnected"), logger$1.info("rtc disconnected, start to reconnect"), _this3.reconnect());
                     }), _this3.socket.on("socketQuit", function () {
                       logger$1.info("socket quit success"), _this3.setState("closed");
                     }), _this3.socket.on("socketClosed", function (n) {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/js/index.js.map


+ 1 - 0
src/Preload.js

@@ -4,6 +4,7 @@ import {reporter} from "./Reporter.js"
 import {modelTable} from "./ModelTable.js"
 import util from "./util.js"
 import {http1} from "./Http1.js"
+import InternalError from "./error/InternalError.js"
 
 export default class Preload {
     constructor(e) {

+ 1 - 0
src/Socket.js

@@ -4,6 +4,7 @@ import Timeout from "./Timeout.js"
 import InitNetworkTimeoutError from "./error/InitNetworkTimeoutError.js"
 import {reporter} from "./Reporter.js"
 import util from "./util.js"
+import InternalError from "./error/InternalError.js"
 
 export default class Socket extends EventEmitter {
     constructor(e) {

+ 1 - 0
src/Stream.js

@@ -1,4 +1,5 @@
 import {logger} from "./Logger.js"
+import InternalError from "./error/InternalError.js"
 
 export default class Stream {
     constructor(e) {

+ 1 - 0
src/XverseAvatar.js

@@ -1,6 +1,7 @@
 //const logger = new Logger("xverse-avatar");
 import {logger} from "./Logger.js"
 import util from "./util.js"
+import InternalError from "./error/InternalError.js"
 
 export default class XverseAvatar extends EventEmitter {
     constructor({userId: e, isHost: t, room: r, avatarId: n, isSelf: o, group: a=AvatarGroup.Npc}) {