ui/cubes: adjust label style
This commit is contained in:
@@ -14,8 +14,18 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.machine-label {
|
||||
@apply text-white bg-fg-def-2 py-1 px-3 rounded-sm;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
@apply text-white bg-inv-4 py-1 px-2 rounded-sm;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.machine-label::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: #203637 transparent transparent transparent;
|
||||
}
|
||||
|
||||
@@ -563,7 +563,7 @@ export function CubeScene(props: {
|
||||
const ambientLight = new THREE.AmbientLight(0xffffff, 1);
|
||||
scene.add(ambientLight);
|
||||
|
||||
const directionalLight = new THREE.DirectionalLight(0xffffff, 1);
|
||||
const directionalLight = new THREE.DirectionalLight(0xffffff, 2);
|
||||
|
||||
// scene.add(new THREE.DirectionalLightHelper(directionalLight));
|
||||
// scene.add(new THREE.CameraHelper(directionalLight.shadow.camera));
|
||||
@@ -587,7 +587,7 @@ export function CubeScene(props: {
|
||||
directionalLight.shadow.camera.far = 2000;
|
||||
directionalLight.shadow.mapSize.width = 4096; // Higher resolution for sharper shadows
|
||||
directionalLight.shadow.mapSize.height = 4096;
|
||||
directionalLight.shadow.radius = 0; // Hard shadows (low radius)
|
||||
directionalLight.shadow.radius = 1; // Hard shadows (low radius)
|
||||
directionalLight.shadow.blurSamples = 4; // Fewer samples for harder edges
|
||||
scene.add(directionalLight);
|
||||
scene.add(directionalLight.target);
|
||||
@@ -814,7 +814,7 @@ export function CubeScene(props: {
|
||||
nameDiv.textContent = `${userData.id}`;
|
||||
|
||||
const nameLabel = new CSS2DObject(nameDiv);
|
||||
nameLabel.position.set(0, CUBE_Y + CUBE_SIZE / 2 + 0.2, 0);
|
||||
nameLabel.position.set(0, CUBE_Y + CUBE_SIZE / 2 - 0.2, 0);
|
||||
cubeMesh.add(nameLabel);
|
||||
|
||||
// TODO: Destroy Group in onCleanup
|
||||
|
||||
Reference in New Issue
Block a user