index.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <html lang="en">
  2. <head>
  3. <meta charset="UTF-8">
  4. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  5. <title>3D Tiles Loader: RealityCapture</title>
  6. <style>
  7. * {
  8. margin: 0;
  9. padding: 0;
  10. }
  11. body {
  12. width: 100vw;
  13. height: 100vh;
  14. overflow: hidden;
  15. }
  16. #canvas-parent {
  17. width: 100vw;
  18. height: 100vh;
  19. touch-action: none;
  20. }
  21. #guide {
  22. position: fixed;
  23. top: 0;
  24. right: 0;
  25. width: 300px;
  26. padding: 1rem 2rem;
  27. font-family:'Courier New', Courier, monospace;
  28. line-height: 1.2;
  29. background-color: white;
  30. color: black;
  31. }
  32. #guide p {
  33. margin-top: 10px;
  34. }
  35. #stats-widget {
  36. position: absolute;
  37. top: 70px;
  38. left: 10px;
  39. background-color: rgb(255 255 255 / 83%);
  40. padding: 10px;
  41. width: 300px;
  42. word-break: break-all;
  43. visibility: hidden;
  44. }
  45. #button {
  46. position: fixed;
  47. bottom: 16px;
  48. right: 16px;
  49. padding: 12px;
  50. border-radius: 50%;
  51. margin-bottom: 0px;
  52. background-color: #FFF;
  53. opacity: .9;
  54. z-index: 999;
  55. box-shadow: 0 0 4px rgb(0 0 0 / 15%);
  56. }
  57. @media (max-width:480px) {
  58. #guide, #stats-widget { display: none; }
  59. }
  60. </style>
  61. </head>
  62. <body>
  63. <div id='canvas-parent'></div>
  64. <div id="stats-widget"></div>
  65. <div id="guide">
  66. <span id="example-desc">
  67. <b>Freeman Alley, New York.</b> Captured using iPhone 12 Pro Max and processed via RealityCapture.
  68. </span>
  69. <p>Use arrow/WASD keys or mouse wheel/trackpad to move around, and click and drag to turn/rotate the camera.</p>
  70. <p>
  71. <u>Available URL parameters:</u>
  72. <ul>
  73. <li><b>tilesetUrl</b>: Load another tileset json.</li>
  74. <li><b>sse</b>: Change the maximum screen space error.</li>
  75. </ul>
  76. </p>
  77. </div>
  78. <script async src="https://ga.jspm.io/npm:es-module-shims@1.4.4/dist/es-module-shims.js"></script>
  79. <script type="importmap">
  80. {
  81. "imports": {
  82. "three": "https://cdn.skypack.dev/three@0.137.0",
  83. "three/examples/jsm/loaders/GLTFLoader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/GLTFLoader",
  84. "three/examples/jsm/loaders/DRACOLoader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/DRACOLoader",
  85. "three/examples/jsm/loaders/KTX2Loader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/KTX2Loader",
  86. "three/examples/jsm/libs/stats.module.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/libs/stats.module",
  87. "three/examples/jsm/controls/OrbitControls": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/controls/OrbitControls",
  88. "@probe.gl/stats" : "https://cdn.skypack.dev/@probe.gl/stats@3.3.1",
  89. "@probe.gl/stats-widget" : "https://cdn.skypack.dev/@probe.gl/stats-widget@3.5.0",
  90. "three-loader-3dtiles" : "../../../dist/three-loader-3dtiles.esm.js",
  91. "gsap": "https://cdn.skypack.dev/gsap@3.6.1",
  92. "three-story-controls" : "https://cdn.skypack.dev/three-story-controls@1.0.0"
  93. }
  94. }
  95. </script>
  96. <script src="js/App.js" type='module'></script>
  97. <a id="button" target="_blank" href="https://github.com/nytimes/three-loader-3dtiles/blob/master/examples/demos/realitycapture/index.html" title="View source code for demo" style=""><img src="../ic_code_black_24dp.svg"></a>
  98. </body>
  99. </html>