@mml-io/3d-web-experience-client 0.25.0 → 0.26.0
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/Networked3dWebExperienceClient.d.ts +28 -40
- package/build/Networked3dWebExperienceClient.d.ts.map +1 -1
- package/build/index.css +104 -104
- package/build/index.css.map +1 -1
- package/build/index.js +223 -351
- package/build/index.js.map +3 -3
- package/package.json +7 -7
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-f6c39ca8d32b92c0b3e90804c6ccc949__']=".AvatarSelectionUIComponent-module__menuButton_VjZ7cq__0260{z-index:102;user-select:none;width:70px;min-height:70px;position:absolute;top:0;right:0}.AvatarSelectionUIComponent-module__input_VjZ7cq__0260{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__0260:focus{background-color:#0009;border-color:#fff6;box-shadow:0 0 0 3px #ffffff26}.AvatarSelectionUIComponent-module__input_VjZ7cq__0260::placeholder{color:#ffffff80}.AvatarSelectionUIComponent-module__closeButton_VjZ7cq__0260{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__0260:hover{color:#ffffffe6;background:#000c;transform:scale(1.05)}.AvatarSelectionUIComponent-module__closeButton_VjZ7cq__0260:active{transform:scale(.95)}.AvatarSelectionUIComponent-module__openTab_VjZ7cq__0260{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__0260:hover{background:#000c;transform:scale(1.05)}.AvatarSelectionUIComponent-module__openTab_VjZ7cq__0260:active{transform:scale(.95)}.AvatarSelectionUIComponent-module__openTab_VjZ7cq__0260 img{filter:invert(80%);width:24px;height:24px;transition:all .2s ease-in-out}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0260{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__0260::-webkit-scrollbar{width:8px}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0260::-webkit-scrollbar-track{background:none}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0260::-webkit-scrollbar-thumb{background:#fff3;border:1px solid #ffffff1a;border-radius:4px}.AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0260::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.AvatarSelectionUIComponent-module__avatarSelectionSection_VjZ7cq__0260{border-bottom:1px solid #ffffff26;padding:10px}.AvatarSelectionUIComponent-module__avatarSelectionSection_VjZ7cq__0260:last-child{border-bottom:none}.AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0260{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__0260::-webkit-scrollbar{width:6px}.AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0260::-webkit-scrollbar-track{background:none}.AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0260::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:3px}.AvatarSelectionUIComponent-module__avatarSelectionUiHeader_VjZ7cq__0260{color:#ffffffe6;text-align:center;font-weight:600;position:relative}.AvatarSelectionUIComponent-module__avatarSelectionUiCloseButton_VjZ7cq__0260{position:absolute;top:20px;right:20px}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0260{color:#ffffffe6;text-align:center;cursor:pointer;border-radius:8px;padding:4px;transition:all .2s ease-in-out}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0260:hover{background:#0000004d;transform:translateY(-2px)}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImgContainer_VjZ7cq__0260{border-radius:8px;position:relative;overflow:hidden}.AvatarSelectionUIComponent-module__avatarSelectionNoImage_VjZ7cq__0260{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__0260 img{filter:invert(70%);opacity:.7;width:40%}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0260 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__0260{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__0260 p:hover+.AvatarSelectionUIComponent-module__tooltipText_VjZ7cq__0260{opacity:1;visibility:visible;transition-delay:.5s}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImgContainer_VjZ7cq__0260 .AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImage_VjZ7cq__0260{aspect-ratio:1;border-radius:8px;width:100%;transition:all .2s ease-in-out}.AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0260{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__0260 .AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0260{z-index:2;position:absolute;top:4px;right:4px}.AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0260 img:hover{opacity:.8;transform:scale(1.05)}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260{color:#ffffffe6;border-bottom:1px solid #ffffff26;padding:10px;position:relative}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260:last-child{border-bottom:none}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260 .AvatarSelectionUIComponent-module__radioGroup_VjZ7cq__0260{flex-wrap:wrap;align-items:center;gap:4px;margin-bottom:8px;display:flex}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260 .AvatarSelectionUIComponent-module__radioItem_VjZ7cq__0260{white-space:nowrap;align-items:center;gap:3px;margin-right:6px;display:flex}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260 label{color:#fffc;cursor:pointer;margin:0;font-size:14px;font-weight:500;transition:color .2s ease-in-out}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260 label:hover{color:#fff}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260 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__0260 input[type=radio]:hover{border-color:#ffffff80}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260 input[type=radio]:focus{box-shadow:0 0 0 3px #ffffff1a}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260 input[type=radio]:checked{background:#ffffff1a;border-color:#fffc}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260 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__0260 input[type=radio][disabled]{opacity:.4;cursor:not-allowed}.AvatarSelectionUIComponent-module__customAvatarInputSection_VjZ7cq__0260{align-items:stretch;display:flex}.AvatarSelectionUIComponent-module__setButton_VjZ7cq__0260{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__0260: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__0260:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 4px #0003}.AvatarSelectionUIComponent-module__setButton_VjZ7cq__0260:disabled{opacity:.5;cursor:not-allowed;transform:none}.AvatarSelectionUIComponent-module__sectionHeading_VjZ7cq__0260{color:#ffffffe6;letter-spacing:-.01em;margin-bottom:8px;font-size:18px;font-weight:600}.AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260 .AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0260{margin-left:8px;position:relative;top:-2px}.AvatarSelectionUIComponent-module__displayNameSection_VjZ7cq__0260{color:#ffffffe6;border-bottom:1px solid #ffffff26;padding:10px;position:relative}.AvatarSelectionUIComponent-module__displayNameInputSection_VjZ7cq__0260{align-items:stretch;display:flex}.InputBox-module__inputWrapper_adOgOW__0260{pointer-events:all;align-items:stretch;gap:6px;display:flex}.InputBox-module__chatInput_adOgOW__0260{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__0260:focus{background:#0009;border-color:#fff6;box-shadow:0 0 0 3px #ffffff26}.InputBox-module__chatInput_adOgOW__0260::placeholder{color:#ffffff80}.InputBox-module__sendButton_adOgOW__0260{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__0260:hover{background:linear-gradient(135deg,#000c,#0009);border-color:#ffffff4d;transform:translateY(-1px);box-shadow:0 4px 8px #0000004d}.InputBox-module__sendButton_adOgOW__0260:active{transform:translateY(0);box-shadow:0 2px 4px #0003}.InputBox-module__sendButton_adOgOW__0260 .InputBox-module__svgIcon_adOgOW__0260 img{filter:invert(80%);width:18px;height:18px;transition:all .2s ease-in-out}.InputBox-module__sendButton_adOgOW__0260:hover .InputBox-module__svgIcon_adOgOW__0260 img{filter:invert(90%)}.Message-module__messageContainer_ikOQiq__0260{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__0260:hover{background:#0006;border-color:#ffffff4d}.Message-module__userName_ikOQiq__0260{color:#ffffffe6;margin-right:4px;font-weight:600}.Messages-module__messagesContainer_LXaUUW__0260{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__0260::-webkit-scrollbar{width:6px}.Messages-module__messagesContainer_LXaUUW__0260::-webkit-scrollbar-track{background:none}.Messages-module__messagesContainer_LXaUUW__0260::-webkit-scrollbar-thumb{background:#fff3;border:1px solid #ffffff1a;border-radius:3px}.Messages-module__messagesContainer_LXaUUW__0260::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.Messages-module__newMessagesButton_LXaUUW__0260{-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__0260:hover{background:#000000d9;border-color:#ffffff4d;transform:translate(-50%)translateY(-2px);box-shadow:0 6px 16px #0006}.Messages-module__newMessagesButton_LXaUUW__0260:active{transform:translate(-50%)translateY(0);box-shadow:0 2px 8px #0000004d}.TextChatUIComponent-module__uiHover_gFDdcW__0260{z-index:102;pointer-events:all;width:58px;min-height:58px;position:absolute;bottom:0;left:0}.TextChatUIComponent-module__textChatUi_gFDdcW__0260{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__0260{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__0260{opacity:1;transform:translate(0)}.TextChatUIComponent-module__fadeOut_gFDdcW__0260{opacity:.6;transform:translate(calc(-100% - 72px))}.TextChatUIComponent-module__controls_gFDdcW__0260{position:absolute;top:2px;right:0}.TextChatUIComponent-module__openTab_gFDdcW__0260{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__0260:hover{background:#000c;border-color:#ffffff4d;transform:scale(1.05)}.TextChatUIComponent-module__openTab_gFDdcW__0260:active{transform:scale(.95)}.TextChatUIComponent-module__openTab_gFDdcW__0260 img{filter:invert(80%);width:24px;height:24px;transition:all .2s ease-in-out}.TextChatUIComponent-module__stickyButton_gFDdcW__0260{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__0260:hover{background:#000c;border-color:#ffffff4d;transform:scale(1.05)}.TextChatUIComponent-module__stickyButtonFadeOut_gFDdcW__0260{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__0260{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__0260:hover{border-color:#22c55ecc;transform:scale(1.05);box-shadow:0 0 12px #22c55e66}.TextChatUIComponent-module__stickyButton_gFDdcW__0260 img,.TextChatUIComponent-module__stickyButtonFadeOut_gFDdcW__0260 img,.TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0260 img{filter:invert(70%);width:12px;height:12px;transition:all .2s ease-in-out}.TextChatUIComponent-module__stickyButton_gFDdcW__0260:hover img,.TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0260:hover img{filter:invert(90%)}.TextChatUIComponent-module__controls_gFDdcW__0260 .TextChatUIComponent-module__closeButton_gFDdcW__0260{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__0260:hover{color:#ffffffe6;background:#000c;border-color:#ffffff4d;transform:scale(1.05)}.TextChatUIComponent-module__closeButton_gFDdcW__0260:active{transform:scale(.95)}.TextChatUIComponent-module__messagesWrapper_gFDdcW__0260{direction:rtl;width:fit-content;max-height:450px;margin-bottom:8px;position:relative}.Networked3dWebExperience-module__respawnButton_7g9l0W__0260{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__0260:hover{background:linear-gradient(135deg,#000c,#0009);border-color:#ffffff4d;transform:translateY(-1px)}.Networked3dWebExperience-module__respawnButton_7g9l0W__0260:active{transform:translateY(0)}\n";globalThis['__css-digest-f6c39ca8d32b92c0b3e90804c6ccc949__']="f6c39ca8d32b92c0b3e90804c6ccc949";
|
|
2
2
|
// src/Networked3dWebExperienceClient.ts
|
|
3
3
|
import {
|
|
4
4
|
CameraManager,
|
|
5
|
-
CharacterManager,
|
|
6
|
-
CharacterModelLoader,
|
|
7
5
|
CollisionsManager,
|
|
8
|
-
Composer,
|
|
9
6
|
ErrorScreen,
|
|
10
|
-
|
|
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-
|
|
58
|
-
var digest = globalThis['__css-digest-
|
|
48
|
+
var content = globalThis['__css-content-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
49
|
+
var digest = globalThis['__css-digest-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
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-
|
|
85
|
-
"avatarSelectionNoImage": "AvatarSelectionUIComponent-
|
|
86
|
-
"avatarSelectionSection": "AvatarSelectionUIComponent-
|
|
87
|
-
"avatarSelectionUi": "AvatarSelectionUIComponent-
|
|
88
|
-
"avatarSelectionUiAvatar": "AvatarSelectionUIComponent-
|
|
89
|
-
"avatarSelectionUiAvatarImage": "AvatarSelectionUIComponent-
|
|
90
|
-
"avatarSelectionUiAvatarImgContainer": "AvatarSelectionUIComponent-
|
|
91
|
-
"avatarSelectionUiCloseButton": "AvatarSelectionUIComponent-
|
|
92
|
-
"avatarSelectionUiHeader": "AvatarSelectionUIComponent-
|
|
93
|
-
"closeButton": "AvatarSelectionUIComponent-
|
|
94
|
-
"customAvatarInputSection": "AvatarSelectionUIComponent-
|
|
95
|
-
"customAvatarSection": "AvatarSelectionUIComponent-
|
|
96
|
-
"displayNameInputSection": "AvatarSelectionUIComponent-
|
|
97
|
-
"displayNameSection": "AvatarSelectionUIComponent-
|
|
98
|
-
"input": "AvatarSelectionUIComponent-
|
|
99
|
-
"menuButton": "AvatarSelectionUIComponent-
|
|
100
|
-
"openTab": "AvatarSelectionUIComponent-
|
|
101
|
-
"radioGroup": "AvatarSelectionUIComponent-
|
|
102
|
-
"radioItem": "AvatarSelectionUIComponent-
|
|
103
|
-
"sectionHeading": "AvatarSelectionUIComponent-
|
|
104
|
-
"selectedPill": "AvatarSelectionUIComponent-
|
|
105
|
-
"setButton": "AvatarSelectionUIComponent-
|
|
106
|
-
"tooltipText": "AvatarSelectionUIComponent-
|
|
75
|
+
"avatarSelectionContainer": "AvatarSelectionUIComponent-module__avatarSelectionContainer_VjZ7cq__0260",
|
|
76
|
+
"avatarSelectionNoImage": "AvatarSelectionUIComponent-module__avatarSelectionNoImage_VjZ7cq__0260",
|
|
77
|
+
"avatarSelectionSection": "AvatarSelectionUIComponent-module__avatarSelectionSection_VjZ7cq__0260",
|
|
78
|
+
"avatarSelectionUi": "AvatarSelectionUIComponent-module__avatarSelectionUi_VjZ7cq__0260",
|
|
79
|
+
"avatarSelectionUiAvatar": "AvatarSelectionUIComponent-module__avatarSelectionUiAvatar_VjZ7cq__0260",
|
|
80
|
+
"avatarSelectionUiAvatarImage": "AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImage_VjZ7cq__0260",
|
|
81
|
+
"avatarSelectionUiAvatarImgContainer": "AvatarSelectionUIComponent-module__avatarSelectionUiAvatarImgContainer_VjZ7cq__0260",
|
|
82
|
+
"avatarSelectionUiCloseButton": "AvatarSelectionUIComponent-module__avatarSelectionUiCloseButton_VjZ7cq__0260",
|
|
83
|
+
"avatarSelectionUiHeader": "AvatarSelectionUIComponent-module__avatarSelectionUiHeader_VjZ7cq__0260",
|
|
84
|
+
"closeButton": "AvatarSelectionUIComponent-module__closeButton_VjZ7cq__0260",
|
|
85
|
+
"customAvatarInputSection": "AvatarSelectionUIComponent-module__customAvatarInputSection_VjZ7cq__0260",
|
|
86
|
+
"customAvatarSection": "AvatarSelectionUIComponent-module__customAvatarSection_VjZ7cq__0260",
|
|
87
|
+
"displayNameInputSection": "AvatarSelectionUIComponent-module__displayNameInputSection_VjZ7cq__0260",
|
|
88
|
+
"displayNameSection": "AvatarSelectionUIComponent-module__displayNameSection_VjZ7cq__0260",
|
|
89
|
+
"input": "AvatarSelectionUIComponent-module__input_VjZ7cq__0260",
|
|
90
|
+
"menuButton": "AvatarSelectionUIComponent-module__menuButton_VjZ7cq__0260",
|
|
91
|
+
"openTab": "AvatarSelectionUIComponent-module__openTab_VjZ7cq__0260",
|
|
92
|
+
"radioGroup": "AvatarSelectionUIComponent-module__radioGroup_VjZ7cq__0260",
|
|
93
|
+
"radioItem": "AvatarSelectionUIComponent-module__radioItem_VjZ7cq__0260",
|
|
94
|
+
"sectionHeading": "AvatarSelectionUIComponent-module__sectionHeading_VjZ7cq__0260",
|
|
95
|
+
"selectedPill": "AvatarSelectionUIComponent-module__selectedPill_VjZ7cq__0260",
|
|
96
|
+
"setButton": "AvatarSelectionUIComponent-module__setButton_VjZ7cq__0260",
|
|
97
|
+
"tooltipText": "AvatarSelectionUIComponent-module__tooltipText_VjZ7cq__0260"
|
|
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-
|
|
468
|
-
var digest2 = globalThis['__css-digest-
|
|
458
|
+
var content2 = globalThis['__css-content-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
459
|
+
var digest2 = globalThis['__css-digest-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
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-
|
|
495
|
-
"inputWrapper": "InputBox-
|
|
496
|
-
"sendButton": "InputBox-
|
|
497
|
-
"svgIcon": "InputBox-
|
|
485
|
+
"chatInput": "InputBox-module__chatInput_adOgOW__0260",
|
|
486
|
+
"inputWrapper": "InputBox-module__inputWrapper_adOgOW__0260",
|
|
487
|
+
"sendButton": "InputBox-module__sendButton_adOgOW__0260",
|
|
488
|
+
"svgIcon": "InputBox-module__svgIcon_adOgOW__0260"
|
|
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-
|
|
566
|
-
var digest3 = globalThis['__css-digest-
|
|
556
|
+
var content3 = globalThis['__css-content-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
557
|
+
var digest3 = globalThis['__css-digest-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
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-
|
|
593
|
-
"userName": "Message-
|
|
583
|
+
"messageContainer": "Message-module__messageContainer_ikOQiq__0260",
|
|
584
|
+
"userName": "Message-module__userName_ikOQiq__0260"
|
|
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-
|
|
650
|
-
var digest4 = globalThis['__css-digest-
|
|
640
|
+
var content4 = globalThis['__css-content-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
641
|
+
var digest4 = globalThis['__css-digest-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
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-
|
|
677
|
-
"newMessagesButton": "Messages-
|
|
667
|
+
"messagesContainer": "Messages-module__messagesContainer_LXaUUW__0260",
|
|
668
|
+
"newMessagesButton": "Messages-module__newMessagesButton_LXaUUW__0260"
|
|
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-
|
|
757
|
-
var digest5 = globalThis['__css-digest-
|
|
747
|
+
var content5 = globalThis['__css-content-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
748
|
+
var digest5 = globalThis['__css-digest-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
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-
|
|
784
|
-
"controls": "TextChatUIComponent-
|
|
785
|
-
"fadeIn": "TextChatUIComponent-
|
|
786
|
-
"fadeOut": "TextChatUIComponent-
|
|
787
|
-
"messagesWrapper": "TextChatUIComponent-
|
|
788
|
-
"openTab": "TextChatUIComponent-
|
|
789
|
-
"stickyButton": "TextChatUIComponent-
|
|
790
|
-
"stickyButtonEnabled": "TextChatUIComponent-
|
|
791
|
-
"stickyButtonFadeOut": "TextChatUIComponent-
|
|
792
|
-
"textChat": "TextChatUIComponent-
|
|
793
|
-
"textChatUi": "TextChatUIComponent-
|
|
794
|
-
"uiHover": "TextChatUIComponent-
|
|
774
|
+
"closeButton": "TextChatUIComponent-module__closeButton_gFDdcW__0260",
|
|
775
|
+
"controls": "TextChatUIComponent-module__controls_gFDdcW__0260",
|
|
776
|
+
"fadeIn": "TextChatUIComponent-module__fadeIn_gFDdcW__0260",
|
|
777
|
+
"fadeOut": "TextChatUIComponent-module__fadeOut_gFDdcW__0260",
|
|
778
|
+
"messagesWrapper": "TextChatUIComponent-module__messagesWrapper_gFDdcW__0260",
|
|
779
|
+
"openTab": "TextChatUIComponent-module__openTab_gFDdcW__0260",
|
|
780
|
+
"stickyButton": "TextChatUIComponent-module__stickyButton_gFDdcW__0260",
|
|
781
|
+
"stickyButtonEnabled": "TextChatUIComponent-module__stickyButtonEnabled_gFDdcW__0260",
|
|
782
|
+
"stickyButtonFadeOut": "TextChatUIComponent-module__stickyButtonFadeOut_gFDdcW__0260",
|
|
783
|
+
"textChat": "TextChatUIComponent-module__textChat_gFDdcW__0260",
|
|
784
|
+
"textChatUi": "TextChatUIComponent-module__textChatUi_gFDdcW__0260",
|
|
785
|
+
"uiHover": "TextChatUIComponent-module__uiHover_gFDdcW__0260"
|
|
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-
|
|
1013
|
-
var digest6 = globalThis['__css-digest-
|
|
1003
|
+
var content6 = globalThis['__css-content-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
1004
|
+
var digest6 = globalThis['__css-digest-f6c39ca8d32b92c0b3e90804c6ccc949__'];
|
|
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-
|
|
1030
|
+
"respawnButton": "Networked3dWebExperience-module__respawnButton_7g9l0W__0260"
|
|
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(
|
|
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.
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
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
|
|
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 = (
|
|
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.
|
|
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
|
-
|
|
1230
|
-
|
|
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,111 @@ var Networked3dWebExperienceClient = class {
|
|
|
1249
1215
|
this.spawnCharacter(spawnData);
|
|
1250
1216
|
}
|
|
1251
1217
|
});
|
|
1252
|
-
|
|
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
|
-
|
|
1257
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1291
|
+
lastUpdateTimeMs = 0;
|
|
1292
|
+
frameCounter = 0;
|
|
1288
1293
|
targetFPS = 60;
|
|
1289
1294
|
frameInterval = 1e3 / this.targetFPS;
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
this.scene.remove(this.groundPlane);
|
|
1298
|
-
this.groundPlane = null;
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1295
|
+
epochFramesRendered = 0;
|
|
1296
|
+
epochStartTimeMs = 0;
|
|
1297
|
+
cachedCameraTransform = {
|
|
1298
|
+
position: new Vect3(),
|
|
1299
|
+
rotation: { x: 0, y: 0, z: 0 },
|
|
1300
|
+
fov: 0
|
|
1301
|
+
};
|
|
1301
1302
|
updateConfig(config) {
|
|
1302
1303
|
this.config = {
|
|
1303
1304
|
...this.config,
|
|
1304
1305
|
...config
|
|
1305
1306
|
};
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1307
|
+
const rendererConfigUpdate = {};
|
|
1308
|
+
if (config.environmentConfiguration !== void 0) {
|
|
1309
|
+
rendererConfigUpdate.environmentConfiguration = config.environmentConfiguration;
|
|
1310
|
+
}
|
|
1311
|
+
if (config.postProcessingEnabled !== void 0) {
|
|
1312
|
+
rendererConfigUpdate.postProcessingEnabled = config.postProcessingEnabled;
|
|
1313
|
+
}
|
|
1314
|
+
if (config.enableTweakPane !== void 0) {
|
|
1315
|
+
rendererConfigUpdate.enableTweakPane = config.enableTweakPane;
|
|
1316
|
+
}
|
|
1317
|
+
if (Object.keys(rendererConfigUpdate).length > 0) {
|
|
1318
|
+
this.rendererConfig = {
|
|
1319
|
+
...this.rendererConfig,
|
|
1320
|
+
...rendererConfigUpdate
|
|
1321
|
+
};
|
|
1322
|
+
this.renderer.updateConfig(rendererConfigUpdate);
|
|
1309
1323
|
}
|
|
1310
1324
|
if (this.avatarSelectionUI) {
|
|
1311
1325
|
if (config.avatarConfiguration) {
|
|
@@ -1313,22 +1327,6 @@ var Networked3dWebExperienceClient = class {
|
|
|
1313
1327
|
}
|
|
1314
1328
|
this.avatarSelectionUI.updateAllowCustomDisplayName(config.allowCustomDisplayName || false);
|
|
1315
1329
|
}
|
|
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
1330
|
if (config.allowOrbitalCamera !== void 0) {
|
|
1333
1331
|
if (config.allowOrbitalCamera === false) {
|
|
1334
1332
|
this.keyInputManager.removeKeyBinding(Key.C);
|
|
@@ -1339,7 +1337,7 @@ var Networked3dWebExperienceClient = class {
|
|
|
1339
1337
|
this.keyInputManager.createKeyBinding(Key.C, () => {
|
|
1340
1338
|
if (document.activeElement === document.body) {
|
|
1341
1339
|
this.cameraManager.toggleFlyCamera();
|
|
1342
|
-
this.
|
|
1340
|
+
this.renderer.fitContainer();
|
|
1343
1341
|
}
|
|
1344
1342
|
});
|
|
1345
1343
|
}
|
|
@@ -1363,8 +1361,8 @@ var Networked3dWebExperienceClient = class {
|
|
|
1363
1361
|
this.respawnButton.remove();
|
|
1364
1362
|
this.respawnButton = null;
|
|
1365
1363
|
}
|
|
1366
|
-
if (config.mmlDocuments) {
|
|
1367
|
-
this.
|
|
1364
|
+
if (config.mmlDocuments !== void 0) {
|
|
1365
|
+
this.renderer.setMMLConfiguration(config.mmlDocuments, this.config.authToken ?? null);
|
|
1368
1366
|
}
|
|
1369
1367
|
}
|
|
1370
1368
|
static createFullscreenHolder() {
|
|
@@ -1433,21 +1431,6 @@ var Networked3dWebExperienceClient = class {
|
|
|
1433
1431
|
this.networkClient.updateUsername(displayName);
|
|
1434
1432
|
this.networkClient.updateCharacterDescription(characterDescription);
|
|
1435
1433
|
}
|
|
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
1434
|
handleChatMessage(fromUserId, message) {
|
|
1452
1435
|
if (this.textChatUI === null) {
|
|
1453
1436
|
return;
|
|
@@ -1462,7 +1445,7 @@ var Networked3dWebExperienceClient = class {
|
|
|
1462
1445
|
}
|
|
1463
1446
|
const username = user.username ?? `Unknown User ${fromUserId}`;
|
|
1464
1447
|
this.textChatUI.addTextMessage(username, message);
|
|
1465
|
-
this.
|
|
1448
|
+
this.renderer.addChatBubble(fromUserId, message);
|
|
1466
1449
|
}
|
|
1467
1450
|
}
|
|
1468
1451
|
connectToTextChat() {
|
|
@@ -1477,8 +1460,7 @@ var Networked3dWebExperienceClient = class {
|
|
|
1477
1460
|
const textChatUISettings = {
|
|
1478
1461
|
holderElement: this.canvasHolder,
|
|
1479
1462
|
sendMessageToServerMethod: (message) => {
|
|
1480
|
-
this.
|
|
1481
|
-
this.mmlCompositionScene.onChatMessage(message);
|
|
1463
|
+
this.renderer.onChatMessage(message);
|
|
1482
1464
|
this.networkClient.sendCustomMessage(
|
|
1483
1465
|
FROM_CLIENT_CHAT_MESSAGE_TYPE,
|
|
1484
1466
|
JSON.stringify({ message })
|
|
@@ -1515,53 +1497,60 @@ var Networked3dWebExperienceClient = class {
|
|
|
1515
1497
|
this.avatarSelectionUI.init();
|
|
1516
1498
|
}
|
|
1517
1499
|
update() {
|
|
1518
|
-
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1521
|
-
if (
|
|
1522
|
-
|
|
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
|
-
}
|
|
1500
|
+
const currentTimeMs = performance.now();
|
|
1501
|
+
const elapsedMs = currentTimeMs - this.lastUpdateTimeMs;
|
|
1502
|
+
let deltaTimeSeconds = elapsedMs / 1e3;
|
|
1503
|
+
if (deltaTimeSeconds > 0.1) {
|
|
1504
|
+
deltaTimeSeconds = 0.1;
|
|
1548
1505
|
}
|
|
1549
1506
|
this.currentRequestAnimationFrame = requestAnimationFrame(() => {
|
|
1550
1507
|
this.update();
|
|
1551
1508
|
});
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
const
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
} else {
|
|
1561
|
-
this.audioListener.position.copy(this.cameraManager.camera.position);
|
|
1562
|
-
this.audioListener.rotation.copy(this.cameraManager.camera.rotation);
|
|
1563
|
-
this.audioListener.updateMatrixWorld();
|
|
1509
|
+
if (this.epochStartTimeMs === 0) {
|
|
1510
|
+
this.epochStartTimeMs = currentTimeMs;
|
|
1511
|
+
}
|
|
1512
|
+
const timeSinceEpochStartMs = currentTimeMs - this.epochStartTimeMs;
|
|
1513
|
+
const idealFramesRendered = timeSinceEpochStartMs / this.frameInterval;
|
|
1514
|
+
const deltaFrames = this.epochFramesRendered - idealFramesRendered;
|
|
1515
|
+
if (deltaFrames > 0) {
|
|
1516
|
+
return;
|
|
1564
1517
|
}
|
|
1518
|
+
if (timeSinceEpochStartMs > 1e3) {
|
|
1519
|
+
this.epochStartTimeMs = currentTimeMs;
|
|
1520
|
+
this.epochFramesRendered = 0;
|
|
1521
|
+
}
|
|
1522
|
+
this.epochFramesRendered++;
|
|
1523
|
+
this.lastUpdateTimeMs = currentTimeMs;
|
|
1524
|
+
this.frameCounter++;
|
|
1525
|
+
const { updatedCharacterDescriptions, removedUserIds } = this.characterManager.update(
|
|
1526
|
+
deltaTimeSeconds,
|
|
1527
|
+
this.frameCounter
|
|
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
|
|
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
|
-
|
|
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.
|
|
1587
|
-
|
|
1588
|
-
|
|
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
|
|
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.
|
|
1608
|
-
this.
|
|
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
|
-
(
|
|
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 {
|