index.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <!doctype html>
  2. <html lang="en-US">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <title>Animation timeline demo</title>
  7. <style>
  8. html,
  9. body {
  10. margin: 0px;
  11. }
  12. .app-container {
  13. background-color: #1e1e1e;
  14. scrollbar-color: gray #161616;
  15. color: #adadad;
  16. font-size: 12px;
  17. height: 100vh;
  18. overflow: hidden;
  19. display: flex;
  20. flex-direction: column;
  21. }
  22. #timeline {
  23. box-sizing: border-box;
  24. flex-grow: 8;
  25. width: 100%;
  26. height: 100%;
  27. scrollbar-color: gray #161616;
  28. }
  29. ::-webkit-scrollbar {
  30. background: #161616;
  31. color: gray;
  32. }
  33. ::-webkit-scrollbar-thumb {
  34. background: gray;
  35. }
  36. ::-webkit-scrollbar-corner {
  37. background: #161616;
  38. }
  39. main {
  40. display: grid;
  41. /*grid-template-columns: ;*/
  42. height: 100%;
  43. width: 100%;
  44. }
  45. .button {
  46. padding: 0px;
  47. width: 44px;
  48. min-width: 44px;
  49. margin-right: 5px;
  50. color: #adadad;
  51. background: transparent;
  52. border: none;
  53. }
  54. .button:focus {
  55. outline: 0;
  56. border: none;
  57. }
  58. .button:hover {
  59. background: #201616;
  60. }
  61. .button:focus {
  62. border: none;
  63. }
  64. main {
  65. flex-grow: 4;
  66. height: 0px;
  67. display: grid;
  68. grid-template-rows: auto minmax(0, 1fr) auto;
  69. }
  70. footer {
  71. display: flex;
  72. height: 45%;
  73. max-height: 70%;
  74. }
  75. .toolbar {
  76. background-color: #383838;
  77. padding-left: 44px;
  78. max-height: 36px;
  79. height: 36px;
  80. position: relative;
  81. overflow: hidden;
  82. display: flex;
  83. height: 36px;
  84. background-color: #3c3c3c;
  85. }
  86. .outline-header {
  87. height: 30px;
  88. }
  89. .outline-scroll-container {
  90. overflow: hidden;
  91. }
  92. .outline-node {
  93. padding-left: 20px;
  94. font-size: 12px !important;
  95. display: flex;
  96. align-items: center;
  97. width: 100%;
  98. font-family: Roboto, 'Helvetica Neue', sans-serif;
  99. color: white;
  100. -webkit-user-select: none;
  101. user-select: none;
  102. height: 30px;
  103. }
  104. .outline-node:hover {
  105. background-color: #3399ff;
  106. }
  107. .links {
  108. display: flex;
  109. align-items: center;
  110. }
  111. a {
  112. font-family: Roboto, 'Helvetica Neue', sans-serif;
  113. color: white;
  114. margin-right: 30px;
  115. }
  116. .logs {
  117. display: grid;
  118. grid-template-columns: 1fr 1fr;
  119. height: 100%;
  120. }
  121. .output {
  122. height: 100%;
  123. width: 100%;
  124. }
  125. .outline {
  126. width: 250px;
  127. min-width: 150px;
  128. overflow: hidden;
  129. display: flex;
  130. flex-direction: column;
  131. height: 100%;
  132. align-items: stretch;
  133. align-content: stretch;
  134. }
  135. .content {
  136. overflow: scroll;
  137. }
  138. </style>
  139. <link href="https://fonts.googleapis.com/icon?family=Material+Icons&amp;display=block" rel="stylesheet" />
  140. <script src="./lib/animation-timeline.js?v=2" type="text/javascript"></script>
  141. </head>
  142. <body>
  143. <div class="app-container">
  144. <main>
  145. <aside></aside>
  146. <div class="content">
  147. <div id="currentTime"></div>
  148. <div class="logs">
  149. <div class="output" id="output1"></div>
  150. <div class="output" id="output2"></div>
  151. </div>
  152. </div>
  153. </main>
  154. <div class="toolbar">
  155. <button class="button mat-icon material-icons mat-icon-no-color" title="Timeline selection mode" onclick="selectMode()">tab_unselected</button>
  156. <button class="button mat-icon material-icons mat-icon-no-color" title="Timeline pan mode with the keyframe selection." onclick="panMode(true)">pan_tool_alt</button>
  157. <button class="button mat-icon material-icons mat-icon-no-color" title="Timeline pan mode non interactive" onclick="panMode(false)">pan_tool</button>
  158. <button class="button mat-icon material-icons mat-icon-no-color" title="Timeline zoom mode. Also ctrl + scroll can be used." onclick="zoomMode()">search</button>
  159. <button class="button mat-icon material-icons mat-icon-no-color" title="Only view mode." onclick="noneMode()">visibility</button>
  160. <div style="width: 1px; background: gray; height: 100%"></div>
  161. <button class="button mat-icon material-icons mat-icon-no-color" title="Use external player to play\stop the timeline. For the demo simple setInterval is used." onclick="onPlayClick()">
  162. play_arrow
  163. </button>
  164. <button class="button mat-icon material-icons mat-icon-no-color" title="Use external player to play\stop the timeline. For the demo simple setInterval is used." onclick="onPauseClick()">
  165. pause
  166. </button>
  167. <div style="flex: 1"></div>
  168. <button class="flex-left button mat-icon material-icons mat-icon-no-color" title="Remove selected keyframe" onclick="removeKeyframe()">close</button>
  169. <button class="flex-left button mat-icon material-icons mat-icon-no-color" title="Add new track with the keyframe" onclick="addKeyframe()">add</button>
  170. <div class="links">
  171. <a class="git-hub-link" href="https://github.com/ievgennaida/animation-timeline-control">GitHub</a>
  172. </div>
  173. </div>
  174. <footer>
  175. <div class="outline">
  176. <div class="outline-header" id="outline-header"></div>
  177. <div class="outline-scroll-container" id="outline-scroll-container" onwheel="outlineMouseWheel(arguments[0])">
  178. <div class="outline-items" id="outline-container"></div>
  179. </div>
  180. </div>
  181. <div id="timeline"></div>
  182. </footer>
  183. </div>
  184. </body>
  185. <script src="./demo/demo.js" type="text/javascript"></script>
  186. </html>