Skip to content

Commit

Permalink
fixed the thing
Browse files Browse the repository at this point in the history
  • Loading branch information
benhalverson committed Oct 29, 2024
1 parent d66b845 commit dd1ec05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/PreviewComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const PreviewComponent: React.FC<PreviewComponentProps> = ({
if (url && color) {
loadModelAndCheckDimensions(url);
}
}, [url, color]);
}, [url]);

const initializeScene = () => {
renderer.setSize(600, 400); // Fixed size
Expand Down Expand Up @@ -178,10 +178,10 @@ const PreviewComponent: React.FC<PreviewComponentProps> = ({
};

useEffect(() => {
if (modelLoaded && color) {
if (modelLoaded) {
updateMaterialColor(parseInt(color.replace("#", ""), 16));
}
}, [color, modelLoaded]);
}, [color]);

const updateDimensions = () => {
const boundingBox = new THREE.Box3().setFromObject(meshRef.current!);
Expand Down

0 comments on commit dd1ec05

Please sign in to comment.