Skip to content

Commit

Permalink
Use level offset properly
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Sep 18, 2023
1 parent aaf1c86 commit 1651605
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const ImageThree = ({ level, imageUrl }: ImageThreeProps) => {
const texture = useLoader(TextureLoader, imageUrl);
const image = level.images[0];
const scale = image.scale;
const x_offset = (texture.image.width * scale) / 2;
const y_offset = -(texture.image.height * scale) / 2;
const x_offset = (texture.image.width * scale) / 2 + image.x_offset;
const y_offset = -(texture.image.height * scale) / 2 + image.y_offset;

// const imageWidth = texture.image.width;
// const imageHeight = texture.image.height;
Expand Down

0 comments on commit 1651605

Please sign in to comment.