main.css 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  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. width: 280px;
  336. bottom: 16px;
  337. height: 32px;
  338. background: #eee;
  339. color: #333;
  340. }
  341. #toolbar * {
  342. vertical-align: middle;
  343. }
  344. #toolbar .Panel {
  345. padding: 4px;
  346. color: #888;
  347. }
  348. #toolbar button {
  349. margin-right: 6px;
  350. line-height: 14px;
  351. height: 24px;
  352. }
  353. .Outliner {
  354. color: #444;
  355. background-color: #fff;
  356. padding: 0;
  357. width: 100%;
  358. height: 140px;
  359. font-size: 12px;
  360. cursor: default;
  361. overflow: auto;
  362. resize: vertical;
  363. outline: none !important;
  364. }
  365. .Outliner .option {
  366. padding: 4px;
  367. color: #666;
  368. white-space: nowrap;
  369. }
  370. .Outliner .option:hover {
  371. background-color: rgba(0,0,0,0.02);
  372. }
  373. .Outliner .option.active {
  374. background-color: rgba(0,0,0,0.04);
  375. }
  376. .TabbedPanel .Tabs {
  377. background-color: #ddd;
  378. border-top: 1px solid #ccc;
  379. }
  380. .TabbedPanel .Tab {
  381. color: #aaa;
  382. border-right: 1px solid #ccc;
  383. }
  384. .TabbedPanel .Tab.selected {
  385. color: #888;
  386. background-color: #eee;
  387. }
  388. .Listbox {
  389. color: #444;
  390. background-color: #fff;
  391. }
  392. .Panel {
  393. color: #888;
  394. }
  395. /* */
  396. @media all and ( max-width: 600px ) {
  397. #menubar .menu .options {
  398. max-height: calc(100% - 372px);
  399. }
  400. #menubar .menu.right {
  401. display: none;
  402. }
  403. #viewport {
  404. left: 0;
  405. right: 0;
  406. top: 32px;
  407. height: calc(100% - 352px);
  408. }
  409. #script {
  410. left: 0;
  411. right: 0;
  412. top: 32px;
  413. height: calc(100% - 352px);
  414. }
  415. #player {
  416. left: 0;
  417. right: 0;
  418. top: 32px;
  419. height: calc(100% - 352px);
  420. }
  421. #sidebar {
  422. left: 0;
  423. width: 100%;
  424. top: calc(100% - 320px);
  425. bottom: 0;
  426. }
  427. #toolbar {
  428. left: calc(50% - 140px);
  429. width: 280px;
  430. top: 68px;
  431. }
  432. }
  433. /* DARK MODE */
  434. @media ( prefers-color-scheme: dark ) {
  435. button {
  436. color: #aaa;
  437. background-color: #222;
  438. }
  439. button:hover {
  440. color: #ccc;
  441. background-color: #444;
  442. }
  443. button.selected {
  444. color: #fff;
  445. background-color: #08f;
  446. }
  447. input, textarea {
  448. background-color: #222;
  449. border: 1px solid transparent;
  450. color: #888;
  451. }
  452. select {
  453. color: #aaa;
  454. background-color: #222;
  455. }
  456. select:hover {
  457. color: #ccc;
  458. background-color: #444;
  459. }
  460. /* UI */
  461. #menubar {
  462. background: #111;
  463. }
  464. #menubar .menu .options {
  465. background: #111;
  466. }
  467. #menubar .menu .options hr {
  468. border-color: #222;
  469. }
  470. #menubar .menu .options .option {
  471. color: #888;
  472. }
  473. #menubar .menu .options .inactive {
  474. color: #444;
  475. }
  476. #sidebar {
  477. background-color: #111;
  478. }
  479. #sidebar .Panel {
  480. border-top: 1px solid #222;
  481. }
  482. #sidebar .Panel.Material canvas {
  483. border: solid 1px #5A5A5A;
  484. }
  485. #tabs {
  486. background-color: #1b1b1b;
  487. border-top: 1px solid #222;
  488. }
  489. #tabs span {
  490. color: #555;
  491. border-right: 1px solid #222;
  492. }
  493. #tabs span.selected {
  494. background-color: #111;
  495. }
  496. #toolbar {
  497. background-color: #111;
  498. }
  499. .Outliner {
  500. color: #888;
  501. background: #222;
  502. }
  503. .Outliner .option:hover {
  504. background-color: rgba(21,60,94,0.5);
  505. }
  506. .Outliner .option.active {
  507. background-color: rgba(21,60,94,1);
  508. }
  509. .TabbedPanel .Tabs {
  510. background-color: #1b1b1b;
  511. border-top: 1px solid #222;
  512. }
  513. .TabbedPanel .Tab {
  514. color: #555;
  515. border-right: 1px solid #222;
  516. }
  517. .TabbedPanel .Tab.selected {
  518. color: #888;
  519. background-color: #111;
  520. }
  521. .Listbox {
  522. color: #888;
  523. background: #222;
  524. }
  525. .Listbox .ListboxItem:hover {
  526. background-color: rgba(21,60,94,0.5);
  527. }
  528. .Listbox .ListboxItem.active {
  529. background-color: rgba(21,60,94,1);
  530. }
  531. }