main.css 14 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030
  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. .TextureParametersDialog-content {
  748. min-width: 480px;
  749. }
  750. .TextureParametersDialog-split {
  751. display: flex;
  752. gap: 20px;
  753. }
  754. .TextureParametersDialog-preview {
  755. flex: 0 0 auto;
  756. }
  757. .TextureParametersDialog-preview canvas {
  758. border: 1px solid #888;
  759. background: #000;
  760. display: block;
  761. max-width: 100%;
  762. height: auto;
  763. }
  764. .TextureParametersDialog-form {
  765. flex: 1 1 auto;
  766. min-width: 0;
  767. }
  768. @media all and ( max-width: 600px ) {
  769. .TextureParametersDialog-content {
  770. min-width: 0;
  771. width: 90vw;
  772. }
  773. .TextureParametersDialog-split {
  774. flex-direction: column;
  775. }
  776. .TextureParametersDialog-preview {
  777. align-self: center;
  778. max-width: 100%;
  779. }
  780. }
  781. .TextureParametersDialog-groupHeading {
  782. margin: 12px 0 6px;
  783. padding-bottom: 2px;
  784. border-bottom: 1px solid #ccc;
  785. font-weight: bold;
  786. text-transform: uppercase;
  787. font-size: 11px;
  788. color: #666;
  789. }
  790. .TextureParametersDialog-groupHeading:first-child {
  791. margin-top: 0;
  792. }
  793. @media ( prefers-color-scheme: dark ) {
  794. .TextureParametersDialog-groupHeading {
  795. border-bottom-color: #444;
  796. color: #888;
  797. }
  798. }
  799. .TextureSettingsButton {
  800. padding: 0 4px;
  801. line-height: 16px;
  802. }
  803. @media ( prefers-color-scheme: dark ) {
  804. .Dialog-content {
  805. background: #111;
  806. }
  807. .Dialog-title {
  808. color: #888;
  809. }
  810. }
  811. /* Temporary Chrome fix (#24794) */
  812. [draggable="true"] {
  813. transform: translate(0, 0);
  814. z-index: 0;
  815. }
粤ICP备19079148号