Giter Club home page Giter Club logo

Comments (6)

odrick avatar odrick commented on May 18, 2024

Fixed. Please, check here: http://free-tex-packer.com/test/

from free-tex-packer.

942Avril avatar 942Avril commented on May 18, 2024

Can be used, but the result has a floating point value

from free-tex-packer.

942Avril avatar 942Avril commented on May 18, 2024

The calculated offset value is incorrect

from free-tex-packer.

odrick avatar odrick commented on May 18, 2024

Do you have an examples for me? With correct values.

from free-tex-packer.

942Avril avatar 942Avril commented on May 18, 2024

example.zip
The texturePacker folder is the result of exporting with texturepacker. The freeTexPacker folder is the result of exporting with the link you sent. The sourceImg folder is the source file.

from free-tex-packer.

odrick avatar odrick commented on May 18, 2024

Ok, fixed. Please, try again: http://free-tex-packer.com/test/
Floating point offset values are valid: https://www.codeandweb.com/blog/2016/01/29/cocos2d-plist-format-explained

Calculation offset formula:

spriteSourceSize.x + spriteSourceSize.width/2 - sourceSize.width/2

(the offset of the sprite's untrimmed center to the sprite's trimmed center)

For example:

spriteSourceSize: x=320, y=55, width=193, height=399
sourceSize: width=800, height=800
offset.x = 320 + 193/2 - 800/2 = 16.5

FTP pack results:
pack-result.zip

from free-tex-packer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.