- Add visibility-based animation pause (IntersectionObserver + wrapped rAF) - Zero CPU usage when widget scrolls out of view - Apply host style variables via useHostStyles - Support transparent WebGL background (alpha: true) - Use light-dark() for theme-aware fallback colors - Tool no longer echoes code back in result - Document performance features in README
47 lines
871 B
CSS
47 lines
871 B
CSS
:root {
|
|
color-scheme: light dark;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html, body {
|
|
font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
|
|
font-size: 1rem;
|
|
margin: 0;
|
|
padding: 0;
|
|
background: transparent;
|
|
}
|
|
|
|
.loading {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 400px;
|
|
color: var(--color-text-secondary, #888);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.error {
|
|
padding: 20px;
|
|
color: var(--color-text-danger, #ff6b6b);
|
|
}
|
|
|
|
.threejs-container {
|
|
width: 100%;
|
|
position: relative;
|
|
}
|
|
|
|
.error-overlay {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--color-text-danger, #ff6b6b);
|
|
background: var(--color-background-secondary, rgba(26, 26, 46, 0.9));
|
|
border-radius: var(--border-radius-md, 8px);
|
|
font-family: var(--font-sans, system-ui);
|
|
padding: 20px;
|
|
}
|