[FEAT] Fix meta

This commit is contained in:
2025-12-17 21:35:29 +01:00
parent 012448df3e
commit 0e88199e6e

View File

@@ -59,15 +59,16 @@ export const shareSpritesheet = async (layersRef: Ref<Layer[]>, columns: Ref<num
ctx.drawImage(sprite.img, 0, 0);
}
const base64 = canvas.toDataURL('image/png');
// Since we bake transformations into the image, set them to 0/false in metadata
return {
id: sprite.id,
width: sprite.width,
height: sprite.height,
x: sprite.x,
y: sprite.y,
rotation: sprite.rotation || 0,
flipX: sprite.flipX || false,
flipY: sprite.flipY || false,
rotation: 0,
flipX: false,
flipY: false,
base64,
name: sprite.file.name,
};