main.css 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  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 .option {
  108. border: 1px solid transparent;
  109. }
  110. #outliner .option.drag {
  111. border: 1px dashed #999;
  112. }
  113. #outliner .option.dragTop {
  114. border-top: 1px dashed #999;
  115. }
  116. #outliner .option.dragBottom {
  117. border-bottom: 1px dashed #999;
  118. }
  119. #outliner .type {
  120. position:relative;
  121. top:-2px;
  122. padding: 0 2px;
  123. color: #ddd;
  124. }
  125. #outliner .type:after {
  126. content: '■';
  127. }
  128. #outliner .Scene {
  129. color: #ccccff;
  130. }
  131. #outliner .Object3D {
  132. color: #aaaaee;
  133. }
  134. #outliner .Mesh {
  135. color: #8888ee;
  136. }
  137. #outliner .Line {
  138. color: #88ee88;
  139. }
  140. #outliner .LineSegments {
  141. color: #88ee88;
  142. }
  143. #outliner .Points {
  144. color: #ee8888;
  145. }
  146. /* */
  147. #outliner .PointLight {
  148. color: #dddd00;
  149. }
  150. /* */
  151. #outliner .Geometry {
  152. color: #88ff88;
  153. }
  154. #outliner .BoxGeometry {
  155. color: #bbeebb;
  156. }
  157. #outliner .TorusGeometry {
  158. color: #aaeeaa;
  159. }
  160. /* */
  161. #outliner .Material {
  162. color: #ff8888;
  163. }
  164. #outliner .MeshPhongMaterial {
  165. color: #ffaa88;
  166. }
  167. /* */
  168. #outliner .Script:after {
  169. content: '{...}' /* ❮/❯ */
  170. }
  171. /* */
  172. button {
  173. color: #555;
  174. background-color: #ddd;
  175. border: 0px;
  176. padding: 5px 8px;
  177. text-transform: uppercase;
  178. cursor: pointer;
  179. outline: none;
  180. }
  181. button:hover {
  182. background-color: #fff;
  183. }
  184. button.selected {
  185. background-color: #fff;
  186. }
  187. input, textarea {
  188. border: 1px solid transparent;
  189. color: #444;
  190. }
  191. input.Number {
  192. color: #08f!important;
  193. font-size: 12px;
  194. border: 0px;
  195. padding: 2px;
  196. cursor: col-resize;
  197. }
  198. select {
  199. color: #666;
  200. background-color: #ddd;
  201. border: 0px;
  202. text-transform: uppercase;
  203. cursor: pointer;
  204. outline: none;
  205. }
  206. select:hover {
  207. background-color: #fff;
  208. }
  209. /* UI */
  210. #viewport {
  211. position: absolute;
  212. top: 32px;
  213. left: 0;
  214. right: 300px;
  215. bottom: 0;
  216. }
  217. #viewport #info {
  218. text-shadow: 1px 1px 0 rgba(0,0,0,0.25);
  219. pointer-events: none;
  220. }
  221. #script {
  222. position: absolute;
  223. top: 32px;
  224. left: 0;
  225. right: 300px;
  226. bottom: 0;
  227. opacity: 0.9;
  228. }
  229. #player {
  230. position: absolute;
  231. top: 32px;
  232. left: 0;
  233. right: 300px;
  234. bottom: 0;
  235. }
  236. #menubar {
  237. position: absolute;
  238. width: 100%;
  239. height: 32px;
  240. background: #eee;
  241. padding: 0;
  242. margin: 0;
  243. right: 0;
  244. top: 0;
  245. }
  246. #menubar .menu {
  247. float: left;
  248. cursor: pointer;
  249. padding-right: 8px;
  250. }
  251. #menubar .menu.right {
  252. float: right;
  253. cursor: auto;
  254. padding-right: 0;
  255. text-align: right;
  256. }
  257. #menubar .menu .title {
  258. display: inline-block;
  259. color: #888;
  260. margin: 0;
  261. padding: 8px;
  262. line-height: 16px;
  263. }
  264. #menubar .menu .options {
  265. position: fixed;
  266. display: none;
  267. padding: 5px 0;
  268. background: #eee;
  269. width: 150px;
  270. max-height: calc(100% - 80px);
  271. overflow: auto;
  272. }
  273. #menubar .menu:hover .options {
  274. display: block;
  275. }
  276. #menubar .menu .options hr {
  277. border-color: #ddd;
  278. }
  279. #menubar .menu .options .option {
  280. color: #666;
  281. background-color: transparent;
  282. padding: 5px 10px;
  283. margin: 0 !important;
  284. }
  285. #menubar .menu .options .option:hover {
  286. color: #fff;
  287. background-color: #08f;
  288. }
  289. #menubar .menu .options .option:active {
  290. color: #666;
  291. background: transparent;
  292. }
  293. #menubar .menu .options .inactive {
  294. color: #bbb;
  295. background-color: transparent;
  296. padding: 5px 10px;
  297. margin: 0 !important;
  298. }
  299. #sidebar {
  300. position: absolute;
  301. right: 0;
  302. top: 32px;
  303. bottom: 0;
  304. width: 300px;
  305. background: #eee;
  306. overflow: auto;
  307. }
  308. #sidebar .Panel {
  309. color: #888;
  310. padding: 10px;
  311. border-top: 1px solid #ccc;
  312. }
  313. #sidebar .Panel.collapsed {
  314. margin-bottom: 0;
  315. }
  316. #sidebar .Row {
  317. min-height: 20px;
  318. margin-bottom: 10px;
  319. }
  320. #tabs {
  321. background-color: #ddd;
  322. border-top: 1px solid #ccc;
  323. }
  324. #tabs span {
  325. color: #aaa;
  326. border-right: 1px solid #ccc;
  327. padding: 10px;
  328. }
  329. #tabs span.selected {
  330. color: #888;
  331. background-color: #eee;
  332. }
  333. #toolbar {
  334. position: absolute;
  335. left: 10px;
  336. top: 42px;
  337. width: 32px;
  338. background: #eee;
  339. text-align: center;
  340. }
  341. #toolbar button, #toolbar input {
  342. height: 32px;
  343. }
  344. #toolbar button img {
  345. width: 16px;
  346. opacity: 0.5;
  347. }
  348. .Outliner {
  349. color: #444;
  350. background-color: #fff;
  351. padding: 0;
  352. width: 100%;
  353. height: 140px;
  354. font-size: 12px;
  355. cursor: default;
  356. overflow: auto;
  357. resize: vertical;
  358. outline: none !important;
  359. }
  360. .Outliner .option {
  361. padding: 4px;
  362. color: #666;
  363. white-space: nowrap;
  364. }
  365. .Outliner .option:hover {
  366. background-color: rgba(0,0,0,0.02);
  367. }
  368. .Outliner .option.active {
  369. background-color: rgba(0,0,0,0.04);
  370. }
  371. .TabbedPanel .Tabs {
  372. background-color: #ddd;
  373. border-top: 1px solid #ccc;
  374. }
  375. .TabbedPanel .Tab {
  376. color: #aaa;
  377. border-right: 1px solid #ccc;
  378. }
  379. .TabbedPanel .Tab.selected {
  380. color: #888;
  381. background-color: #eee;
  382. }
  383. .Listbox {
  384. color: #444;
  385. background-color: #fff;
  386. }
  387. .Panel {
  388. color: #888;
  389. }
  390. /* */
  391. @media all and ( max-width: 600px ) {
  392. #menubar .menu .options {
  393. max-height: calc(100% - 372px);
  394. }
  395. #menubar .menu.right {
  396. display: none;
  397. }
  398. #viewport {
  399. left: 0;
  400. right: 0;
  401. top: 32px;
  402. height: calc(100% - 352px);
  403. }
  404. #script {
  405. left: 0;
  406. right: 0;
  407. top: 32px;
  408. height: calc(100% - 352px);
  409. }
  410. #player {
  411. left: 0;
  412. right: 0;
  413. top: 32px;
  414. height: calc(100% - 352px);
  415. }
  416. #sidebar {
  417. left: 0;
  418. width: 100%;
  419. top: calc(100% - 320px);
  420. bottom: 0;
  421. }
  422. }
  423. /* DARK MODE */
  424. @media ( prefers-color-scheme: dark ) {
  425. button {
  426. color: #aaa;
  427. background-color: #222;
  428. }
  429. button:hover {
  430. color: #ccc;
  431. background-color: #444;
  432. }
  433. button.selected {
  434. color: #fff;
  435. background-color: #08f;
  436. }
  437. input, textarea {
  438. background-color: #222;
  439. border: 1px solid transparent;
  440. color: #888;
  441. }
  442. select {
  443. color: #aaa;
  444. background-color: #222;
  445. }
  446. select:hover {
  447. color: #ccc;
  448. background-color: #444;
  449. }
  450. /* UI */
  451. #menubar {
  452. background: #111;
  453. }
  454. #menubar .menu .options {
  455. background: #111;
  456. }
  457. #menubar .menu .options hr {
  458. border-color: #222;
  459. }
  460. #menubar .menu .options .option {
  461. color: #888;
  462. }
  463. #menubar .menu .options .inactive {
  464. color: #444;
  465. }
  466. #sidebar {
  467. background-color: #111;
  468. }
  469. #sidebar .Panel {
  470. border-top: 1px solid #222;
  471. }
  472. #sidebar .Panel.Material canvas {
  473. border: solid 1px #5A5A5A;
  474. }
  475. #tabs {
  476. background-color: #1b1b1b;
  477. border-top: 1px solid #222;
  478. }
  479. #tabs span {
  480. color: #555;
  481. border-right: 1px solid #222;
  482. }
  483. #tabs span.selected {
  484. background-color: #111;
  485. }
  486. #toolbar {
  487. background-color: #111;
  488. }
  489. #toolbar img {
  490. filter: invert(1);
  491. }
  492. .Outliner {
  493. color: #888;
  494. background: #222;
  495. }
  496. .Outliner .option:hover {
  497. background-color: rgba(21,60,94,0.5);
  498. }
  499. .Outliner .option.active {
  500. background-color: rgba(21,60,94,1);
  501. }
  502. .TabbedPanel .Tabs {
  503. background-color: #1b1b1b;
  504. border-top: 1px solid #222;
  505. }
  506. .TabbedPanel .Tab {
  507. color: #555;
  508. border-right: 1px solid #222;
  509. }
  510. .TabbedPanel .Tab.selected {
  511. color: #888;
  512. background-color: #111;
  513. }
  514. .Listbox {
  515. color: #888;
  516. background: #222;
  517. }
  518. .Listbox .ListboxItem:hover {
  519. background-color: rgba(21,60,94,0.5);
  520. }
  521. .Listbox .ListboxItem.active {
  522. background-color: rgba(21,60,94,1);
  523. }
  524. }