mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 02:06:03 +08:00
Fixed atlas wrap.
This commit is contained in:
parent
1e7f6277c2
commit
93db323ed2
@ -216,8 +216,14 @@ spAtlas* spAtlas_create (const char* begin, int length, const char* dir, void* r
|
|||||||
|
|
||||||
if (!readValue(&begin, end, &str)) return abortAtlas(self);
|
if (!readValue(&begin, end, &str)) return abortAtlas(self);
|
||||||
if (!equals(&str, "none")) {
|
if (!equals(&str, "none")) {
|
||||||
page->uWrap = *str.begin == 'x' ? SP_ATLAS_REPEAT : (*str.begin == 'y' ? SP_ATLAS_CLAMPTOEDGE : SP_ATLAS_REPEAT);
|
page->uWrap = SP_ATLAS_CLAMPTOEDGE;
|
||||||
page->vWrap = *str.begin == 'x' ? SP_ATLAS_CLAMPTOEDGE : (*str.begin == 'y' ? SP_ATLAS_REPEAT : SP_ATLAS_REPEAT);
|
page->vWrap = SP_ATLAS_CLAMPTOEDGE;
|
||||||
|
if (*str.begin == 'x')
|
||||||
|
page->uWrap = SP_ATLAS_REPEAT;
|
||||||
|
else if (*str.begin == 'y')
|
||||||
|
page->vWrap = SP_ATLAS_REPEAT;
|
||||||
|
else
|
||||||
|
page->uWrap = page->vWrap = SP_ATLAS_REPEAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
_spAtlasPage_createTexture(page, path);
|
_spAtlasPage_createTexture(page, path);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user