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