main.css 8.8 KB

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