Hirikgg Posted February 20, 2019 Share Posted February 20, 2019 so I created a spritesheet online and and added to my game. but some sprites are small in size so how do I change the size of sprite: { "filename": "Attack__004", "frame": { "x": 1, "y": 1951, "w": 111, "h": 96 }, "rotated": false, "trimmed": true, "spriteSourceSize": { "x": 9, "y": 5, "w": 111, "h": 96 }, "sourceSize": { "w": 120, "h": 110 }, "pivot": { "x": 0.5, "y": 0.5 } }, I don't know which one is the height and width of image. So do can I resize the image inside the json file or I must manually resize and pack it again? Btw, I used this tool http://free-tex-packer.com/app/ (no PC to use texture packer :-) ) Thanks in advance Quote Link to comment Share on other sites More sharing options...
mattstyles Posted March 1, 2019 Share Posted March 1, 2019 If your source sprites are smaller than you need (i.e. draw a box around the sprite in spritesheet using any drawing tool and it'll tell you how many pixels wide and high it is) then you'll need to repack them. I'm not sure what spriteSourceSize and sourceSize refer to, but they are different aspect ratios, so it isn't just that one is a scaled version of the other. Normally sprites refer to bounding boxes in the spritesheet, from which you can use portions of the sheet. If that portion is smaller than you need then you either need to enlarge it when using it (which will result in loss of image clarity) or make it larger in the first place. Hirikgg 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.