main.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
  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. z-index: 1; /** Above .Panels **/
  65. display: block;
  66. width: 100%;
  67. white-space: pre;
  68. overflow: hidden;
  69. overflow-x: auto;
  70. }
  71. .TabbedPanel .Tabs::-webkit-scrollbar {
  72. height: 5px;
  73. background: #eee;
  74. }
  75. .TabbedPanel .Tabs::-webkit-scrollbar-thumb {
  76. background: #08f3;
  77. }
  78. .TabbedPanel .Tabs:hover::-webkit-scrollbar-thumb {
  79. background: #08f;
  80. cursor: ew-resize;
  81. }
  82. .TabbedPanel .Tabs .Tab {
  83. padding: 10px 9px;
  84. text-transform: uppercase;
  85. }
  86. .TabbedPanel .Panels {
  87. position: absolute;
  88. top: 36px;
  89. display: block;
  90. width: 100%;
  91. }
  92. /* Listbox */
  93. .Listbox {
  94. color: #444;
  95. background-color: #fff;
  96. padding: 0;
  97. width: 100%;
  98. min-height: 180px;
  99. font-size: 12px;
  100. cursor: default;
  101. overflow: auto;
  102. }
  103. .Listbox .ListboxItem {
  104. padding: 4px;
  105. color: #666;
  106. white-space: nowrap;
  107. }
  108. .Listbox .ListboxItem:hover {
  109. background-color: rgba(0, 0, 0, 0.02);
  110. }
  111. .Listbox .ListboxItem.active {
  112. background-color: rgba(0, 0, 0, 0.04);
  113. }
  114. /* CodeMirror */
  115. .CodeMirror {
  116. position: absolute !important;
  117. top: 37px;
  118. width: 100% !important;
  119. height: calc(100% - 37px) !important;
  120. }
  121. .CodeMirror .errorLine {
  122. background: rgba(255,0,0,0.25);
  123. }
  124. .CodeMirror .esprima-error {
  125. color: #f00;
  126. text-align: right;
  127. padding: 0 20px;
  128. }
  129. /* outliner */
  130. #outliner .opener {
  131. display: inline-block;
  132. width: 14px;
  133. height: 14px;
  134. margin: 0px 4px;
  135. vertical-align: top;
  136. text-align: center;
  137. }
  138. #outliner .opener.open:after {
  139. content: '−';
  140. }
  141. #outliner .opener.closed:after {
  142. content: '+';
  143. }
  144. #outliner .option {
  145. border: 1px solid transparent;
  146. }
  147. #outliner .option.drag {
  148. border: 1px dashed #999;
  149. }
  150. #outliner .option.dragTop {
  151. border-top: 1px dashed #999;
  152. }
  153. #outliner .option.dragBottom {
  154. border-bottom: 1px dashed #999;
  155. }
  156. #outliner .type {
  157. display: inline-block;
  158. width: 14px;
  159. height: 14px;
  160. color: #ddd;
  161. text-align: center;
  162. }
  163. #outliner .type:after {
  164. content: '●';
  165. }
  166. /* */
  167. #outliner .Scene {
  168. color: #8888dd;
  169. }
  170. #outliner .Camera {
  171. color: #dd8888;
  172. }
  173. #outliner .Light {
  174. color: #dddd88;
  175. }
  176. /* */
  177. #outliner .Object3D {
  178. color: #aaaaee;
  179. }
  180. #outliner .Mesh {
  181. color: #8888ee;
  182. }
  183. #outliner .Line {
  184. color: #88ee88;
  185. }
  186. #outliner .LineSegments {
  187. color: #88ee88;
  188. }
  189. #outliner .Points {
  190. color: #ee8888;
  191. }
  192. /* */
  193. #outliner .Geometry {
  194. color: #aaeeaa;
  195. }
  196. #outliner .Material {
  197. color: #eeaaee;
  198. }
  199. /* */
  200. #outliner .Script:after {
  201. content: '◎'
  202. }
  203. /* */
  204. .Button {
  205. color: #555;
  206. background-color: #ddd;
  207. border: 0px;
  208. margin: 0px; /* GNOME Web */
  209. padding: 5px 8px;
  210. font-size: 12px;
  211. text-transform: uppercase;
  212. cursor: pointer;
  213. outline: none;
  214. }
  215. .Button:hover {
  216. background-color: #fff;
  217. }
  218. .Button.selected {
  219. background-color: #fff;
  220. }
  221. .Input, .TextArea {
  222. border: 1px solid transparent;
  223. color: #444;
  224. }
  225. .Input.Number {
  226. color: #08f!important;
  227. font-size: 12px;
  228. border: 0px;
  229. padding: 2px;
  230. }
  231. .Select {
  232. color: #666;
  233. background-color: #ddd;
  234. border: 3px solid #ddd;
  235. border-radius: 4px;
  236. text-transform: uppercase;
  237. cursor: pointer;
  238. outline: none;
  239. }
  240. .Select:hover {
  241. background-color: #fff;
  242. }
  243. /* UI */
  244. #resizer {
  245. position: absolute;
  246. z-index: 2; /* Above #sidebar */
  247. top: 36px;
  248. right: 350px;
  249. width: 5px;
  250. bottom: 0px;
  251. transform: translatex(2.5px);
  252. cursor: col-resize;
  253. }
  254. #resizer:hover {
  255. background-color: #08f8;
  256. transition-property: background-color;
  257. transition-delay: 0.1s;
  258. transition-duration: 0.2s;
  259. }
  260. #resizer:active {
  261. background-color: #08f;
  262. }
  263. #viewport {
  264. position: absolute;
  265. top: 36px;
  266. left: 0;
  267. right: 350px;
  268. bottom: 0;
  269. }
  270. #viewport .Text {
  271. text-shadow: 1px 1px 0 rgba(0,0,0,0.25);
  272. pointer-events: none;
  273. }
  274. #script {
  275. position: absolute;
  276. top: 36px;
  277. left: 0;
  278. right: 350px;
  279. bottom: 0;
  280. opacity: 0.9;
  281. }
  282. #player {
  283. position: absolute;
  284. top: 36px;
  285. left: 0;
  286. right: 350px;
  287. bottom: 0;
  288. }
  289. #menubar {
  290. position: absolute;
  291. width: 100%;
  292. height: 36px;
  293. background: #eee;
  294. padding: 0;
  295. margin: 0;
  296. right: 0;
  297. top: 0;
  298. }
  299. #menubar .menu {
  300. float: left;
  301. cursor: pointer;
  302. padding-right: 8px;
  303. }
  304. #menubar .menu.right {
  305. float: right;
  306. cursor: auto;
  307. padding-right: 0;
  308. text-align: right;
  309. }
  310. #menubar .menu .title {
  311. display: inline-block;
  312. color: #888;
  313. margin: 0;
  314. padding: 10px;
  315. line-height: 16px;
  316. }
  317. #menubar .menu .key {
  318. position: absolute;
  319. right: 10px;
  320. color: #ccc;
  321. border: 1px solid #ccc;
  322. border-radius: 4px;
  323. font-size: 9px;
  324. line-height: normal;
  325. padding: 2px 4px;
  326. right: 10px;
  327. pointer-events: none;
  328. }
  329. #menubar .menu .options {
  330. position: fixed;
  331. z-index: 1; /* higher than resizer */
  332. display: none;
  333. padding: 5px 0;
  334. background: #eee;
  335. min-width: 150px;
  336. max-height: calc(100vh - 80px);
  337. overflow: auto;
  338. }
  339. #menubar .menu:hover .options {
  340. display: block;
  341. box-shadow: 0 10px 10px -5px #00000033;
  342. }
  343. #menubar .menu .options hr {
  344. border-color: #ddd;
  345. }
  346. #menubar .menu .options .option {
  347. color: #666;
  348. background-color: transparent;
  349. padding: 5px 10px;
  350. line-height: 25px;
  351. margin: 0 !important;
  352. }
  353. #menubar .menu .options .option:hover {
  354. color: #fff;
  355. background-color: #08f;
  356. }
  357. #menubar .menu .options .option:not(.submenu-title):active {
  358. color: #666;
  359. background: transparent;
  360. }
  361. #menubar .menu .options .option.toggle::before {
  362. content: ' ';
  363. display: inline-block;
  364. width: 16px;
  365. }
  366. #menubar .menu .options .option.toggle-on::before {
  367. content: '✔';
  368. font-size: 12px;
  369. }
  370. #menubar .submenu-title::after {
  371. content: '⏵';
  372. float: right;
  373. }
  374. #menubar .menu .options .inactive {
  375. color: #bbb;
  376. background-color: transparent;
  377. padding: 5px 10px;
  378. line-height: 25px;
  379. margin: 0 !important;
  380. cursor: not-allowed;
  381. }
  382. #sidebar {
  383. position: absolute;
  384. right: 0;
  385. top: 36px;
  386. bottom: 0;
  387. width: 350px;
  388. background: #eee;
  389. overflow: auto;
  390. overflow-x: hidden;
  391. }
  392. #sidebar .Panel {
  393. color: #888;
  394. padding: 10px;
  395. border-top: 1px solid #ccc;
  396. }
  397. #sidebar .Panel.collapsed {
  398. margin-bottom: 0;
  399. }
  400. #sidebar .Row {
  401. display: flex;
  402. align-items: center;
  403. min-height: 24px;
  404. margin-bottom: 10px;
  405. }
  406. #sidebar .Row .Label {
  407. width: 120px;
  408. }
  409. #tabs {
  410. background-color: #ddd;
  411. border-top: 1px solid #ccc;
  412. }
  413. #tabs span {
  414. color: #aaa;
  415. border-right: 1px solid #ccc;
  416. padding: 10px;
  417. }
  418. #tabs span.selected {
  419. color: #888;
  420. background-color: #eee;
  421. }
  422. #toolbar {
  423. position: absolute;
  424. left: calc(50% - 175px);
  425. transform: translateX(-50%);
  426. bottom: 20px;
  427. height: 32px;
  428. background: #eee;
  429. text-align: center;
  430. display: flex;
  431. align-items: center;
  432. gap: 2px;
  433. border-radius: 6px;
  434. border: 3px solid #eee;
  435. overflow: hidden;
  436. }
  437. #toolbar .Button, #toolbar .Input {
  438. height: 32px;
  439. border-radius: 4px;
  440. display: flex;
  441. align-items: center;
  442. justify-content: center;
  443. }
  444. #toolbar .Button img {
  445. width: 16px;
  446. opacity: 0.5;
  447. }
  448. .Outliner {
  449. color: #444;
  450. background-color: #fff;
  451. padding: 0;
  452. width: 100%;
  453. height: 180px;
  454. font-size: 12px;
  455. cursor: default;
  456. overflow: auto;
  457. resize: vertical;
  458. outline: none !important;
  459. }
  460. .Outliner .option {
  461. padding: 4px;
  462. color: #666;
  463. white-space: nowrap;
  464. }
  465. .Outliner .option:hover {
  466. background-color: rgba(0,0,0,0.02);
  467. }
  468. .Outliner .option.active {
  469. background-color: rgba(0,0,0,0.04);
  470. }
  471. .TabbedPanel .Tabs {
  472. background-color: #ddd;
  473. border-top: 1px solid #ccc;
  474. }
  475. .TabbedPanel .Tab {
  476. color: #aaa;
  477. border-right: 1px solid #ccc;
  478. }
  479. .TabbedPanel .Tab.selected {
  480. color: #888;
  481. background-color: #eee;
  482. }
  483. .Listbox {
  484. color: #444;
  485. background-color: #fff;
  486. }
  487. .Panel {
  488. color: #888;
  489. }
  490. /* */
  491. @media all and ( max-width: 600px ) {
  492. #resizer {
  493. display: none;
  494. }
  495. #menubar .menu .options {
  496. max-height: calc(100% - 80px);
  497. }
  498. #menubar .menu.right {
  499. display: none;
  500. }
  501. #viewport {
  502. left: 0;
  503. right: 0;
  504. top: 36px;
  505. height: calc(100% - 356px);
  506. }
  507. #script {
  508. left: 0;
  509. right: 0;
  510. top: 36px;
  511. height: calc(100% - 356px);
  512. }
  513. #player {
  514. left: 0;
  515. right: 0;
  516. top: 36px;
  517. height: calc(100% - 356px);
  518. }
  519. #sidebar {
  520. left: 0;
  521. width: 100%;
  522. top: calc(100% - 320px);
  523. bottom: 0;
  524. }
  525. #toolbar {
  526. left: 50%;
  527. transform: translateX(-50%);
  528. bottom: 330px;
  529. }
  530. }
  531. /* DARK MODE */
  532. @media ( prefers-color-scheme: dark ) {
  533. .Button {
  534. color: #aaa;
  535. background-color: #222;
  536. }
  537. .Button:hover {
  538. color: #ccc;
  539. background-color: #444;
  540. }
  541. .Button.selected {
  542. color: #fff;
  543. background-color: #08f;
  544. }
  545. .Input, .TextArea {
  546. background-color: #222;
  547. border: 1px solid transparent;
  548. color: #888;
  549. }
  550. .Select {
  551. color: #aaa;
  552. background-color: #222;
  553. border-color: #222;
  554. }
  555. .Select:hover {
  556. color: #ccc;
  557. background-color: #444;
  558. }
  559. /* UI */
  560. #menubar {
  561. background: #111;
  562. }
  563. #menubar .menu .key {
  564. color: #444;
  565. border-color: #444;
  566. }
  567. #menubar .menu .options {
  568. background: #111;
  569. }
  570. #menubar .menu .options hr {
  571. border-color: #222;
  572. }
  573. #menubar .menu .options .option {
  574. color: #888;
  575. }
  576. #menubar .menu .options .inactive {
  577. color: #444;
  578. }
  579. #sidebar {
  580. background-color: #111;
  581. }
  582. #sidebar .Panel {
  583. border-top: 1px solid #222;
  584. }
  585. #sidebar .Panel.Material canvas {
  586. border: solid 1px #5A5A5A;
  587. }
  588. #tabs {
  589. background-color: #1b1b1b;
  590. border-top: 1px solid #222;
  591. }
  592. #tabs span {
  593. color: #555;
  594. border-right: 1px solid #222;
  595. }
  596. #tabs span.selected {
  597. background-color: #111;
  598. }
  599. #toolbar {
  600. background-color: #111;
  601. border-color: #111;
  602. }
  603. #toolbar img {
  604. filter: invert(1);
  605. }
  606. .Outliner {
  607. background: #222;
  608. }
  609. .Outliner .option {
  610. color: #999;
  611. }
  612. .Outliner .option:hover {
  613. background-color: rgba(21,60,94,0.5);
  614. }
  615. .Outliner .option.active {
  616. background-color: rgba(21,60,94,1);
  617. }
  618. .TabbedPanel .Tabs {
  619. background-color: #1b1b1b;
  620. border-top: 1px solid #222;
  621. }
  622. .TabbedPanel .Tabs::-webkit-scrollbar {
  623. background: #111;
  624. }
  625. .TabbedPanel .Tab {
  626. color: #555;
  627. border-right: 1px solid #222;
  628. }
  629. .TabbedPanel .Tab.selected {
  630. color: #888;
  631. background-color: #111;
  632. }
  633. .Listbox {
  634. color: #888;
  635. background: #222;
  636. }
  637. .Listbox .ListboxItem:hover {
  638. background-color: rgba(21,60,94,0.5);
  639. }
  640. .Listbox .ListboxItem.active {
  641. background-color: rgba(21,60,94,1);
  642. }
  643. }
  644. /* Dialog */
  645. .Dialog {
  646. position: fixed;
  647. top: 0;
  648. left: 0;
  649. right: 0;
  650. bottom: 0;
  651. z-index: 100;
  652. display: flex;
  653. align-items: center;
  654. justify-content: center;
  655. }
  656. .Dialog-background {
  657. position: absolute;
  658. top: 0;
  659. left: 0;
  660. right: 0;
  661. bottom: 0;
  662. background: rgba(0, 0, 0, 0.5);
  663. }
  664. .Dialog-content {
  665. position: relative;
  666. background: #eee;
  667. min-width: 300px;
  668. max-width: 90%;
  669. max-height: 90%;
  670. overflow: auto;
  671. }
  672. .Dialog-title {
  673. padding: 10px 15px;
  674. color: #666;
  675. text-transform: uppercase;
  676. }
  677. .Dialog-body {
  678. padding: 15px;
  679. }
  680. .Dialog-body .Row {
  681. display: flex;
  682. align-items: center;
  683. min-height: 24px;
  684. margin-bottom: 10px;
  685. }
  686. .Dialog-body .Row .Label {
  687. width: 120px;
  688. color: #888;
  689. }
  690. .Dialog-buttons {
  691. display: flex;
  692. justify-content: flex-end;
  693. margin-top: 15px;
  694. }
  695. @media ( prefers-color-scheme: dark ) {
  696. .Dialog-content {
  697. background: #111;
  698. }
  699. .Dialog-title {
  700. color: #888;
  701. }
  702. }
  703. /* Temporary Chrome fix (#24794) */
  704. [draggable="true"] {
  705. transform: translate(0, 0);
  706. z-index: 0;
  707. }
粤ICP备19079148号