index.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>three.js - documentation</title>
  6. <style>
  7. @font-face {
  8. font-family: 'inconsolata';
  9. src: url('files/inconsolata.woff') format('woff');
  10. font-weight: normal;
  11. font-style: normal;
  12. }
  13. html {
  14. height: 100%;
  15. }
  16. body {
  17. margin: 0;
  18. padding: 0;
  19. height: 100%;
  20. color: #555;
  21. font-family: 'inconsolata';
  22. font-size: 15px;
  23. overflow: hidden;
  24. }
  25. a {
  26. color: #2194CE;
  27. }
  28. #panel {
  29. position: fixed;
  30. width: 260px;
  31. height: 100%;
  32. overflow: auto;
  33. }
  34. #panel h1 {
  35. color: #444;
  36. font-size: 25px;
  37. margin-top: 25px;
  38. margin-left: 20px;
  39. }
  40. #panel h2 {
  41. color: #999;
  42. font-size: 16px;
  43. margin-top: 20px;
  44. margin-left: 20px;
  45. }
  46. #panel ul {
  47. list-style-type: none;
  48. padding: 0px;
  49. margin-left: 20px;
  50. }
  51. #viewer {
  52. border: 0px;
  53. margin-left: 260px;
  54. width: -webkit-calc(100% - 260px);
  55. width: -moz-calc(100% - 260px);
  56. width: calc(100% - 260px);
  57. height: 100%;
  58. overflow: auto;
  59. }
  60. </style>
  61. </head>
  62. <body>
  63. <div id="panel"></div>
  64. <iframe id="viewer"></iframe>
  65. <script src="list.js"></script>
  66. <script>
  67. var REVISION = '49';
  68. var panel = document.getElementById( 'panel' );
  69. var viewer = document.getElementById( 'viewer' );
  70. var html = '<h1>three.js <span style="font-size: 50%; vertical-align: super;">r' + REVISION + '</span></h1>';
  71. for ( var category in list ) {
  72. html += '<h2>' + category + '</h2>';
  73. html += '<ul>';
  74. for ( var i = 0; i < list[ category ].length; i ++ ) {
  75. var page = list[ category ][ i ];
  76. html += '<li><a href="javascript:goTo(\'' + page[ 0 ] + '\')">' + page[ 0 ] + '</a></li>';
  77. }
  78. html += '</ul>';
  79. }
  80. panel.innerHTML += html;
  81. // Page loading
  82. function goTo( name ) {
  83. var path = pages[ name ];
  84. window.location.hash = name;
  85. viewer.src = 'api/' + path + '.html';
  86. }
  87. function goToHash() {
  88. goTo( window.location.hash.substring( 1 ) );
  89. }
  90. window.addEventListener( 'hashchange', goToHash, false );
  91. if ( window.location.hash.length > 0 ) goToHash();
  92. </script>
  93. </body>
  94. </html>