pages235/src/styles.css
Vitaly 9b72cdb8f0
feat: migrate to mc-assets & Rsbuild better resource pack support (#164)
The complete migration from `minecraft-assets` to [`mc-assets`](https://npmjs.com/mc-assets).

Now all block states & block models are processed dynamically! So it is now easily possible to implement custom models

- no post-install work anymore: the building is now 3x faster and 4x faster in docker
- drop 10x total deploy size
- display world ~1.5x faster
- fix snow & repeater state parser (they didn't render correctly)

rsbuild pipeline!

- the initial app load is faster ~1.2
- much fewer requests are made & cached
- dev reloads are fast now

Resource pack changes:

- now textures are reloaded much more quickly on the fly
- add hotkey to quickly reload textures (for debugging) assigned to F3+T (open dev widget is now assigned to F3+Y)
- add a way to disable resource pack instead of uninstalling it
- items render from resource pack are now support
- resource pack widgets & icons are now supported
2024-07-26 13:12:28 +03:00

197 lines
3.6 KiB
CSS

@import url(./screens.css);
@import url('pixelarticons/fonts/pixelart-icons-font.css');
:root {
--guiScaleFactor: 3;
--guiScale: 3;
--chatWidth: 320px;
--chatHeight: 180px;
--chatScale: 1;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
a {
color: white;
}
[hidden] {
display: none !important;
}
html {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
height: 100vh;
overflow: hidden;
color: white;
}
html.disable-assets {
--widgets-gui-atlas: none;
--title-gui: none;
}
body {
overflow: hidden;
position: relative;
margin: 0;
padding: 0;
height: 100vh;
/* font-family: sans-serif; */
background: #333;
/* background: linear-gradient(#141e30, #243b55); */
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
font-family: minecraft, mojangles, monospace;
z-index: -5;
}
#react-root {
z-index: 9;
position: fixed;
}
.text {
color: white;
font-size: 10px;
text-shadow: 1px 1px #222;
}
#VRButton {
background: rgba(0, 0, 0, 0.3) !important;
opacity: 0.7 !important;
position: fixed !important;
bottom: 60px !important;
}
.dirt-bg {
position: absolute;
top: 0;
left: 0;
background: url('mc-assets/dist/other-textures/latest/gui/options_background.png'), rgba(0, 0, 0, 0.7);
background-size: 16px;
background-repeat: repeat;
width: 100%;
height: 100%;
transform-origin: top left;
transform: scale(2);
background-blend-mode: overlay;
}
/* todo move from here */
[data-name="TouchMovementArea"] {
/* padding-left: calc(env(safe-area-inset-left) / 2);
padding-right: calc(env(safe-area-inset-right) / 2);
padding-bottom: calc(env(safe-area-inset-bottom) / 2); */
margin: calc(var(--touch-movement-buttons-position) * 2);
--border: none;
}
[data-name="TouchMovementArea"]:first-child {
--border: 1px solid rgba(255, 255, 255, 0.1);
margin-right: 0;
}
[data-name="TouchMovementArea"]:last-child {
margin-left: 0;
}
[data-name="MovementButton"] {
opacity: var(--touch-movement-buttons-opacity);
border: var(--border);
}
@font-face {
font-family: minecraft;
src: url(../assets/minecraftia.woff);
}
@font-face {
font-family: mojangles;
src: url(../assets/mojangles.ttf);
}
#ui-root {
position: fixed;
top: 0;
left: 0;
transform-origin: top left;
transform: scale(var(--guiScale));
width: calc(100% / var(--guiScale));
height: calc(100% / var(--guiScale));
z-index: 8;
image-rendering: optimizeSpeed;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: -o-crisp-edges;
image-rendering: pixelated;
-ms-interpolation-mode: nearest-neighbor;
}
.overlay-top-scaled, .overlay-bottom-scaled {
position: fixed;
inset: 0;
transform-origin: top left;
transform: scale(var(--guiScale));
width: calc(100% / var(--guiScale));
height: calc(100% / var(--guiScale));
z-index: 80;
image-rendering: pixelated;
pointer-events: none;
}
.overlay-bottom-scaled {
z-index: 1;
}
#viewer-canvas {
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
font-size: 0;
margin: 0;
padding: 0;
animation-duration: 0.3s;
animation-timing-function: ease-in-out;
animation-fill-mode: forwards;
}
body::xr-overlay #viewer-canvas {
display: none;
}
.full-svg svg {
width: 100%;
height: 100%;
}
.muted {
color: #999;
}
@media screen and (min-width: 430px) {
.span-2 {
grid-column: span 2;
}
}
@keyframes dive-animation {
0% {
transform: translateZ(-150px);
opacity: 0;
}
100% {
transform: translateZ(0);
opacity: 1;
}
}