main.css 8.9 KB

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