main.css 8.9 KB

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