소스 검색

Documented updateCacheReset.

NathanSweet 9 년 전
부모
커밋
397c8fd8f8
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java

+ 3 - 0
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java

@@ -292,6 +292,9 @@ public class Skeleton {
 
 
 	/** Updates the world transform for each bone and applies constraints. */
 	/** Updates the world transform for each bone and applies constraints. */
 	public void updateWorldTransform () {
 	public void updateWorldTransform () {
+		// This partial update avoids computing the world transform for constrained bones when 1) the bone is not updated
+		// before the constraint, 2) the constraint only needs to access the applied local transform, and 3) the constraint calls
+		// updateWorldTransform.
 		Array<Bone> updateCacheReset = this.updateCacheReset;
 		Array<Bone> updateCacheReset = this.updateCacheReset;
 		for (int i = 0, n = updateCacheReset.size; i < n; i++) {
 		for (int i = 0, n = updateCacheReset.size; i < n; i++) {
 			Bone bone = updateCacheReset.get(i);
 			Bone bone = updateCacheReset.get(i);