feat: Update floor item selection logic to use userData for model UUID comparison
This commit is contained in:
@@ -73,11 +73,17 @@ function Model({ asset }: { readonly asset: Asset }) {
|
||||
|
||||
useEffect(() => {
|
||||
setDeletableFloorItem(null);
|
||||
if (selectedFloorItem === null || selectedFloorItem.modelUuid !== asset.modelUuid) {
|
||||
if (selectedFloorItem === null || selectedFloorItem.userData.modelUuid !== asset.modelUuid) {
|
||||
resetAnimation(asset.modelUuid);
|
||||
}
|
||||
}, [activeModule, toolMode, selectedFloorItem])
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedFloorItem && selectedFloorItem.userData.modelUuid === asset.modelUuid) {
|
||||
setSelectedFloorItem(groupRef.current);
|
||||
}
|
||||
}, [isRendered, selectedFloorItem])
|
||||
|
||||
useEffect(() => {
|
||||
const loader = new GLTFLoader();
|
||||
const dracoLoader = new DRACOLoader();
|
||||
|
||||
Reference in New Issue
Block a user