We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在本Demo中,Skeleton的位置和输出大小都是写死的,这些值是怎么来的呢?
The text was updated successfully, but these errors were encountered:
demo 里是针对 spineboy 这个素材的经验值,如果希望对任意素材都大小合适且居中,可以根据 json 里的 x、y、width、height 做一个计算,得到合适的 posX 、posY、scale 参数,计算的时候可能要考虑屏幕像素比 pixelRatio
x
y
width
height
posX
posY
scale
"skeleton": { "hash": "MOhkPvw8nLOrjuLm/U98aFMannI", "spine": "3.8.55", "x": -221.27, "y": -8.57, "width": 470.72, "height": 731.57, "images": "./images/", "audio": "" }
Sorry, something went wrong.
能给个参考吗?由于SkeletonData需要共享,所以不能在这上面设置Scale,只能在Skeleton上设置Scale和Position
可以参考下官方的 player 实现 http://en.esotericsoftware.com/spine-player
No branches or pull requests
在本Demo中,Skeleton的位置和输出大小都是写死的,这些值是怎么来的呢?
The text was updated successfully, but these errors were encountered: