mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-19 06:46:28 +01:00
cleaned AvatarDataContainer
This commit is contained in:
parent
973240c997
commit
302212ba5c
@ -386,7 +386,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
partCount--;
|
||||
}
|
||||
|
||||
if(this._avatarSpriteData && this._avatarSpriteData._Str_832) this.convertToGrayscale(container);
|
||||
if(this._avatarSpriteData && this._avatarSpriteData.paletteIsGrayscale) this.convertToGrayscale(container);
|
||||
|
||||
if(!cache)
|
||||
{
|
||||
@ -404,7 +404,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
|
||||
if(!this._reusableTexture) return null;
|
||||
|
||||
if(this._avatarSpriteData && this._avatarSpriteData._Str_832)
|
||||
if(this._avatarSpriteData && this._avatarSpriteData.paletteIsGrayscale)
|
||||
{
|
||||
//this._reusableTexture = this.applyPalette(this._reusableTexture, this._avatarSpriteData.reds);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ export class AvatarDataContainer implements IAvatarDataContainer
|
||||
this._paletteIsGrayscale = false;
|
||||
}
|
||||
|
||||
this._colorMap = this._Str_1181(this._backGround, this._foreGround);
|
||||
this._colorMap = this.generatePaletteMapForGrayscale(this._backGround, this._foreGround);
|
||||
}
|
||||
|
||||
public get ink(): number
|
||||
@ -81,12 +81,12 @@ export class AvatarDataContainer implements IAvatarDataContainer
|
||||
return this._colorMap.get('alphas');
|
||||
}
|
||||
|
||||
public get _Str_832(): boolean
|
||||
public get paletteIsGrayscale(): boolean
|
||||
{
|
||||
return this._paletteIsGrayscale;
|
||||
}
|
||||
|
||||
private _Str_1181(k: number, _arg_2: number): Map<string, number[]>
|
||||
private generatePaletteMapForGrayscale(k: number, _arg_2: number): Map<string, number[]>
|
||||
{
|
||||
const _local_3 = ((k >> 24) & 0xFF);
|
||||
const _local_4 = ((k >> 16) & 0xFF);
|
||||
|
@ -4,7 +4,7 @@ export interface IAvatarDataContainer
|
||||
{
|
||||
ink: number;
|
||||
colorTransform: AdjustmentFilter;
|
||||
_Str_832: boolean;
|
||||
paletteIsGrayscale: boolean;
|
||||
reds: number[];
|
||||
greens: number[];
|
||||
blues: number[];
|
||||
|
Loading…
Reference in New Issue
Block a user