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