feat: some transparencies

This commit is contained in:
TrèsAbhi committed 2024-07-26 13:39:32 -05:00
1 parent ceb759aba1
commit 1a91214dd0
1 file changed
+11 -3
@@ -5,6 +5,7 @@ import {
Intersection, Intersection,
MeshBasicMaterial, MeshBasicMaterial,
MeshStandardMaterial, MeshStandardMaterial,
NormalBlending,
Object3D, Object3D,
Plane, Plane,
Quaternion, Quaternion,
@@ -385,10 +386,17 @@ export function SpacedArmorSceneComponent({
props.type === ArmorType.Core props.type === ArmorType.Core
? `rgb(${to255(r)}, ${to255(g)}, 0)` ? `rgb(${to255(r)}, ${to255(g)}, 0)`
: props.type === ArmorType.Spaced : props.type === ArmorType.Spaced
? `rgb(${to255(1 - x)}, 0, ${to255(1 - x)})` ? `rgb(${to255(1 - x)}, 0, ${to255(1 - 0.75 * x)})`
: `rgb(0, 255, 255)`, : `rgb(0, 255, 255)`,
opacity: props.type === ArmorType.External ? 0.25 : 1, opacity:
transparent: props.type === ArmorType.External, props.type === ArmorType.External
? 1 / 8
: props.type === ArmorType.Spaced
? 7 / 8
: 1,
transparent: props.type !== ArmorType.Core,
blending:
props.type === ArmorType.Core ? NormalBlending : NormalBlending,
}), }),
userData: { userData: {