zhouenguang 3 سال پیش
والد
کامیت
ce74aaced2
4فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 2 1
      dist/index.html
  2. 1 0
      src/NetworkController.js
  3. 1 1
      src/XAvatarManager.js
  4. 2 0
      src/Xverse_Room.js

+ 2 - 1
dist/index.html

@@ -81,6 +81,7 @@
 
     
 
+    // 角色相关设置
     const avatarSetting = {
         fileType: ".glb",
         lodType: "_lod",
@@ -101,7 +102,7 @@
             dist: 7500
         }],
         isRayCastEnable: !0,
-        maxAvatarNum: 40,
+        maxAvatarNum: 40,       // 角色数量上限
         maxBillBoardDist: 7500,
         body: "body",
         head: "head",

+ 1 - 0
src/NetworkController.js

@@ -151,6 +151,7 @@ export default class NetworkController extends EventEmitter {
         )
     }
     reconnect() {
+        // webrtc的IceConnectionState为disconnected时,前端连接断开并尝试重连
         if (this.room.viewMode === "observer")
             return;
         const e = Date.now();

+ 1 - 1
src/XAvatarManager.js

@@ -172,7 +172,7 @@ export default class XAvatarManager {
             if (this.getAvatarById(id))
                 return reject(new DuplicateAvatarIDError(`[Engine] cannot init avatar with the same id = ${e}`));
             if (this.getAvatarNums() > this.maxAvatarNum)
-                //超出最大角色限 ${this.maxAvatarNum}
+                // 超出角色个数上限 ${this.maxAvatarNum}
                 return reject(new ExceedMaxAvatarNumError(`[Engine] \u8D85\u51FA\u6700\u5927\u89D2\u8272\u9650\u5236 ${this.maxAvatarNum}`));
 
             const avatar = new XAvatar({ id, avatarType, priority, avatarManager, assets, status });

+ 2 - 0
src/Xverse_Room.js

@@ -269,7 +269,9 @@ export default class Xverse_Room extends EventEmitter {
       this.beforeJoinRoomResolveHook();
   }
   afterJoinRoom() {
+    // 去掉首屏loading
     document.querySelector(".loading").style.zIndex = -9999;
+
     (this.joined = !0),
       this.viewMode === "observer" && this.setViewModeToObserver(),
       logger.infoAndReportMeasurement({