threepipe
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>ThreePipe Examples</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1" />
  7. <style>
  8. html, body {
  9. width: 100%;
  10. height: 100%;
  11. margin: 0;
  12. padding: 0;
  13. overflow: hidden;
  14. font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
  15. }
  16. .root-container {
  17. display: flex;
  18. flex-direction: row;
  19. width: 100%;
  20. height: 100%;
  21. }
  22. .hamburger {
  23. position: absolute;
  24. background: transparent;
  25. border: none;
  26. top: 0.25rem;
  27. right: 0.5rem;
  28. font-size: 1.75rem;
  29. padding: 0.5rem;
  30. color: #bbb;
  31. }
  32. .hamburger:hover {
  33. color: #fff;
  34. }
  35. .sidebar {
  36. max-width: min(350px, 30%);
  37. height: 100%;
  38. background: #1a1a1c;
  39. color: #bbb;
  40. padding: 1rem 1rem;
  41. box-sizing: border-box;
  42. overflow-y: auto;
  43. display: flex;
  44. flex-direction: column;
  45. gap: 0.5rem;
  46. position: relative;
  47. }
  48. .sidebar h1 {
  49. color: #ddd;
  50. font-size: 1.5rem;
  51. margin: 0 3rem 1rem 0;
  52. font-weight: normal;
  53. padding: 0;
  54. }
  55. .sidebar h1 a {
  56. color: #58a6ff;
  57. text-decoration: none;
  58. }
  59. .sidebar h1 a:hover {
  60. color: #eee;
  61. }
  62. .sidebar h2 {
  63. font-size: 1.2rem;
  64. margin: 0 0 0.5rem 0.25rem;
  65. font-weight: normal;
  66. padding: 0;
  67. }
  68. .sidebar ul {
  69. font-size: 1rem;
  70. list-style: none;
  71. padding: 0 0 0 1rem;
  72. margin: 0 0 1rem;
  73. display: flex;
  74. flex-direction: column;
  75. font-weight: normal;
  76. gap: 0.6rem;
  77. }
  78. .sidebar ul li a {
  79. color: #58a6ff;
  80. text-underline-offset: 0.25rem;
  81. text-decoration: none;
  82. transition: color 0.25s ease-in-out;
  83. }
  84. .sidebar ul li a:hover {
  85. color: #eee;
  86. }
  87. .sidebar ul li a.selected {
  88. color: #fff;
  89. font-weight: bold;
  90. text-decoration: underline;
  91. }
  92. .iframe-container {
  93. flex: 1;
  94. height: 100%;
  95. overflow: hidden;
  96. }
  97. .iframe-container iframe {
  98. width: 100%;
  99. height: 100%;
  100. border: none;
  101. }
  102. .closed > ul {
  103. display: none;
  104. }
  105. .closed > h1 {
  106. display: none;
  107. }
  108. .closed > h2 {
  109. display: none;
  110. }
  111. .closed.sidebar{
  112. padding: 1.75rem;
  113. }
  114. .closed:before{
  115. content: attr(data-selected-example);
  116. position: absolute;
  117. top: 0;
  118. left: 0;
  119. height: 100%;
  120. width: 3.3rem;
  121. color: #58a6ff;
  122. font-size: 1.25rem;
  123. text-align: center;
  124. vertical-align: middle;
  125. line-height: 3.25rem;
  126. writing-mode: vertical-lr;
  127. text-orientation: upright;
  128. }
  129. @media only screen and (max-width: 768px) {
  130. .root-container {
  131. flex-direction: column;
  132. }
  133. .sidebar{
  134. max-width: 100%;
  135. height: auto;
  136. max-height: 50%;
  137. padding: 1rem;
  138. position: relative;
  139. }
  140. .hamburger{
  141. padding: 0.25rem;
  142. }
  143. .closed:before{
  144. width: 100%;
  145. height: 3rem;
  146. writing-mode: unset;
  147. text-orientation: unset;
  148. }
  149. }
  150. </style>
  151. <script>
  152. window.addEventListener('DOMContentLoaded', () => {
  153. const hamburger = document.querySelector('.hamburger');
  154. const sidebar = document.querySelector('.sidebar');
  155. hamburger.addEventListener('click', () => {
  156. sidebar.classList.toggle('closed');
  157. });
  158. const iframe = document.querySelector('#example-iframe');
  159. const links = document.querySelectorAll('li>a');
  160. let selected = document.querySelector('a.selected');
  161. links.forEach(link => {
  162. link.onclick = (ev) => {
  163. selected.classList.remove('selected');
  164. ev.target.classList.add('selected');
  165. selected = ev.target;
  166. iframe.src = ev.target.href;
  167. ev.preventDefault()
  168. sidebar.dataset.selectedExample = ev.target.innerText;
  169. }
  170. });
  171. });
  172. </script>
  173. </head>
  174. <body>
  175. <div class="root-container">
  176. <div class="sidebar" data-selected-example="GLTF Load">
  177. <button class="hamburger"> &#9776;</button>
  178. <h1><a href="https://github.com/repalash/threepipe">ThreePipe</a> Examples</h1>
  179. <h2 class="category">Plugins</h2>
  180. <ul>
  181. <li><a href="./depth-buffer-plugin">Depth Buffer Plugin </a></li>
  182. <li><a href="./render-target-preview">Render Target Preview </a></li>
  183. <li><a href="./dropzone-plugin">Dropzone (Drag & Drop) </a></li>
  184. </ul>
  185. <h2 class="category">Import/Export</h2>
  186. <ul>
  187. <li><a href="./fbx-load">FBX Load </a></li>
  188. <li><a href="./hdr-load">HDR Load </a></li>
  189. <li><a href="./obj-mtl-load">OBJ MTL Load </a></li>
  190. <li><a class="selected" href="./gltf-load">GLTF Load </a></li>
  191. <li><a href="./drc-load">DRACO(DRC) Load </a></li>
  192. <li><a href="./glb-export">GLB Export </a></li>
  193. <li><a href="./pmat-material-export">PMAT Material export </a></li>
  194. </ul>
  195. <h2 class="category">Rendering</h2>
  196. <ul>
  197. <li><a href="./custom-pipeline">Custom Pipeline specification </a></li>
  198. </ul>
  199. <h2 class="category">Utils</h2>
  200. <ul>
  201. <li><a href="./obj-to-glb">Convert OBJ to GLB </a></li>
  202. </ul>
  203. <h2 class="category">Tests</h2>
  204. <ul>
  205. <li><a href="./import-test">Import Test</a></li>
  206. <li><a href="./sphere-rgbm-test">Sphere RGBM Test </a></li>
  207. <li><a href="./sphere-half-float-test">Sphere Half Float Test </a></li>
  208. <li><a href="./sphere-msaa-test">Sphere MSAA Test </a></li>
  209. <li><a href="./z-prepass">Z-Prepass Test </a></li>
  210. </ul>
  211. </div>
  212. <div class="iframe-container">
  213. <iframe id="example-iframe" src="./gltf-load" frameborder="0" allowfullscreen="allowfullscreen"
  214. allow="accelerometer *; ambient-light-sensor *; autoplay *; camera *; clipboard-read *; clipboard-write *; encrypted-media *; fullscreen *; geolocation *; gyroscope *; magnetometer *; microphone *; midi *; payment *; picture-in-picture *; screen-wake-lock *; speaker *; sync-xhr *; usb *; web-share *; vibrate *; vr *">
  215. </iframe>
  216. </div>
  217. </div>
  218. </body>