Jump to content

Cannot figure out what Sprite Input size (i.e. sprite bounds) is determined by


Recommended Posts

You'd think sprite bounds would be determined by the size of the sprite cut out from the image file in the frame definition: 


"filename": "0",
"frame": {"x":0,"y":0,"w":64,"h":64},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":20,"y":20,"w":30,"h":40},
"sourceSize": {"w":64,"h":64}
But when I change the w and h to 32, in both frame and sourceSize the sprite bounds remains the same ... 64 x 64. I even do a control-f search in all my files for "64." It turns up nothing, but somehow the spire input size is still 64 x 64. I can tell this from:
game.debug.spriteInputInfo(sprite, 100, 400, '#000');
Is there something I'm missing here? How could phaser come up with 64x64?  
And if the sprite bounds is determined by the image, does that mean it's impossible for me to have padding in the image since that padding will show up in the sprite bounds (which can't be changed)?
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...