index.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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.min.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/webrtc.js"></script>
  27. <script src="/lib/gundb/lib/radix.js"></script>
  28. <script src="/lib/gundb/lib/radisk.js"></script>
  29. <script src="/lib/gundb/lib/store.js"></script>
  30. <script src="/lib/gundb/lib/rindexed.js"></script>
  31. <!-- <script src="/gun/as.js"></script>
  32. <script src="/gun/nts.js"></script> -->
  33. <script type="text/javascript" src="/lib/cell.js"></script>
  34. <script type="text/javascript" src="/lib/he.js"></script>
  35. <!-- signals for AR.js
  36. <script type="text/javascript" src="/lib/signals/signals.min.js"></script> -->
  37. <script type="text/javascript" src="/lib/draggabilly/draggabilly.pkgd.js"></script>
  38. <script type="text/javascript" src="/lib/screenfull/screenfull.min.js"></script>
  39. <link href="/lib/noty/noty.css" rel="stylesheet">
  40. <link href="/lib/noty/themes/mint.css" rel="stylesheet">
  41. <script type="text/javascript" src="/lib/noty/noty.js"></script>
  42. <script type="text/javascript" src="/lib/polyglot/polyglot.min.js"></script>
  43. <!-- <script type="text/javascript" src="/vwf/view/lib/polyglot/language.js"></script> -->
  44. <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
  45. <link rel="stylesheet" href="/lib/mdc/dist/material-components-web.min.css">
  46. <script src="/lib/mdc/dist/material-components-web.min.js"></script>
  47. <!-- <link rel="stylesheet" href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css">
  48. <script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script> -->
  49. <script type="text/javascript" src="/vwf/model/aframe/addon/virtualgc/nipplejs.js"></script>
  50. <link rel="stylesheet" type="text/css" href="/vwf/model/aframe/addon/virtualgc/virtual-gamepad-controls.css" />
  51. <script type="text/javascript" src="/lib/lively.vm_standalone.js"></script>
  52. <script type="text/javascript" src="/lib/async/async.min.js"></script>
  53. <script type="text/javascript" src="/lib/require.js"></script>
  54. <script type="text/javascript" src="/lib/crypto.js"></script>
  55. <script type="text/javascript" src="/lib/md5.js"></script>
  56. <script type="text/javascript" src="/lib/alea.js"></script>
  57. <script type="text/javascript" src="/lib/mash.js"></script>
  58. <script type="text/javascript" src="/lib/ace/ace.js"></script>
  59. <script type="text/javascript" src="/lib/closure/base.js"></script>
  60. <script type="text/javascript">goog.require('goog.vec.Vec2')</script>
  61. <script type="text/javascript">goog.require('goog.vec.Mat4')</script>
  62. <script type="text/javascript">goog.require('goog.vec.Quaternion')</script>
  63. <script type="text/javascript" src="/vwf.js"></script>
  64. <link rel="stylesheet" type="text/css" href="/lib/index.css" />
  65. <script type="module">
  66. //localStorage.clear();
  67. let oldGunStorage = localStorage.getItem('gun/');
  68. if(oldGunStorage){
  69. localStorage.removeItem('gun/');
  70. }
  71. import { App } from '/app.js';
  72. window.onload = new App;
  73. </script>
  74. </head>
  75. <body class="mdc-typography">
  76. <div id="load-progressbar" role="progressbar" class="mdc-linear-progress mdc-linear-progress--indeterminate loader visible">
  77. <div class="mdc-linear-progress__buffering-dots"></div>
  78. <div class="mdc-linear-progress__buffer"></div>
  79. <div class="mdc-linear-progress__bar mdc-linear-progress__primary-bar">
  80. <span class="mdc-linear-progress__bar-inner"></span>
  81. </div>
  82. <div class="mdc-linear-progress__bar mdc-linear-progress__secondary-bar">
  83. <span class="mdc-linear-progress__bar-inner"></span>
  84. </div>
  85. </div>
  86. <div id="incompatibleBrowser">
  87. <div>
  88. <span style="color:#3090C7;">
  89. <br/>
  90. <br/>Your browser does not support this app</span>
  91. </div>
  92. </div>
  93. <div id="vwf-root"></div>
  94. <div id="ui-controls" class="guiwindow">
  95. <i id="hideui" class="mdc-icon-button material-icons" role="button" aria-pressed="true" aria-label="Hide Toollbar" tabindex="0"
  96. data-toggle-on='{"label": "Hide", "content": "grid_on"}' data-toggle-off='{"label": "Show", "content": "grid_off"}'>
  97. grid_on
  98. </i>
  99. <i id="fullscreenui" class="mdc-icon-button material-icons" role="button" aria-pressed="true" aria-label="Hide Toollbar"
  100. tabindex="0" data-toggle-on='{"label": "Hide", "content": "fullscreen"}' data-toggle-off='{"label": "Show", "content": "fullscreen_exit"}'>
  101. fullscreen
  102. </i>
  103. </div>
  104. <script>
  105. mdc.autoInit();
  106. window.addEventListener("load", function (event) {
  107. console.log("All resources finished loading!");
  108. });
  109. const iconEl = document.querySelector('#hideui');
  110. const compHideUI = new mdc.iconButton.MDCIconButtonToggle(iconEl);
  111. iconEl.addEventListener('MDCIconButtonToggle:change', (e) => {
  112. let ui = document.querySelector('.mdc-top-app-bar');
  113. if (ui) {
  114. let chkAttr = e.detail.isOn;
  115. if (chkAttr) {
  116. ui.style.visibility = 'visible'
  117. } else {
  118. ui.style.visibility = 'hidden'
  119. }
  120. }
  121. });
  122. const fullScreenToggle = document.querySelector('#fullscreenui');
  123. const compfullScreen = new mdc.iconButton.MDCIconButtonToggle(fullScreenToggle);
  124. fullScreenToggle.addEventListener('MDCIconButtonToggle:change', (e) => {
  125. if (screenfull.enabled) {
  126. screenfull.toggle();
  127. } else {
  128. // Ignore or do something else
  129. }
  130. });
  131. </script>
  132. </body>
  133. </html>