index.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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: #333;
  36. font-size: 25px;
  37. font-weight: normal;
  38. margin-top: 25px;
  39. margin-left: 20px;
  40. }
  41. #panel h2 {
  42. color: #666;
  43. font-size: 16px;
  44. font-weight: normal;
  45. margin-top: 20px;
  46. margin-left: 20px;
  47. }
  48. #panel ul {
  49. list-style-type: none;
  50. padding: 0px;
  51. margin-left: 20px;
  52. }
  53. #viewer {
  54. border: 0px;
  55. margin-left: 260px;
  56. width: -webkit-calc(100% - 260px);
  57. width: -moz-calc(100% - 260px);
  58. width: calc(100% - 260px);
  59. height: 100%;
  60. overflow: auto;
  61. }
  62. </style>
  63. </head>
  64. <body>
  65. <div id="panel"></div>
  66. <iframe id="viewer"></iframe>
  67. <script src="list.js"></script>
  68. <script>
  69. var REVISION = '49';
  70. var panel = document.getElementById( 'panel' );
  71. var viewer = document.getElementById( 'viewer' );
  72. var html = '<h1>three.js<span style="font-size: 50%; vertical-align: super;"> r' + REVISION + '</span></h1>';
  73. for ( var category in list ) {
  74. html += '<h2>' + category + '</h2>';
  75. html += '<ul>';
  76. for ( var i = 0; i < list[ category ].length; i ++ ) {
  77. var page = list[ category ][ i ];
  78. html += '<li><a href="javascript:goTo(\'' + page[ 0 ] + '\')">' + page[ 0 ] + '</a></li>';
  79. }
  80. html += '</ul>';
  81. }
  82. panel.innerHTML += html;
  83. // Page loading
  84. function goTo( name ) {
  85. var path = pages[ name ];
  86. window.location.hash = name;
  87. viewer.src = 'api/' + path + '.html';
  88. }
  89. function goToHash() {
  90. goTo( window.location.hash.substring( 1 ) );
  91. }
  92. window.addEventListener( 'hashchange', goToHash, false );
  93. if ( window.location.hash.length > 0 ) goToHash();
  94. </script>
  95. </body>
  96. </html>