mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[runtimes] Closes #719, fixed sortPathConstraintAttachment
This commit is contained in:
parent
f84ae17615
commit
1ecd627afa
Binary file not shown.
@ -213,8 +213,13 @@ public class Skeleton {
|
|||||||
sortBone(slotBone);
|
sortBone(slotBone);
|
||||||
else {
|
else {
|
||||||
var bones:Vector.<Bone> = this.bones;
|
var bones:Vector.<Bone> = this.bones;
|
||||||
for each (var boneIndex:int in pathBones)
|
var i:int = 0;
|
||||||
sortBone(bones[boneIndex]);
|
while (i < pathBones.length) {
|
||||||
|
var boneCount:int = pathBones[i++];
|
||||||
|
for (var n:int = i + boneCount; i < n; i++) {
|
||||||
|
sortBone(bones[pathBones[i]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -186,9 +186,12 @@ static void _sortPathConstraintAttachmentBones(_spSkeleton* const internal, spAt
|
|||||||
_sortBone(internal, slotBone);
|
_sortBone(internal, slotBone);
|
||||||
else {
|
else {
|
||||||
spBone** bones = internal->super.bones;
|
spBone** bones = internal->super.bones;
|
||||||
int i;
|
int i = 0;
|
||||||
for (i = 0; i < pathBonesCount; i++)
|
while (i < pathBonesCount) {
|
||||||
_sortBone(internal, bones[pathBones[i]]);
|
int boneCount = pathBones[i++];
|
||||||
|
for (int n = i + boneCount; i < n; i++)
|
||||||
|
_sortBone(internal, bones[pathBones[i]]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -42,9 +42,9 @@ public class Main extends Sprite {
|
|||||||
public function Main () {
|
public function Main () {
|
||||||
var example:Class;
|
var example:Class;
|
||||||
// example = SpineboyExample;
|
// example = SpineboyExample;
|
||||||
example = GoblinsExample;
|
// example = GoblinsExample;
|
||||||
// example = RaptorExample;
|
// example = RaptorExample;
|
||||||
// example = TankExample;
|
example = TankExample;
|
||||||
// example = VineExample;
|
// example = VineExample;
|
||||||
|
|
||||||
_starling = new Starling(example, stage);
|
_starling = new Starling(example, stage);
|
||||||
|
|||||||
Binary file not shown.
@ -2941,9 +2941,13 @@ var spine;
|
|||||||
this.sortBone(slotBone);
|
this.sortBone(slotBone);
|
||||||
else {
|
else {
|
||||||
var bones = this.bones;
|
var bones = this.bones;
|
||||||
for (var i = 0; i < pathBones.length; i++) {
|
var i = 0;
|
||||||
var boneIndex = pathBones[i];
|
while (i < pathBones.length) {
|
||||||
this.sortBone(bones[boneIndex]);
|
var boneCount = pathBones[i++];
|
||||||
|
for (var n = i + boneCount; i < n; i++) {
|
||||||
|
var boneIndex = pathBones[i];
|
||||||
|
this.sortBone(bones[boneIndex]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -2941,9 +2941,13 @@ var spine;
|
|||||||
this.sortBone(slotBone);
|
this.sortBone(slotBone);
|
||||||
else {
|
else {
|
||||||
var bones = this.bones;
|
var bones = this.bones;
|
||||||
for (var i = 0; i < pathBones.length; i++) {
|
var i = 0;
|
||||||
var boneIndex = pathBones[i];
|
while (i < pathBones.length) {
|
||||||
this.sortBone(bones[boneIndex]);
|
var boneCount = pathBones[i++];
|
||||||
|
for (var n = i + boneCount; i < n; i++) {
|
||||||
|
var boneIndex = pathBones[i];
|
||||||
|
this.sortBone(bones[boneIndex]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -2698,9 +2698,13 @@ var spine;
|
|||||||
this.sortBone(slotBone);
|
this.sortBone(slotBone);
|
||||||
else {
|
else {
|
||||||
var bones = this.bones;
|
var bones = this.bones;
|
||||||
for (var i = 0; i < pathBones.length; i++) {
|
var i = 0;
|
||||||
var boneIndex = pathBones[i];
|
while (i < pathBones.length) {
|
||||||
this.sortBone(bones[boneIndex]);
|
var boneCount = pathBones[i++];
|
||||||
|
for (var n = i + boneCount; i < n; i++) {
|
||||||
|
var boneIndex = pathBones[i];
|
||||||
|
this.sortBone(bones[boneIndex]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -2698,9 +2698,13 @@ var spine;
|
|||||||
this.sortBone(slotBone);
|
this.sortBone(slotBone);
|
||||||
else {
|
else {
|
||||||
var bones = this.bones;
|
var bones = this.bones;
|
||||||
for (var i = 0; i < pathBones.length; i++) {
|
var i = 0;
|
||||||
var boneIndex = pathBones[i];
|
while (i < pathBones.length) {
|
||||||
this.sortBone(bones[boneIndex]);
|
var boneCount = pathBones[i++];
|
||||||
|
for (var n = i + boneCount; i < n; i++) {
|
||||||
|
var boneIndex = pathBones[i];
|
||||||
|
this.sortBone(bones[boneIndex]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -2698,9 +2698,13 @@ var spine;
|
|||||||
this.sortBone(slotBone);
|
this.sortBone(slotBone);
|
||||||
else {
|
else {
|
||||||
var bones = this.bones;
|
var bones = this.bones;
|
||||||
for (var i = 0; i < pathBones.length; i++) {
|
var i = 0;
|
||||||
var boneIndex = pathBones[i];
|
while (i < pathBones.length) {
|
||||||
this.sortBone(bones[boneIndex]);
|
var boneCount = pathBones[i++];
|
||||||
|
for (var n = i + boneCount; i < n; i++) {
|
||||||
|
var boneIndex = pathBones[i];
|
||||||
|
this.sortBone(bones[boneIndex]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -2698,9 +2698,13 @@ var spine;
|
|||||||
this.sortBone(slotBone);
|
this.sortBone(slotBone);
|
||||||
else {
|
else {
|
||||||
var bones = this.bones;
|
var bones = this.bones;
|
||||||
for (var i = 0; i < pathBones.length; i++) {
|
var i = 0;
|
||||||
var boneIndex = pathBones[i];
|
while (i < pathBones.length) {
|
||||||
this.sortBone(bones[boneIndex]);
|
var boneCount = pathBones[i++];
|
||||||
|
for (var n = i + boneCount; i < n; i++) {
|
||||||
|
var boneIndex = pathBones[i];
|
||||||
|
this.sortBone(bones[boneIndex]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -209,9 +209,13 @@ module spine {
|
|||||||
this.sortBone(slotBone);
|
this.sortBone(slotBone);
|
||||||
else {
|
else {
|
||||||
let bones = this.bones;
|
let bones = this.bones;
|
||||||
for (let i = 0; i < pathBones.length; i++) {
|
let i = 0;
|
||||||
let boneIndex = pathBones[i];
|
while (i < pathBones.length) {
|
||||||
this.sortBone(bones[boneIndex]);
|
let boneCount = pathBones[i++];
|
||||||
|
for (let n = i + boneCount; i < n; i++) {
|
||||||
|
let boneIndex = pathBones[i];
|
||||||
|
this.sortBone(bones[boneIndex]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -75,9 +75,6 @@ function init () {
|
|||||||
assetManager.loadText("assets/stretchyman.json");
|
assetManager.loadText("assets/stretchyman.json");
|
||||||
assetManager.loadText("assets/stretchyman.atlas");
|
assetManager.loadText("assets/stretchyman.atlas");
|
||||||
assetManager.loadTexture("assets/stretchyman.png");
|
assetManager.loadTexture("assets/stretchyman.png");
|
||||||
assetManager.loadText("assets/test.json")
|
|
||||||
assetManager.loadText("assets/test.atlas")
|
|
||||||
assetManager.loadTexture("assets/test.png")
|
|
||||||
requestAnimationFrame(load);
|
requestAnimationFrame(load);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +82,6 @@ function load () {
|
|||||||
// Wait until the AssetManager has loaded all resources, then load the skeletons.
|
// Wait until the AssetManager has loaded all resources, then load the skeletons.
|
||||||
if (assetManager.isLoadingComplete()) {
|
if (assetManager.isLoadingComplete()) {
|
||||||
skeletons["raptor"] = loadSkeleton("raptor", "walk", false);
|
skeletons["raptor"] = loadSkeleton("raptor", "walk", false);
|
||||||
skeletons["test"] = loadSkeleton("test", "animation", false);
|
|
||||||
skeletons["spineboy"] = loadSkeleton("spineboy", "run", false);
|
skeletons["spineboy"] = loadSkeleton("spineboy", "run", false);
|
||||||
skeletons["tank"] = loadSkeleton("tank", "drive", false);
|
skeletons["tank"] = loadSkeleton("tank", "drive", false);
|
||||||
skeletons["goblins"] = loadSkeleton("goblins-mesh", "walk", false, "goblin");
|
skeletons["goblins"] = loadSkeleton("goblins-mesh", "walk", false, "goblin");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user