Skip to content

Commit

Permalink
fix code formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Canvasfull committed Oct 11, 2023
1 parent ba361de commit 2760925
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cocos/spine/attach-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class AttachUtil {
protected _isInitialized = false;
protected _skeletonBones: spine.Bone[] | FrameBoneInfo[] | null = null;
protected _socketNodes: Map<number, Node> | null = null;
private keysToDelete: number[] = [];
private _keysToDelete: number[] = [];

constructor () {
this._isInitialized = false;
Expand All @@ -61,25 +61,25 @@ export class AttachUtil {
this._isInitialized = false;
this._skeletonBones = null;
this._socketNodes = null;
this.keysToDelete.length = 0;
this._keysToDelete.length = 0;
}

_syncAttachedNode (): void {
if (!this._isInitialized) return;
const socketNodes = this._socketNodes!;
for (const [boneIdx, boneNode] of socketNodes) {
if (!boneNode || !boneNode.isValid) {
this.keysToDelete.push(boneIdx);
this._keysToDelete.push(boneIdx);
continue;
}
const bone = this._skeletonBones![boneIdx];
if (bone) this.matrixHandle(boneNode, bone);
}
if (this.keysToDelete.length <= 0) return;
for (const boneIdx of this.keysToDelete) {
if (this._keysToDelete.length <= 0) return;
for (const boneIdx of this._keysToDelete) {
socketNodes.delete(boneIdx);
}
this.keysToDelete.length = 0;
this._keysToDelete.length = 0;
}

matrixHandle (node: Node, bone: any): void {
Expand Down

0 comments on commit 2760925

Please sign in to comment.