Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
deprecation warning
  • Loading branch information
ivanpopelyshev committed Oct 19, 2016
1 parent 7e4b789 commit 65952ff
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 162 deletions.
77 changes: 4 additions & 73 deletions bin/pixi-spine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bin/pixi-spine.js.map

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions bin/pixi-spine.min.js

This file was deleted.

1 change: 0 additions & 1 deletion bin/pixi-spine.min.js.map

This file was deleted.

72 changes: 0 additions & 72 deletions src/core/Bone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,78 +192,6 @@ export class Bone implements Updatable {
}
return;
}
//old < 3.5 stuff
case TransformMode.InheritRotation: {
let rotationY = rotation + 90 + shearY;
let la = MathUtils.cosDeg(rotation + shearX) * scaleX;
let lb = MathUtils.cosDeg(rotationY) * scaleY;
let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;
let ld = MathUtils.sinDeg(rotationY) * scaleY;

pa = 1;
pb = 0;
pc = 0;
pd = 1;
do {
let cos = MathUtils.cosDeg(parent.arotation), sin = MathUtils.sinDeg(parent.arotation);
let temp = pa * cos + pb * sin;
pb = pb * cos - pa * sin;
pa = temp;
temp = pc * cos + pd * sin;
pd = pd * cos - pc * sin;
pc = temp;

if (parent.data.transformMode === TransformMode.InheritScale ||
parent.data.transformMode === TransformMode.OnlyTranslation) break;
parent = parent.parent;
} while (parent != null);
m.a = pa * la + pb * lc;
m.c = pa * lb + pb * ld;
m.b = pc * la + pd * lc;
m.d = pc * lb + pd * ld;
break;
}
//old < 3.5 stuff
case TransformMode.InheritScale: {
let rotationY = rotation + 90 + shearY;
let la = MathUtils.cosDeg(rotation + shearX) * scaleX;
let lb = MathUtils.cosDeg(rotationY) * scaleY;
let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;
let ld = MathUtils.sinDeg(rotationY) * scaleY;

pa = 1;
pb = 0;
pc = 0;
pd = 1;
do {
let cos = MathUtils.cosDeg(parent.arotation), sin = MathUtils.sinDeg(parent.arotation);
let psx = parent.scaleX, psy = parent.scaleY;
let za = cos * psx, zb = sin * psy, zc = sin * psx, zd = cos * psy;
let temp = pa * za + pb * zc;
pb = pb * zd - pa * zb;
pa = temp;
temp = pc * za + pd * zc;
pd = pd * zd - pc * zb;
pc = temp;

if (psx >= 0) sin = -sin;
temp = pa * cos + pb * sin;
pb = pb * cos - pa * sin;
pa = temp;
temp = pc * cos + pd * sin;
pd = pd * cos - pc * sin;
pc = temp;

if (parent.data.transformMode === TransformMode.InheritRotation ||
parent.data.transformMode === TransformMode.OnlyTranslation) break;
parent = parent.parent;
} while (parent != null);
m.a = pa * la + pb * lc;
m.c = pa * lb + pb * ld;
m.b = pc * la + pd * lc;
m.d = pc * lb + pd * ld;
break;
}
}
if (this.skeleton.flipX) {
m.a = -m.a;
Expand Down
2 changes: 1 addition & 1 deletion src/core/BoneData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ export class BoneData {
}

export enum TransformMode {
Normal, OnlyTranslation, NoRotationOrReflection, NoScale, NoScaleOrReflection, InheritRotation, InheritScale
Normal, OnlyTranslation, NoRotationOrReflection, NoScale, NoScaleOrReflection
}
5 changes: 3 additions & 2 deletions src/core/SkeletonJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -746,12 +746,13 @@ export class SkeletonJson {
}

static transformModeLegacy(inheritRotation: boolean, inheritScale: boolean) {
console.log("Deprecation Warning: re-export your model with spine 3.5, or downgrade to pixi-spine 1.1 branch. There were many breaking changes, place breakpoint here if you want to know which model is broken");
if (inheritRotation && inheritScale) {
return TransformMode.Normal;
} else if (inheritRotation) {
return TransformMode.InheritRotation;
return TransformMode.NoScaleOrReflection;
} else if (inheritScale) {
return TransformMode.InheritScale;
return TransformMode.NoRotationOrReflection;
} else {
return TransformMode.OnlyTranslation;
}
Expand Down

0 comments on commit 65952ff

Please sign in to comment.