main.css 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. :root {
  2. color-scheme: light dark;
  3. }
  4. html {
  5. touch-action: none;
  6. }
  7. body {
  8. font-family: Helvetica, Arial, sans-serif;
  9. font-size: 14px;
  10. margin: 0;
  11. overflow: hidden;
  12. }
  13. hr {
  14. border: 0;
  15. border-top: 1px solid #ccc;
  16. }
  17. button {
  18. position: relative;
  19. }
  20. input {
  21. vertical-align: middle;
  22. }
  23. textarea {
  24. tab-size: 4;
  25. white-space: pre;
  26. word-wrap: normal;
  27. vertical-align: middle;
  28. }
  29. textarea.success {
  30. border-color: #8b8 !important;
  31. }
  32. textarea.fail {
  33. border-color: #f00 !important;
  34. background-color: rgba(255,0,0,0.05);
  35. }
  36. textarea, input { outline: none; } /* osx */
  37. .Panel {
  38. -moz-user-select: none;
  39. -webkit-user-select: none;
  40. -ms-user-select: none;
  41. /* No support for these yet */
  42. -o-user-select: none;
  43. user-select: none;
  44. }
  45. .TabbedPanel {
  46. -moz-user-select: none;
  47. -webkit-user-select: none;
  48. -ms-user-select: none;
  49. /* No support for these yet */
  50. -o-user-select: none;
  51. user-select: none;
  52. position: relative;
  53. display: block;
  54. width: 100%;
  55. }
  56. .TabbedPanel .Tabs {
  57. position: relative;
  58. display: block;
  59. width: 100%;
  60. }
  61. .TabbedPanel .Tabs .Tab {
  62. padding: 10px;
  63. vertical-align: middle;
  64. text-transform: uppercase;
  65. }
  66. .TabbedPanel .Tabs .Panels {
  67. position: relative;
  68. display: block;
  69. width: 100%;
  70. height: 100%;
  71. }
  72. /* Listbox */
  73. .Listbox {
  74. color: #444;
  75. background-color: #fff;
  76. padding: 0;
  77. width: 100%;
  78. min-height: 140px;
  79. font-size: 12px;
  80. cursor: default;
  81. overflow: auto;
  82. }
  83. .Listbox .ListboxItem {
  84. padding: 6px;
  85. color: #666;
  86. white-space: nowrap;
  87. }
  88. .Listbox .ListboxItem.active {
  89. background-color: rgba(0, 0, 0, 0.04);
  90. }
  91. /* CodeMirror */
  92. .CodeMirror {
  93. position: absolute !important;
  94. top: 37px;
  95. width: 100% !important;
  96. height: calc(100% - 37px) !important;
  97. }
  98. .CodeMirror .errorLine {
  99. background: rgba(255,0,0,0.25);
  100. }
  101. .CodeMirror .esprima-error {
  102. color: #f00;
  103. text-align: right;
  104. padding: 0 20px;
  105. }
  106. /* outliner */
  107. #outliner .opener {
  108. display: inline-block;
  109. width: 14px;
  110. height: 14px;
  111. margin: 0px 4px;
  112. vertical-align: top;
  113. text-align: center;
  114. }
  115. #outliner .opener.open:after {
  116. content: '−';
  117. }
  118. #outliner .opener.closed:after {
  119. content: '+';
  120. }
  121. #outliner .option {
  122. border: 1px solid transparent;
  123. }
  124. #outliner .option.drag {
  125. border: 1px dashed #999;
  126. }
  127. #outliner .option.dragTop {
  128. border-top: 1px dashed #999;
  129. }
  130. #outliner .option.dragBottom {
  131. border-bottom: 1px dashed #999;
  132. }
  133. #outliner .type {
  134. display: inline-block;
  135. width: 14px;
  136. height: 14px;
  137. color: #ddd;
  138. text-align: center;
  139. }
  140. #outliner .type:after {
  141. content: '●';
  142. }
  143. #outliner .Scene {
  144. color: #ccccff;
  145. }
  146. #outliner .Object3D {
  147. color: #aaaaee;
  148. }
  149. #outliner .Mesh {
  150. color: #8888ee;
  151. }
  152. #outliner .Line {
  153. color: #88ee88;
  154. }
  155. #outliner .LineSegments {
  156. color: #88ee88;
  157. }
  158. #outliner .Points {
  159. color: #ee8888;
  160. }
  161. /* */
  162. #outliner .PointLight {
  163. color: #dddd00;
  164. }
  165. /* */
  166. #outliner .Geometry {
  167. color: #88ff88;
  168. }
  169. #outliner .BoxGeometry {
  170. color: #bbeebb;
  171. }
  172. #outliner .TorusGeometry {
  173. color: #aaeeaa;
  174. }
  175. /* */
  176. #outliner .Material {
  177. color: #ff8888;
  178. }
  179. #outliner .MeshPhongMaterial {
  180. color: #ffaa88;
  181. }
  182. /* */
  183. #outliner .Script:after {
  184. content: '{...}' /* ❮/❯ */
  185. }
  186. /* */
  187. button {
  188. color: #555;
  189. background-color: #ddd;
  190. border: 0px;
  191. padding: 5px 8px;
  192. text-transform: uppercase;
  193. cursor: pointer;
  194. outline: none;
  195. }
  196. button:hover {
  197. background-color: #fff;
  198. }
  199. button.selected {
  200. background-color: #fff;
  201. }
  202. input, textarea {
  203. border: 1px solid transparent;
  204. color: #444;
  205. }
  206. input.Number {
  207. color: #08f!important;
  208. font-size: 12px;
  209. border: 0px;
  210. padding: 2px;
  211. cursor: col-resize;
  212. }
  213. select {
  214. color: #666;
  215. background-color: #ddd;
  216. border: 0px;
  217. text-transform: uppercase;
  218. cursor: pointer;
  219. outline: none;
  220. }
  221. select:hover {
  222. background-color: #fff;
  223. }
  224. /* UI */
  225. #viewport {
  226. position: absolute;
  227. top: 32px;
  228. left: 0;
  229. right: 300px;
  230. bottom: 0;
  231. }
  232. #viewport #info {
  233. text-shadow: 1px 1px 0 rgba(0,0,0,0.25);
  234. pointer-events: none;
  235. }
  236. #script {
  237. position: absolute;
  238. top: 32px;
  239. left: 0;
  240. right: 300px;
  241. bottom: 0;
  242. opacity: 0.9;
  243. }
  244. #player {
  245. position: absolute;
  246. top: 32px;
  247. left: 0;
  248. right: 300px;
  249. bottom: 0;
  250. }
  251. #menubar {
  252. position: absolute;
  253. width: 100%;
  254. height: 32px;
  255. background: #eee;
  256. padding: 0;
  257. margin: 0;
  258. right: 0;
  259. top: 0;
  260. }
  261. #menubar .menu {
  262. float: left;
  263. cursor: pointer;
  264. padding-right: 8px;
  265. }
  266. #menubar .menu.right {
  267. float: right;
  268. cursor: auto;
  269. padding-right: 0;
  270. text-align: right;
  271. }
  272. #menubar .menu .title {
  273. display: inline-block;
  274. color: #888;
  275. margin: 0;
  276. padding: 8px;
  277. line-height: 16px;
  278. }
  279. #menubar .menu .options {
  280. position: fixed;
  281. display: none;
  282. padding: 5px 0;
  283. background: #eee;
  284. width: 150px;
  285. max-height: calc(100% - 80px);
  286. overflow: auto;
  287. }
  288. #menubar .menu:hover .options {
  289. display: block;
  290. }
  291. #menubar .menu .options hr {
  292. border-color: #ddd;
  293. }
  294. #menubar .menu .options .option {
  295. color: #666;
  296. background-color: transparent;
  297. padding: 5px 10px;
  298. margin: 0 !important;
  299. }
  300. #menubar .menu .options .option:hover {
  301. color: #fff;
  302. background-color: #08f;
  303. }
  304. #menubar .menu .options .option:active {
  305. color: #666;
  306. background: transparent;
  307. }
  308. #menubar .menu .options .inactive {
  309. color: #bbb;
  310. background-color: transparent;
  311. padding: 5px 10px;
  312. margin: 0 !important;
  313. }
  314. #sidebar {
  315. position: absolute;
  316. right: 0;
  317. top: 32px;
  318. bottom: 0;
  319. width: 300px;
  320. background: #eee;
  321. overflow: auto;
  322. }
  323. #sidebar .Panel {
  324. color: #888;
  325. padding: 10px;
  326. border-top: 1px solid #ccc;
  327. }
  328. #sidebar .Panel.collapsed {
  329. margin-bottom: 0;
  330. }
  331. #sidebar .Row {
  332. min-height: 20px;
  333. margin-bottom: 10px;
  334. }
  335. #tabs {
  336. background-color: #ddd;
  337. border-top: 1px solid #ccc;
  338. }
  339. #tabs span {
  340. color: #aaa;
  341. border-right: 1px solid #ccc;
  342. padding: 10px;
  343. }
  344. #tabs span.selected {
  345. color: #888;
  346. background-color: #eee;
  347. }
  348. #toolbar {
  349. position: absolute;
  350. left: 10px;
  351. top: 42px;
  352. width: 32px;
  353. background: #eee;
  354. text-align: center;
  355. }
  356. #toolbar button, #toolbar input {
  357. height: 32px;
  358. }
  359. #toolbar button img {
  360. width: 16px;
  361. opacity: 0.5;
  362. }
  363. .Outliner {
  364. color: #444;
  365. background-color: #fff;
  366. padding: 0;
  367. width: 100%;
  368. height: 140px;
  369. font-size: 12px;
  370. cursor: default;
  371. overflow: auto;
  372. resize: vertical;
  373. outline: none !important;
  374. }
  375. .Outliner .option {
  376. padding: 4px;
  377. color: #666;
  378. white-space: nowrap;
  379. }
  380. .Outliner .option:hover {
  381. background-color: rgba(0,0,0,0.02);
  382. }
  383. .Outliner .option.active {
  384. background-color: rgba(0,0,0,0.04);
  385. }
  386. .TabbedPanel .Tabs {
  387. background-color: #ddd;
  388. border-top: 1px solid #ccc;
  389. }
  390. .TabbedPanel .Tab {
  391. color: #aaa;
  392. border-right: 1px solid #ccc;
  393. }
  394. .TabbedPanel .Tab.selected {
  395. color: #888;
  396. background-color: #eee;
  397. }
  398. .Listbox {
  399. color: #444;
  400. background-color: #fff;
  401. }
  402. .Panel {
  403. color: #888;
  404. }
  405. /* */
  406. @media all and ( max-width: 600px ) {
  407. #menubar .menu .options {
  408. max-height: calc(100% - 372px);
  409. }
  410. #menubar .menu.right {
  411. display: none;
  412. }
  413. #viewport {
  414. left: 0;
  415. right: 0;
  416. top: 32px;
  417. height: calc(100% - 352px);
  418. }
  419. #script {
  420. left: 0;
  421. right: 0;
  422. top: 32px;
  423. height: calc(100% - 352px);
  424. }
  425. #player {
  426. left: 0;
  427. right: 0;
  428. top: 32px;
  429. height: calc(100% - 352px);
  430. }
  431. #sidebar {
  432. left: 0;
  433. width: 100%;
  434. top: calc(100% - 320px);
  435. bottom: 0;
  436. }
  437. }
  438. /* DARK MODE */
  439. @media ( prefers-color-scheme: dark ) {
  440. button {
  441. color: #aaa;
  442. background-color: #222;
  443. }
  444. button:hover {
  445. color: #ccc;
  446. background-color: #444;
  447. }
  448. button.selected {
  449. color: #fff;
  450. background-color: #08f;
  451. }
  452. input, textarea {
  453. background-color: #222;
  454. border: 1px solid transparent;
  455. color: #888;
  456. }
  457. select {
  458. color: #aaa;
  459. background-color: #222;
  460. }
  461. select:hover {
  462. color: #ccc;
  463. background-color: #444;
  464. }
  465. /* UI */
  466. #menubar {
  467. background: #111;
  468. }
  469. #menubar .menu .options {
  470. background: #111;
  471. }
  472. #menubar .menu .options hr {
  473. border-color: #222;
  474. }
  475. #menubar .menu .options .option {
  476. color: #888;
  477. }
  478. #menubar .menu .options .inactive {
  479. color: #444;
  480. }
  481. #sidebar {
  482. background-color: #111;
  483. }
  484. #sidebar .Panel {
  485. border-top: 1px solid #222;
  486. }
  487. #sidebar .Panel.Material canvas {
  488. border: solid 1px #5A5A5A;
  489. }
  490. #tabs {
  491. background-color: #1b1b1b;
  492. border-top: 1px solid #222;
  493. }
  494. #tabs span {
  495. color: #555;
  496. border-right: 1px solid #222;
  497. }
  498. #tabs span.selected {
  499. background-color: #111;
  500. }
  501. #toolbar {
  502. background-color: #111;
  503. }
  504. #toolbar img {
  505. filter: invert(1);
  506. }
  507. .Outliner {
  508. color: #888;
  509. background: #222;
  510. }
  511. .Outliner .option:hover {
  512. background-color: rgba(21,60,94,0.5);
  513. }
  514. .Outliner .option.active {
  515. background-color: rgba(21,60,94,1);
  516. }
  517. .TabbedPanel .Tabs {
  518. background-color: #1b1b1b;
  519. border-top: 1px solid #222;
  520. }
  521. .TabbedPanel .Tab {
  522. color: #555;
  523. border-right: 1px solid #222;
  524. }
  525. .TabbedPanel .Tab.selected {
  526. color: #888;
  527. background-color: #111;
  528. }
  529. .Listbox {
  530. color: #888;
  531. background: #222;
  532. }
  533. .Listbox .ListboxItem:hover {
  534. background-color: rgba(21,60,94,0.5);
  535. }
  536. .Listbox .ListboxItem.active {
  537. background-color: rgba(21,60,94,1);
  538. }
  539. }