Skip to content

Add cocos2d offset format#138

Open
lzubiaur wants to merge 1 commit into
jorgebastida:masterfrom
lzubiaur:cocos2d_offset
Open

Add cocos2d offset format#138
lzubiaur wants to merge 1 commit into
jorgebastida:masterfrom
lzubiaur:cocos2d_offset

Conversation

@lzubiaur

Copy link
Copy Markdown

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
Copy Markdown

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