Closed XGCoder closed 3 years ago
Spine skeletons are modelled in pixels. The scales used in the example project are manually chosen so that the skeletons fit on screen.
You can query the size of a skeleton after it is loaded via soSkeletonData
, which is set on spSkeleton
which itself can be found on the SkeletonAnimation
Obj-C class. https://github.com/EsotericSoftware/spine-runtimes/blob/3.8/spine-c/spine-c/include/spine/SkeletonData.h#L50
For further questions, please use our forums at https://esotericsoftware.com/forum
脊柱骨骼以像素为模型。手动选择示例项目中使用的比例,以使骨架适合屏幕。
您可以查询它通过加载后骨骼的大小
soSkeletonData
,这是设置在spSkeleton
其本身可以在找到SkeletonAnimation
的OBJ-C类。https://github.com/EsotericSoftware/spine-runtimes/blob/3.8/spine-c/spine-c/include/spine/SkeletonData.h#L50如有其他疑问,请在https://esotericsoftware.com/forum上使用我们的论坛。
Thanks for your reply. What I found in 'spSkeletonData' is indeed the size of the entire canvas, but my need is to get the size of a particular image When I get a 'Slot size' from the 'SkeletonRenderer' 'findSlot' method, I don't find a 'Slot size' method
感谢回复,我在spSkeletonData
中找到的确实是整个画布的尺寸,但是,我的需求是想要获取某个图片的尺寸
我在通过 SkeletonRenderer
的findSlot
方法获取某个Slot的尺寸
的时候,并没有发现有关Slot尺寸
的方法
I downloaded the project and showed the sample program using spine-Cocos2D-objc, but after switching to our resource, I found that it was not possible to display our spine animation in full screen during the presentation, and I had two problems
scale
here be adapted according to the screen?OC
code?我下载了此项目并使用spine-cocos2d-objc展示了示例程序,但是切换为我们的资源后,在展示时发现无法全屏展示我们的spine动画,我有两个问题