[cocos2d-x] Spine 组件所有特性原生平台适配

This commit is contained in:
SmallMain
2022-07-05 11:05:41 +08:00
parent f4599764fe
commit 3b1584ee1c
25 changed files with 1801 additions and 312 deletions

View File

@@ -98,8 +98,8 @@ void MeshAttachment::updateUVs() {
return;
}
case 270: {
float textureWidth = _regionWidth / (_regionU2 - _regionU);
float textureHeight = _regionHeight / (_regionV2 - _regionV);
float textureWidth = _regionHeight / (_regionV2 - _regionV);
float textureHeight = _regionWidth / (_regionU2 - _regionU);
u -= _regionOffsetY / textureWidth;
v -= _regionOffsetX / textureHeight;
width = _regionOriginalHeight / textureWidth;
@@ -217,6 +217,22 @@ void MeshAttachment::setRegionOffsetY(float inValue) {
_regionOffsetY = inValue;
}
float MeshAttachment::getRegionX() {
return _regionX;
}
void MeshAttachment::setRegionX(float inValue) {
_regionX = inValue;
}
float MeshAttachment::getRegionY() {
return _regionY;
}
void MeshAttachment::setRegionY(float inValue) {
_regionY = inValue;
}
float MeshAttachment::getRegionWidth() {
return _regionWidth;
}