Removed width and height check for file split
This commit is contained in:
parent
b884487ec9
commit
1ca54ce7f7
18
src/App.vue
18
src/App.vue
@ -133,17 +133,13 @@
|
|||||||
// Load the image to check its dimensions
|
// Load the image to check its dimensions
|
||||||
const img = new Image();
|
const img = new Image();
|
||||||
img.onload = () => {
|
img.onload = () => {
|
||||||
// If the image is large enough, it might be a spritesheet
|
// Ask the user if they want to split the spritesheet
|
||||||
// This is a simple heuristic - we can improve it later
|
if (confirm('This looks like it might be a spritesheet. Would you like to split it into individual sprites?')) {
|
||||||
if (img.width > 200 && img.height > 200) {
|
// Open the spritesheet splitter
|
||||||
// Ask the user if they want to split the spritesheet
|
spritesheetImageUrl.value = url;
|
||||||
if (confirm('This looks like it might be a spritesheet. Would you like to split it into individual sprites?')) {
|
spritesheetImageFile.value = file;
|
||||||
// Open the spritesheet splitter
|
isSpritesheetSplitterOpen.value = true;
|
||||||
spritesheetImageUrl.value = url;
|
return;
|
||||||
spritesheetImageFile.value = file;
|
|
||||||
isSpritesheetSplitterOpen.value = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the user doesn't want to split or it's not large enough, process as a single sprite
|
// If the user doesn't want to split or it's not large enough, process as a single sprite
|
||||||
|
Loading…
x
Reference in New Issue
Block a user