fix: RoomRenderable

This commit is contained in:
cha0s 2022-04-03 12:02:02 -05:00
parent 61b978aaaa
commit 5d62fdd1f9
2 changed files with 17 additions and 1 deletions

View File

@ -18,7 +18,7 @@ const RoomStage = () => {
setCamera(selfEntity.camera);
}
}, [selfEntity]);
return <RoomRenderable camera={camera} className={styles.stage} room={room} />;
return <RoomRenderable camera={camera} styles={styles} room={room} />;
};
export default RoomStage;

View File

@ -1,8 +1,13 @@
.stage {
display: inline-block;
left: 50%;
line-height: 0;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
canvas {
image-rendering: pixelated;
}
@media (max-aspect-ratio: 16/9) {
&,
& > [class],
@ -18,3 +23,14 @@
}
}
}
.canvas {
align-items: center;
display: flex;
flex-grow: 1;
height: 100%;
justify-content: space-around;
position: relative;
width: 100%;
line-height: 0;
}