index.html 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <!DOCTYPE html>
  2. <!--
  3. The MIT License (MIT)
  4. Copyright (c) 2017 Nikolai Suslov
  5. LiveCoding.space
  6. Permission is hereby granted, free of charge, to any person obtaining a copy
  7. of this software and associated documentation files (the "Software"), to deal
  8. in the Software without restriction, including without limitation the rights
  9. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. copies of the Software, and to permit persons to whom the Software is
  11. furnished to do so, subject to the following conditions:
  12. The above copyright notice and this permission notice shall be included in all
  13. copies or substantial portions of the Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  20. SOFTWARE.
  21. -->
  22. <!-- Copyright 2012 United States Government, as represented by the Secretary of Defense, Under -->
  23. <!-- Secretary of Defense (Personnel & Readiness). -->
  24. <!-- -->
  25. <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file -->
  26. <!-- except in compliance with the License. You may obtain a copy of the License at -->
  27. <!-- -->
  28. <!-- http://www.apache.org/licenses/LICENSE-2.0 -->
  29. <!-- -->
  30. <!-- Unless required by applicable law or agreed to in writing, software distributed under the -->
  31. <!-- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -->
  32. <!-- either express or implied. See the License for the specific language governing permissions -->
  33. <!-- and limitations under the License. -->
  34. <html>
  35. <!-- The Virtual World Framework client is a collection of scripts and a world specification -->
  36. <!-- passed to an initialization call. In this sample, the world specification is provided -->
  37. <!-- inline for clarity, but it is normally provided by the reflector or may be specified as a -->
  38. <!-- URI and loaded from a network-visible location. -->
  39. <head>
  40. <title>Virtual World Framework</title>
  41. <link rel="icon" type="image/x-icon" href="favicon.ico" />
  42. <meta name="viewport" content="initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  43. <script type="text/javascript" src="compatibilitycheck.js"></script>
  44. <script type="text/javascript" src="socket.io/socket.io.js"></script>
  45. <!-- <script type="text/javascript" src="socket.io-sessionid-patch.js"></script> -->
  46. <script src="vwf/view/webrtc/adapter-latest.js"></script>
  47. <script type="text/javascript" src="vwf/view/lib/cell.js"></script>
  48. <script type="text/javascript" src="vwf/view/lib/he.js"></script>
  49. <script type="text/javascript" src="vwf/view/lib/draggabilly.pkgd.js"></script>
  50. <script type="text/javascript" src="js/screenfull.min.js"></script>
  51. <script type="text/javascript" src="vwf/view/lib/polyglot/polyglot.min.js"></script>
  52. <script type="text/javascript" src="vwf/view/lib/polyglot/language.js"></script>
  53. <link rel="stylesheet" href="vwf/view/lib/mdc/dist/material-components-web.css">
  54. <script src="vwf/view/lib/mdc/dist/material-components-web.js"></script>
  55. <script type="text/javascript" src="async/async.min.js"></script>
  56. <script type="text/javascript" src="require.js"></script>
  57. <script type="text/javascript" src="crypto.js"></script>
  58. <script type="text/javascript" src="md5.js"></script>
  59. <script type="text/javascript" src="alea.js"></script>
  60. <script type="text/javascript" src="mash.js"></script>
  61. <!-- <script type="text/javascript" src="Class.create.js"></script>
  62. <script type="text/javascript" src="rAF.js"></script>
  63. <script type="text/javascript" src="performance.now-polyfill.js"></script> -->
  64. <!-- This is the main client library. vwf.js creates a framework manager and attaches it to -->
  65. <!-- the global window object as window.vwf. All access to the framework is through that -->
  66. <!-- reference, and no other objects are globally visible. -->
  67. <script type="text/javascript" src="vwf.js"></script>
  68. <!-- The core framework manages the simulation and synchronizes it across worlds shared by -->
  69. <!-- multiple users. But, the manner in which the simulation is expressed is controlled by -->
  70. <!-- extension modules. There are two flavors. Models directly control the simulation but -->
  71. <!-- cannot accept external input. The model configuration is identical for all participants -->
  72. <!-- in a shared world. Views may accept external input -such as pointer and key events or -->
  73. <!-- directives from a connection to an outside engine that is not visible to all users- but -->
  74. <!-- may only affect the simulation indirectly through the synchronization server. -->
  75. <script type="text/javascript">
  76. // Users can specify which libraries the application will load by adding parameters to the URL.
  77. // Model libraries are specified as a query parameter and view libraries as a hash fragment.
  78. var userLibraries = { model: {}, view: {} };
  79. var application;
  80. window._LangManager = new Lang;
  81. _LangManager.setLanguage().then(res => {
  82. vwf.loadConfiguration(application, userLibraries, compatibilityCheck);
  83. })
  84. </script>
  85. <!-- This is the common view implementation and an example view that summarizes the -->
  86. <!-- simulation state in HTML on the main page. -->
  87. <link rel="stylesheet" type="text/css" href="index.css" />
  88. <!-- Global Site Tag (gtag.js) - Google Analytics -->
  89. <script async src="https://www.googletagmanager.com/gtag/js?id=UA-11815598-9"></script>
  90. <script>
  91. window.dataLayer = window.dataLayer || [];
  92. function gtag() { dataLayer.push(arguments) };
  93. gtag('js', new Date());
  94. gtag('config', 'UA-11815598-9');
  95. </script>
  96. </head>
  97. <body class="mdc-typography">
  98. <!-- Generic clients may have nearly empty pages, but pages for custom clients may be laid -->
  99. <!-- out in any manner desired. Any view and models that render to the page should be -->
  100. <!-- instructed where to attach their content. -->
  101. <!-- The main content renders to "#vwf-root", the item with the id "vwf-root". -->
  102. <!-- The loading spinner
  103. <div id="vwf-loading-spinner" class="pace pace-active">
  104. <div class="pace-activity"></div>
  105. </div> -->
  106. <div id="load-progressbar" role="progressbar" class="mdc-linear-progress mdc-linear-progress--indeterminate loader visible">
  107. <div class="mdc-linear-progress__buffering-dots"></div>
  108. <div class="mdc-linear-progress__buffer"></div>
  109. <div class="mdc-linear-progress__bar mdc-linear-progress__primary-bar">
  110. <span class="mdc-linear-progress__bar-inner"></span>
  111. </div>
  112. <div class="mdc-linear-progress__bar mdc-linear-progress__secondary-bar">
  113. <span class="mdc-linear-progress__bar-inner"></span>
  114. </div>
  115. </div>
  116. <div id="incompatibleBrowser">
  117. <div>
  118. <span style="color:#3090C7;">
  119. <br/>
  120. <br/>Your browser does not support this app</span>
  121. </div>
  122. </div>
  123. <div id="vwf-root"></div>
  124. <div id="ui-controls" class="guiwindow">
  125. <i id="hideui" class="mdc-icon-toggle material-icons" role="button" aria-pressed="true" aria-label="Hide Toollbar" tabindex="0"
  126. data-toggle-on='{"label": "Hide", "content": "grid_on"}' data-toggle-off='{"label": "Show", "content": "grid_off"}'>
  127. grid_on
  128. </i>
  129. <i id="fullscreenui" class="mdc-icon-toggle material-icons" role="button" aria-pressed="true" aria-label="Hide Toollbar"
  130. tabindex="0" data-toggle-on='{"label": "Hide", "content": "fullscreen"}' data-toggle-off='{"label": "Show", "content": "fullscreen_exit"}'>
  131. fullscreen
  132. </i>
  133. </div>
  134. <script>
  135. mdc.autoInit();
  136. window.addEventListener("load", function (event) {
  137. console.log("All resources finished loading!");
  138. });
  139. const iconEl = document.querySelector('#hideui');
  140. iconEl.addEventListener('MDCIconToggle:change', (e) => {
  141. let ui = document.querySelector('.mdc-toolbar');
  142. if (ui) {
  143. let chkAttr = e.detail.isOn;
  144. if (chkAttr) {
  145. ui.style.visibility = 'visible'
  146. } else {
  147. ui.style.visibility = 'hidden'
  148. }
  149. }
  150. });
  151. const fullScreenToggle = document.querySelector('#fullscreenui');
  152. fullScreenToggle.addEventListener('MDCIconToggle:change', (e) => {
  153. if (screenfull.enabled) {
  154. screenfull.toggle();
  155. } else {
  156. // Ignore or do something else
  157. }
  158. });
  159. </script>
  160. </body>
  161. </html>