[runtimes] Closes #842, sorting of transform constraints

This commit is contained in:
badlogic 2017-02-23 15:44:31 +01:00
parent cbe79ba04a
commit 787a525a93
22 changed files with 18 additions and 20 deletions

View File

@ -198,7 +198,7 @@ public class Skeleton {
var i:Number = 0;
if (constraint.data.local) {
for (i = 0; i < boneCount; i++) {
var child:Bone = constrained[constrained.length - 1];
var child:Bone = constrained[i];
sortBone(child.parent);
if (!(_updateCache.indexOf(child) > -1)) _updateCacheReset.push(child);
}

View File

@ -295,7 +295,7 @@ static void _sortTransformConstraint(_spSkeleton* const internal, spTransformCon
boneCount = constraint->bonesCount;
if (constraint->data->local) {
for (i = 0; i < boneCount; i++) {
child = constrained[boneCount - 1];
child = constrained[i];
_sortBone(internal, child);
contains = 0;
for (i = 0; i < internal->updateCacheCount; i++) {

View File

@ -210,11 +210,9 @@ namespace Spine {
var constrained = constraint.bones;
int boneCount = constrained.Count;
// for (int ii = 0; ii < boneCount; ii++)
// SortBone(constrained.Items[ii]);
if (constraint.data.local) {
for (int i = 0; i < boneCount; i++) {
Bone child = constrained.Items[constrained.Count - 1];
Bone child = constrained.Items[i];
SortBone(child.parent);
if (!updateCache.Contains(child)) updateCacheReset.Add(child);
}

View File

@ -250,7 +250,7 @@ public class Skeleton {
int boneCount = constrained.size;
if (constraint.data.local) {
for (int i = 0; i < boneCount; i++) {
Bone child = constrained.peek();
Bone child = constrained.get(i);
sortBone(child.parent);
if (!updateCache.contains(child, true)) updateCacheReset.add(child);
}

View File

@ -69,7 +69,7 @@ public class SkeletonSprite extends DisplayObject {
}
override public function render (painter:Painter) : void {
painter.state.alpha *= skeleton.a;
painter.state.alpha *= skeleton.color.a;
var originalBlendMode:String = painter.state.blendMode;
var r:Number = skeleton.color.r * 255;
var g:Number = skeleton.color.g * 255;

View File

@ -3724,7 +3724,7 @@ var spine;
var boneCount = constrained.length;
if (constraint.data.local) {
for (var i = 0; i < boneCount; i++) {
var child = constrained[constrained.length - 1];
var child = constrained[i];
this.sortBone(child.parent);
if (!(this._updateCache.indexOf(child) > -1))
this.updateCacheReset.push(child);

File diff suppressed because one or more lines are too long

View File

@ -3724,7 +3724,7 @@ var spine;
var boneCount = constrained.length;
if (constraint.data.local) {
for (var i = 0; i < boneCount; i++) {
var child = constrained[constrained.length - 1];
var child = constrained[i];
this.sortBone(child.parent);
if (!(this._updateCache.indexOf(child) > -1))
this.updateCacheReset.push(child);

File diff suppressed because one or more lines are too long

View File

@ -3413,7 +3413,7 @@ var spine;
var boneCount = constrained.length;
if (constraint.data.local) {
for (var i = 0; i < boneCount; i++) {
var child = constrained[constrained.length - 1];
var child = constrained[i];
this.sortBone(child.parent);
if (!(this._updateCache.indexOf(child) > -1))
this.updateCacheReset.push(child);

File diff suppressed because one or more lines are too long

View File

@ -3413,7 +3413,7 @@ var spine;
var boneCount = constrained.length;
if (constraint.data.local) {
for (var i = 0; i < boneCount; i++) {
var child = constrained[constrained.length - 1];
var child = constrained[i];
this.sortBone(child.parent);
if (!(this._updateCache.indexOf(child) > -1))
this.updateCacheReset.push(child);

File diff suppressed because one or more lines are too long

View File

@ -3413,7 +3413,7 @@ var spine;
var boneCount = constrained.length;
if (constraint.data.local) {
for (var i = 0; i < boneCount; i++) {
var child = constrained[constrained.length - 1];
var child = constrained[i];
this.sortBone(child.parent);
if (!(this._updateCache.indexOf(child) > -1))
this.updateCacheReset.push(child);

File diff suppressed because one or more lines are too long

View File

@ -3413,7 +3413,7 @@ var spine;
var boneCount = constrained.length;
if (constraint.data.local) {
for (var i = 0; i < boneCount; i++) {
var child = constrained[constrained.length - 1];
var child = constrained[i];
this.sortBone(child.parent);
if (!(this._updateCache.indexOf(child) > -1))
this.updateCacheReset.push(child);

File diff suppressed because one or more lines are too long

View File

@ -192,7 +192,7 @@ module spine {
let boneCount = constrained.length;
if (constraint.data.local) {
for (let i = 0; i < boneCount; i++) {
let child = constrained[constrained.length - 1];
let child = constrained[i];
this.sortBone(child.parent);
if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);
}