main.css 11 KB

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