mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
[runtimes] Closes #842, sorting of transform constraints
This commit is contained in:
parent
cbe79ba04a
commit
787a525a93
Binary file not shown.
@ -198,7 +198,7 @@ public class Skeleton {
|
|||||||
var i:Number = 0;
|
var i:Number = 0;
|
||||||
if (constraint.data.local) {
|
if (constraint.data.local) {
|
||||||
for (i = 0; i < boneCount; i++) {
|
for (i = 0; i < boneCount; i++) {
|
||||||
var child:Bone = constrained[constrained.length - 1];
|
var child:Bone = constrained[i];
|
||||||
sortBone(child.parent);
|
sortBone(child.parent);
|
||||||
if (!(_updateCache.indexOf(child) > -1)) _updateCacheReset.push(child);
|
if (!(_updateCache.indexOf(child) > -1)) _updateCacheReset.push(child);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -295,7 +295,7 @@ static void _sortTransformConstraint(_spSkeleton* const internal, spTransformCon
|
|||||||
boneCount = constraint->bonesCount;
|
boneCount = constraint->bonesCount;
|
||||||
if (constraint->data->local) {
|
if (constraint->data->local) {
|
||||||
for (i = 0; i < boneCount; i++) {
|
for (i = 0; i < boneCount; i++) {
|
||||||
child = constrained[boneCount - 1];
|
child = constrained[i];
|
||||||
_sortBone(internal, child);
|
_sortBone(internal, child);
|
||||||
contains = 0;
|
contains = 0;
|
||||||
for (i = 0; i < internal->updateCacheCount; i++) {
|
for (i = 0; i < internal->updateCacheCount; i++) {
|
||||||
|
|||||||
@ -210,11 +210,9 @@ namespace Spine {
|
|||||||
|
|
||||||
var constrained = constraint.bones;
|
var constrained = constraint.bones;
|
||||||
int boneCount = constrained.Count;
|
int boneCount = constrained.Count;
|
||||||
// for (int ii = 0; ii < boneCount; ii++)
|
|
||||||
// SortBone(constrained.Items[ii]);
|
|
||||||
if (constraint.data.local) {
|
if (constraint.data.local) {
|
||||||
for (int i = 0; i < boneCount; i++) {
|
for (int i = 0; i < boneCount; i++) {
|
||||||
Bone child = constrained.Items[constrained.Count - 1];
|
Bone child = constrained.Items[i];
|
||||||
SortBone(child.parent);
|
SortBone(child.parent);
|
||||||
if (!updateCache.Contains(child)) updateCacheReset.Add(child);
|
if (!updateCache.Contains(child)) updateCacheReset.Add(child);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -250,7 +250,7 @@ public class Skeleton {
|
|||||||
int boneCount = constrained.size;
|
int boneCount = constrained.size;
|
||||||
if (constraint.data.local) {
|
if (constraint.data.local) {
|
||||||
for (int i = 0; i < boneCount; i++) {
|
for (int i = 0; i < boneCount; i++) {
|
||||||
Bone child = constrained.peek();
|
Bone child = constrained.get(i);
|
||||||
sortBone(child.parent);
|
sortBone(child.parent);
|
||||||
if (!updateCache.contains(child, true)) updateCacheReset.add(child);
|
if (!updateCache.contains(child, true)) updateCacheReset.add(child);
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -69,7 +69,7 @@ public class SkeletonSprite extends DisplayObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override public function render (painter:Painter) : void {
|
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 originalBlendMode:String = painter.state.blendMode;
|
||||||
var r:Number = skeleton.color.r * 255;
|
var r:Number = skeleton.color.r * 255;
|
||||||
var g:Number = skeleton.color.g * 255;
|
var g:Number = skeleton.color.g * 255;
|
||||||
|
|||||||
@ -3724,7 +3724,7 @@ var spine;
|
|||||||
var boneCount = constrained.length;
|
var boneCount = constrained.length;
|
||||||
if (constraint.data.local) {
|
if (constraint.data.local) {
|
||||||
for (var i = 0; i < boneCount; i++) {
|
for (var i = 0; i < boneCount; i++) {
|
||||||
var child = constrained[constrained.length - 1];
|
var child = constrained[i];
|
||||||
this.sortBone(child.parent);
|
this.sortBone(child.parent);
|
||||||
if (!(this._updateCache.indexOf(child) > -1))
|
if (!(this._updateCache.indexOf(child) > -1))
|
||||||
this.updateCacheReset.push(child);
|
this.updateCacheReset.push(child);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -3724,7 +3724,7 @@ var spine;
|
|||||||
var boneCount = constrained.length;
|
var boneCount = constrained.length;
|
||||||
if (constraint.data.local) {
|
if (constraint.data.local) {
|
||||||
for (var i = 0; i < boneCount; i++) {
|
for (var i = 0; i < boneCount; i++) {
|
||||||
var child = constrained[constrained.length - 1];
|
var child = constrained[i];
|
||||||
this.sortBone(child.parent);
|
this.sortBone(child.parent);
|
||||||
if (!(this._updateCache.indexOf(child) > -1))
|
if (!(this._updateCache.indexOf(child) > -1))
|
||||||
this.updateCacheReset.push(child);
|
this.updateCacheReset.push(child);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -3413,7 +3413,7 @@ var spine;
|
|||||||
var boneCount = constrained.length;
|
var boneCount = constrained.length;
|
||||||
if (constraint.data.local) {
|
if (constraint.data.local) {
|
||||||
for (var i = 0; i < boneCount; i++) {
|
for (var i = 0; i < boneCount; i++) {
|
||||||
var child = constrained[constrained.length - 1];
|
var child = constrained[i];
|
||||||
this.sortBone(child.parent);
|
this.sortBone(child.parent);
|
||||||
if (!(this._updateCache.indexOf(child) > -1))
|
if (!(this._updateCache.indexOf(child) > -1))
|
||||||
this.updateCacheReset.push(child);
|
this.updateCacheReset.push(child);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -3413,7 +3413,7 @@ var spine;
|
|||||||
var boneCount = constrained.length;
|
var boneCount = constrained.length;
|
||||||
if (constraint.data.local) {
|
if (constraint.data.local) {
|
||||||
for (var i = 0; i < boneCount; i++) {
|
for (var i = 0; i < boneCount; i++) {
|
||||||
var child = constrained[constrained.length - 1];
|
var child = constrained[i];
|
||||||
this.sortBone(child.parent);
|
this.sortBone(child.parent);
|
||||||
if (!(this._updateCache.indexOf(child) > -1))
|
if (!(this._updateCache.indexOf(child) > -1))
|
||||||
this.updateCacheReset.push(child);
|
this.updateCacheReset.push(child);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -3413,7 +3413,7 @@ var spine;
|
|||||||
var boneCount = constrained.length;
|
var boneCount = constrained.length;
|
||||||
if (constraint.data.local) {
|
if (constraint.data.local) {
|
||||||
for (var i = 0; i < boneCount; i++) {
|
for (var i = 0; i < boneCount; i++) {
|
||||||
var child = constrained[constrained.length - 1];
|
var child = constrained[i];
|
||||||
this.sortBone(child.parent);
|
this.sortBone(child.parent);
|
||||||
if (!(this._updateCache.indexOf(child) > -1))
|
if (!(this._updateCache.indexOf(child) > -1))
|
||||||
this.updateCacheReset.push(child);
|
this.updateCacheReset.push(child);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -3413,7 +3413,7 @@ var spine;
|
|||||||
var boneCount = constrained.length;
|
var boneCount = constrained.length;
|
||||||
if (constraint.data.local) {
|
if (constraint.data.local) {
|
||||||
for (var i = 0; i < boneCount; i++) {
|
for (var i = 0; i < boneCount; i++) {
|
||||||
var child = constrained[constrained.length - 1];
|
var child = constrained[i];
|
||||||
this.sortBone(child.parent);
|
this.sortBone(child.parent);
|
||||||
if (!(this._updateCache.indexOf(child) > -1))
|
if (!(this._updateCache.indexOf(child) > -1))
|
||||||
this.updateCacheReset.push(child);
|
this.updateCacheReset.push(child);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -192,7 +192,7 @@ module spine {
|
|||||||
let boneCount = constrained.length;
|
let boneCount = constrained.length;
|
||||||
if (constraint.data.local) {
|
if (constraint.data.local) {
|
||||||
for (let i = 0; i < boneCount; i++) {
|
for (let i = 0; i < boneCount; i++) {
|
||||||
let child = constrained[constrained.length - 1];
|
let child = constrained[i];
|
||||||
this.sortBone(child.parent);
|
this.sortBone(child.parent);
|
||||||
if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);
|
if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user