1
0

panel.css 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. :root {
  2. color-scheme: light dark;
  3. }
  4. body {
  5. background: light-dark( #fff, #333 );
  6. color: light-dark( #333, #e0e0e0 );
  7. margin: 0;
  8. padding: 10px;
  9. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  10. font-size: 12px;
  11. }
  12. hr {
  13. color: light-dark( #333, #e0e0e0 );
  14. }
  15. #scene-tree {
  16. width: 100%;
  17. height: 100%;
  18. overflow: auto;
  19. }
  20. .header {
  21. padding: 8px 12px;
  22. background: light-dark( #f5f5f5, #333 );
  23. border-radius: 4px;
  24. margin-bottom: 16px;
  25. font-family: monospace;
  26. color: light-dark( #666, #aaa );
  27. }
  28. .header a {
  29. color: light-dark( #666, #aaa );
  30. text-decoration: none;
  31. }
  32. .header a:hover {
  33. color: light-dark( #333, #e0e0e0 );
  34. }
  35. .section {
  36. margin-bottom: 24px;
  37. }
  38. .section h3 {
  39. margin: 0 0 8px 0;
  40. font-size: 11px;
  41. text-transform: uppercase;
  42. color: light-dark( #666, #aaa );
  43. font-weight: 500;
  44. border-bottom: 1px solid light-dark( #eee, #444 );
  45. padding-bottom: 4px;
  46. }
  47. .tree-item {
  48. padding: 4px;
  49. cursor: pointer;
  50. display: flex;
  51. align-items: center;
  52. }
  53. .tree-item:hover {
  54. background: light-dark( #f0f0f0, #555 );
  55. }
  56. .tree-item .icon {
  57. margin-right: 4px;
  58. opacity: 0.7;
  59. }
  60. .tree-item .label {
  61. flex: 1;
  62. white-space: nowrap;
  63. overflow: hidden;
  64. text-overflow: ellipsis;
  65. }
  66. .tree-item .label .object-details {
  67. color: #aaa;
  68. margin-left: 4px;
  69. font-weight: normal;
  70. }
  71. .tree-item .type {
  72. margin-left: 8px;
  73. opacity: 0.5;
  74. font-size: 0.9em;
  75. }
  76. .children {
  77. margin-left: 0;
  78. }
  79. /* Collapsible scene tree nodes */
  80. details.tree-node > summary.tree-item {
  81. list-style: none;
  82. }
  83. details.tree-node > summary.tree-item::-webkit-details-marker {
  84. display: none;
  85. }
  86. .tree-toggle,
  87. .tree-toggle-placeholder {
  88. display: inline-block;
  89. width: 1em;
  90. margin-right: 2px;
  91. text-align: center;
  92. flex-shrink: 0;
  93. }
  94. .tree-toggle::before {
  95. content: '▶';
  96. font-size: 0.7em;
  97. opacity: 0.6;
  98. }
  99. details.tree-node[open] > summary.tree-item .tree-toggle::before {
  100. content: '▼';
  101. }
  102. /* Style for clickable renderer summary */
  103. .renderer-summary {
  104. cursor: pointer;
  105. }
  106. .renderer-summary:hover {
  107. background: light-dark( #f0f0f0, #555 );
  108. }
  109. /* Hide default details marker when using custom summary */
  110. details.renderer-container > summary.renderer-summary { /* Target summary */
  111. list-style: none; /* Hide default arrow */
  112. cursor: pointer; /* Make the summary div look clickable */
  113. }
  114. details.renderer-container > summary.renderer-summary::-webkit-details-marker {
  115. display: none; /* Hide default arrow in WebKit */
  116. }
  117. /* Style for the toggle icon */
  118. .toggle-icon::before {
  119. content: '▶'; /* Default: collapsed */
  120. display: inline-block;
  121. width: 1em;
  122. margin-right: 2px;
  123. opacity: 0.7;
  124. }
  125. details.renderer-container[open] > summary.renderer-summary .toggle-icon::before {
  126. content: '▼'; /* Expanded */
  127. }
  128. /* Floating object details panel */
  129. .floating-details {
  130. position: fixed;
  131. z-index: 1000;
  132. background: light-dark( #fff, #2a2a2a );
  133. border: 1px solid light-dark( #ccc, #555 );
  134. border-radius: 6px;
  135. padding: 12px;
  136. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  137. max-width: 300px;
  138. min-width: 200px;
  139. font-size: 11px;
  140. pointer-events: none; /* Prevent interfering with mouse interactions */
  141. opacity: 0;
  142. transform: translateY(10px);
  143. transition: opacity 0.2s ease, transform 0.2s ease;
  144. }
  145. .floating-details.visible {
  146. opacity: 1;
  147. transform: translateY(0);
  148. }
  149. .floating-details h4 {
  150. margin: 8px 0 4px 0;
  151. font-size: 10px;
  152. text-transform: uppercase;
  153. color: light-dark( #666, #aaa );
  154. border-bottom: 1px solid light-dark( #eee, #444 );
  155. padding-bottom: 2px;
  156. }
  157. .floating-details .property-row {
  158. margin-bottom: 1px;
  159. font-size: 10px;
  160. }
  161. /* Scroll to canvas button */
  162. .scroll-to-canvas-btn {
  163. background: none;
  164. border: none;
  165. cursor: pointer;
  166. font-size: 12px;
  167. margin-left: 8px;
  168. padding: 2px 4px;
  169. border-radius: 3px;
  170. opacity: 0.6;
  171. transition: opacity 0.2s ease, background 0.2s ease;
  172. }
  173. .scroll-to-canvas-btn:hover {
  174. opacity: 1;
  175. background: light-dark( rgba(0,0,0,0.1), rgba(255,255,255,0.1) );
  176. }
  177. .scroll-to-canvas-placeholder {
  178. font-size: 12px;
  179. margin-left: 8px;
  180. padding: 2px 4px;
  181. opacity: 0.3;
  182. }
  183. /* Two-column layout for wide panel */
  184. @media (min-width: 1000px) {
  185. .sections-container {
  186. display: flex;
  187. gap: 20px;
  188. align-items: flex-start;
  189. }
  190. .sections-container .section {
  191. flex: 1;
  192. margin-bottom: 0;
  193. }
  194. /* Ensure sections have equal width */
  195. .sections-container .section:first-child {
  196. min-width: 0; /* Allow flexbox to shrink */
  197. }
  198. .sections-container .section:last-child {
  199. min-width: 0; /* Allow flexbox to shrink */
  200. }
  201. }
粤ICP备19079148号