index.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <!--
  2. The MIT License (MIT)
  3. Copyright (c) 2014-2018 Nikolai Suslov and the Krestianstvo.org project contributors. (https://github.com/NikolaySuslov/livecodingspace/blob/master/LICENSE.md)
  4. -->
  5. <!DOCTYPE html>
  6. <html lang="en">
  7. <head>
  8. <meta charset="utf-8">
  9. <!-- <meta name="viewport" content="initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> -->
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  11. <title>Live Coding Space 0.2</title>
  12. <!-- <script type="text/javascript" src="/lib/page.js"></script> -->
  13. <script type="text/javascript" src="/lib/yamljs/dist/yaml.js"></script>
  14. <script type="text/javascript" src="/lib/compatibilitycheck.js"></script>
  15. <script type="text/javascript" src="/lib/socket.io/socket.io.js"></script>
  16. <!-- <script type="text/javascript" src="socket.io-sessionid-patch.js"></script> -->
  17. <script src="/vwf/view/webrtc/adapter-latest.js"></script>
  18. <script src="/lib/gundb/gun.js"></script>
  19. <script src="/lib/gundb/sea.js"></script>
  20. <script src="/lib/gundb/lib/then.js"></script>
  21. <script src="/lib/gundb/lib/path.js"></script>
  22. <script src="/lib/gundb/lib/not.js"></script>
  23. <script src="/lib/gundb/lib/open.js"></script>
  24. <script src="/lib/gundb/lib/load.js"></script>
  25. <script src="/lib/gundb/lib/promise.js"></script>
  26. <script src="/lib/gundb/lib/time.js"></script>
  27. <script src="/lib/gundb/lib/bye.js"></script>
  28. <script src="/lib/gundb/lib/webrtc.js"></script>
  29. <script src="/lib/gundb/nts.js"></script>
  30. <script src="/lib/gundb/lib/radix.js"></script>
  31. <script src="/lib/gundb/lib/radisk.js"></script>
  32. <script src="/lib/gundb/lib/store.js"></script>
  33. <script src="/lib/gundb/lib/rindexed.js"></script>
  34. <!-- <script src="/gun/as.js"></script>
  35. <script src="/gun/nts.js"></script> -->
  36. <script type="text/javascript" src="/lib/cell.js"></script>
  37. <script type="text/javascript" src="/lib/he.js"></script>
  38. <!-- signals for AR.js
  39. <script type="text/javascript" src="/lib/signals/signals.min.js"></script> -->
  40. <script type="text/javascript" src="/lib/draggabilly/draggabilly.pkgd.js"></script>
  41. <script type="text/javascript" src="/lib/screenfull/screenfull.min.js"></script>
  42. <link href="/lib/noty/noty.css" rel="stylesheet">
  43. <link href="/lib/noty/themes/mint.css" rel="stylesheet">
  44. <script type="text/javascript" src="/lib/noty/noty.js"></script>
  45. <script type="text/javascript" src="/lib/polyglot/polyglot.min.js"></script>
  46. <!-- <script type="text/javascript" src="/vwf/view/lib/polyglot/language.js"></script> -->
  47. <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
  48. <link rel="stylesheet" href="/lib/mdc/dist/material-components-web.min.css">
  49. <script src="/lib/mdc/dist/material-components-web.min.js"></script>
  50. <!-- <link rel="stylesheet" href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css">
  51. <script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script> -->
  52. <script type="text/javascript" src="/vwf/model/aframe/addon/virtualgc/nipplejs.js"></script>
  53. <link rel="stylesheet" type="text/css" href="/vwf/model/aframe/addon/virtualgc/virtual-gamepad-controls.css" />
  54. <script type="text/javascript" src="/lib/lively.vm_standalone.js"></script>
  55. <script type="text/javascript" src="/lib/async/async.min.js"></script>
  56. <script type="text/javascript" src="/lib/require.js"></script>
  57. <script type="text/javascript" src="/lib/crypto.js"></script>
  58. <script type="text/javascript" src="/lib/md5.js"></script>
  59. <script type="text/javascript" src="/lib/alea.js"></script>
  60. <script type="text/javascript" src="/lib/mash.js"></script>
  61. <script type="text/javascript" src="/lib/ace/ace.js"></script>
  62. <script type="text/javascript" src="/lib/closure/base.js"></script>
  63. <script type="text/javascript">goog.require('goog.vec.Vec2')</script>
  64. <script type="text/javascript">goog.require('goog.vec.Mat4')</script>
  65. <script type="text/javascript">goog.require('goog.vec.Quaternion')</script>
  66. <script type="text/javascript" src="/vwf.js"></script>
  67. <link rel="stylesheet" type="text/css" href="/lib/index.css" />
  68. <script type="module">
  69. //localStorage.clear();
  70. let oldGunStorage = localStorage.getItem('gun/');
  71. if(oldGunStorage){
  72. localStorage.removeItem('gun/');
  73. }
  74. import { App } from '/app.js';
  75. window.onload = new App;
  76. </script>
  77. </head>
  78. <body class="mdc-typography">
  79. <div id="load-progressbar" role="progressbar" class="mdc-linear-progress mdc-linear-progress--indeterminate loader visible">
  80. <div class="mdc-linear-progress__buffering-dots"></div>
  81. <div class="mdc-linear-progress__buffer"></div>
  82. <div class="mdc-linear-progress__bar mdc-linear-progress__primary-bar">
  83. <span class="mdc-linear-progress__bar-inner"></span>
  84. </div>
  85. <div class="mdc-linear-progress__bar mdc-linear-progress__secondary-bar">
  86. <span class="mdc-linear-progress__bar-inner"></span>
  87. </div>
  88. </div>
  89. <div id="incompatibleBrowser">
  90. <div>
  91. <span style="color:#3090C7;">
  92. <br/>
  93. <br/>Your browser does not support this app</span>
  94. </div>
  95. </div>
  96. <div id="vwf-root"></div>
  97. <div id="ui-controls" class="guiwindow">
  98. <i id="hideui" class="mdc-icon-button material-icons" role="button" aria-pressed="true" aria-label="Hide Toollbar" tabindex="0"
  99. data-toggle-on='{"label": "Hide", "content": "grid_on"}' data-toggle-off='{"label": "Show", "content": "grid_off"}'>
  100. grid_on
  101. </i>
  102. <i id="fullscreenui" class="mdc-icon-button material-icons" role="button" aria-pressed="true" aria-label="Hide Toollbar"
  103. tabindex="0" data-toggle-on='{"label": "Hide", "content": "fullscreen"}' data-toggle-off='{"label": "Show", "content": "fullscreen_exit"}'>
  104. fullscreen
  105. </i>
  106. </div>
  107. <script>
  108. mdc.autoInit();
  109. window.addEventListener("load", function (event) {
  110. console.log("All resources finished loading!");
  111. });
  112. const iconEl = document.querySelector('#hideui');
  113. const compHideUI = new mdc.iconButton.MDCIconButtonToggle(iconEl);
  114. iconEl.addEventListener('MDCIconButtonToggle:change', (e) => {
  115. let ui = document.querySelector('.mdc-top-app-bar');
  116. if (ui) {
  117. let chkAttr = e.detail.isOn;
  118. if (chkAttr) {
  119. ui.style.visibility = 'visible'
  120. } else {
  121. ui.style.visibility = 'hidden'
  122. }
  123. }
  124. });
  125. const fullScreenToggle = document.querySelector('#fullscreenui');
  126. const compfullScreen = new mdc.iconButton.MDCIconButtonToggle(fullScreenToggle);
  127. fullScreenToggle.addEventListener('MDCIconButtonToggle:change', (e) => {
  128. if (screenfull.enabled) {
  129. screenfull.toggle();
  130. } else {
  131. // Ignore or do something else
  132. }
  133. });
  134. </script>
  135. </body>
  136. </html>