main.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  1. :root {
  2. color-scheme: light dark;
  3. }
  4. [hidden] {
  5. display: none !important;
  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. input[type="color"]::-webkit-color-swatch-wrapper {
  24. padding: 0;
  25. }
  26. input[type="color"]::-webkit-color-swatch {
  27. border: none;
  28. }
  29. textarea {
  30. tab-size: 4;
  31. white-space: pre;
  32. word-wrap: normal;
  33. }
  34. textarea.success {
  35. border-color: #8b8 !important;
  36. }
  37. textarea.fail {
  38. border-color: #f00 !important;
  39. background-color: rgba(255,0,0,0.05);
  40. }
  41. textarea, input { outline: none; } /* osx */
  42. .Panel {
  43. -moz-user-select: none;
  44. -webkit-user-select: none;
  45. -ms-user-select: none;
  46. /* No support for these yet */
  47. -o-user-select: none;
  48. user-select: none;
  49. }
  50. .TabbedPanel {
  51. -moz-user-select: none;
  52. -webkit-user-select: none;
  53. -ms-user-select: none;
  54. /* No support for these yet */
  55. -o-user-select: none;
  56. user-select: none;
  57. position: relative;
  58. display: block;
  59. width: 100%;
  60. min-width: 335px;
  61. }
  62. .TabbedPanel .Tabs {
  63. position: relative;
  64. display: block;
  65. width: 100%;
  66. }
  67. .TabbedPanel .Tabs .Tab {
  68. padding: 10px 9px;
  69. text-transform: uppercase;
  70. }
  71. .TabbedPanel .Panels {
  72. position: relative;
  73. display: block;
  74. width: 100%;
  75. }
  76. /* Listbox */
  77. .Listbox {
  78. color: #444;
  79. background-color: #fff;
  80. padding: 0;
  81. width: 100%;
  82. min-height: 180px;
  83. font-size: 12px;
  84. cursor: default;
  85. overflow: auto;
  86. }
  87. .Listbox .ListboxItem {
  88. padding: 6px;
  89. color: #666;
  90. white-space: nowrap;
  91. }
  92. .Listbox .ListboxItem.active {
  93. background-color: rgba(0, 0, 0, 0.04);
  94. }
  95. /* CodeMirror */
  96. .CodeMirror {
  97. position: absolute !important;
  98. top: 37px;
  99. width: 100% !important;
  100. height: calc(100% - 37px) !important;
  101. }
  102. .CodeMirror .errorLine {
  103. background: rgba(255,0,0,0.25);
  104. }
  105. .CodeMirror .esprima-error {
  106. color: #f00;
  107. text-align: right;
  108. padding: 0 20px;
  109. }
  110. /* outliner */
  111. #outliner .opener {
  112. display: inline-block;
  113. width: 14px;
  114. height: 14px;
  115. margin: 0px 4px;
  116. vertical-align: top;
  117. text-align: center;
  118. }
  119. #outliner .opener.open:after {
  120. content: '−';
  121. }
  122. #outliner .opener.closed:after {
  123. content: '+';
  124. }
  125. #outliner .option {
  126. border: 1px solid transparent;
  127. }
  128. #outliner .option.drag {
  129. border: 1px dashed #999;
  130. }
  131. #outliner .option.dragTop {
  132. border-top: 1px dashed #999;
  133. }
  134. #outliner .option.dragBottom {
  135. border-bottom: 1px dashed #999;
  136. }
  137. #outliner .type {
  138. display: inline-block;
  139. width: 14px;
  140. height: 14px;
  141. color: #ddd;
  142. text-align: center;
  143. }
  144. #outliner .type:after {
  145. content: '●';
  146. }
  147. /* */
  148. #outliner .Scene {
  149. color: #8888dd;
  150. }
  151. #outliner .Camera {
  152. color: #dd8888;
  153. }
  154. #outliner .Light {
  155. color: #dddd88;
  156. }
  157. /* */
  158. #outliner .Object3D {
  159. color: #aaaaee;
  160. }
  161. #outliner .Mesh {
  162. color: #8888ee;
  163. }
  164. #outliner .Line {
  165. color: #88ee88;
  166. }
  167. #outliner .LineSegments {
  168. color: #88ee88;
  169. }
  170. #outliner .Points {
  171. color: #ee8888;
  172. }
  173. /* */
  174. #outliner .Geometry {
  175. color: #aaeeaa;
  176. }
  177. #outliner .Material {
  178. color: #eeaaee;
  179. }
  180. /* */
  181. #outliner .Script:after {
  182. content: '◎'
  183. }
  184. /* */
  185. button {
  186. color: #555;
  187. background-color: #ddd;
  188. border: 0px;
  189. margin: 0px; /* GNOME Web */
  190. padding: 5px 8px;
  191. font-size: 12px;
  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. }
  212. select {
  213. color: #666;
  214. background-color: #ddd;
  215. border: 0px;
  216. text-transform: uppercase;
  217. cursor: pointer;
  218. outline: none;
  219. }
  220. select:hover {
  221. background-color: #fff;
  222. }
  223. /* UI */
  224. #resizer {
  225. position: absolute;
  226. top: 32px;
  227. right: 350px;
  228. width: 5px;
  229. bottom: 0px;
  230. transform: translatex(2.5px);
  231. cursor: col-resize;
  232. }
  233. #resizer:hover {
  234. background-color: #08f8;
  235. transition-property: background-color;
  236. transition-delay: 0.1s;
  237. transition-duration: 0.2s;
  238. }
  239. #resizer:active {
  240. background-color: #08f;
  241. }
  242. #viewport {
  243. position: absolute;
  244. top: 32px;
  245. left: 0;
  246. right: 350px;
  247. bottom: 0;
  248. }
  249. #viewport .Text {
  250. text-shadow: 1px 1px 0 rgba(0,0,0,0.25);
  251. pointer-events: none;
  252. }
  253. #script {
  254. position: absolute;
  255. top: 32px;
  256. left: 0;
  257. right: 350px;
  258. bottom: 0;
  259. opacity: 0.9;
  260. }
  261. #player {
  262. position: absolute;
  263. top: 32px;
  264. left: 0;
  265. right: 350px;
  266. bottom: 0;
  267. }
  268. #menubar {
  269. position: absolute;
  270. width: 100%;
  271. height: 32px;
  272. background: #eee;
  273. padding: 0;
  274. margin: 0;
  275. right: 0;
  276. top: 0;
  277. }
  278. #menubar .menu {
  279. float: left;
  280. cursor: pointer;
  281. padding-right: 8px;
  282. }
  283. #menubar .menu.right {
  284. float: right;
  285. cursor: auto;
  286. padding-right: 0;
  287. text-align: right;
  288. }
  289. #menubar .menu .title {
  290. display: inline-block;
  291. color: #888;
  292. margin: 0;
  293. padding: 8px;
  294. line-height: 16px;
  295. }
  296. #menubar .menu .key {
  297. position: absolute;
  298. right: 10px;
  299. color: #ccc;
  300. border: 1px solid #ccc;
  301. border-radius: 4px;
  302. font-size: 9px;
  303. padding: 2px 4px;
  304. right: 10px;
  305. }
  306. #menubar .menu .options {
  307. position: fixed;
  308. z-index: 1; /* higher than resizer */
  309. display: none;
  310. padding: 5px 0;
  311. background: #eee;
  312. min-width: 150px;
  313. max-height: calc(100vh - 80px);
  314. overflow: auto;
  315. }
  316. #menubar .menu:hover .options {
  317. display: block;
  318. box-shadow: 0 10px 10px -5px #00000033;
  319. }
  320. #menubar .menu .options hr {
  321. border-color: #ddd;
  322. }
  323. #menubar .menu .options .option {
  324. color: #666;
  325. background-color: transparent;
  326. padding: 5px 10px;
  327. margin: 0 !important;
  328. }
  329. #menubar .menu .options .option:hover {
  330. color: #fff;
  331. background-color: #08f;
  332. }
  333. #menubar .menu .options .option:not(.submenu-title):active {
  334. color: #666;
  335. background: transparent;
  336. }
  337. #menubar .menu .options .option.toggle::before {
  338. content: ' ';
  339. display: inline-block;
  340. width: 16px;
  341. }
  342. #menubar .menu .options .option.toggle-on::before {
  343. content: '✔';
  344. font-size: 12px;
  345. }
  346. #menubar .submenu-title::after {
  347. content: '⏵';
  348. float: right;
  349. }
  350. #menubar .menu .options .inactive {
  351. color: #bbb;
  352. background-color: transparent;
  353. padding: 5px 10px;
  354. margin: 0 !important;
  355. cursor: not-allowed;
  356. }
  357. #sidebar {
  358. position: absolute;
  359. right: 0;
  360. top: 32px;
  361. bottom: 0;
  362. width: 350px;
  363. background: #eee;
  364. overflow: auto;
  365. }
  366. #sidebar .Panel {
  367. color: #888;
  368. padding: 10px;
  369. border-top: 1px solid #ccc;
  370. }
  371. #sidebar .Panel.collapsed {
  372. margin-bottom: 0;
  373. }
  374. #sidebar .Row {
  375. display: flex;
  376. align-items: center;
  377. min-height: 24px;
  378. margin-bottom: 10px;
  379. }
  380. #sidebar .Row .Label {
  381. width: 120px;
  382. }
  383. #tabs {
  384. background-color: #ddd;
  385. border-top: 1px solid #ccc;
  386. }
  387. #tabs span {
  388. color: #aaa;
  389. border-right: 1px solid #ccc;
  390. padding: 10px;
  391. }
  392. #tabs span.selected {
  393. color: #888;
  394. background-color: #eee;
  395. }
  396. #toolbar {
  397. position: absolute;
  398. left: 10px;
  399. top: 42px;
  400. width: 32px;
  401. background: #eee;
  402. text-align: center;
  403. }
  404. #toolbar button, #toolbar input {
  405. height: 32px;
  406. }
  407. #toolbar button img {
  408. width: 16px;
  409. opacity: 0.5;
  410. }
  411. .Outliner {
  412. color: #444;
  413. background-color: #fff;
  414. padding: 0;
  415. width: 100%;
  416. height: 180px;
  417. font-size: 12px;
  418. cursor: default;
  419. overflow: auto;
  420. resize: vertical;
  421. outline: none !important;
  422. }
  423. .Outliner .option {
  424. padding: 4px;
  425. color: #666;
  426. white-space: nowrap;
  427. }
  428. .Outliner .option:hover {
  429. background-color: rgba(0,0,0,0.02);
  430. }
  431. .Outliner .option.active {
  432. background-color: rgba(0,0,0,0.04);
  433. }
  434. .TabbedPanel .Tabs {
  435. background-color: #ddd;
  436. border-top: 1px solid #ccc;
  437. }
  438. .TabbedPanel .Tab {
  439. color: #aaa;
  440. border-right: 1px solid #ccc;
  441. }
  442. .TabbedPanel .Tab.selected {
  443. color: #888;
  444. background-color: #eee;
  445. }
  446. .Listbox {
  447. color: #444;
  448. background-color: #fff;
  449. }
  450. .Panel {
  451. color: #888;
  452. }
  453. /* */
  454. @media all and ( max-width: 600px ) {
  455. #resizer {
  456. display: none;
  457. }
  458. #menubar .menu .options {
  459. max-height: calc(100% - 80px);
  460. }
  461. #menubar .menu.right {
  462. display: none;
  463. }
  464. #viewport {
  465. left: 0;
  466. right: 0;
  467. top: 32px;
  468. height: calc(100% - 352px);
  469. }
  470. #script {
  471. left: 0;
  472. right: 0;
  473. top: 32px;
  474. height: calc(100% - 352px);
  475. }
  476. #player {
  477. left: 0;
  478. right: 0;
  479. top: 32px;
  480. height: calc(100% - 352px);
  481. }
  482. #sidebar {
  483. left: 0;
  484. width: 100%;
  485. top: calc(100% - 320px);
  486. bottom: 0;
  487. }
  488. }
  489. /* DARK MODE */
  490. @media ( prefers-color-scheme: dark ) {
  491. button {
  492. color: #aaa;
  493. background-color: #222;
  494. }
  495. button:hover {
  496. color: #ccc;
  497. background-color: #444;
  498. }
  499. button.selected {
  500. color: #fff;
  501. background-color: #08f;
  502. }
  503. input, textarea {
  504. background-color: #222;
  505. border: 1px solid transparent;
  506. color: #888;
  507. }
  508. select {
  509. color: #aaa;
  510. background-color: #222;
  511. }
  512. select:hover {
  513. color: #ccc;
  514. background-color: #444;
  515. }
  516. /* UI */
  517. #menubar {
  518. background: #111;
  519. }
  520. #menubar .menu .options {
  521. background: #111;
  522. }
  523. #menubar .menu .options hr {
  524. border-color: #222;
  525. }
  526. #menubar .menu .options .option {
  527. color: #888;
  528. }
  529. #menubar .menu .options .inactive {
  530. color: #444;
  531. }
  532. #sidebar {
  533. background-color: #111;
  534. }
  535. #sidebar .Panel {
  536. border-top: 1px solid #222;
  537. }
  538. #sidebar .Panel.Material canvas {
  539. border: solid 1px #5A5A5A;
  540. }
  541. #tabs {
  542. background-color: #1b1b1b;
  543. border-top: 1px solid #222;
  544. }
  545. #tabs span {
  546. color: #555;
  547. border-right: 1px solid #222;
  548. }
  549. #tabs span.selected {
  550. background-color: #111;
  551. }
  552. #toolbar {
  553. background-color: #111;
  554. }
  555. #toolbar img {
  556. filter: invert(1);
  557. }
  558. .Outliner {
  559. background: #222;
  560. }
  561. .Outliner .option {
  562. color: #999;
  563. }
  564. .Outliner .option:hover {
  565. background-color: rgba(21,60,94,0.5);
  566. }
  567. .Outliner .option.active {
  568. background-color: rgba(21,60,94,1);
  569. }
  570. .TabbedPanel .Tabs {
  571. background-color: #1b1b1b;
  572. border-top: 1px solid #222;
  573. }
  574. .TabbedPanel .Tab {
  575. color: #555;
  576. border-right: 1px solid #222;
  577. }
  578. .TabbedPanel .Tab.selected {
  579. color: #888;
  580. background-color: #111;
  581. }
  582. .Listbox {
  583. color: #888;
  584. background: #222;
  585. }
  586. .Listbox .ListboxItem:hover {
  587. background-color: rgba(21,60,94,0.5);
  588. }
  589. .Listbox .ListboxItem.active {
  590. background-color: rgba(21,60,94,1);
  591. }
  592. }
  593. /* Temporary Chrome fix (#24794) */
  594. [draggable="true"] {
  595. transform: translate(0, 0);
  596. z-index: 0;
  597. }
粤ICP备19079148号