[FEAT] Add missing types
This commit is contained in:
@@ -101,6 +101,9 @@ export const useSprites = () => {
|
|||||||
height: img.height,
|
height: img.height,
|
||||||
x: old.x,
|
x: old.x,
|
||||||
y: old.y,
|
y: old.y,
|
||||||
|
rotation: 0,
|
||||||
|
flipX: false,
|
||||||
|
flipY: false,
|
||||||
};
|
};
|
||||||
const arr = [...sprites.value];
|
const arr = [...sprites.value];
|
||||||
arr[i] = next;
|
arr[i] = next;
|
||||||
@@ -132,6 +135,9 @@ export const useSprites = () => {
|
|||||||
height: img.height,
|
height: img.height,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
rotation: 0,
|
||||||
|
flipX: false,
|
||||||
|
flipY: false,
|
||||||
};
|
};
|
||||||
sprites.value = [...sprites.value, s];
|
sprites.value = [...sprites.value, s];
|
||||||
};
|
};
|
||||||
@@ -163,6 +169,9 @@ export const useSprites = () => {
|
|||||||
height: img.height,
|
height: img.height,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
rotation: 0,
|
||||||
|
flipX: false,
|
||||||
|
flipY: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const newMaxWidth = Math.max(maxWidth, img.width);
|
const newMaxWidth = Math.max(maxWidth, img.width);
|
||||||
@@ -222,6 +231,9 @@ export const useSprites = () => {
|
|||||||
height: img.height,
|
height: img.height,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
rotation: 0,
|
||||||
|
flipX: false,
|
||||||
|
flipY: false,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
img.onerror = () => reject(new Error(`Failed to load image: ${file.name}`));
|
img.onerror = () => reject(new Error(`Failed to load image: ${file.name}`));
|
||||||
|
|||||||
@@ -197,6 +197,9 @@
|
|||||||
height: spriteData.height,
|
height: spriteData.height,
|
||||||
x: spriteData.x || 0,
|
x: spriteData.x || 0,
|
||||||
y: spriteData.y || 0,
|
y: spriteData.y || 0,
|
||||||
|
rotation: spriteData.rotation || 0,
|
||||||
|
flipX: spriteData.flipX || false,
|
||||||
|
flipY: spriteData.flipY || false,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
img.src = spriteData.base64;
|
img.src = spriteData.base64;
|
||||||
|
|||||||
Reference in New Issue
Block a user