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 9, 2023
1 parent d6d04cb commit b65d5d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cocos/spine/assembler/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function realTimeTraverse (comp: Skeleton): void {
let indexOffset = 0;
let indexCount = 0;
for (let i = 0; i < count; i += 6) {
indexCount = data.get(i+3);
indexCount = data.get(i + 3);
const material = _getSlotMaterial(data.get(i + 4), comp);

Check failure on line 179 in cocos/spine/assembler/simple.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unsafe argument of type `any` assigned to a parameter of type `number`
const textureID: number = data.get(i + 5);
comp.requestDrawData(material, textureID, indexOffset, indexCount);
Expand Down
2 changes: 1 addition & 1 deletion cocos/spine/lib/spine-core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ declare namespace spine {
scale: number;
private linkedMeshes;
constructor(attachmentLoader: AttachmentLoader);
readSkeletonData(json: string | any): SkeletonData;
readSkeletonData(json: any): SkeletonData;
readAttachment(map: any, skin: Skin, slotIndex: number, name: string, skeletonData: SkeletonData): Attachment;
readVertices(map: any, attachment: VertexAttachment, verticesLength: number): void;
readAnimation(map: any, name: string, skeletonData: SkeletonData): void;
Expand Down
12 changes: 5 additions & 7 deletions cocos/spine/skeleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export class Skeleton extends UIRenderer {
_vBuffer: Uint8Array | null = null;
_iLength = 0;
_iBuffer: Uint8Array | null = null;
_model: any | undefined;
_model: any;
_tempColor: Color = new Color(1, 1, 1, 1);

constructor () {
Expand Down Expand Up @@ -1015,7 +1015,7 @@ export class Skeleton extends UIRenderer {
}
this._updateCache(dt);
} else {
if(EDITOR_NOT_IN_PREVIEW) this._instance.updateAnimation(dt);
if (EDITOR_NOT_IN_PREVIEW) this._instance.updateAnimation(dt);

Check failure on line 1018 in cocos/spine/skeleton.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unexpected if as the only statement in an else block
}
}

Expand Down Expand Up @@ -1610,11 +1610,9 @@ export class Skeleton extends UIRenderer {
const g = this._color.g / 255.0;
const b = this._color.b / 255.0;
const a = this.node._uiProps.opacity;

if (this._tempColor.r === r ||
this._tempColor.g === g ||
this._tempColor.b === b)
{ return; }
if (this._tempColor.r === r && this._tempColor.g === g && this._tempColor.b === b) {
return;
}
this._tempColor.set(r, g, b, this._tempColor.a);
this._instance.setColor(r, g, b, a);
}
Expand Down

0 comments on commit b65d5d4

Please sign in to comment.