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);
|
||||
else {
|
||||
var bones:Vector.<Bone> = this.bones;
|
||||
for each (var boneIndex:int in pathBones)
|
||||
sortBone(bones[boneIndex]);
|
||||
var i:int = 0;
|
||||
while (i < pathBones.length) {
|
||||
var boneCount:int = pathBones[i++];
|
||||
for (var n:int = i + boneCount; i < n; i++) {
|
||||
sortBone(bones[pathBones[i]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -186,10 +186,13 @@ static void _sortPathConstraintAttachmentBones(_spSkeleton* const internal, spAt
|
||||
_sortBone(internal, slotBone);
|
||||
else {
|
||||
spBone** bones = internal->super.bones;
|
||||
int i;
|
||||
for (i = 0; i < pathBonesCount; i++)
|
||||
int i = 0;
|
||||
while (i < pathBonesCount) {
|
||||
int boneCount = pathBones[i++];
|
||||
for (int n = i + boneCount; i < n; i++)
|
||||
_sortBone(internal, bones[pathBones[i]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void _sortPathConstraintAttachment(_spSkeleton* const internal, spSkin* skin, int slotIndex, spBone* slotBone) {
|
||||
|
||||
Binary file not shown.
@ -42,9 +42,9 @@ public class Main extends Sprite {
|
||||
public function Main () {
|
||||
var example:Class;
|
||||
// example = SpineboyExample;
|
||||
example = GoblinsExample;
|
||||
// example = GoblinsExample;
|
||||
// example = RaptorExample;
|
||||
// example = TankExample;
|
||||
example = TankExample;
|
||||
// example = VineExample;
|
||||
|
||||
_starling = new Starling(example, stage);
|
||||
|
||||
Binary file not shown.
@ -2941,11 +2941,15 @@ var spine;
|
||||
this.sortBone(slotBone);
|
||||
else {
|
||||
var bones = this.bones;
|
||||
for (var i = 0; i < pathBones.length; i++) {
|
||||
var i = 0;
|
||||
while (i < pathBones.length) {
|
||||
var boneCount = pathBones[i++];
|
||||
for (var n = i + boneCount; i < n; i++) {
|
||||
var boneIndex = pathBones[i];
|
||||
this.sortBone(bones[boneIndex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Skeleton.prototype.sortBone = function (bone) {
|
||||
if (bone.sorted)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2941,11 +2941,15 @@ var spine;
|
||||
this.sortBone(slotBone);
|
||||
else {
|
||||
var bones = this.bones;
|
||||
for (var i = 0; i < pathBones.length; i++) {
|
||||
var i = 0;
|
||||
while (i < pathBones.length) {
|
||||
var boneCount = pathBones[i++];
|
||||
for (var n = i + boneCount; i < n; i++) {
|
||||
var boneIndex = pathBones[i];
|
||||
this.sortBone(bones[boneIndex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Skeleton.prototype.sortBone = function (bone) {
|
||||
if (bone.sorted)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2698,11 +2698,15 @@ var spine;
|
||||
this.sortBone(slotBone);
|
||||
else {
|
||||
var bones = this.bones;
|
||||
for (var i = 0; i < pathBones.length; i++) {
|
||||
var i = 0;
|
||||
while (i < pathBones.length) {
|
||||
var boneCount = pathBones[i++];
|
||||
for (var n = i + boneCount; i < n; i++) {
|
||||
var boneIndex = pathBones[i];
|
||||
this.sortBone(bones[boneIndex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Skeleton.prototype.sortBone = function (bone) {
|
||||
if (bone.sorted)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2698,11 +2698,15 @@ var spine;
|
||||
this.sortBone(slotBone);
|
||||
else {
|
||||
var bones = this.bones;
|
||||
for (var i = 0; i < pathBones.length; i++) {
|
||||
var i = 0;
|
||||
while (i < pathBones.length) {
|
||||
var boneCount = pathBones[i++];
|
||||
for (var n = i + boneCount; i < n; i++) {
|
||||
var boneIndex = pathBones[i];
|
||||
this.sortBone(bones[boneIndex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Skeleton.prototype.sortBone = function (bone) {
|
||||
if (bone.sorted)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2698,11 +2698,15 @@ var spine;
|
||||
this.sortBone(slotBone);
|
||||
else {
|
||||
var bones = this.bones;
|
||||
for (var i = 0; i < pathBones.length; i++) {
|
||||
var i = 0;
|
||||
while (i < pathBones.length) {
|
||||
var boneCount = pathBones[i++];
|
||||
for (var n = i + boneCount; i < n; i++) {
|
||||
var boneIndex = pathBones[i];
|
||||
this.sortBone(bones[boneIndex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Skeleton.prototype.sortBone = function (bone) {
|
||||
if (bone.sorted)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2698,11 +2698,15 @@ var spine;
|
||||
this.sortBone(slotBone);
|
||||
else {
|
||||
var bones = this.bones;
|
||||
for (var i = 0; i < pathBones.length; i++) {
|
||||
var i = 0;
|
||||
while (i < pathBones.length) {
|
||||
var boneCount = pathBones[i++];
|
||||
for (var n = i + boneCount; i < n; i++) {
|
||||
var boneIndex = pathBones[i];
|
||||
this.sortBone(bones[boneIndex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Skeleton.prototype.sortBone = function (bone) {
|
||||
if (bone.sorted)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -209,12 +209,16 @@ module spine {
|
||||
this.sortBone(slotBone);
|
||||
else {
|
||||
let bones = this.bones;
|
||||
for (let i = 0; i < pathBones.length; i++) {
|
||||
let i = 0;
|
||||
while (i < pathBones.length) {
|
||||
let boneCount = pathBones[i++];
|
||||
for (let n = i + boneCount; i < n; i++) {
|
||||
let boneIndex = pathBones[i];
|
||||
this.sortBone(bones[boneIndex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sortBone (bone: Bone) {
|
||||
if (bone.sorted) return;
|
||||
|
||||
@ -75,9 +75,6 @@ function init () {
|
||||
assetManager.loadText("assets/stretchyman.json");
|
||||
assetManager.loadText("assets/stretchyman.atlas");
|
||||
assetManager.loadTexture("assets/stretchyman.png");
|
||||
assetManager.loadText("assets/test.json")
|
||||
assetManager.loadText("assets/test.atlas")
|
||||
assetManager.loadTexture("assets/test.png")
|
||||
requestAnimationFrame(load);
|
||||
}
|
||||
|
||||
@ -85,7 +82,6 @@ function load () {
|
||||
// Wait until the AssetManager has loaded all resources, then load the skeletons.
|
||||
if (assetManager.isLoadingComplete()) {
|
||||
skeletons["raptor"] = loadSkeleton("raptor", "walk", false);
|
||||
skeletons["test"] = loadSkeleton("test", "animation", false);
|
||||
skeletons["spineboy"] = loadSkeleton("spineboy", "run", false);
|
||||
skeletons["tank"] = loadSkeleton("tank", "drive", false);
|
||||
skeletons["goblins"] = loadSkeleton("goblins-mesh", "walk", false, "goblin");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user