mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-12 18:18:43 +08:00
[ts] fix parsing of default skins without attachment for binary files.
This commit is contained in:
parent
fada823dcb
commit
8b714d6849
3288
spine-ts/build/spine-webgl.d.ts
vendored
3288
spine-ts/build/spine-webgl.d.ts
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -245,9 +245,15 @@ module spine {
|
||||
}
|
||||
|
||||
private readSkin (input: BinaryInput, skeletonData: SkeletonData, defaultSkin: boolean, nonessential: boolean): Skin {
|
||||
let skin = new Skin(defaultSkin ? "default" : input.readStringRef());
|
||||
let skin = null;
|
||||
let slotCount = 0;
|
||||
|
||||
if (!defaultSkin) {
|
||||
if (defaultSkin) {
|
||||
slotCount = input.readInt(true)
|
||||
if (slotCount == 0) return null;
|
||||
skin = new Skin("default");
|
||||
} else {
|
||||
skin = new Skin(input.readStringRef());
|
||||
skin.bones.length = input.readInt(true);
|
||||
for (let i = 0, n = skin.bones.length; i < n; i++)
|
||||
skin.bones[i] = skeletonData.bones[input.readInt(true)];
|
||||
@ -258,9 +264,11 @@ module spine {
|
||||
skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);
|
||||
for (let i = 0, n = input.readInt(true); i < n; i++)
|
||||
skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);
|
||||
|
||||
slotCount = input.readInt(true);
|
||||
}
|
||||
|
||||
for (let i = 0, n = input.readInt(true); i < n; i++) {
|
||||
for (let i = 0; i < slotCount; i++) {
|
||||
let slotIndex = input.readInt(true);
|
||||
for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {
|
||||
let name = input.readStringRef();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user