From a8f789324805b1ee840941e936476836c4ff0b4a Mon Sep 17 00:00:00 2001 From: Dank074 Date: Wed, 12 May 2021 03:43:45 -0500 Subject: [PATCH] cleaned AvatarImageBodyPartContainer --- src/nitro/avatar/AvatarImage.ts | 20 +++++++++---------- .../avatar/AvatarImageBodyPartContainer.ts | 16 +++++++-------- src/nitro/avatar/cache/AvatarImageCache.ts | 8 ++++---- src/nitro/avatar/cache/ImageData.ts | 4 ++-- src/nitro/avatar/structure/AvatarCanvas.ts | 4 ++-- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/nitro/avatar/AvatarImage.ts b/src/nitro/avatar/AvatarImage.ts index 75477903..40f6a207 100644 --- a/src/nitro/avatar/AvatarImage.ts +++ b/src/nitro/avatar/AvatarImage.ts @@ -358,17 +358,17 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener return null; } - isCachable = ((isCachable) && (part._Str_1807)); + isCachable = ((isCachable) && (part.isCacheable)); - const point = part._Str_1076.clone(); + const point = part.regPoint.clone(); if(point) { point.x += avatarCanvas.offset.x; point.y += avatarCanvas.offset.y; - point.x += avatarCanvas._Str_1076.x; - point.y += avatarCanvas._Str_1076.y; + point.x += avatarCanvas.regPoint.x; + point.y += avatarCanvas.regPoint.y; const partContainer = new Container(); @@ -477,15 +477,15 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener return null; } - const point = part._Str_1076.clone(); + const point = part.regPoint.clone(); if(point) { point.x += avatarCanvas.offset.x; point.y += avatarCanvas.offset.y; - point.x += avatarCanvas._Str_1076.x; - point.y += avatarCanvas._Str_1076.y; + point.x += avatarCanvas.regPoint.x; + point.y += avatarCanvas.regPoint.y; const partContainer = new Container(); @@ -542,15 +542,15 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener return null; } - const point = part._Str_1076.clone(); + const point = part.regPoint.clone(); if(point) { point.x += avatarCanvas.offset.x; point.y += avatarCanvas.offset.y; - point.x += avatarCanvas._Str_1076.x; - point.y += avatarCanvas._Str_1076.y; + point.x += avatarCanvas.regPoint.x; + point.y += avatarCanvas.regPoint.y; const partContainer = new Container(); diff --git a/src/nitro/avatar/AvatarImageBodyPartContainer.ts b/src/nitro/avatar/AvatarImageBodyPartContainer.ts index 941ea6dc..a4efc020 100644 --- a/src/nitro/avatar/AvatarImageBodyPartContainer.ts +++ b/src/nitro/avatar/AvatarImageBodyPartContainer.ts @@ -15,7 +15,7 @@ export class AvatarImageBodyPartContainer this._regPoint = _arg_2; this._isCacheable = _arg_3; - this._Str_1225(); + this.cleanPoints(); } public dispose(): void @@ -32,7 +32,7 @@ export class AvatarImageBodyPartContainer this._offset = null; } - private _Str_1225(): void + private cleanPoints(): void { // this._regPoint.x = this._regPoint.x; // this._regPoint.y = this._regPoint.y; @@ -40,11 +40,11 @@ export class AvatarImageBodyPartContainer // this._offset.y = this._offset.y; } - public _Str_1387(k: Point): void + public setRegPoint(k: Point): void { this._regPoint = k; - this._Str_1225(); + this.cleanPoints(); } public get image(): Container @@ -64,7 +64,7 @@ export class AvatarImageBodyPartContainer this._image = k; } - public get _Str_1076(): Point + public get regPoint(): Point { const clone = this._regPoint.clone(); @@ -78,11 +78,11 @@ export class AvatarImageBodyPartContainer { this._offset = k; - this._Str_1225(); + this.cleanPoints(); } - public get _Str_1807(): boolean + public get isCacheable(): boolean { return this._isCacheable; } -} \ No newline at end of file +} diff --git a/src/nitro/avatar/cache/AvatarImageCache.ts b/src/nitro/avatar/cache/AvatarImageCache.ts index 67222342..61f27e70 100644 --- a/src/nitro/avatar/cache/AvatarImageCache.ts +++ b/src/nitro/avatar/cache/AvatarImageCache.ts @@ -280,7 +280,7 @@ export class AvatarImageCache if(_local_14 && !_arg_3) { - if(_local_14._Str_1807) _local_13._Str_1924(_local_14, frameCount); + if(_local_14.isCacheable) _local_13._Str_1924(_local_14, frameCount); } else { @@ -443,7 +443,7 @@ export class AvatarImageCache const imageData = this._Str_1236(this._unionImages, isFlipped); const canvasOffset = ((this._scale === AvatarScaleType.LARGE) ? (this._canvas.height - 16) : (this._canvas.height - 8)); - const offset = new Point(-(imageData._Str_1076.x), (canvasOffset - imageData._Str_1076.y)); + const offset = new Point(-(imageData.regPoint.x), (canvasOffset - imageData.regPoint.y)); if(isFlipped && (assetPartDefinition !== 'lay')) offset.x = (offset.x + ((this._scale === AvatarScaleType.LARGE) ? 67 : 31)); @@ -496,8 +496,8 @@ export class AvatarImageCache const flipH = (!(isFlipped && data.flipH) && (isFlipped || data.flipH)); const regPoint = point.clone(); - regPoint.x -= data._Str_1076.x; - regPoint.y -= data._Str_1076.y; + regPoint.x -= data.regPoint.x; + regPoint.y -= data.regPoint.y; if(isFlipped) regPoint.x = (container.width - (regPoint.x + data.rect.width)); diff --git a/src/nitro/avatar/cache/ImageData.ts b/src/nitro/avatar/cache/ImageData.ts index 6f478d5b..6b58e784 100644 --- a/src/nitro/avatar/cache/ImageData.ts +++ b/src/nitro/avatar/cache/ImageData.ts @@ -43,7 +43,7 @@ export class ImageData return this._rect; } - public get _Str_1076(): Point + public get regPoint(): Point { return this._regPoint; } @@ -62,4 +62,4 @@ export class ImageData { return new Rectangle(-(this._regPoint.x), -(this._regPoint.y), this._rect.width, this._rect.height); } -} \ No newline at end of file +} diff --git a/src/nitro/avatar/structure/AvatarCanvas.ts b/src/nitro/avatar/structure/AvatarCanvas.ts index b47a79e9..3e539afa 100644 --- a/src/nitro/avatar/structure/AvatarCanvas.ts +++ b/src/nitro/avatar/structure/AvatarCanvas.ts @@ -40,8 +40,8 @@ export class AvatarCanvas return this._id; } - public get _Str_1076(): Point + public get regPoint(): Point { return this._regPoint; } -} \ No newline at end of file +}