Changes
Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
+15
-11
@@ -117,19 +117,23 @@ function XRModel({ url }: { url: string }) {
|
|||||||
const rotYRad = (fineTuning.rotY * Math.PI) / 180;
|
const rotYRad = (fineTuning.rotY * Math.PI) / 180;
|
||||||
const rotZRad = (fineTuning.rotZ * Math.PI) / 180;
|
const rotZRad = (fineTuning.rotZ * Math.PI) / 180;
|
||||||
const s = fineTuning.scale ?? 1;
|
const s = fineTuning.scale ?? 1;
|
||||||
|
const scaleRatio = useModelStore((st) => st.scaleRatio);
|
||||||
|
const renderFactor = scaleRatio?.factor ?? 1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<group
|
<group scale={[renderFactor, renderFactor, renderFactor]}>
|
||||||
ref={ref}
|
<group
|
||||||
position={[
|
ref={ref}
|
||||||
-modelInfo.center.x + fineTuning.posX,
|
position={[
|
||||||
-modelInfo.center.y + fineTuning.posY,
|
-modelInfo.center.x + fineTuning.posX,
|
||||||
-modelInfo.center.z + fineTuning.posZ,
|
-modelInfo.center.y + fineTuning.posY,
|
||||||
]}
|
-modelInfo.center.z + fineTuning.posZ,
|
||||||
rotation={[rotXRad, rotYRad, rotZRad]}
|
]}
|
||||||
scale={[s, s, s]}
|
rotation={[rotXRad, rotYRad, rotZRad]}
|
||||||
>
|
scale={[s, s, s]}
|
||||||
<primitive object={scene} />
|
>
|
||||||
|
<primitive object={scene} />
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user