main.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771
  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. pointer-events: none;
  306. }
  307. #menubar .menu .options {
  308. position: fixed;
  309. z-index: 1; /* higher than resizer */
  310. display: none;
  311. padding: 5px 0;
  312. background: #eee;
  313. min-width: 150px;
  314. max-height: calc(100vh - 80px);
  315. overflow: auto;
  316. }
  317. #menubar .menu:hover .options {
  318. display: block;
  319. box-shadow: 0 10px 10px -5px #00000033;
  320. }
  321. #menubar .menu .options hr {
  322. border-color: #ddd;
  323. }
  324. #menubar .menu .options .option {
  325. color: #666;
  326. background-color: transparent;
  327. padding: 5px 10px;
  328. margin: 0 !important;
  329. }
  330. #menubar .menu .options .option:hover {
  331. color: #fff;
  332. background-color: #08f;
  333. }
  334. #menubar .menu .options .option:not(.submenu-title):active {
  335. color: #666;
  336. background: transparent;
  337. }
  338. #menubar .menu .options .option.toggle::before {
  339. content: ' ';
  340. display: inline-block;
  341. width: 16px;
  342. }
  343. #menubar .menu .options .option.toggle-on::before {
  344. content: '✔';
  345. font-size: 12px;
  346. }
  347. #menubar .submenu-title::after {
  348. content: '⏵';
  349. float: right;
  350. }
  351. #menubar .menu .options .inactive {
  352. color: #bbb;
  353. background-color: transparent;
  354. padding: 5px 10px;
  355. margin: 0 !important;
  356. cursor: not-allowed;
  357. }
  358. #sidebar {
  359. position: absolute;
  360. right: 0;
  361. top: 32px;
  362. bottom: 0;
  363. width: 350px;
  364. background: #eee;
  365. overflow: auto;
  366. }
  367. #sidebar .Panel {
  368. color: #888;
  369. padding: 10px;
  370. border-top: 1px solid #ccc;
  371. }
  372. #sidebar .Panel.collapsed {
  373. margin-bottom: 0;
  374. }
  375. #sidebar .Row {
  376. display: flex;
  377. align-items: center;
  378. min-height: 24px;
  379. margin-bottom: 10px;
  380. }
  381. #sidebar .Row .Label {
  382. width: 120px;
  383. }
  384. #tabs {
  385. background-color: #ddd;
  386. border-top: 1px solid #ccc;
  387. }
  388. #tabs span {
  389. color: #aaa;
  390. border-right: 1px solid #ccc;
  391. padding: 10px;
  392. }
  393. #tabs span.selected {
  394. color: #888;
  395. background-color: #eee;
  396. }
  397. #toolbar {
  398. position: absolute;
  399. left: 10px;
  400. top: 42px;
  401. width: 32px;
  402. background: #eee;
  403. text-align: center;
  404. }
  405. #toolbar button, #toolbar input {
  406. height: 32px;
  407. }
  408. #toolbar button img {
  409. width: 16px;
  410. opacity: 0.5;
  411. }
  412. .Outliner {
  413. color: #444;
  414. background-color: #fff;
  415. padding: 0;
  416. width: 100%;
  417. height: 180px;
  418. font-size: 12px;
  419. cursor: default;
  420. overflow: auto;
  421. resize: vertical;
  422. outline: none !important;
  423. }
  424. .Outliner .option {
  425. padding: 4px;
  426. color: #666;
  427. white-space: nowrap;
  428. }
  429. .Outliner .option:hover {
  430. background-color: rgba(0,0,0,0.02);
  431. }
  432. .Outliner .option.active {
  433. background-color: rgba(0,0,0,0.04);
  434. }
  435. .TabbedPanel .Tabs {
  436. background-color: #ddd;
  437. border-top: 1px solid #ccc;
  438. }
  439. .TabbedPanel .Tab {
  440. color: #aaa;
  441. border-right: 1px solid #ccc;
  442. }
  443. .TabbedPanel .Tab.selected {
  444. color: #888;
  445. background-color: #eee;
  446. }
  447. .Listbox {
  448. color: #444;
  449. background-color: #fff;
  450. }
  451. .Panel {
  452. color: #888;
  453. }
  454. /* */
  455. @media all and ( max-width: 600px ) {
  456. #resizer {
  457. display: none;
  458. }
  459. #menubar .menu .options {
  460. max-height: calc(100% - 80px);
  461. }
  462. #menubar .menu.right {
  463. display: none;
  464. }
  465. #viewport {
  466. left: 0;
  467. right: 0;
  468. top: 32px;
  469. height: calc(100% - 352px);
  470. }
  471. #script {
  472. left: 0;
  473. right: 0;
  474. top: 32px;
  475. height: calc(100% - 352px);
  476. }
  477. #player {
  478. left: 0;
  479. right: 0;
  480. top: 32px;
  481. height: calc(100% - 352px);
  482. }
  483. #sidebar {
  484. left: 0;
  485. width: 100%;
  486. top: calc(100% - 320px);
  487. bottom: 0;
  488. }
  489. }
  490. /* DARK MODE */
  491. @media ( prefers-color-scheme: dark ) {
  492. button {
  493. color: #aaa;
  494. background-color: #222;
  495. }
  496. button:hover {
  497. color: #ccc;
  498. background-color: #444;
  499. }
  500. button.selected {
  501. color: #fff;
  502. background-color: #08f;
  503. }
  504. input, textarea {
  505. background-color: #222;
  506. border: 1px solid transparent;
  507. color: #888;
  508. }
  509. select {
  510. color: #aaa;
  511. background-color: #222;
  512. }
  513. select:hover {
  514. color: #ccc;
  515. background-color: #444;
  516. }
  517. /* UI */
  518. #menubar {
  519. background: #111;
  520. }
  521. #menubar .menu .key {
  522. color: #444;
  523. border-color: #444;
  524. }
  525. #menubar .menu .options {
  526. background: #111;
  527. }
  528. #menubar .menu .options hr {
  529. border-color: #222;
  530. }
  531. #menubar .menu .options .option {
  532. color: #888;
  533. }
  534. #menubar .menu .options .inactive {
  535. color: #444;
  536. }
  537. #sidebar {
  538. background-color: #111;
  539. }
  540. #sidebar .Panel {
  541. border-top: 1px solid #222;
  542. }
  543. #sidebar .Panel.Material canvas {
  544. border: solid 1px #5A5A5A;
  545. }
  546. #tabs {
  547. background-color: #1b1b1b;
  548. border-top: 1px solid #222;
  549. }
  550. #tabs span {
  551. color: #555;
  552. border-right: 1px solid #222;
  553. }
  554. #tabs span.selected {
  555. background-color: #111;
  556. }
  557. #toolbar {
  558. background-color: #111;
  559. }
  560. #toolbar img {
  561. filter: invert(1);
  562. }
  563. .Outliner {
  564. background: #222;
  565. }
  566. .Outliner .option {
  567. color: #999;
  568. }
  569. .Outliner .option:hover {
  570. background-color: rgba(21,60,94,0.5);
  571. }
  572. .Outliner .option.active {
  573. background-color: rgba(21,60,94,1);
  574. }
  575. .TabbedPanel .Tabs {
  576. background-color: #1b1b1b;
  577. border-top: 1px solid #222;
  578. }
  579. .TabbedPanel .Tab {
  580. color: #555;
  581. border-right: 1px solid #222;
  582. }
  583. .TabbedPanel .Tab.selected {
  584. color: #888;
  585. background-color: #111;
  586. }
  587. .Listbox {
  588. color: #888;
  589. background: #222;
  590. }
  591. .Listbox .ListboxItem:hover {
  592. background-color: rgba(21,60,94,0.5);
  593. }
  594. .Listbox .ListboxItem.active {
  595. background-color: rgba(21,60,94,1);
  596. }
  597. }
  598. /* Temporary Chrome fix (#24794) */
  599. [draggable="true"] {
  600. transform: translate(0, 0);
  601. z-index: 0;
  602. }
粤ICP备19079148号