feat: Update wall asset handling; include wallAssets in visibility logic for improved rendering conditions

This commit is contained in:
2025-07-31 15:57:33 +05:30
parent 1177e35db6
commit 43dbf9dfaf

View File

@@ -18,7 +18,7 @@ import material1 from '../../../../../assets/textures/floor/factory wall texture
function Wall({ wall }: { readonly wall: Wall }) { function Wall({ wall }: { readonly wall: Wall }) {
const { wallStore, wallAssetStore } = useSceneContext(); const { wallStore, wallAssetStore } = useSceneContext();
const { walls, addDecal } = wallStore(); const { walls, addDecal } = wallStore();
const { getAssetsByWall } = wallAssetStore(); const { wallAssets, getAssetsByWall } = wallAssetStore();
const assets = getAssetsByWall(wall.wallUuid); const assets = getAssetsByWall(wall.wallUuid);
const { selectedWall, setSelectedWall, setSelectedDecal } = useBuilderStore(); const { selectedWall, setSelectedWall, setSelectedDecal } = useBuilderStore();
const { togglView } = useToggleView(); const { togglView } = useToggleView();
@@ -107,7 +107,7 @@ function Wall({ wall }: { readonly wall: Wall }) {
key={wall.wallUuid} key={wall.wallUuid}
userData={wall} userData={wall}
> >
{(assets.length > 0 || walls[0].wallUuid === wall.wallUuid) ? {(assets.length > 0 || (walls[0].wallUuid === wall.wallUuid && wallAssets.length > 0)) ?
<Base <Base
castShadow castShadow
receiveShadow receiveShadow