cleaned AvatarImagePartContainer

This commit is contained in:
Dank074 2021-05-12 03:55:21 -05:00
parent a8f7893248
commit ed6eafb26a
4 changed files with 21 additions and 21 deletions

View File

@ -34,7 +34,7 @@ export class AvatarImagePartContainer
if(this._partType === 'ey') this._isColorable = false; if(this._partType === 'ey') this._isColorable = false;
} }
public _Str_1674(k: number): number public getFrameIndex(k: number): number
{ {
if(!this._frames || !this._frames.length) return 0; if(!this._frames || !this._frames.length) return 0;
@ -48,7 +48,7 @@ export class AvatarImagePartContainer
return frameNumber; return frameNumber;
} }
public _Str_2258(k: number): AvatarAnimationFrame public getFrameDefinition(k: number): AvatarAnimationFrame
{ {
const frameNumber = (k % this._frames.length); const frameNumber = (k % this._frames.length);
@ -63,7 +63,7 @@ export class AvatarImagePartContainer
return null; return null;
} }
public _Str_1206(k: number): string public getCacheableKey(k: number): string
{ {
const frameNumber = (k % this._frames.length); const frameNumber = (k % this._frames.length);
@ -73,24 +73,24 @@ export class AvatarImagePartContainer
{ {
const frame = this._frames[frameNumber]; const frame = this._frames[frameNumber];
return (this._Str_1502 + ':' + frame._Str_778 + ':' + frame.number); return (this.partId + ':' + frame._Str_778 + ':' + frame.number);
} }
} }
return (this._Str_1502 + ':' + frameNumber); return (this.partId + ':' + frameNumber);
} }
public get _Str_1360(): string public get bodyPartId(): string
{ {
return this._bodyPartId; return this._bodyPartId;
} }
public get _Str_1669(): string public get partType(): string
{ {
return this._partType; return this._partType;
} }
public get _Str_1502(): string public get partId(): string
{ {
return this._partId; return this._partId;
} }
@ -115,17 +115,17 @@ export class AvatarImagePartContainer
this._isColorable = k; this._isColorable = k;
} }
public get _Str_1406(): number public get paletteMapId(): number
{ {
return this._paletteMapId; return this._paletteMapId;
} }
public get _Str_1666(): string public get flippedPartType(): string
{ {
return this._flippedPartType; return this._flippedPartType;
} }
public get _Str_1184(): boolean public get isBlendable(): boolean
{ {
return this._isBlendable; return this._isBlendable;
} }

View File

@ -474,7 +474,7 @@ export class AvatarStructure extends EventDispatcher
for(const _local_23 of _local_11) for(const _local_23 of _local_11)
{ {
if(_local_23._Str_1669 === _local_12) if(_local_23.partType === _local_12)
{ {
if(_local_40) if(_local_40)
{ {

View File

@ -341,14 +341,14 @@ export class AvatarImageCache
let color = 16777215; let color = 16777215;
if(!((direction == 7) && ((container._Str_1669 === 'fc') || (container._Str_1669 === 'ey')))) if(!((direction == 7) && ((container.partType === 'fc') || (container.partType === 'ey'))))
{ {
if(!((container._Str_1669 === 'ri') && !container._Str_1502)) if(!((container.partType === 'ri') && !container.partId))
{ {
const partId = container._Str_1502; const partId = container.partId;
const animationFrame = container._Str_2258(frameCount); const animationFrame = container.getFrameDefinition(frameCount);
let partType = container._Str_1669; let partType = container.partType;
let frameNumber = 0; let frameNumber = 0;
if(animationFrame) if(animationFrame)
@ -357,7 +357,7 @@ export class AvatarImageCache
if((animationFrame._Str_778) && (animationFrame._Str_778 !== '')) assetPartDefinition = animationFrame._Str_778; if((animationFrame._Str_778) && (animationFrame._Str_778 !== '')) assetPartDefinition = animationFrame._Str_778;
} }
else frameNumber = container._Str_1674(frameCount); else frameNumber = container.getFrameIndex(frameCount);
let assetDirection = direction; let assetDirection = direction;
let flipH = false; let flipH = false;
@ -374,7 +374,7 @@ export class AvatarImageCache
else if(direction === 5) assetDirection = 1; else if(direction === 5) assetDirection = 1;
else if(direction === 6) assetDirection = 0; else if(direction === 6) assetDirection = 0;
if(container._Str_1666 !== partType) partType = container._Str_1666; if(container.flippedPartType !== partType) partType = container.flippedPartType;
} }
} }

View File

@ -48,7 +48,7 @@ export class AvatarImageDirectionCache
{ {
let name = ''; let name = '';
for(const part of this._partList) name += (part._Str_1206(k) + '/'); for(const part of this._partList) name += (part.getCacheableKey(k) + '/');
return name; return name;
} }
@ -56,4 +56,4 @@ export class AvatarImageDirectionCache
private _Str_587(k: string): void private _Str_587(k: string): void
{ {
} }
} }