Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cocos2d offset format #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add cocos2d offset format #138

wants to merge 1 commit into from

Conversation

lzubiaur
Copy link

In cocos2d images can be cropped in the sprites sheet but they keep their original size when using them in cocos2d. This feature is useful for animations.

When cropped, sprite’s need to be offset to ensure their texture is drawn in correct alignment to their original size. This PR implement offset for the cocos2d format.

PS: An option might be added to glue to actually crop the image or keep its original size.
For instance TexturePacker implements the following options:
--trim-mode=None (images are not cropped at all)
--trim-mode=Trim (transparency is removed but original size is kept)
--trim-mode=Crop (sprite appears in the sheet as if it never had any transparency)

@Stolzenhain
Copy link

Has something similar landed in the CSS generator? This is a welcome feature for CSS animations as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants