main.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  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: 36px;
  269. }
  270. #viewport .Text {
  271. text-shadow: 1px 1px 0 rgba(0,0,0,0.25);
  272. pointer-events: none;
  273. }
  274. #animation {
  275. position: absolute;
  276. left: 0;
  277. right: 350px;
  278. bottom: 0;
  279. height: 36px;
  280. background: #eee;
  281. border-top: 1px solid #ccc;
  282. display: none;
  283. flex-direction: row;
  284. }
  285. #animation .Panel {
  286. color: #888;
  287. }
  288. #animation input[type="range"] {
  289. accent-color: #08f;
  290. }
  291. #animation-resizer {
  292. position: absolute;
  293. left: 0;
  294. right: 350px;
  295. bottom: 36px;
  296. height: 5px;
  297. transform: translateY(2.5px);
  298. cursor: row-resize;
  299. z-index: 2;
  300. }
  301. #animation-resizer:hover {
  302. background-color: #08f8;
  303. transition-property: background-color;
  304. transition-delay: 0.1s;
  305. transition-duration: 0.2s;
  306. }
  307. #animation-resizer:active {
  308. background-color: #08f;
  309. }
  310. #script {
  311. position: absolute;
  312. top: 36px;
  313. left: 0;
  314. right: 350px;
  315. bottom: 0;
  316. opacity: 0.9;
  317. }
  318. #player {
  319. position: absolute;
  320. top: 36px;
  321. left: 0;
  322. right: 350px;
  323. bottom: 0;
  324. }
  325. #menubar {
  326. position: absolute;
  327. width: 100%;
  328. height: 36px;
  329. background: #eee;
  330. padding: 0;
  331. margin: 0;
  332. right: 0;
  333. top: 0;
  334. }
  335. #menubar .menu {
  336. float: left;
  337. cursor: pointer;
  338. padding-right: 8px;
  339. }
  340. #menubar .menu.right {
  341. float: right;
  342. cursor: auto;
  343. padding-right: 0;
  344. text-align: right;
  345. }
  346. #menubar .menu .title {
  347. display: inline-block;
  348. color: #888;
  349. margin: 0;
  350. padding: 10px;
  351. line-height: 16px;
  352. }
  353. #menubar .menu .key {
  354. position: absolute;
  355. right: 10px;
  356. color: #ccc;
  357. border: 1px solid #ccc;
  358. border-radius: 4px;
  359. font-size: 9px;
  360. line-height: normal;
  361. padding: 2px 4px;
  362. right: 10px;
  363. pointer-events: none;
  364. }
  365. #menubar .menu .options {
  366. position: fixed;
  367. z-index: 1; /* higher than resizer */
  368. display: none;
  369. padding: 5px 0;
  370. background: #eee;
  371. min-width: 150px;
  372. max-height: calc(100vh - 80px);
  373. overflow: auto;
  374. }
  375. #menubar .menu:hover .options {
  376. display: block;
  377. box-shadow: 0 10px 10px -5px #00000033;
  378. }
  379. #menubar .menu .options hr {
  380. border-color: #ddd;
  381. }
  382. #menubar .menu .options .option {
  383. color: #666;
  384. background-color: transparent;
  385. padding: 5px 10px;
  386. line-height: 25px;
  387. margin: 0 !important;
  388. }
  389. #menubar .menu .options .option:hover {
  390. color: #fff;
  391. background-color: #08f;
  392. }
  393. #menubar .menu .options .option:not(.submenu-title):active {
  394. color: #666;
  395. background: transparent;
  396. }
  397. #menubar .menu .options .option.toggle::before {
  398. content: ' ';
  399. display: inline-block;
  400. width: 16px;
  401. }
  402. #menubar .menu .options .option.toggle-on::before {
  403. content: '✔';
  404. font-size: 12px;
  405. }
  406. #menubar .submenu-title::after {
  407. content: '⏵';
  408. float: right;
  409. }
  410. #menubar .menu .options .inactive {
  411. color: #bbb;
  412. background-color: transparent;
  413. padding: 5px 10px;
  414. line-height: 25px;
  415. margin: 0 !important;
  416. cursor: not-allowed;
  417. }
  418. #sidebar {
  419. position: absolute;
  420. right: 0;
  421. top: 36px;
  422. bottom: 0;
  423. width: 350px;
  424. background: #eee;
  425. overflow: auto;
  426. overflow-x: hidden;
  427. }
  428. #sidebar .Panel {
  429. color: #888;
  430. padding: 10px;
  431. border-top: 1px solid #ccc;
  432. }
  433. #sidebar .Panel.collapsed {
  434. margin-bottom: 0;
  435. }
  436. #sidebar .Row {
  437. display: flex;
  438. align-items: center;
  439. min-height: 24px;
  440. margin-bottom: 10px;
  441. }
  442. #sidebar .Row .Label {
  443. width: 120px;
  444. }
  445. #tabs {
  446. background-color: #ddd;
  447. border-top: 1px solid #ccc;
  448. }
  449. #tabs span {
  450. color: #aaa;
  451. border-right: 1px solid #ccc;
  452. padding: 10px;
  453. }
  454. #tabs span.selected {
  455. color: #888;
  456. background-color: #eee;
  457. }
  458. #toolbar {
  459. position: absolute;
  460. left: calc(50% - 175px);
  461. transform: translateX(-50%);
  462. bottom: 56px;
  463. height: 32px;
  464. background: #eee;
  465. text-align: center;
  466. display: flex;
  467. align-items: center;
  468. gap: 2px;
  469. border-radius: 6px;
  470. border: 3px solid #eee;
  471. overflow: hidden;
  472. }
  473. #toolbar .Button, #toolbar .Input {
  474. height: 32px;
  475. border-radius: 4px;
  476. display: flex;
  477. align-items: center;
  478. justify-content: center;
  479. }
  480. #toolbar .Button img {
  481. width: 16px;
  482. opacity: 0.5;
  483. }
  484. .Outliner {
  485. color: #444;
  486. background-color: #fff;
  487. padding: 0;
  488. width: 100%;
  489. height: 180px;
  490. font-size: 12px;
  491. cursor: default;
  492. overflow: auto;
  493. resize: vertical;
  494. outline: none !important;
  495. }
  496. .Outliner .option {
  497. padding: 4px;
  498. color: #666;
  499. white-space: nowrap;
  500. }
  501. .Outliner .option:hover {
  502. background-color: rgba(0,0,0,0.02);
  503. }
  504. .Outliner .option.active {
  505. background-color: rgba(0,0,0,0.04);
  506. }
  507. .TabbedPanel .Tabs {
  508. background-color: #ddd;
  509. border-top: 1px solid #ccc;
  510. }
  511. .TabbedPanel .Tab {
  512. color: #aaa;
  513. border-right: 1px solid #ccc;
  514. }
  515. .TabbedPanel .Tab.selected {
  516. color: #888;
  517. background-color: #eee;
  518. }
  519. .Listbox {
  520. color: #444;
  521. background-color: #fff;
  522. }
  523. .Panel {
  524. color: #888;
  525. }
  526. /* */
  527. @media all and ( max-width: 600px ) {
  528. #resizer {
  529. display: none;
  530. }
  531. #animation-resizer {
  532. display: none;
  533. }
  534. #menubar .menu .options {
  535. max-height: calc(100% - 80px);
  536. }
  537. #menubar .menu.right {
  538. display: none;
  539. }
  540. #viewport {
  541. left: 0;
  542. right: 0;
  543. top: 36px;
  544. height: calc(100% - 356px);
  545. }
  546. #script {
  547. left: 0;
  548. right: 0;
  549. top: 36px;
  550. height: calc(100% - 356px);
  551. }
  552. #player {
  553. left: 0;
  554. right: 0;
  555. top: 36px;
  556. height: calc(100% - 356px);
  557. }
  558. #sidebar {
  559. left: 0;
  560. width: 100%;
  561. top: calc(100% - 320px);
  562. bottom: 0;
  563. }
  564. #toolbar {
  565. left: 50%;
  566. transform: translateX(-50%);
  567. bottom: 330px;
  568. }
  569. #animation {
  570. display: none !important;
  571. }
  572. }
  573. /* DARK MODE */
  574. @media ( prefers-color-scheme: dark ) {
  575. .Button {
  576. color: #aaa;
  577. background-color: #222;
  578. }
  579. .Button:hover {
  580. color: #ccc;
  581. background-color: #444;
  582. }
  583. .Button.selected {
  584. color: #fff;
  585. background-color: #08f;
  586. }
  587. .Input, .TextArea {
  588. background-color: #222;
  589. border: 1px solid transparent;
  590. color: #888;
  591. }
  592. .Select {
  593. color: #aaa;
  594. background-color: #222;
  595. border-color: #222;
  596. }
  597. .Select:hover {
  598. color: #ccc;
  599. background-color: #444;
  600. }
  601. /* UI */
  602. #menubar {
  603. background: #111;
  604. }
  605. #menubar .menu .key {
  606. color: #444;
  607. border-color: #444;
  608. }
  609. #menubar .menu .options {
  610. background: #111;
  611. }
  612. #menubar .menu .options hr {
  613. border-color: #222;
  614. }
  615. #menubar .menu .options .option {
  616. color: #888;
  617. }
  618. #menubar .menu .options .inactive {
  619. color: #444;
  620. }
  621. #sidebar {
  622. background-color: #111;
  623. }
  624. #sidebar .Panel {
  625. border-top: 1px solid #222;
  626. }
  627. #sidebar .Panel.Material canvas {
  628. border: solid 1px #5A5A5A;
  629. }
  630. #animation {
  631. background-color: #111;
  632. border-top: 1px solid #222;
  633. }
  634. #animation .Panel {
  635. border-bottom: 1px solid #222;
  636. }
  637. #animation .timeline-container {
  638. background: rgba(255, 255, 255, 0.05);
  639. }
  640. #tabs {
  641. background-color: #1b1b1b;
  642. border-top: 1px solid #222;
  643. }
  644. #tabs span {
  645. color: #555;
  646. border-right: 1px solid #222;
  647. }
  648. #tabs span.selected {
  649. background-color: #111;
  650. }
  651. #toolbar {
  652. background-color: #111;
  653. border-color: #111;
  654. }
  655. #toolbar img {
  656. filter: invert(1);
  657. }
  658. .Outliner {
  659. background: #222;
  660. }
  661. .Outliner .option {
  662. color: #999;
  663. }
  664. .Outliner .option:hover {
  665. background-color: rgba(21,60,94,0.5);
  666. }
  667. .Outliner .option.active {
  668. background-color: rgba(21,60,94,1);
  669. }
  670. .TabbedPanel .Tabs {
  671. background-color: #1b1b1b;
  672. border-top: 1px solid #222;
  673. }
  674. .TabbedPanel .Tabs::-webkit-scrollbar {
  675. background: #111;
  676. }
  677. .TabbedPanel .Tab {
  678. color: #555;
  679. border-right: 1px solid #222;
  680. }
  681. .TabbedPanel .Tab.selected {
  682. color: #888;
  683. background-color: #111;
  684. }
  685. .Listbox {
  686. color: #888;
  687. background: #222;
  688. }
  689. .Listbox .ListboxItem:hover {
  690. background-color: rgba(21,60,94,0.5);
  691. }
  692. .Listbox .ListboxItem.active {
  693. background-color: rgba(21,60,94,1);
  694. }
  695. }
  696. /* Dialog */
  697. .Dialog {
  698. position: fixed;
  699. top: 0;
  700. left: 0;
  701. right: 0;
  702. bottom: 0;
  703. z-index: 100;
  704. display: flex;
  705. align-items: center;
  706. justify-content: center;
  707. }
  708. .Dialog-background {
  709. position: absolute;
  710. top: 0;
  711. left: 0;
  712. right: 0;
  713. bottom: 0;
  714. background: rgba(0, 0, 0, 0.5);
  715. }
  716. .Dialog-content {
  717. position: relative;
  718. background: #eee;
  719. min-width: 300px;
  720. max-width: 90%;
  721. max-height: 90%;
  722. overflow: auto;
  723. }
  724. .Dialog-title {
  725. padding: 10px 15px;
  726. color: #666;
  727. text-transform: uppercase;
  728. }
  729. .Dialog-body {
  730. padding: 15px;
  731. }
  732. .Dialog-body .Row {
  733. display: flex;
  734. align-items: center;
  735. min-height: 24px;
  736. margin-bottom: 10px;
  737. }
  738. .Dialog-body .Row .Label {
  739. width: 120px;
  740. color: #888;
  741. }
  742. .Dialog-buttons {
  743. display: flex;
  744. justify-content: flex-end;
  745. margin-top: 15px;
  746. }
  747. @media ( prefers-color-scheme: dark ) {
  748. .Dialog-content {
  749. background: #111;
  750. }
  751. .Dialog-title {
  752. color: #888;
  753. }
  754. }
  755. /* Temporary Chrome fix (#24794) */
  756. [draggable="true"] {
  757. transform: translate(0, 0);
  758. z-index: 0;
  759. }
粤ICP备19079148号