index.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <!DOCTYPE html>
  2. <!-- Copyright 2012 United States Government, as represented by the Secretary of Defense, Under -->
  3. <!-- Secretary of Defense (Personnel & Readiness). -->
  4. <!-- -->
  5. <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file -->
  6. <!-- except in compliance with the License. You may obtain a copy of the License at -->
  7. <!-- -->
  8. <!-- http://www.apache.org/licenses/LICENSE-2.0 -->
  9. <!-- -->
  10. <!-- Unless required by applicable law or agreed to in writing, software distributed under the -->
  11. <!-- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -->
  12. <!-- either express or implied. See the License for the specific language governing permissions -->
  13. <!-- and limitations under the License. -->
  14. <html>
  15. <!-- The Virtual World Framework client is a collection of scripts and a world specification -->
  16. <!-- passed to an initialization call. In this sample, the world specification is provided -->
  17. <!-- inline for clarity, but it is normally provided by the reflector or may be specified as a -->
  18. <!-- URI and loaded from a network-visible location. -->
  19. <head>
  20. <title>Virtual World Framework</title>
  21. <link rel="icon" type="image/x-icon" href="favicon.ico" />
  22. <meta name="viewport" content="initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  23. <script type="text/javascript" src="compatibilitycheck.js"></script>
  24. <script type="text/javascript" src="socket.io/socket.io.js"></script>
  25. <!-- <script type="text/javascript" src="socket.io-sessionid-patch.js"></script> -->
  26. <script src="vwf/view/webrtc/dist/adapter-latest.js"></script>
  27. <script type="text/javascript" src="vwf/view/lib/cell.js"></script>
  28. <script type="text/javascript" src="vwf/view/lib/he.js"></script>
  29. <script type="text/javascript" src="vwf/view/lib/draggabilly.pkgd.js"></script>
  30. <script type="text/javascript" src="js/screenfull.min.js"></script>
  31. <!-- <script type="text/javascript" src="vwf/view/lib/polyglot/polyglot.min.js"></script> -->
  32. <link rel="stylesheet" href="vwf/view/lib/mdc/dist/material-components-web.css">
  33. <script src="vwf/view/lib/mdc/dist/material-components-web.js"></script>
  34. <script type="text/javascript" src="require.js"></script>
  35. <script type="text/javascript" src="async.js"></script>
  36. <script type="text/javascript" src="crypto.js"></script>
  37. <script type="text/javascript" src="md5.js"></script>
  38. <script type="text/javascript" src="alea.js"></script>
  39. <script type="text/javascript" src="mash.js"></script>
  40. <script type="text/javascript" src="Class.create.js"></script>
  41. <script type="text/javascript" src="rAF.js"></script>
  42. <script type="text/javascript" src="performance.now-polyfill.js"></script>
  43. <!-- This is the main client library. vwf.js creates a framework manager and attaches it to -->
  44. <!-- the global window object as window.vwf. All access to the framework is through that -->
  45. <!-- reference, and no other objects are globally visible. -->
  46. <script type="text/javascript" src="vwf.js"></script>
  47. <!-- The core framework manages the simulation and synchronizes it across worlds shared by -->
  48. <!-- multiple users. But, the manner in which the simulation is expressed is controlled by -->
  49. <!-- extension modules. There are two flavors. Models directly control the simulation but -->
  50. <!-- cannot accept external input. The model configuration is identical for all participants -->
  51. <!-- in a shared world. Views may accept external input -such as pointer and key events or -->
  52. <!-- directives from a connection to an outside engine that is not visible to all users- but -->
  53. <!-- may only affect the simulation indirectly through the synchronization server. -->
  54. <script type="text/javascript">
  55. // Users can specify which libraries the application will load by adding parameters to the URL.
  56. // Model libraries are specified as a query parameter and view libraries as a hash fragment.
  57. var userLibraries = { model: {}, view: {} };
  58. var application;
  59. vwf.loadConfiguration(application, userLibraries, compatibilityCheck);
  60. </script>
  61. <!-- This is the common view implementation and an example view that summarizes the -->
  62. <!-- simulation state in HTML on the main page. -->
  63. <link rel="stylesheet" type="text/css" href="index.css" />
  64. <!-- Global Site Tag (gtag.js) - Google Analytics -->
  65. <script async src="https://www.googletagmanager.com/gtag/js?id=UA-11815598-9"></script>
  66. <script>
  67. window.dataLayer = window.dataLayer || [];
  68. function gtag() { dataLayer.push(arguments) };
  69. gtag('js', new Date());
  70. gtag('config', 'UA-11815598-9');
  71. </script>
  72. </head>
  73. <body class="mdc-typography">
  74. <!-- Generic clients may have nearly empty pages, but pages for custom clients may be laid -->
  75. <!-- out in any manner desired. Any view and models that render to the page should be -->
  76. <!-- instructed where to attach their content. -->
  77. <!-- The main content renders to "#vwf-root", the item with the id "vwf-root". -->
  78. <!-- The loading spinner -->
  79. <div id="vwf-loading-spinner" class="pace pace-active">
  80. <div class="pace-activity"></div>
  81. </div>
  82. <div id="incompatibleBrowser">
  83. <div>
  84. <span style="color:#3090C7;">
  85. <br/>
  86. <br/>Your browser does not support Virtual World Framework. Please review our
  87. <a href='https://virtual.wf/requirements.html'>requirements</a> for supported browser versions.</span>
  88. </div>
  89. </div>
  90. <div id="vwf-root"></div>
  91. <div id="ui-controls" class="guiwindow">
  92. <i id="hideui" class="mdc-icon-toggle material-icons" role="button" aria-pressed="true" aria-label="Hide Toollbar" tabindex="0"
  93. data-toggle-on='{"label": "Hide", "content": "grid_on"}' data-toggle-off='{"label": "Show", "content": "grid_off"}'>
  94. grid_on
  95. </i>
  96. <i id="fullscreenui" class="mdc-icon-toggle material-icons" role="button" aria-pressed="true" aria-label="Hide Toollbar" tabindex="0"
  97. data-toggle-on='{"label": "Hide", "content": "fullscreen"}' data-toggle-off='{"label": "Show", "content": "fullscreen_exit"}'>
  98. fullscreen
  99. </i>
  100. </div>
  101. <script>
  102. mdc.autoInit();
  103. window.addEventListener("load", function (event) {
  104. console.log("All resources finished loading!");
  105. });
  106. const iconEl = document.querySelector('#hideui');
  107. iconEl.addEventListener('MDCIconToggle:change', (e) => {
  108. let ui = document.querySelector('.mdc-toolbar');
  109. if (ui) {
  110. let chkAttr = e.detail.isOn;
  111. if (chkAttr) {
  112. ui.style.visibility = 'visible'
  113. } else {
  114. ui.style.visibility = 'hidden'
  115. }
  116. }
  117. });
  118. const fullScreenToggle = document.querySelector('#fullscreenui');
  119. fullScreenToggle.addEventListener('MDCIconToggle:change', (e) => {
  120. if (screenfull.enabled) {
  121. screenfull.toggle();
  122. } else {
  123. // Ignore or do something else
  124. }
  125. });
  126. </script>
  127. </body>
  128. </html>