cleaned AvatarImageBodyPartContainer

This commit is contained in:
Dank074 2021-05-12 03:43:45 -05:00
parent 4e54c91554
commit a8f7893248
5 changed files with 26 additions and 26 deletions

View File

@ -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();

View File

@ -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;
}
}
}

View File

@ -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));

View File

@ -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);
}
}
}

View File

@ -40,8 +40,8 @@ export class AvatarCanvas
return this._id;
}
public get _Str_1076(): Point
public get regPoint(): Point
{
return this._regPoint;
}
}
}