@mml-io/3d-web-experience-client 0.25.0 → 0.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -1,25 +1,23 @@
1
- globalThis['__css-content-c066f87a63805017c3d140897de9e462__']=".AvatarSelectionUIComponent-module__menuButton_VjZ7cq__0250{z-index:102;user-select:none;width:70px;min-height:70px;position:absolute;top:0;right:0}.AvatarSelectionUIComponent-module__input_VjZ7cq__0250{color:#fff;backdrop-filter:blur(10px);background-color:#0006;border:1px solid #fff3;border-radius:8px;outline:none;flex:1;margin-right:6px;padding:6px 8px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;font-weight:400;transition:all .2s ease-in-out}.AvatarSelectionUIComponent-module__input_VjZ7cq__0250:focus{background-color:#0009;border-color:#fff6;box-shadow:0 0 0 3px #ffffff26}.AvatarSelectionUIComponent-module__input_VjZ7cq__0250::placeholder{color:#ffffff80}.AvatarSelectionUIComponent-module__closeButton_VjZ7cq__0250{backdrop-filter:blur(10px);color:#fffc;cursor:pointer;user-select:none;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:44px;height:44px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:16px;font-weight:500;transition:all .2s ease-in-out;display:flex;position:absolute;top:8px;right:8px}.AvatarSelectionUIComponent-module__closeButton_VjZ7cq__0250:hover{color:#ffffffe6;background:#000c;transform:scale(1.05)}.AvatarSelectionUIComponent-module__closeButton_VjZ7cq__0250:active{transform:scale(.95)}.AvatarSelectionUIComponent-module__openTab_VjZ7cq__0250{backdrop-filter:blur(10px);cursor:pointer;user-select:none;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:44px;height:44px;transition:all .2s ease-in-out;display:flex;position:absolute;top:8px;right:8px}.AvatarSelectionUIComponent-module__openTab_VjZ7cq__0250:hover{background:#000c;transform:scale(1.05)}.AvatarSelectionUIComponent-module__openTab_VjZ7cq__0250:active{transform:scale(.95)}.AvatarSelectionUIComponent-module__openTab_VjZ7cq__0250 img{filter:invert(80%);width:24px;height:24px;transition:all .2s ease-in-out}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0250{backdrop-filter:blur(20px);z-index:103;user-select:none;background:#000000bf;border:1px solid #fff3;border-radius:16px;width:400px;max-width:78vw;max-height:calc(100vh - 24px);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;position:absolute;top:8px;right:60px;overflow:hidden auto;box-shadow:0 8px 32px #0006,0 0 0 1px #ffffff1a}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0250::-webkit-scrollbar{width:8px}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0250::-webkit-scrollbar-track{background:none}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0250::-webkit-scrollbar-thumb{background:#fff3;border:1px solid #ffffff1a;border-radius:4px}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0250::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.AvatarSelectionUIComponent-module__avatarSelectionSection_VjZ7cq__0250{border-bottom:1px solid #ffffff26;padding:10px}.AvatarSelectionUIComponent-module__avatarSelectionSection_VjZ7cq__0250:last-child{border-bottom:none}.AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0250{background:#0000004d;border:1px solid #ffffff26;border-radius:12px;grid-template-columns:repeat(auto-fill,minmax(85px,1fr));gap:8px;max-height:320px;padding:10px;display:grid;overflow:hidden auto}.AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0250::-webkit-scrollbar{width:6px}.AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0250::-webkit-scrollbar-track{background:none}.AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0250::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:3px}.AvatarSelectionUIComponent-module__avatarSelectionUiHeader_VjZ7cq__0250{color:#ffffffe6;text-align:center;font-weight:600;position:relative}.AvatarSelectionUIComponent-module__avatarSelectionUiCloseButton_VjZ7cq__0250{position:absolute;top:20px;right:20px}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0250{color:#ffffffe6;text-align:center;cursor:pointer;border-radius:8px;padding:4px;transition:all .2s ease-in-out}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0250:hover{background:#0000004d;transform:translateY(-2px)}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImgContainer_VjZ7cq__0250{border-radius:8px;position:relative;overflow:hidden}.AvatarSelectionUIComponent-module__avatarSelectionNoImage_VjZ7cq__0250{aspect-ratio:1;box-sizing:border-box;background:#0003;border:1px solid #ffffff26;border-radius:8px;justify-content:center;align-items:center;width:100%;display:flex}.AvatarSelectionUIComponent-module__avatarSelectionNoImage_VjZ7cq__0250 img{filter:invert(70%);opacity:.7;width:40%}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0250 p{text-overflow:ellipsis;white-space:nowrap;color:#fffc;margin:4px 0 0;font-size:12px;font-weight:500;position:relative;overflow:hidden}.AvatarSelectionUIComponent-module__tooltipText_VjZ7cq__0250{pointer-events:none;z-index:1000;color:#ffffffe6;backdrop-filter:blur(10px);opacity:0;visibility:hidden;white-space:nowrap;background:#000c;border-radius:8px;margin-bottom:4px;padding:4px 6px;font-size:12px;font-weight:500;transition:opacity .2s ease-in-out;position:absolute;bottom:100%;left:50%;transform:translate(-50%)}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0250 p:hover+.AvatarSelectionUIComponent-module__tooltipText_VjZ7cq__0250{opacity:1;visibility:visible;transition-delay:.5s}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImgContainer_VjZ7cq__0250 .AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImage_VjZ7cq__0250{aspect-ratio:1;border-radius:8px;width:100%;transition:all .2s ease-in-out}.AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0250{color:#fff;backdrop-filter:blur(10px);background:linear-gradient(135deg,#22c55e,#16a34a);border:1px solid #fff3;border-radius:6px;padding:2px 4px;font-size:11px;font-weight:600;box-shadow:0 2px 4px #0003}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImgContainer_VjZ7cq__0250 .AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0250{z-index:2;position:absolute;top:4px;right:4px}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0250 img:hover{opacity:.8;transform:scale(1.05)}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250{color:#ffffffe6;border-bottom:1px solid #ffffff26;padding:10px;position:relative}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250:last-child{border-bottom:none}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250 .AvatarSelectionUIComponent-module__radioGroup_VjZ7cq__0250{flex-wrap:wrap;align-items:center;gap:4px;margin-bottom:8px;display:flex}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250 .AvatarSelectionUIComponent-module__radioItem_VjZ7cq__0250{white-space:nowrap;align-items:center;gap:3px;margin-right:6px;display:flex}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250 label{color:#fffc;cursor:pointer;margin:0;font-size:14px;font-weight:500;transition:color .2s ease-in-out}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250 label:hover{color:#fff}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250 input[type=radio]{appearance:none;cursor:pointer;background:none;border:2px solid #ffffff4d;border-radius:50%;outline:none;width:18px;height:18px;transition:all .2s ease-in-out;position:relative}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250 input[type=radio]:hover{border-color:#ffffff80}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250 input[type=radio]:focus{box-shadow:0 0 0 3px #ffffff1a}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250 input[type=radio]:checked{background:#ffffff1a;border-color:#fffc}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250 input[type=radio]:checked:after{content:\"\";background:#ffffffe6;border-radius:50%;width:8px;height:8px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250 input[type=radio][disabled]{opacity:.4;cursor:not-allowed}.AvatarSelectionUIComponent-module__customAvatarInputSection_VjZ7cq__0250{align-items:stretch;display:flex}.AvatarSelectionUIComponent-module__setButton_VjZ7cq__0250{color:#ffffffe6;backdrop-filter:blur(10px);cursor:pointer;background:linear-gradient(135deg,#0009,#0006);border:1px solid #fff3;border-radius:8px;justify-content:center;align-items:center;height:44px;padding-left:16px;padding-right:16px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;font-weight:500;transition:all .2s ease-in-out;display:flex}.AvatarSelectionUIComponent-module__setButton_VjZ7cq__0250:hover:not(:disabled){background:linear-gradient(135deg,#000c,#0009);border-color:#ffffff4d;transform:translateY(-1px);box-shadow:0 4px 8px #0000004d}.AvatarSelectionUIComponent-module__setButton_VjZ7cq__0250:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 4px #0003}.AvatarSelectionUIComponent-module__setButton_VjZ7cq__0250:disabled{opacity:.5;cursor:not-allowed;transform:none}.AvatarSelectionUIComponent-module__sectionHeading_VjZ7cq__0250{color:#ffffffe6;letter-spacing:-.01em;margin-bottom:8px;font-size:18px;font-weight:600}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250 .AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0250{margin-left:8px;position:relative;top:-2px}.AvatarSelectionUIComponent-module__displayNameSection_VjZ7cq__0250{color:#ffffffe6;border-bottom:1px solid #ffffff26;padding:10px;position:relative}.AvatarSelectionUIComponent-module__displayNameInputSection_VjZ7cq__0250{align-items:stretch;display:flex}.InputBox-module__inputWrapper_adOgOW__0250{pointer-events:all;align-items:stretch;gap:6px;display:flex}.InputBox-module__chatInput_adOgOW__0250{color:#fff;backdrop-filter:blur(10px);box-sizing:border-box;background:#0006;border:1px solid #fff3;border-radius:8px;outline:none;flex:1;height:36px;padding:0 8px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;font-weight:400;transition:all .2s ease-in-out}.InputBox-module__chatInput_adOgOW__0250:focus{background:#0009;border-color:#fff6;box-shadow:0 0 0 3px #ffffff26}.InputBox-module__chatInput_adOgOW__0250::placeholder{color:#ffffff80}.InputBox-module__sendButton_adOgOW__0250{color:#ffffffe6;backdrop-filter:blur(10px);cursor:pointer;background:linear-gradient(135deg,#0009,#0006);border:1px solid #fff3;border-radius:8px;outline:none;justify-content:center;align-items:center;width:36px;height:36px;transition:all .2s ease-in-out;display:flex}.InputBox-module__sendButton_adOgOW__0250:hover{background:linear-gradient(135deg,#000c,#0009);border-color:#ffffff4d;transform:translateY(-1px);box-shadow:0 4px 8px #0000004d}.InputBox-module__sendButton_adOgOW__0250:active{transform:translateY(0);box-shadow:0 2px 4px #0003}.InputBox-module__sendButton_adOgOW__0250 .InputBox-module__svgIcon_adOgOW__0250 img{filter:invert(80%);width:18px;height:18px;transition:all .2s ease-in-out}.InputBox-module__sendButton_adOgOW__0250:hover .InputBox-module__svgIcon_adOgOW__0250 img{filter:invert(90%)}.Message-module__messageContainer_ikOQiq__0250{backdrop-filter:blur(8px);word-break:break-word;color:#ffffffe6;direction:ltr;background:#0000004d;border:1px solid #fff3;border-radius:8px;width:fit-content;margin:6px auto 6px 2px;padding:4px 8px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;transition:all .2s ease-in-out;overflow-x:hidden}.Message-module__messageContainer_ikOQiq__0250:hover{background:#0006;border-color:#ffffff4d}.Message-module__userName_ikOQiq__0250{color:#ffffffe6;margin-right:4px;font-weight:600}.Messages-module__messagesContainer_LXaUUW__0250{z-index:1000;max-height:inherit;scrollbar-width:thin;scrollbar-color:#fff3 transparent;pointer-events:fill;direction:rtl;position:relative;bottom:0;left:-1px;overflow-y:auto}.Messages-module__messagesContainer_LXaUUW__0250::-webkit-scrollbar{width:6px}.Messages-module__messagesContainer_LXaUUW__0250::-webkit-scrollbar-track{background:none}.Messages-module__messagesContainer_LXaUUW__0250::-webkit-scrollbar-thumb{background:#fff3;border:1px solid #ffffff1a;border-radius:3px}.Messages-module__messagesContainer_LXaUUW__0250::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.Messages-module__newMessagesButton_LXaUUW__0250{-webkit-backdrop-filter:blur(10px);color:#fff;cursor:pointer;z-index:1001;direction:ltr;background:#000000bf;border:1px solid #fff3;border-radius:20px;padding:8px 16px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:14px;font-weight:500;transition:all .2s;position:absolute;bottom:50px;left:50%;transform:translate(-50%);box-shadow:0 4px 12px #0000004d}.Messages-module__newMessagesButton_LXaUUW__0250:hover{background:#000000d9;border-color:#ffffff4d;transform:translate(-50%)translateY(-2px);box-shadow:0 6px 16px #0006}.Messages-module__newMessagesButton_LXaUUW__0250:active{transform:translate(-50%)translateY(0);box-shadow:0 2px 8px #0000004d}.TextChatUIComponent-module__uiHover_gFDdcW__0250{z-index:102;pointer-events:all;width:58px;min-height:58px;position:absolute;bottom:0;left:0}.TextChatUIComponent-module__textChatUi_gFDdcW__0250{flex-direction:row;align-items:flex-end;width:100%;max-width:500px;height:0;display:flex;position:absolute;bottom:0;left:0}.TextChatUIComponent-module__textChat_gFDdcW__0250{z-index:-1;color:#fff;user-select:none;opacity:0;flex-direction:column;justify-content:space-between;width:100%;max-height:500px;margin-bottom:8px;margin-left:60px;padding:5px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;transition:opacity .25s ease-in-out,transform .2s ease-in-out;display:flex;transform:translate(-100%)}.TextChatUIComponent-module__fadeIn_gFDdcW__0250{opacity:1;transform:translate(0)}.TextChatUIComponent-module__fadeOut_gFDdcW__0250{opacity:.6;transform:translate(calc(-100% - 72px))}.TextChatUIComponent-module__controls_gFDdcW__0250{position:absolute;top:2px;right:0}.TextChatUIComponent-module__openTab_gFDdcW__0250{backdrop-filter:blur(10px);cursor:pointer;z-index:102;user-select:none;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:44px;height:44px;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:8px;left:8px}.TextChatUIComponent-module__openTab_gFDdcW__0250:hover{background:#000c;border-color:#ffffff4d;transform:scale(1.05)}.TextChatUIComponent-module__openTab_gFDdcW__0250:active{transform:scale(.95)}.TextChatUIComponent-module__openTab_gFDdcW__0250 img{filter:invert(80%);width:24px;height:24px;transition:all .2s ease-in-out}.TextChatUIComponent-module__stickyButton_gFDdcW__0250{z-index:103;backdrop-filter:blur(10px);cursor:pointer;user-select:none;opacity:1;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:38px;left:38px}.TextChatUIComponent-module__stickyButton_gFDdcW__0250:hover{background:#000c;border-color:#ffffff4d;transform:scale(1.05)}.TextChatUIComponent-module__stickyButtonFadeOut_gFDdcW__0250{z-index:103;backdrop-filter:blur(10px);cursor:pointer;user-select:none;opacity:0;pointer-events:none;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:42px;left:42px}.TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0250{z-index:103;backdrop-filter:blur(10px);cursor:pointer;user-select:none;background:#000c;border:1px solid #22c55e99;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:42px;left:42px;box-shadow:0 0 8px #22c55e4d}.TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0250:hover{border-color:#22c55ecc;transform:scale(1.05);box-shadow:0 0 12px #22c55e66}.TextChatUIComponent-module__stickyButton_gFDdcW__0250 img,.TextChatUIComponent-module__stickyButtonFadeOut_gFDdcW__0250 img,.TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0250 img{filter:invert(70%);width:12px;height:12px;transition:all .2s ease-in-out}.TextChatUIComponent-module__stickyButton_gFDdcW__0250:hover img,.TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0250:hover img{filter:invert(90%)}.TextChatUIComponent-module__controls_gFDdcW__0250 .TextChatUIComponent-module__closeButton_gFDdcW__0250{color:#fffc;backdrop-filter:blur(10px);cursor:pointer;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;font-weight:500;transition:all .2s ease-in-out;display:flex;position:absolute;top:3px;right:3px}.TextChatUIComponent-module__closeButton_gFDdcW__0250:hover{color:#ffffffe6;background:#000c;border-color:#ffffff4d;transform:scale(1.05)}.TextChatUIComponent-module__closeButton_gFDdcW__0250:active{transform:scale(.95)}.TextChatUIComponent-module__messagesWrapper_gFDdcW__0250{direction:rtl;width:fit-content;max-height:450px;margin-bottom:8px;position:relative}.Networked3dWebExperience-module__respawnButton_7g9l0W__0250{z-index:102;color:#ffffffe6;backdrop-filter:blur(10px);cursor:pointer;user-select:none;background:linear-gradient(135deg,#0009,#0006);border:1px solid #fff3;border-radius:8px;justify-content:center;align-items:center;padding:12px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;font-weight:500;transition:all .2s ease-in-out;display:flex;position:absolute;top:8px;left:8px}.Networked3dWebExperience-module__respawnButton_7g9l0W__0250:hover{background:linear-gradient(135deg,#000c,#0009);border-color:#ffffff4d;transform:translateY(-1px)}.Networked3dWebExperience-module__respawnButton_7g9l0W__0250:active{transform:translateY(0)}\n";globalThis['__css-digest-c066f87a63805017c3d140897de9e462__']="c066f87a63805017c3d140897de9e462";
1
+ globalThis['__css-content-9df4d1565589ce63a22b21cf2f9d3ed9__']=".AvatarSelectionUIComponent-module__menuButton_VjZ7cq__0261{z-index:102;user-select:none;width:70px;min-height:70px;position:absolute;top:0;right:0}.AvatarSelectionUIComponent-module__input_VjZ7cq__0261{color:#fff;backdrop-filter:blur(10px);background-color:#0006;border:1px solid #fff3;border-radius:8px;outline:none;flex:1;margin-right:6px;padding:6px 8px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;font-weight:400;transition:all .2s ease-in-out}.AvatarSelectionUIComponent-module__input_VjZ7cq__0261:focus{background-color:#0009;border-color:#fff6;box-shadow:0 0 0 3px #ffffff26}.AvatarSelectionUIComponent-module__input_VjZ7cq__0261::placeholder{color:#ffffff80}.AvatarSelectionUIComponent-module__closeButton_VjZ7cq__0261{backdrop-filter:blur(10px);color:#fffc;cursor:pointer;user-select:none;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:44px;height:44px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:16px;font-weight:500;transition:all .2s ease-in-out;display:flex;position:absolute;top:8px;right:8px}.AvatarSelectionUIComponent-module__closeButton_VjZ7cq__0261:hover{color:#ffffffe6;background:#000c;transform:scale(1.05)}.AvatarSelectionUIComponent-module__closeButton_VjZ7cq__0261:active{transform:scale(.95)}.AvatarSelectionUIComponent-module__openTab_VjZ7cq__0261{backdrop-filter:blur(10px);cursor:pointer;user-select:none;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:44px;height:44px;transition:all .2s ease-in-out;display:flex;position:absolute;top:8px;right:8px}.AvatarSelectionUIComponent-module__openTab_VjZ7cq__0261:hover{background:#000c;transform:scale(1.05)}.AvatarSelectionUIComponent-module__openTab_VjZ7cq__0261:active{transform:scale(.95)}.AvatarSelectionUIComponent-module__openTab_VjZ7cq__0261 img{filter:invert(80%);width:24px;height:24px;transition:all .2s ease-in-out}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0261{backdrop-filter:blur(20px);z-index:103;user-select:none;background:#000000bf;border:1px solid #fff3;border-radius:16px;width:400px;max-width:78vw;max-height:calc(100vh - 24px);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;position:absolute;top:8px;right:60px;overflow:hidden auto;box-shadow:0 8px 32px #0006,0 0 0 1px #ffffff1a}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0261::-webkit-scrollbar{width:8px}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0261::-webkit-scrollbar-track{background:none}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0261::-webkit-scrollbar-thumb{background:#fff3;border:1px solid #ffffff1a;border-radius:4px}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0261::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.AvatarSelectionUIComponent-module__avatarSelectionSection_VjZ7cq__0261{border-bottom:1px solid #ffffff26;padding:10px}.AvatarSelectionUIComponent-module__avatarSelectionSection_VjZ7cq__0261:last-child{border-bottom:none}.AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0261{background:#0000004d;border:1px solid #ffffff26;border-radius:12px;grid-template-columns:repeat(auto-fill,minmax(85px,1fr));gap:8px;max-height:320px;padding:10px;display:grid;overflow:hidden auto}.AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0261::-webkit-scrollbar{width:6px}.AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0261::-webkit-scrollbar-track{background:none}.AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0261::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:3px}.AvatarSelectionUIComponent-module__avatarSelectionUiHeader_VjZ7cq__0261{color:#ffffffe6;text-align:center;font-weight:600;position:relative}.AvatarSelectionUIComponent-module__avatarSelectionUiCloseButton_VjZ7cq__0261{position:absolute;top:20px;right:20px}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0261{color:#ffffffe6;text-align:center;cursor:pointer;border-radius:8px;padding:4px;transition:all .2s ease-in-out}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0261:hover{background:#0000004d;transform:translateY(-2px)}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImgContainer_VjZ7cq__0261{border-radius:8px;position:relative;overflow:hidden}.AvatarSelectionUIComponent-module__avatarSelectionNoImage_VjZ7cq__0261{aspect-ratio:1;box-sizing:border-box;background:#0003;border:1px solid #ffffff26;border-radius:8px;justify-content:center;align-items:center;width:100%;display:flex}.AvatarSelectionUIComponent-module__avatarSelectionNoImage_VjZ7cq__0261 img{filter:invert(70%);opacity:.7;width:40%}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0261 p{text-overflow:ellipsis;white-space:nowrap;color:#fffc;margin:4px 0 0;font-size:12px;font-weight:500;position:relative;overflow:hidden}.AvatarSelectionUIComponent-module__tooltipText_VjZ7cq__0261{pointer-events:none;z-index:1000;color:#ffffffe6;backdrop-filter:blur(10px);opacity:0;visibility:hidden;white-space:nowrap;background:#000c;border-radius:8px;margin-bottom:4px;padding:4px 6px;font-size:12px;font-weight:500;transition:opacity .2s ease-in-out;position:absolute;bottom:100%;left:50%;transform:translate(-50%)}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0261 p:hover+.AvatarSelectionUIComponent-module__tooltipText_VjZ7cq__0261{opacity:1;visibility:visible;transition-delay:.5s}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImgContainer_VjZ7cq__0261 .AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImage_VjZ7cq__0261{aspect-ratio:1;border-radius:8px;width:100%;transition:all .2s ease-in-out}.AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0261{color:#fff;backdrop-filter:blur(10px);background:linear-gradient(135deg,#22c55e,#16a34a);border:1px solid #fff3;border-radius:6px;padding:2px 4px;font-size:11px;font-weight:600;box-shadow:0 2px 4px #0003}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImgContainer_VjZ7cq__0261 .AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0261{z-index:2;position:absolute;top:4px;right:4px}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0261 img:hover{opacity:.8;transform:scale(1.05)}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261{color:#ffffffe6;border-bottom:1px solid #ffffff26;padding:10px;position:relative}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261:last-child{border-bottom:none}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261 .AvatarSelectionUIComponent-module__radioGroup_VjZ7cq__0261{flex-wrap:wrap;align-items:center;gap:4px;margin-bottom:8px;display:flex}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261 .AvatarSelectionUIComponent-module__radioItem_VjZ7cq__0261{white-space:nowrap;align-items:center;gap:3px;margin-right:6px;display:flex}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261 label{color:#fffc;cursor:pointer;margin:0;font-size:14px;font-weight:500;transition:color .2s ease-in-out}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261 label:hover{color:#fff}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261 input[type=radio]{appearance:none;cursor:pointer;background:none;border:2px solid #ffffff4d;border-radius:50%;outline:none;width:18px;height:18px;transition:all .2s ease-in-out;position:relative}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261 input[type=radio]:hover{border-color:#ffffff80}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261 input[type=radio]:focus{box-shadow:0 0 0 3px #ffffff1a}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261 input[type=radio]:checked{background:#ffffff1a;border-color:#fffc}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261 input[type=radio]:checked:after{content:\"\";background:#ffffffe6;border-radius:50%;width:8px;height:8px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261 input[type=radio][disabled]{opacity:.4;cursor:not-allowed}.AvatarSelectionUIComponent-module__customAvatarInputSection_VjZ7cq__0261{align-items:stretch;display:flex}.AvatarSelectionUIComponent-module__setButton_VjZ7cq__0261{color:#ffffffe6;backdrop-filter:blur(10px);cursor:pointer;background:linear-gradient(135deg,#0009,#0006);border:1px solid #fff3;border-radius:8px;justify-content:center;align-items:center;height:44px;padding-left:16px;padding-right:16px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;font-weight:500;transition:all .2s ease-in-out;display:flex}.AvatarSelectionUIComponent-module__setButton_VjZ7cq__0261:hover:not(:disabled){background:linear-gradient(135deg,#000c,#0009);border-color:#ffffff4d;transform:translateY(-1px);box-shadow:0 4px 8px #0000004d}.AvatarSelectionUIComponent-module__setButton_VjZ7cq__0261:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 4px #0003}.AvatarSelectionUIComponent-module__setButton_VjZ7cq__0261:disabled{opacity:.5;cursor:not-allowed;transform:none}.AvatarSelectionUIComponent-module__sectionHeading_VjZ7cq__0261{color:#ffffffe6;letter-spacing:-.01em;margin-bottom:8px;font-size:18px;font-weight:600}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261 .AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0261{margin-left:8px;position:relative;top:-2px}.AvatarSelectionUIComponent-module__displayNameSection_VjZ7cq__0261{color:#ffffffe6;border-bottom:1px solid #ffffff26;padding:10px;position:relative}.AvatarSelectionUIComponent-module__displayNameInputSection_VjZ7cq__0261{align-items:stretch;display:flex}.InputBox-module__inputWrapper_adOgOW__0261{pointer-events:all;align-items:stretch;gap:6px;display:flex}.InputBox-module__chatInput_adOgOW__0261{color:#fff;backdrop-filter:blur(10px);box-sizing:border-box;background:#0006;border:1px solid #fff3;border-radius:8px;outline:none;flex:1;height:36px;padding:0 8px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;font-weight:400;transition:all .2s ease-in-out}.InputBox-module__chatInput_adOgOW__0261:focus{background:#0009;border-color:#fff6;box-shadow:0 0 0 3px #ffffff26}.InputBox-module__chatInput_adOgOW__0261::placeholder{color:#ffffff80}.InputBox-module__sendButton_adOgOW__0261{color:#ffffffe6;backdrop-filter:blur(10px);cursor:pointer;background:linear-gradient(135deg,#0009,#0006);border:1px solid #fff3;border-radius:8px;outline:none;justify-content:center;align-items:center;width:36px;height:36px;transition:all .2s ease-in-out;display:flex}.InputBox-module__sendButton_adOgOW__0261:hover{background:linear-gradient(135deg,#000c,#0009);border-color:#ffffff4d;transform:translateY(-1px);box-shadow:0 4px 8px #0000004d}.InputBox-module__sendButton_adOgOW__0261:active{transform:translateY(0);box-shadow:0 2px 4px #0003}.InputBox-module__sendButton_adOgOW__0261 .InputBox-module__svgIcon_adOgOW__0261 img{filter:invert(80%);width:18px;height:18px;transition:all .2s ease-in-out}.InputBox-module__sendButton_adOgOW__0261:hover .InputBox-module__svgIcon_adOgOW__0261 img{filter:invert(90%)}.Message-module__messageContainer_ikOQiq__0261{backdrop-filter:blur(8px);word-break:break-word;color:#ffffffe6;direction:ltr;background:#0000004d;border:1px solid #fff3;border-radius:8px;width:fit-content;margin:6px auto 6px 2px;padding:4px 8px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;transition:all .2s ease-in-out;overflow-x:hidden}.Message-module__messageContainer_ikOQiq__0261:hover{background:#0006;border-color:#ffffff4d}.Message-module__userName_ikOQiq__0261{color:#ffffffe6;margin-right:4px;font-weight:600}.Messages-module__messagesContainer_LXaUUW__0261{z-index:1000;max-height:inherit;scrollbar-width:thin;scrollbar-color:#fff3 transparent;pointer-events:fill;direction:rtl;position:relative;bottom:0;left:-1px;overflow-y:auto}.Messages-module__messagesContainer_LXaUUW__0261::-webkit-scrollbar{width:6px}.Messages-module__messagesContainer_LXaUUW__0261::-webkit-scrollbar-track{background:none}.Messages-module__messagesContainer_LXaUUW__0261::-webkit-scrollbar-thumb{background:#fff3;border:1px solid #ffffff1a;border-radius:3px}.Messages-module__messagesContainer_LXaUUW__0261::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.Messages-module__newMessagesButton_LXaUUW__0261{-webkit-backdrop-filter:blur(10px);color:#fff;cursor:pointer;z-index:1001;direction:ltr;background:#000000bf;border:1px solid #fff3;border-radius:20px;padding:8px 16px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:14px;font-weight:500;transition:all .2s;position:absolute;bottom:50px;left:50%;transform:translate(-50%);box-shadow:0 4px 12px #0000004d}.Messages-module__newMessagesButton_LXaUUW__0261:hover{background:#000000d9;border-color:#ffffff4d;transform:translate(-50%)translateY(-2px);box-shadow:0 6px 16px #0006}.Messages-module__newMessagesButton_LXaUUW__0261:active{transform:translate(-50%)translateY(0);box-shadow:0 2px 8px #0000004d}.TextChatUIComponent-module__uiHover_gFDdcW__0261{z-index:102;pointer-events:all;width:58px;min-height:58px;position:absolute;bottom:0;left:0}.TextChatUIComponent-module__textChatUi_gFDdcW__0261{flex-direction:row;align-items:flex-end;width:100%;max-width:500px;height:0;display:flex;position:absolute;bottom:0;left:0}.TextChatUIComponent-module__textChat_gFDdcW__0261{z-index:-1;color:#fff;user-select:none;opacity:0;flex-direction:column;justify-content:space-between;width:100%;max-height:500px;margin-bottom:8px;margin-left:60px;padding:5px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;transition:opacity .25s ease-in-out,transform .2s ease-in-out;display:flex;transform:translate(-100%)}.TextChatUIComponent-module__fadeIn_gFDdcW__0261{opacity:1;transform:translate(0)}.TextChatUIComponent-module__fadeOut_gFDdcW__0261{opacity:.6;transform:translate(calc(-100% - 72px))}.TextChatUIComponent-module__controls_gFDdcW__0261{position:absolute;top:2px;right:0}.TextChatUIComponent-module__openTab_gFDdcW__0261{backdrop-filter:blur(10px);cursor:pointer;z-index:102;user-select:none;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:44px;height:44px;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:8px;left:8px}.TextChatUIComponent-module__openTab_gFDdcW__0261:hover{background:#000c;border-color:#ffffff4d;transform:scale(1.05)}.TextChatUIComponent-module__openTab_gFDdcW__0261:active{transform:scale(.95)}.TextChatUIComponent-module__openTab_gFDdcW__0261 img{filter:invert(80%);width:24px;height:24px;transition:all .2s ease-in-out}.TextChatUIComponent-module__stickyButton_gFDdcW__0261{z-index:103;backdrop-filter:blur(10px);cursor:pointer;user-select:none;opacity:1;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:38px;left:38px}.TextChatUIComponent-module__stickyButton_gFDdcW__0261:hover{background:#000c;border-color:#ffffff4d;transform:scale(1.05)}.TextChatUIComponent-module__stickyButtonFadeOut_gFDdcW__0261{z-index:103;backdrop-filter:blur(10px);cursor:pointer;user-select:none;opacity:0;pointer-events:none;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:42px;left:42px}.TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0261{z-index:103;backdrop-filter:blur(10px);cursor:pointer;user-select:none;background:#000c;border:1px solid #22c55e99;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:42px;left:42px;box-shadow:0 0 8px #22c55e4d}.TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0261:hover{border-color:#22c55ecc;transform:scale(1.05);box-shadow:0 0 12px #22c55e66}.TextChatUIComponent-module__stickyButton_gFDdcW__0261 img,.TextChatUIComponent-module__stickyButtonFadeOut_gFDdcW__0261 img,.TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0261 img{filter:invert(70%);width:12px;height:12px;transition:all .2s ease-in-out}.TextChatUIComponent-module__stickyButton_gFDdcW__0261:hover img,.TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0261:hover img{filter:invert(90%)}.TextChatUIComponent-module__controls_gFDdcW__0261 .TextChatUIComponent-module__closeButton_gFDdcW__0261{color:#fffc;backdrop-filter:blur(10px);cursor:pointer;background:#0009;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;font-weight:500;transition:all .2s ease-in-out;display:flex;position:absolute;top:3px;right:3px}.TextChatUIComponent-module__closeButton_gFDdcW__0261:hover{color:#ffffffe6;background:#000c;border-color:#ffffff4d;transform:scale(1.05)}.TextChatUIComponent-module__closeButton_gFDdcW__0261:active{transform:scale(.95)}.TextChatUIComponent-module__messagesWrapper_gFDdcW__0261{direction:rtl;width:fit-content;max-height:450px;margin-bottom:8px;position:relative}.Networked3dWebExperience-module__respawnButton_7g9l0W__0261{z-index:102;color:#ffffffe6;backdrop-filter:blur(10px);cursor:pointer;user-select:none;background:linear-gradient(135deg,#0009,#0006);border:1px solid #fff3;border-radius:8px;justify-content:center;align-items:center;padding:12px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;font-weight:500;transition:all .2s ease-in-out;display:flex;position:absolute;top:8px;left:8px}.Networked3dWebExperience-module__respawnButton_7g9l0W__0261:hover{background:linear-gradient(135deg,#000c,#0009);border-color:#ffffff4d;transform:translateY(-1px)}.Networked3dWebExperience-module__respawnButton_7g9l0W__0261:active{transform:translateY(0)}\n";globalThis['__css-digest-9df4d1565589ce63a22b21cf2f9d3ed9__']="9df4d1565589ce63a22b21cf2f9d3ed9";
2
2
  // src/Networked3dWebExperienceClient.ts
3
3
  import {
4
4
  CameraManager,
5
- CharacterManager,
6
- CharacterModelLoader,
7
5
  CollisionsManager,
8
- Composer,
9
6
  ErrorScreen,
10
- GroundPlane,
7
+ EulXYZ,
11
8
  Key,
12
9
  KeyInputManager,
13
10
  LoadingScreen,
14
- MMLCompositionScene,
15
- TimeManager,
16
- TweakPane,
17
11
  Vect3,
18
12
  VirtualJoystick,
19
- Character,
20
13
  Quat,
21
- getSpawnData
14
+ getSpawnData,
15
+ CharacterManager,
16
+ TweakPane,
17
+ createDefaultCharacterControllerValues,
18
+ createDefaultCameraValues
22
19
  } from "@mml-io/3d-web-client-core";
20
+ import { ThreeJSWorldRenderer } from "@mml-io/3d-web-threejs";
23
21
  import {
24
22
  FROM_SERVER_CHAT_MESSAGE_TYPE,
25
23
  FROM_CLIENT_CHAT_MESSAGE_TYPE,
@@ -30,14 +28,7 @@ import {
30
28
  SERVER_BROADCAST_MESSAGE_TYPE,
31
29
  parseServerBroadcastMessage
32
30
  } from "@mml-io/3d-web-user-networking";
33
- import {
34
- LoadingProgressManager,
35
- MMLNetworkSource,
36
- registerCustomElementsToWindow,
37
- setGlobalDocumentTimeManager,
38
- setGlobalMMLScene
39
- } from "@mml-io/mml-web";
40
- import { Scene, AudioListener, Vector3 } from "three";
31
+ import { LoadingProgressManager, registerCustomElementsToWindow } from "@mml-io/mml-web";
41
32
 
42
33
  // src/avatar-selection-ui/AvatarSelectionUI.tsx
43
34
  import { forwardRef } from "react";
@@ -54,8 +45,8 @@ import {
54
45
  var Avatar_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z"/></svg>\n';
55
46
 
56
47
  // esbuild-css-modules-plugin-ns-js::src/avatar-selection-ui/components/AvatarPanel/AvatarSelectionUIComponent.module.css:injector.js
57
- var content = globalThis['__css-content-c066f87a63805017c3d140897de9e462__'];
58
- var digest = globalThis['__css-digest-c066f87a63805017c3d140897de9e462__'];
48
+ var content = globalThis['__css-content-9df4d1565589ce63a22b21cf2f9d3ed9__'];
49
+ var digest = globalThis['__css-digest-9df4d1565589ce63a22b21cf2f9d3ed9__'];
59
50
  var inject = () => {
60
51
  setTimeout(() => {
61
52
  if (!globalThis.document) {
@@ -81,29 +72,29 @@ var inject = () => {
81
72
 
82
73
  // src/avatar-selection-ui/components/AvatarPanel/AvatarSelectionUIComponent.module.css
83
74
  var AvatarSelectionUIComponent_default = new Proxy({
84
- "avatarSelectionContainer": "AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0250",
85
- "avatarSelectionNoImage": "AvatarSelectionUIComponent-module__avatarSelectionNoImage_VjZ7cq__0250",
86
- "avatarSelectionSection": "AvatarSelectionUIComponent-module__avatarSelectionSection_VjZ7cq__0250",
87
- "avatarSelectionUi": "AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0250",
88
- "avatarSelectionUiAvatar": "AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0250",
89
- "avatarSelectionUiAvatarImage": "AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImage_VjZ7cq__0250",
90
- "avatarSelectionUiAvatarImgContainer": "AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImgContainer_VjZ7cq__0250",
91
- "avatarSelectionUiCloseButton": "AvatarSelectionUIComponent-module__avatarSelectionUiCloseButton_VjZ7cq__0250",
92
- "avatarSelectionUiHeader": "AvatarSelectionUIComponent-module__avatarSelectionUiHeader_VjZ7cq__0250",
93
- "closeButton": "AvatarSelectionUIComponent-module__closeButton_VjZ7cq__0250",
94
- "customAvatarInputSection": "AvatarSelectionUIComponent-module__customAvatarInputSection_VjZ7cq__0250",
95
- "customAvatarSection": "AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0250",
96
- "displayNameInputSection": "AvatarSelectionUIComponent-module__displayNameInputSection_VjZ7cq__0250",
97
- "displayNameSection": "AvatarSelectionUIComponent-module__displayNameSection_VjZ7cq__0250",
98
- "input": "AvatarSelectionUIComponent-module__input_VjZ7cq__0250",
99
- "menuButton": "AvatarSelectionUIComponent-module__menuButton_VjZ7cq__0250",
100
- "openTab": "AvatarSelectionUIComponent-module__openTab_VjZ7cq__0250",
101
- "radioGroup": "AvatarSelectionUIComponent-module__radioGroup_VjZ7cq__0250",
102
- "radioItem": "AvatarSelectionUIComponent-module__radioItem_VjZ7cq__0250",
103
- "sectionHeading": "AvatarSelectionUIComponent-module__sectionHeading_VjZ7cq__0250",
104
- "selectedPill": "AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0250",
105
- "setButton": "AvatarSelectionUIComponent-module__setButton_VjZ7cq__0250",
106
- "tooltipText": "AvatarSelectionUIComponent-module__tooltipText_VjZ7cq__0250"
75
+ "avatarSelectionContainer": "AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0261",
76
+ "avatarSelectionNoImage": "AvatarSelectionUIComponent-module__avatarSelectionNoImage_VjZ7cq__0261",
77
+ "avatarSelectionSection": "AvatarSelectionUIComponent-module__avatarSelectionSection_VjZ7cq__0261",
78
+ "avatarSelectionUi": "AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0261",
79
+ "avatarSelectionUiAvatar": "AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0261",
80
+ "avatarSelectionUiAvatarImage": "AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImage_VjZ7cq__0261",
81
+ "avatarSelectionUiAvatarImgContainer": "AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImgContainer_VjZ7cq__0261",
82
+ "avatarSelectionUiCloseButton": "AvatarSelectionUIComponent-module__avatarSelectionUiCloseButton_VjZ7cq__0261",
83
+ "avatarSelectionUiHeader": "AvatarSelectionUIComponent-module__avatarSelectionUiHeader_VjZ7cq__0261",
84
+ "closeButton": "AvatarSelectionUIComponent-module__closeButton_VjZ7cq__0261",
85
+ "customAvatarInputSection": "AvatarSelectionUIComponent-module__customAvatarInputSection_VjZ7cq__0261",
86
+ "customAvatarSection": "AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0261",
87
+ "displayNameInputSection": "AvatarSelectionUIComponent-module__displayNameInputSection_VjZ7cq__0261",
88
+ "displayNameSection": "AvatarSelectionUIComponent-module__displayNameSection_VjZ7cq__0261",
89
+ "input": "AvatarSelectionUIComponent-module__input_VjZ7cq__0261",
90
+ "menuButton": "AvatarSelectionUIComponent-module__menuButton_VjZ7cq__0261",
91
+ "openTab": "AvatarSelectionUIComponent-module__openTab_VjZ7cq__0261",
92
+ "radioGroup": "AvatarSelectionUIComponent-module__radioGroup_VjZ7cq__0261",
93
+ "radioItem": "AvatarSelectionUIComponent-module__radioItem_VjZ7cq__0261",
94
+ "sectionHeading": "AvatarSelectionUIComponent-module__sectionHeading_VjZ7cq__0261",
95
+ "selectedPill": "AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0261",
96
+ "setButton": "AvatarSelectionUIComponent-module__setButton_VjZ7cq__0261",
97
+ "tooltipText": "AvatarSelectionUIComponent-module__tooltipText_VjZ7cq__0261"
107
98
  }, {
108
99
  get: function(source, key) {
109
100
  inject();
@@ -464,8 +455,8 @@ import { forwardRef as forwardRef2, useImperativeHandle, useRef as useRef3, useS
464
455
  var PaperPlane_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"/></svg>';
465
456
 
466
457
  // esbuild-css-modules-plugin-ns-js::src/chat-ui/components/Input/InputBox.module.css:injector.js
467
- var content2 = globalThis['__css-content-c066f87a63805017c3d140897de9e462__'];
468
- var digest2 = globalThis['__css-digest-c066f87a63805017c3d140897de9e462__'];
458
+ var content2 = globalThis['__css-content-9df4d1565589ce63a22b21cf2f9d3ed9__'];
459
+ var digest2 = globalThis['__css-digest-9df4d1565589ce63a22b21cf2f9d3ed9__'];
469
460
  var inject2 = () => {
470
461
  setTimeout(() => {
471
462
  if (!globalThis.document) {
@@ -491,10 +482,10 @@ var inject2 = () => {
491
482
 
492
483
  // src/chat-ui/components/Input/InputBox.module.css
493
484
  var InputBox_default = new Proxy({
494
- "chatInput": "InputBox-module__chatInput_adOgOW__0250",
495
- "inputWrapper": "InputBox-module__inputWrapper_adOgOW__0250",
496
- "sendButton": "InputBox-module__sendButton_adOgOW__0250",
497
- "svgIcon": "InputBox-module__svgIcon_adOgOW__0250"
485
+ "chatInput": "InputBox-module__chatInput_adOgOW__0261",
486
+ "inputWrapper": "InputBox-module__inputWrapper_adOgOW__0261",
487
+ "sendButton": "InputBox-module__sendButton_adOgOW__0261",
488
+ "svgIcon": "InputBox-module__svgIcon_adOgOW__0261"
498
489
  }, {
499
490
  get: function(source, key) {
500
491
  inject2();
@@ -562,8 +553,8 @@ import { useEffect as useEffect3, useRef as useRef4, useState as useState4 } fro
562
553
  import { useState as useState3, useEffect as useEffect2, useCallback } from "react";
563
554
 
564
555
  // esbuild-css-modules-plugin-ns-js::src/chat-ui/components/Message/Message.module.css:injector.js
565
- var content3 = globalThis['__css-content-c066f87a63805017c3d140897de9e462__'];
566
- var digest3 = globalThis['__css-digest-c066f87a63805017c3d140897de9e462__'];
556
+ var content3 = globalThis['__css-content-9df4d1565589ce63a22b21cf2f9d3ed9__'];
557
+ var digest3 = globalThis['__css-digest-9df4d1565589ce63a22b21cf2f9d3ed9__'];
567
558
  var inject3 = () => {
568
559
  setTimeout(() => {
569
560
  if (!globalThis.document) {
@@ -589,8 +580,8 @@ var inject3 = () => {
589
580
 
590
581
  // src/chat-ui/components/Message/Message.module.css
591
582
  var Message_default = new Proxy({
592
- "messageContainer": "Message-module__messageContainer_ikOQiq__0250",
593
- "userName": "Message-module__userName_ikOQiq__0250"
583
+ "messageContainer": "Message-module__messageContainer_ikOQiq__0261",
584
+ "userName": "Message-module__userName_ikOQiq__0261"
594
585
  }, {
595
586
  get: function(source, key) {
596
587
  inject3();
@@ -646,8 +637,8 @@ var Message = ({ username, message, stringToHslOptions }) => {
646
637
  var Message_default2 = Message;
647
638
 
648
639
  // esbuild-css-modules-plugin-ns-js::src/chat-ui/components/Messages/Messages.module.css:injector.js
649
- var content4 = globalThis['__css-content-c066f87a63805017c3d140897de9e462__'];
650
- var digest4 = globalThis['__css-digest-c066f87a63805017c3d140897de9e462__'];
640
+ var content4 = globalThis['__css-content-9df4d1565589ce63a22b21cf2f9d3ed9__'];
641
+ var digest4 = globalThis['__css-digest-9df4d1565589ce63a22b21cf2f9d3ed9__'];
651
642
  var inject4 = () => {
652
643
  setTimeout(() => {
653
644
  if (!globalThis.document) {
@@ -673,8 +664,8 @@ var inject4 = () => {
673
664
 
674
665
  // src/chat-ui/components/Messages/Messages.module.css
675
666
  var Messages_default = new Proxy({
676
- "messagesContainer": "Messages-module__messagesContainer_LXaUUW__0250",
677
- "newMessagesButton": "Messages-module__newMessagesButton_LXaUUW__0250"
667
+ "messagesContainer": "Messages-module__messagesContainer_LXaUUW__0261",
668
+ "newMessagesButton": "Messages-module__newMessagesButton_LXaUUW__0261"
678
669
  }, {
679
670
  get: function(source, key) {
680
671
  inject4();
@@ -753,8 +744,8 @@ var Messages = ({ messages, stringToHslOptions, shouldAutoScroll }) => {
753
744
  };
754
745
 
755
746
  // esbuild-css-modules-plugin-ns-js::src/chat-ui/components/ChatPanel/TextChatUIComponent.module.css:injector.js
756
- var content5 = globalThis['__css-content-c066f87a63805017c3d140897de9e462__'];
757
- var digest5 = globalThis['__css-digest-c066f87a63805017c3d140897de9e462__'];
747
+ var content5 = globalThis['__css-content-9df4d1565589ce63a22b21cf2f9d3ed9__'];
748
+ var digest5 = globalThis['__css-digest-9df4d1565589ce63a22b21cf2f9d3ed9__'];
758
749
  var inject5 = () => {
759
750
  setTimeout(() => {
760
751
  if (!globalThis.document) {
@@ -780,18 +771,18 @@ var inject5 = () => {
780
771
 
781
772
  // src/chat-ui/components/ChatPanel/TextChatUIComponent.module.css
782
773
  var TextChatUIComponent_default = new Proxy({
783
- "closeButton": "TextChatUIComponent-module__closeButton_gFDdcW__0250",
784
- "controls": "TextChatUIComponent-module__controls_gFDdcW__0250",
785
- "fadeIn": "TextChatUIComponent-module__fadeIn_gFDdcW__0250",
786
- "fadeOut": "TextChatUIComponent-module__fadeOut_gFDdcW__0250",
787
- "messagesWrapper": "TextChatUIComponent-module__messagesWrapper_gFDdcW__0250",
788
- "openTab": "TextChatUIComponent-module__openTab_gFDdcW__0250",
789
- "stickyButton": "TextChatUIComponent-module__stickyButton_gFDdcW__0250",
790
- "stickyButtonEnabled": "TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0250",
791
- "stickyButtonFadeOut": "TextChatUIComponent-module__stickyButtonFadeOut_gFDdcW__0250",
792
- "textChat": "TextChatUIComponent-module__textChat_gFDdcW__0250",
793
- "textChatUi": "TextChatUIComponent-module__textChatUi_gFDdcW__0250",
794
- "uiHover": "TextChatUIComponent-module__uiHover_gFDdcW__0250"
774
+ "closeButton": "TextChatUIComponent-module__closeButton_gFDdcW__0261",
775
+ "controls": "TextChatUIComponent-module__controls_gFDdcW__0261",
776
+ "fadeIn": "TextChatUIComponent-module__fadeIn_gFDdcW__0261",
777
+ "fadeOut": "TextChatUIComponent-module__fadeOut_gFDdcW__0261",
778
+ "messagesWrapper": "TextChatUIComponent-module__messagesWrapper_gFDdcW__0261",
779
+ "openTab": "TextChatUIComponent-module__openTab_gFDdcW__0261",
780
+ "stickyButton": "TextChatUIComponent-module__stickyButton_gFDdcW__0261",
781
+ "stickyButtonEnabled": "TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0261",
782
+ "stickyButtonFadeOut": "TextChatUIComponent-module__stickyButtonFadeOut_gFDdcW__0261",
783
+ "textChat": "TextChatUIComponent-module__textChat_gFDdcW__0261",
784
+ "textChatUi": "TextChatUIComponent-module__textChatUi_gFDdcW__0261",
785
+ "uiHover": "TextChatUIComponent-module__uiHover_gFDdcW__0261"
795
786
  }, {
796
787
  get: function(source, key) {
797
788
  inject5();
@@ -1009,8 +1000,8 @@ var TextChatUI = class {
1009
1000
  };
1010
1001
 
1011
1002
  // esbuild-css-modules-plugin-ns-js::src/Networked3dWebExperience.module.css:injector.js
1012
- var content6 = globalThis['__css-content-c066f87a63805017c3d140897de9e462__'];
1013
- var digest6 = globalThis['__css-digest-c066f87a63805017c3d140897de9e462__'];
1003
+ var content6 = globalThis['__css-content-9df4d1565589ce63a22b21cf2f9d3ed9__'];
1004
+ var digest6 = globalThis['__css-digest-9df4d1565589ce63a22b21cf2f9d3ed9__'];
1014
1005
  var inject6 = () => {
1015
1006
  setTimeout(() => {
1016
1007
  if (!globalThis.document) {
@@ -1036,7 +1027,7 @@ var inject6 = () => {
1036
1027
 
1037
1028
  // src/Networked3dWebExperience.module.css
1038
1029
  var Networked3dWebExperience_default = new Proxy({
1039
- "respawnButton": "Networked3dWebExperience-module__respawnButton_7g9l0W__0250"
1030
+ "respawnButton": "Networked3dWebExperience-module__respawnButton_7g9l0W__0261"
1040
1031
  }, {
1041
1032
  get: function(source, key) {
1042
1033
  inject6();
@@ -1074,46 +1065,31 @@ var Networked3dWebExperienceClient = class {
1074
1065
  constructor(holderElement, config) {
1075
1066
  this.holderElement = holderElement;
1076
1067
  this.config = config;
1077
- var _a;
1078
1068
  this.element = document.createElement("div");
1079
1069
  this.element.style.position = "absolute";
1080
1070
  this.element.style.width = "100%";
1081
1071
  this.element.style.height = "100%";
1082
1072
  this.holderElement.appendChild(this.element);
1083
- document.addEventListener("mousedown", () => {
1084
- if (this.audioListener.context.state === "suspended") {
1085
- this.audioListener.context.resume();
1086
- }
1087
- });
1088
1073
  this.canvasHolder = document.createElement("div");
1089
1074
  this.canvasHolder.style.position = "absolute";
1090
1075
  this.canvasHolder.style.width = "100%";
1091
1076
  this.canvasHolder.style.height = "100%";
1092
1077
  this.element.appendChild(this.canvasHolder);
1093
- this.collisionsManager = new CollisionsManager(this.scene);
1078
+ this.collisionsManager = new CollisionsManager();
1094
1079
  this.cameraManager = new CameraManager(this.canvasHolder, this.collisionsManager);
1095
- this.scene.add(this.audioListener);
1096
- this.characterModelLoader = new CharacterModelLoader();
1097
1080
  this.virtualJoystick = new VirtualJoystick(this.element, {
1098
1081
  radius: 70,
1099
1082
  innerRadius: 20,
1100
1083
  mouseSupport: false
1101
1084
  });
1102
- this.composer = new Composer({
1103
- scene: this.scene,
1104
- cameraManager: this.cameraManager,
1105
- spawnSun: true,
1106
- environmentConfiguration: this.config.environmentConfiguration,
1107
- postProcessingEnabled: this.config.postProcessingEnabled
1108
- });
1109
- this.canvasHolder.appendChild(this.composer.renderer.domElement);
1110
- if (this.config.enableTweakPane !== false) {
1111
- this.setupTweakPane();
1112
- }
1113
- const resizeObserver = new ResizeObserver(() => {
1114
- this.composer.fitContainer();
1115
- });
1116
- resizeObserver.observe(this.element);
1085
+ this.tweakPane = new TweakPane(
1086
+ this.canvasHolder,
1087
+ {
1088
+ cameraValues: this.cameraValues,
1089
+ characterControllerValues: this.characterControllerValues
1090
+ },
1091
+ config.enableTweakPane ?? false
1092
+ );
1117
1093
  this.spawnConfiguration = normalizeSpawnConfiguration(this.config.spawnConfiguration);
1118
1094
  const spawnData = getSpawnData(this.spawnConfiguration, true);
1119
1095
  const spawnRotation = new Quat().setFromEulerXYZ(spawnData.spawnRotation);
@@ -1135,6 +1111,7 @@ var Networked3dWebExperienceClient = class {
1135
1111
  assignedIdentity: (clientId) => {
1136
1112
  console.log(`Assigned ID: ${clientId}`);
1137
1113
  this.clientId = clientId;
1114
+ this.characterManager.setLocalClientId(clientId);
1138
1115
  if (this.initialLoadCompleted) {
1139
1116
  const spawnData2 = getSpawnData(this.spawnConfiguration, true);
1140
1117
  this.spawnCharacter(spawnData2);
@@ -1162,13 +1139,13 @@ var Networked3dWebExperienceClient = class {
1162
1139
  }
1163
1140
  },
1164
1141
  onCustomMessage: (customType, contents) => {
1165
- var _a2, _b;
1142
+ var _a, _b;
1166
1143
  if (customType === SERVER_BROADCAST_MESSAGE_TYPE) {
1167
1144
  const serverBroadcastMessage = parseServerBroadcastMessage(contents);
1168
1145
  if (serverBroadcastMessage instanceof Error) {
1169
1146
  console.error(`Invalid server broadcast message: ${contents}`);
1170
1147
  } else {
1171
- (_b = (_a2 = this.config).onServerBroadcast) == null ? void 0 : _b.call(_a2, serverBroadcastMessage);
1148
+ (_b = (_a = this.config).onServerBroadcast) == null ? void 0 : _b.call(_a, serverBroadcastMessage);
1172
1149
  }
1173
1150
  } else if (customType === FROM_SERVER_CHAT_MESSAGE_TYPE) {
1174
1151
  const serverChatMessage = parseServerChatMessage(contents);
@@ -1200,44 +1177,33 @@ var Networked3dWebExperienceClient = class {
1200
1177
  this.keyInputManager.createKeyBinding(Key.C, () => {
1201
1178
  if (document.activeElement === document.body) {
1202
1179
  this.cameraManager.toggleFlyCamera();
1203
- this.composer.fitContainer();
1180
+ this.renderer.fitContainer();
1204
1181
  }
1205
1182
  });
1206
1183
  }
1207
- const animationsPromise = Character.loadAnimations(
1208
- this.characterModelLoader,
1209
- this.config.animationConfig
1210
- );
1211
1184
  this.characterManager = new CharacterManager({
1212
- composer: this.composer,
1213
- characterModelLoader: this.characterModelLoader,
1214
1185
  collisionsManager: this.collisionsManager,
1215
1186
  cameraManager: this.cameraManager,
1216
- timeManager: this.timeManager,
1217
1187
  keyInputManager: this.keyInputManager,
1218
1188
  virtualJoystick: this.virtualJoystick,
1219
1189
  remoteUserStates: this.remoteUserStates,
1220
1190
  sendUpdate: (characterState) => {
1221
- this.latestCharacterObject.characterState = characterState;
1222
1191
  this.networkClient.sendUpdate(characterState);
1223
1192
  },
1224
1193
  sendLocalCharacterColors: (colors) => {
1225
1194
  this.networkClient.updateColors(colors);
1226
1195
  },
1227
- animationsPromise,
1228
1196
  spawnConfiguration: this.spawnConfiguration,
1229
- characterResolve: (characterId) => {
1230
- return this.resolveCharacterData(characterId);
1197
+ characterControllerValues: this.characterControllerValues,
1198
+ characterResolve: (clientId) => {
1199
+ return this.resolveCharacterData(clientId);
1231
1200
  },
1232
1201
  updateURLLocation: this.config.updateURLLocation !== false
1233
1202
  });
1234
- this.scene.add(this.characterManager.group);
1235
1203
  if (this.spawnConfiguration.enableRespawnButton) {
1236
1204
  this.respawnButton = this.createRespawnButton();
1237
1205
  this.element.appendChild(this.respawnButton);
1238
1206
  }
1239
- this.setGroundPlaneEnabled(((_a = this.config.environmentConfiguration) == null ? void 0 : _a.groundPlane) ?? true);
1240
- this.setupMMLScene();
1241
1207
  this.loadingScreen = new LoadingScreen(this.loadingProgressManager, this.config.loadingScreen);
1242
1208
  this.element.append(this.loadingScreen.element);
1243
1209
  this.loadingProgressManager.addProgressCallback(() => {
@@ -1249,63 +1215,110 @@ var Networked3dWebExperienceClient = class {
1249
1215
  this.spawnCharacter(spawnData);
1250
1216
  }
1251
1217
  });
1252
- this.loadingProgressManager.setInitialLoad(true);
1218
+ registerCustomElementsToWindow(window);
1219
+ this.rendererConfig = {
1220
+ animationConfig: config.animationConfig,
1221
+ environmentConfiguration: config.environmentConfiguration,
1222
+ postProcessingEnabled: config.postProcessingEnabled,
1223
+ spawnSun: true,
1224
+ enableTweakPane: config.enableTweakPane
1225
+ };
1226
+ if (this.config.createRenderer) {
1227
+ this.renderer = this.config.createRenderer({
1228
+ targetElement: this.canvasHolder,
1229
+ coreCameraManager: this.cameraManager,
1230
+ collisionsManager: this.collisionsManager,
1231
+ config: this.rendererConfig,
1232
+ tweakPane: this.tweakPane,
1233
+ mmlTargetWindow: window,
1234
+ mmlTargetElement: document.body,
1235
+ loadingProgressManager: this.loadingProgressManager,
1236
+ mmlDocuments: this.config.mmlDocuments ?? {},
1237
+ mmlAuthToken: this.config.authToken ?? null,
1238
+ onInitialized: () => {
1239
+ this.loadingProgressManager.setInitialLoad(true);
1240
+ }
1241
+ });
1242
+ } else {
1243
+ this.renderer = new ThreeJSWorldRenderer({
1244
+ targetElement: this.canvasHolder,
1245
+ coreCameraManager: this.cameraManager,
1246
+ collisionsManager: this.collisionsManager,
1247
+ config: this.rendererConfig,
1248
+ tweakPane: this.tweakPane,
1249
+ mmlTargetWindow: window,
1250
+ mmlTargetElement: document.body,
1251
+ loadingProgressManager: this.loadingProgressManager,
1252
+ mmlDocuments: this.config.mmlDocuments ?? {},
1253
+ mmlAuthToken: this.config.authToken ?? null
1254
+ });
1255
+ this.loadingProgressManager.setInitialLoad(true);
1256
+ }
1257
+ if (this.characterManager.localController) {
1258
+ this.characterManager.setupTweakPane(this.tweakPane);
1259
+ }
1260
+ const resizeObserver = new ResizeObserver(() => {
1261
+ this.renderer.fitContainer();
1262
+ });
1263
+ resizeObserver.observe(this.element);
1253
1264
  }
1254
1265
  element;
1255
1266
  canvasHolder;
1256
- scene = new Scene();
1257
- composer;
1258
- tweakPane = null;
1259
- audioListener = new AudioListener();
1267
+ renderer;
1268
+ rendererConfig;
1260
1269
  cameraManager;
1261
1270
  collisionsManager;
1262
- characterModelLoader;
1263
1271
  characterManager;
1264
- timeManager = new TimeManager();
1265
1272
  keyInputManager = new KeyInputManager();
1266
1273
  virtualJoystick;
1267
- mmlCompositionScene;
1268
- mmlDocumentStates = {};
1269
1274
  clientId = null;
1270
1275
  networkClient;
1271
1276
  remoteUserStates = /* @__PURE__ */ new Map();
1272
1277
  userProfiles = /* @__PURE__ */ new Map();
1273
1278
  textChatUI = null;
1274
1279
  avatarSelectionUI = null;
1275
- latestCharacterObject = {
1276
- characterState: null
1277
- };
1278
- characterControllerPaneSet = false;
1280
+ tweakPane;
1279
1281
  spawnConfiguration;
1282
+ cameraValues = createDefaultCameraValues();
1283
+ characterControllerValues = createDefaultCharacterControllerValues();
1280
1284
  initialLoadCompleted = false;
1281
1285
  loadingProgressManager = new LoadingProgressManager();
1282
1286
  loadingScreen;
1283
1287
  errorScreen;
1284
- groundPlane = null;
1285
1288
  respawnButton = null;
1289
+ // Frame timing
1286
1290
  currentRequestAnimationFrame = null;
1287
- lastUpdateTime = 0;
1291
+ lastUpdateTimeMs = 0;
1292
+ frameCounter = 0;
1288
1293
  targetFPS = 60;
1289
- frameInterval = 1e3 / this.targetFPS;
1290
- setGroundPlaneEnabled(enabled) {
1291
- if (enabled && this.groundPlane === null) {
1292
- this.groundPlane = new GroundPlane();
1293
- this.collisionsManager.addMeshesGroup(this.groundPlane);
1294
- this.scene.add(this.groundPlane);
1295
- } else if (!enabled && this.groundPlane !== null) {
1296
- this.collisionsManager.removeMeshesGroup(this.groundPlane);
1297
- this.scene.remove(this.groundPlane);
1298
- this.groundPlane = null;
1299
- }
1300
- }
1294
+ fixedDeltaTime = 1 / this.targetFPS;
1295
+ accumulatedTime = 0;
1296
+ cachedCameraTransform = {
1297
+ position: new Vect3(),
1298
+ rotation: { x: 0, y: 0, z: 0 },
1299
+ fov: 0
1300
+ };
1301
1301
  updateConfig(config) {
1302
1302
  this.config = {
1303
1303
  ...this.config,
1304
1304
  ...config
1305
1305
  };
1306
- if (config.environmentConfiguration) {
1307
- this.composer.updateEnvironmentConfiguration(config.environmentConfiguration);
1308
- this.setGroundPlaneEnabled(config.environmentConfiguration.groundPlane ?? true);
1306
+ const rendererConfigUpdate = {};
1307
+ if (config.environmentConfiguration !== void 0) {
1308
+ rendererConfigUpdate.environmentConfiguration = config.environmentConfiguration;
1309
+ }
1310
+ if (config.postProcessingEnabled !== void 0) {
1311
+ rendererConfigUpdate.postProcessingEnabled = config.postProcessingEnabled;
1312
+ }
1313
+ if (config.enableTweakPane !== void 0) {
1314
+ rendererConfigUpdate.enableTweakPane = config.enableTweakPane;
1315
+ }
1316
+ if (Object.keys(rendererConfigUpdate).length > 0) {
1317
+ this.rendererConfig = {
1318
+ ...this.rendererConfig,
1319
+ ...rendererConfigUpdate
1320
+ };
1321
+ this.renderer.updateConfig(rendererConfigUpdate);
1309
1322
  }
1310
1323
  if (this.avatarSelectionUI) {
1311
1324
  if (config.avatarConfiguration) {
@@ -1313,22 +1326,6 @@ var Networked3dWebExperienceClient = class {
1313
1326
  }
1314
1327
  this.avatarSelectionUI.updateAllowCustomDisplayName(config.allowCustomDisplayName || false);
1315
1328
  }
1316
- if (config.enableTweakPane !== void 0) {
1317
- if (config.enableTweakPane === false && this.tweakPane !== null) {
1318
- this.tweakPane.dispose();
1319
- this.tweakPane = null;
1320
- } else if (config.enableTweakPane === true && this.tweakPane === null) {
1321
- this.setupTweakPane();
1322
- }
1323
- }
1324
- if (this.config.postProcessingEnabled !== void 0) {
1325
- this.composer.togglePostProcessing(this.config.postProcessingEnabled);
1326
- if (this.tweakPane) {
1327
- this.tweakPane.dispose();
1328
- this.tweakPane = null;
1329
- this.setupTweakPane();
1330
- }
1331
- }
1332
1329
  if (config.allowOrbitalCamera !== void 0) {
1333
1330
  if (config.allowOrbitalCamera === false) {
1334
1331
  this.keyInputManager.removeKeyBinding(Key.C);
@@ -1339,7 +1336,7 @@ var Networked3dWebExperienceClient = class {
1339
1336
  this.keyInputManager.createKeyBinding(Key.C, () => {
1340
1337
  if (document.activeElement === document.body) {
1341
1338
  this.cameraManager.toggleFlyCamera();
1342
- this.composer.fitContainer();
1339
+ this.renderer.fitContainer();
1343
1340
  }
1344
1341
  });
1345
1342
  }
@@ -1363,8 +1360,8 @@ var Networked3dWebExperienceClient = class {
1363
1360
  this.respawnButton.remove();
1364
1361
  this.respawnButton = null;
1365
1362
  }
1366
- if (config.mmlDocuments) {
1367
- this.setMMLDocuments(config.mmlDocuments);
1363
+ if (config.mmlDocuments !== void 0) {
1364
+ this.renderer.setMMLConfiguration(config.mmlDocuments, this.config.authToken ?? null);
1368
1365
  }
1369
1366
  }
1370
1367
  static createFullscreenHolder() {
@@ -1433,21 +1430,6 @@ var Networked3dWebExperienceClient = class {
1433
1430
  this.networkClient.updateUsername(displayName);
1434
1431
  this.networkClient.updateCharacterDescription(characterDescription);
1435
1432
  }
1436
- setupTweakPane() {
1437
- if (this.tweakPane) {
1438
- return;
1439
- }
1440
- this.tweakPane = new TweakPane(
1441
- this.element,
1442
- this.composer.renderer,
1443
- this.scene,
1444
- this.composer,
1445
- this.config.postProcessingEnabled,
1446
- this.collisionsManager.toggleDebug
1447
- );
1448
- this.cameraManager.setupTweakPane(this.tweakPane);
1449
- this.composer.setupTweakPane(this.tweakPane);
1450
- }
1451
1433
  handleChatMessage(fromUserId, message) {
1452
1434
  if (this.textChatUI === null) {
1453
1435
  return;
@@ -1462,7 +1444,7 @@ var Networked3dWebExperienceClient = class {
1462
1444
  }
1463
1445
  const username = user.username ?? `Unknown User ${fromUserId}`;
1464
1446
  this.textChatUI.addTextMessage(username, message);
1465
- this.characterManager.addChatBubble(fromUserId, message);
1447
+ this.renderer.addChatBubble(fromUserId, message);
1466
1448
  }
1467
1449
  }
1468
1450
  connectToTextChat() {
@@ -1477,8 +1459,7 @@ var Networked3dWebExperienceClient = class {
1477
1459
  const textChatUISettings = {
1478
1460
  holderElement: this.canvasHolder,
1479
1461
  sendMessageToServerMethod: (message) => {
1480
- this.characterManager.addSelfChatBubble(message);
1481
- this.mmlCompositionScene.onChatMessage(message);
1462
+ this.renderer.onChatMessage(message);
1482
1463
  this.networkClient.sendCustomMessage(
1483
1464
  FROM_CLIENT_CHAT_MESSAGE_TYPE,
1484
1465
  JSON.stringify({ message })
@@ -1515,53 +1496,61 @@ var Networked3dWebExperienceClient = class {
1515
1496
  this.avatarSelectionUI.init();
1516
1497
  }
1517
1498
  update() {
1518
- var _a, _b, _c;
1519
- const currentTime = performance.now();
1520
- const elapsed = currentTime - this.lastUpdateTime;
1521
- if (elapsed >= this.frameInterval) {
1522
- this.lastUpdateTime = currentTime - elapsed % this.frameInterval;
1523
- this.timeManager.update();
1524
- this.characterManager.update();
1525
- this.cameraManager.update();
1526
- this.updateAudioListenerPosition();
1527
- const characterPosition = (_a = this.characterManager.localCharacter) == null ? void 0 : _a.getPosition();
1528
- (_b = this.composer.sun) == null ? void 0 : _b.updateCharacterPosition(
1529
- new Vector3(
1530
- (characterPosition == null ? void 0 : characterPosition.x) || 0,
1531
- (characterPosition == null ? void 0 : characterPosition.y) || 0,
1532
- (characterPosition == null ? void 0 : characterPosition.z) || 0
1533
- )
1534
- );
1535
- this.composer.render(this.timeManager);
1536
- if ((_c = this.tweakPane) == null ? void 0 : _c.guiVisible) {
1537
- this.tweakPane.updateStats(this.timeManager);
1538
- this.tweakPane.updateCameraData(this.cameraManager);
1539
- if (this.characterManager.localCharacter && this.characterManager.localController) {
1540
- if (!this.characterControllerPaneSet) {
1541
- this.characterControllerPaneSet = true;
1542
- this.characterManager.setupTweakPane(this.tweakPane);
1543
- } else {
1544
- this.tweakPane.updateCharacterData(this.characterManager.localController);
1545
- }
1546
- }
1547
- }
1548
- }
1499
+ const currentTimeMs = performance.now();
1549
1500
  this.currentRequestAnimationFrame = requestAnimationFrame(() => {
1550
1501
  this.update();
1551
1502
  });
1552
- }
1553
- updateAudioListenerPosition() {
1554
- const localCharacter = this.characterManager.localCharacter;
1555
- const headWorldPosition = localCharacter == null ? void 0 : localCharacter.getHeadWorldPosition();
1556
- if (headWorldPosition) {
1557
- this.audioListener.position.copy(headWorldPosition);
1558
- this.audioListener.rotation.copy(this.cameraManager.camera.rotation);
1559
- this.audioListener.updateMatrixWorld();
1560
- } else {
1561
- this.audioListener.position.copy(this.cameraManager.camera.position);
1562
- this.audioListener.rotation.copy(this.cameraManager.camera.rotation);
1563
- this.audioListener.updateMatrixWorld();
1503
+ const elapsedMs = currentTimeMs - this.lastUpdateTimeMs;
1504
+ this.lastUpdateTimeMs = currentTimeMs;
1505
+ const elapsedSeconds = Math.min(elapsedMs / 1e3, 0.1);
1506
+ this.accumulatedTime += elapsedSeconds;
1507
+ let physicsUpdated = false;
1508
+ const updatedCharacterDescriptions = [];
1509
+ const removedUserIds = [];
1510
+ while (this.accumulatedTime >= this.fixedDeltaTime) {
1511
+ this.frameCounter++;
1512
+ const result = this.characterManager.update(this.fixedDeltaTime, this.frameCounter);
1513
+ for (const id of result.updatedCharacterDescriptions) {
1514
+ if (!updatedCharacterDescriptions.includes(id)) {
1515
+ updatedCharacterDescriptions.push(id);
1516
+ }
1517
+ }
1518
+ for (const id of result.removedUserIds) {
1519
+ if (!removedUserIds.includes(id)) {
1520
+ removedUserIds.push(id);
1521
+ }
1522
+ }
1523
+ this.accumulatedTime -= this.fixedDeltaTime;
1524
+ physicsUpdated = true;
1525
+ }
1526
+ if (!physicsUpdated) {
1527
+ return;
1564
1528
  }
1529
+ this.cameraManager.update();
1530
+ if (this.tweakPane.guiVisible && this.characterManager.localController) {
1531
+ this.tweakPane.updateCharacterData(this.characterManager.localController);
1532
+ }
1533
+ const allCharacterStates = this.characterManager.getAllCharacterStates();
1534
+ const cameraState = this.cameraManager.getCameraState();
1535
+ const cameraRotation = new EulXYZ().setFromQuaternion(cameraState.rotation);
1536
+ this.cachedCameraTransform.position.set(
1537
+ cameraState.position.x,
1538
+ cameraState.position.y,
1539
+ cameraState.position.z
1540
+ );
1541
+ this.cachedCameraTransform.rotation.x = cameraRotation.x;
1542
+ this.cachedCameraTransform.rotation.y = cameraRotation.y;
1543
+ this.cachedCameraTransform.rotation.z = cameraRotation.z;
1544
+ this.cachedCameraTransform.fov = cameraState.fov;
1545
+ const renderState = {
1546
+ characters: allCharacterStates,
1547
+ updatedCharacterDescriptions,
1548
+ removedUserIds,
1549
+ cameraTransform: this.cachedCameraTransform,
1550
+ localCharacterId: this.characterManager.getLocalClientId(),
1551
+ deltaTimeSeconds: this.fixedDeltaTime
1552
+ };
1553
+ this.renderer.render(renderState);
1565
1554
  }
1566
1555
  spawnCharacter({
1567
1556
  spawnPosition,
@@ -1575,19 +1564,14 @@ var Networked3dWebExperienceClient = class {
1575
1564
  if (!ownIdentity) {
1576
1565
  throw new Error("Own identity not found");
1577
1566
  }
1578
- this.characterManager.spawnLocalCharacter(
1579
- this.clientId,
1580
- ownIdentity.username ?? `Unknown User ${this.clientId}`,
1581
- ownIdentity.characterDescription,
1582
- spawnPosition,
1583
- spawnRotation
1584
- );
1567
+ this.characterManager.spawnLocalCharacter(this.clientId, spawnPosition, spawnRotation);
1568
+ this.characterManager.setupTweakPane(this.tweakPane);
1585
1569
  if (cameraPosition !== null) {
1586
- this.cameraManager.camera.position.set(cameraPosition.x, cameraPosition.y, cameraPosition.z);
1587
- this.cameraManager.setTarget(
1588
- new Vect3().add(spawnPosition).add(CharacterManager.headTargetOffset)
1589
- );
1590
- this.cameraManager.reverseUpdateFromPositions();
1570
+ const cameraState = this.cameraManager.getMainCameraState();
1571
+ cameraState.position.set(cameraPosition.x, cameraPosition.y, cameraPosition.z);
1572
+ const target = new Vect3().add(spawnPosition).add(CharacterManager.headTargetOffset);
1573
+ this.cameraManager.setTarget(target);
1574
+ this.cameraManager.reverseUpdateFromPositions(cameraState.position, cameraState.rotation);
1591
1575
  }
1592
1576
  }
1593
1577
  disposeWithError(message) {
@@ -1596,131 +1580,19 @@ var Networked3dWebExperienceClient = class {
1596
1580
  this.element.append(this.errorScreen.element);
1597
1581
  }
1598
1582
  dispose() {
1599
- var _a, _b, _c;
1583
+ var _a, _b;
1600
1584
  this.characterManager.dispose();
1601
1585
  this.networkClient.stop();
1602
- for (const mmlDocumentState of Object.values(this.mmlDocumentStates)) {
1603
- mmlDocumentState.dispose();
1604
- }
1605
- this.mmlDocumentStates = {};
1606
1586
  (_a = this.textChatUI) == null ? void 0 : _a.dispose();
1607
- this.mmlCompositionScene.dispose();
1608
- this.composer.dispose();
1609
- (_b = this.tweakPane) == null ? void 0 : _b.dispose();
1587
+ this.tweakPane.dispose();
1588
+ this.renderer.dispose();
1610
1589
  if (this.currentRequestAnimationFrame !== null) {
1611
1590
  cancelAnimationFrame(this.currentRequestAnimationFrame);
1612
1591
  this.currentRequestAnimationFrame = null;
1613
1592
  }
1614
1593
  this.cameraManager.dispose();
1615
1594
  this.loadingScreen.dispose();
1616
- (_c = this.errorScreen) == null ? void 0 : _c.dispose();
1617
- }
1618
- setupMMLScene() {
1619
- registerCustomElementsToWindow(window);
1620
- this.mmlCompositionScene = new MMLCompositionScene({
1621
- targetElement: this.element,
1622
- renderer: this.composer.renderer,
1623
- scene: this.scene,
1624
- camera: this.cameraManager.camera,
1625
- audioListener: this.audioListener,
1626
- collisionsManager: this.collisionsManager,
1627
- getUserPositionAndRotation: () => {
1628
- return this.characterManager.getLocalCharacterPositionAndRotation();
1629
- }
1630
- });
1631
- this.scene.add(this.mmlCompositionScene.group);
1632
- setGlobalMMLScene(this.mmlCompositionScene.mmlScene);
1633
- setGlobalDocumentTimeManager(this.mmlCompositionScene.documentTimeManager);
1634
- this.setMMLDocuments(this.config.mmlDocuments ?? {});
1635
- const mmlProgressManager = this.mmlCompositionScene.mmlScene.getLoadingProgressManager();
1636
- this.loadingProgressManager.addLoadingDocument(mmlProgressManager, "mml", mmlProgressManager);
1637
- mmlProgressManager.addProgressCallback(() => {
1638
- this.loadingProgressManager.updateDocumentProgress(mmlProgressManager);
1639
- });
1640
- mmlProgressManager.setInitialLoad(true);
1641
- }
1642
- createMMLDocument(mmlDocConfig) {
1643
- const mmlScene = this.mmlCompositionScene.mmlScene;
1644
- const loadingProgressManager = new LoadingProgressManager();
1645
- const docRef = {};
1646
- const mmlNetworkSource = MMLNetworkSource.create({
1647
- url: MMLNetworkSource.resolveRelativeUrl(window.location.host, mmlDocConfig.url),
1648
- connectionToken: mmlDocConfig.passAuthToken ? this.config.authToken ?? null : null,
1649
- mmlScene,
1650
- statusUpdated: (status) => {
1651
- },
1652
- windowTarget: window,
1653
- targetForWrappers: document.body
1654
- });
1655
- this.updateMMLDocumentAttributes(mmlNetworkSource, mmlDocConfig);
1656
- return {
1657
- docRef,
1658
- loadingProgressManager,
1659
- config: mmlDocConfig,
1660
- source: mmlNetworkSource,
1661
- dispose: () => {
1662
- mmlNetworkSource.dispose();
1663
- }
1664
- };
1665
- }
1666
- updateMMLDocumentAttributes(mmlNetworkSource, mmlDocument) {
1667
- var _a, _b, _c;
1668
- const remoteDocument = mmlNetworkSource.remoteDocumentWrapper.remoteDocument;
1669
- if (mmlDocument.position) {
1670
- remoteDocument.setAttribute("x", mmlDocument.position.x.toString());
1671
- remoteDocument.setAttribute("y", mmlDocument.position.y.toString());
1672
- remoteDocument.setAttribute("z", mmlDocument.position.z.toString());
1673
- } else {
1674
- remoteDocument.setAttribute("x", "0");
1675
- remoteDocument.setAttribute("y", "0");
1676
- remoteDocument.setAttribute("z", "0");
1677
- }
1678
- if (mmlDocument.rotation) {
1679
- remoteDocument.setAttribute("rx", mmlDocument.rotation.x.toString());
1680
- remoteDocument.setAttribute("ry", mmlDocument.rotation.y.toString());
1681
- remoteDocument.setAttribute("rz", mmlDocument.rotation.z.toString());
1682
- } else {
1683
- remoteDocument.setAttribute("rx", "0");
1684
- remoteDocument.setAttribute("ry", "0");
1685
- remoteDocument.setAttribute("rz", "0");
1686
- }
1687
- if (((_a = mmlDocument.scale) == null ? void 0 : _a.x) !== void 0) {
1688
- remoteDocument.setAttribute("sx", mmlDocument.scale.x.toString());
1689
- } else {
1690
- remoteDocument.setAttribute("sx", "1");
1691
- }
1692
- if (((_b = mmlDocument.scale) == null ? void 0 : _b.y) !== void 0) {
1693
- remoteDocument.setAttribute("sy", mmlDocument.scale.y.toString());
1694
- } else {
1695
- remoteDocument.setAttribute("sy", "1");
1696
- }
1697
- if (((_c = mmlDocument.scale) == null ? void 0 : _c.z) !== void 0) {
1698
- remoteDocument.setAttribute("sz", mmlDocument.scale.z.toString());
1699
- } else {
1700
- remoteDocument.setAttribute("sz", "1");
1701
- }
1702
- return mmlNetworkSource;
1703
- }
1704
- setMMLDocuments(mmlDocuments) {
1705
- const newMMLDocuments = {};
1706
- for (const [key, mmlDocConfig] of Object.entries(mmlDocuments)) {
1707
- let existing = this.mmlDocumentStates[key];
1708
- if (existing && (existing.config.url !== mmlDocConfig.url || existing.config.passAuthToken !== mmlDocConfig.passAuthToken)) {
1709
- existing.dispose();
1710
- existing = void 0;
1711
- }
1712
- if (!existing) {
1713
- newMMLDocuments[key] = this.createMMLDocument(mmlDocConfig);
1714
- } else {
1715
- delete this.mmlDocumentStates[key];
1716
- this.updateMMLDocumentAttributes(existing.source, mmlDocConfig);
1717
- newMMLDocuments[key] = existing;
1718
- }
1719
- }
1720
- for (const element of Object.values(this.mmlDocumentStates)) {
1721
- element.dispose();
1722
- }
1723
- this.mmlDocumentStates = newMMLDocuments;
1595
+ (_b = this.errorScreen) == null ? void 0 : _b.dispose();
1724
1596
  }
1725
1597
  };
1726
1598
  export {