Skip to content

Commit

Permalink
fix: Properly scale the image when the scale prop is changed (#2134)
Browse files Browse the repository at this point in the history
  • Loading branch information
YordanIliev2002 authored Dec 7, 2024
1 parent 0ae552c commit 01be10e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const ImageBase: ForwardRefComponent<Omit<ImageProps, 'url'>, THREE.Mesh> = /* @
planeBounds[1] * ref.current.geometry.parameters.height
)
}
}, [])
}, [planeBounds[0], planeBounds[1]])
return (
<mesh ref={ref} scale={Array.isArray(scale) ? [...scale, 1] : scale} {...props}>
<planeGeometry args={[1, 1, segments, segments]} />
Expand Down

0 comments on commit 01be10e

Please sign in to comment.