threepipe
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

index.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  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(320px, 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. function selectTarget(target) {
  162. selected.classList.remove('selected');
  163. target.classList.add('selected');
  164. selected = target;
  165. iframe.src = target.href;
  166. sidebar.dataset.selectedExample = target.innerText;
  167. window.location.hash = "#" + target.getAttribute("href").slice(2);
  168. }
  169. links.forEach(link => {
  170. link.onclick = (ev) => {
  171. ev.preventDefault()
  172. const target = ev.target;
  173. selectTarget(target);
  174. }
  175. });
  176. const hash = window.location.hash.slice(1);
  177. if(hash){
  178. const target = document.querySelector(`a[href="./${hash}"]`);
  179. selectTarget(target || selected);
  180. }
  181. else selectTarget(selected);
  182. });
  183. </script>
  184. </head>
  185. <body>
  186. <div class="root-container">
  187. <div class="sidebar" data-selected-example="Tweakpane Editor">
  188. <button class="hamburger"> &#9776;</button>
  189. <h1><a href="https://github.com/repalash/threepipe">ThreePipe</a> Examples</h1>
  190. <h2 class="category">Editors</h2>
  191. <ul>
  192. <li><a class="selected" href="./tweakpane-editor/">Tweakpane Editor </a></li>
  193. </ul>
  194. <h2 class="category">Post-Processing</h2>
  195. <ul>
  196. <li><a href="./tonemap-plugin/">Tonemap Plugin </a></li>
  197. <li><a href="./frame-fade-plugin/">Frame Fade Plugin </a></li>
  198. </ul>
  199. <h2 class="category">Rendering</h2>
  200. <ul>
  201. <li><a href="./progressive-plugin/">Progressive Plugin </a></li>
  202. <li><a href="./depth-buffer-plugin/">Depth Buffer Plugin </a></li>
  203. <li><a href="./normal-buffer-plugin/">Normal Buffer Plugin </a></li>
  204. <li><a href="./custom-pipeline/">Custom Pipeline specification </a></li>
  205. </ul>
  206. <h2 class="category">Interaction</h2>
  207. <ul>
  208. <li><a href="./picking-plugin/">Picking (Selection) Plugin </a></li>
  209. <li><a href="./camera-view-plugin/">Camera View (Animation) Plugin </a></li>
  210. <li><a href="./dropzone-plugin/">Dropzone (Drag & Drop) Plugin </a></li>
  211. <li><a href="./fullscreen-plugin/">FullScreen Plugin </a></li>
  212. </ul>
  213. <h2 class="category">Import</h2>
  214. <ul>
  215. <li><a href="./fbx-load/">FBX Load </a></li>
  216. <li><a href="./obj-mtl-load/">OBJ MTL Load </a></li>
  217. <li><a href="./gltf-load/">GLTF Load </a></li>
  218. <li><a href="./rhino3dm-load/">Rhino 3DM Load </a></li>
  219. <li><a href="./drc-load/">DRACO(DRC) Load </a></li>
  220. <li><a href="./hdr-load/">HDR Load </a></li>
  221. <li><a href="./exr-load/">EXR Load </a></li>
  222. <li><a href="./image-load/">Image(png, jpeg, svg, ico, webp, avif) Load </a></li>
  223. <li><a href="./usdz-load/">USDZ, USDA Load </a></li>
  224. <li><a href="./ply-load/">PLY Load </a></li>
  225. <li><a href="./stl-load/">STL Load </a></li>
  226. <li><a href="./ktx2-load/">KTX2 Load </a></li>
  227. <li><a href="./ktx-load/">KTX Load </a></li>
  228. <li><a href="./blend-load/">BLEND Load </a></li>
  229. <li><a href="./extra-importer-plugins/">Extra(3ds, 3mf, collada, amf, bvh, vox, gcode, mdd, pcd, tilt, wrl, ldraw, vtk, xyz) Load </a></li>
  230. </ul>
  231. <h2 class="category">Export</h2>
  232. <ul>
  233. <li><a href="./image-snapshot-export/">PNG, JPEG, WEBP Export<br/>(Image Snapshot) </a></li>
  234. <li><a href="./render-target-export/">EXR, PNG, JPEG, WEBP Export<br/>(Render Target Export) </a></li>
  235. <li><a href="./glb-export/">GLB Export </a></li>
  236. <li><a href="./pmat-material-export/">PMAT Material export </a></li>
  237. </ul>
  238. <h2 class="category">UI Config</h2>
  239. <ul>
  240. <li><a href="./material-uiconfig/">Material UI </a></li>
  241. <li><a href="./object-uiconfig/">Object UI </a></li>
  242. <li><a href="./camera-uiconfig/">Camera UI </a></li>
  243. <li><a href="./scene-uiconfig/">Scene UI </a></li>
  244. <li><a href="./viewer-uiconfig/">Viewer UI </a></li>
  245. </ul>
  246. <h2 class="category">Animation</h2>
  247. <ul>
  248. <li><a href="./gltf-animation-plugin/">glTF Animation Plugin </a></li>
  249. <li><a href="./popmotion-plugin/">Popmotion Plugin </a></li>
  250. <li><a href="./gltf-camera-animation/">glTF Camera Animation </a></li>
  251. <li><a href="./gltf-animation-page-scroll/">glTF Animation Page Scroll </a></li>
  252. </ul>
  253. <h2 class="category">Utils</h2>
  254. <ul>
  255. <li><a href="./hdri-ground-plugin/">HDRi Ground Plugin <br/>(Projected Skybox)</a></li>
  256. <li><a href="./render-target-preview/">Render Target Preview Plugin </a></li>
  257. <li><a href="./geometry-uv-preview/">Geometry UV Preview Plugin </a></li>
  258. <li><a href="./parallel-asset-import/">Parallel Asset Import </a></li>
  259. <li><a href="./obj-to-glb/">Convert OBJ to GLB </a></li>
  260. <li><a href="./3dm-to-glb/">Convert 3DM to GLB </a></li>
  261. <li><a href="./hdr-to-exr/">Convert HDR to EXR </a></li>
  262. </ul>
  263. <h2 class="category">Samples</h2>
  264. <ul>
  265. <li><a href="./html-sample/">HTML/JS Sample </a></li>
  266. </ul>
  267. <h2 class="category">Lights</h2>
  268. <ul>
  269. <li><a href="./directional-light/">Directional Light </a></li>
  270. </ul>
  271. <h2 class="category">Tests</h2>
  272. <ul>
  273. <li><a href="./multi-viewer-test/">Multiple Viewers Test </a></li>
  274. <li><a href="./gltf-transmission-test/">glTF Transmission Test </a></li>
  275. <li><a href="./gltf-transmission-test-msaa/">glTF Transmission Test + MSAA </a></li>
  276. <li><a href="./uint8-rgbm-hdr-test/">Uint8 RGBM HDR Test </a></li>
  277. <li><a href="./half-float-hdr-test/">Half-float HDR Test </a></li>
  278. <li><a href="./sphere-rgbm-test/">RGBM Test </a></li>
  279. <li><a href="./sphere-half-float-test/">Half Float Test </a></li>
  280. <li><a href="./sphere-msaa-test/">MSAA Test </a></li>
  281. <li><a href="./z-prepass/">Z-Prepass Test </a></li>
  282. <li><a href="./import-test/">Import Test</a></li>
  283. </ul>
  284. </div>
  285. <div class="iframe-container">
  286. <iframe id="example-iframe" src="./tweakpane-editor/" frameborder="0" allowfullscreen="allowfullscreen"
  287. 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 *">
  288. </iframe>
  289. </div>
  290. </div>
  291. </body>