mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 23:50:52 +01:00
cleaned AvatarStructure
This commit is contained in:
parent
302212ba5c
commit
428ae04cf6
@ -99,7 +99,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
this.setDirection(AvatarImage.DEFAULT_AVATAR_SET, AvatarImage.DEFAULT_DIRECTION);
|
||||
this._actions = [];
|
||||
this._defaultAction = new ActiveActionData(AvatarAction.POSTURE_STAND);
|
||||
this._defaultAction.definition = this._structure._Str_1675(AvatarImage.DEFAULT_ACTION);
|
||||
this._defaultAction.definition = this._structure.getActionDefinition(AvatarImage.DEFAULT_ACTION);
|
||||
this.resetActions();
|
||||
this._fullImageCache = new AdvancedMap();
|
||||
this._animationFrameCount = 0;
|
||||
@ -165,7 +165,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
|
||||
public getPartColor(k: string): IPartColor
|
||||
{
|
||||
return this._structure._Str_867(this._figure, k);
|
||||
return this._structure.getPartColor(this._figure, k);
|
||||
}
|
||||
|
||||
public setDirection(k: string, _arg_2: number): void
|
||||
@ -182,7 +182,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
_arg_2 = (_arg_2 - (AvatarDirectionAngle.MAX_DIRECTION + 1));
|
||||
}
|
||||
|
||||
if(this._structure._Str_1939(k))
|
||||
if(this._structure.isMainAvatarSet(k))
|
||||
{
|
||||
this._mainDirection = _arg_2;
|
||||
}
|
||||
@ -218,7 +218,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
|
||||
public getLayerData(k: ISpriteDataContainer): IAnimationLayerData
|
||||
{
|
||||
return this._structure._Str_1881(k.animation.id, this._frameCounter, k.id);
|
||||
return this._structure.getBodyPartData(k.animation.id, this._frameCounter, k.id);
|
||||
}
|
||||
|
||||
public updateAnimationByFrames(k: number = 1): void
|
||||
@ -279,7 +279,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
this._cachedBodyPartsDirection = _arg_3;
|
||||
this._cachedBodyPartsGeometryType = _arg_2;
|
||||
this._cachedBodyPartsAvatarSet = k;
|
||||
this._cachedBodyParts = this._structure._Str_755(k, _arg_2, _arg_3);
|
||||
this._cachedBodyParts = this._structure.getBodyParts(k, _arg_2, _arg_3);
|
||||
}
|
||||
return this._cachedBodyParts;
|
||||
}
|
||||
@ -291,7 +291,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
{
|
||||
return;
|
||||
}
|
||||
const _local_2 = this._structure._Str_1664(this._scale, this._mainAction.definition._Str_868);
|
||||
const _local_2 = this._structure.getCanvas(this._scale, this._mainAction.definition._Str_868);
|
||||
if(_local_2 == null)
|
||||
{
|
||||
return;
|
||||
@ -314,7 +314,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
|
||||
if(!this._actionsSorted) this.endActionAppends();
|
||||
|
||||
const avatarCanvas = this._structure._Str_1664(this._scale, this._mainAction.definition._Str_868);
|
||||
const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition._Str_868);
|
||||
|
||||
if(!avatarCanvas) return null;
|
||||
|
||||
@ -444,7 +444,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
|
||||
if(!this._actionsSorted) this.endActionAppends();
|
||||
|
||||
const avatarCanvas = this._structure._Str_1664(this._scale, this._mainAction.definition._Str_868);
|
||||
const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition._Str_868);
|
||||
|
||||
if(!avatarCanvas) return null;
|
||||
|
||||
@ -509,7 +509,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
|
||||
if(!this._actionsSorted) this.endActionAppends();
|
||||
|
||||
const avatarCanvas = this._structure._Str_1664(this._scale, this._mainAction.definition._Str_868);
|
||||
const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition._Str_868);
|
||||
|
||||
if(!avatarCanvas) return null;
|
||||
|
||||
@ -741,7 +741,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
break;
|
||||
case AvatarAction.CARRY_OBJECT:
|
||||
case AvatarAction.USE_OBJECT: {
|
||||
const _local_4 = this._structure._Str_2018(k);
|
||||
const _local_4 = this._structure.getActionDefinitionWithState(k);
|
||||
if(_local_4) _local_3 = _local_4._Str_1350(_local_3);
|
||||
this.addActionData(k, _local_3);
|
||||
break;
|
||||
@ -781,7 +781,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
this._sprites = [];
|
||||
this._avatarSpriteData = null;
|
||||
this._directionOffset = 0;
|
||||
this._structure._Str_2101(this);
|
||||
this._structure.removeDynamicItems(this);
|
||||
this._mainAction = this._defaultAction;
|
||||
this._mainAction.definition = this._defaultAction.definition;
|
||||
this.resetBodyPartCache(this._defaultAction);
|
||||
@ -799,7 +799,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
}
|
||||
for(const _local_3 of this._sortedActions)
|
||||
{
|
||||
_local_2 = this._structure._Str_2018(_local_3.actionType);
|
||||
_local_2 = this._structure.getActionDefinitionWithState(_local_3.actionType);
|
||||
if(((!(_local_2 == null)) && (_local_2._Str_715(_local_3.actionParameter))))
|
||||
{
|
||||
k = true;
|
||||
@ -817,8 +817,8 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
let k: boolean;
|
||||
|
||||
this._currentActionsString = '';
|
||||
this._sortedActions = this._structure._Str_711(this._actions);
|
||||
this._animationFrameCount = this._structure._Str_1936(this._sortedActions);
|
||||
this._sortedActions = this._structure.sortActions(this._actions);
|
||||
this._animationFrameCount = this._structure.maxFrames(this._sortedActions);
|
||||
|
||||
if(!this._sortedActions)
|
||||
{
|
||||
@ -833,7 +833,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
}
|
||||
else
|
||||
{
|
||||
this._canvasOffsets = this._structure._Str_781(this._sortedActions, this._scale, this._mainDirection);
|
||||
this._canvasOffsets = this._structure.getCanvasOffsets(this._sortedActions, this._scale, this._mainDirection);
|
||||
|
||||
for(const _local_4 of this._sortedActions)
|
||||
{
|
||||
@ -886,7 +886,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
{
|
||||
if((k && k.definition) && k.definition._Str_861)
|
||||
{
|
||||
const _local_2 = this._structure._Str_720(((k.definition.state + '.') + k.actionParameter));
|
||||
const _local_2 = this._structure.getAnimation(((k.definition.state + '.') + k.actionParameter));
|
||||
|
||||
if(_local_2 && _local_2._Str_1892())
|
||||
{
|
||||
@ -920,7 +920,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
{
|
||||
this._isAnimating = k.definition._Str_801(k.actionParameter);
|
||||
|
||||
const _local_2 = this._structure._Str_720(((k.definition.state + '.') + k.actionParameter));
|
||||
const _local_2 = this._structure.getAnimation(((k.definition.state + '.') + k.actionParameter));
|
||||
|
||||
if(_local_2)
|
||||
{
|
||||
|
@ -126,7 +126,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
{
|
||||
if(!this._structure) return;
|
||||
|
||||
this._structure._Str_1825(HabboAvatarGeometry.geometry);
|
||||
this._structure.initGeometry(HabboAvatarGeometry.geometry);
|
||||
|
||||
this._geometryReady = true;
|
||||
|
||||
@ -137,7 +137,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
{
|
||||
if(!this._structure) return;
|
||||
|
||||
this._structure._Str_1296(HabboAvatarPartSets.partSets);
|
||||
this._structure.initPartSets(HabboAvatarPartSets.partSets);
|
||||
|
||||
this._partSetsReady = true;
|
||||
|
||||
@ -148,7 +148,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
{
|
||||
const defaultActions = Nitro.instance.getConfiguration<string>('avatar.default.actions');
|
||||
|
||||
if(defaultActions) this._structure._Str_1060(Nitro.instance.core.asset, defaultActions);
|
||||
if(defaultActions) this._structure.initActions(Nitro.instance.core.asset, defaultActions);
|
||||
|
||||
const request = new XMLHttpRequest();
|
||||
|
||||
@ -162,7 +162,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
{
|
||||
if(!this._structure) return;
|
||||
|
||||
this._structure._Str_1620(JSON.parse(request.responseText));
|
||||
this._structure.updateActions(JSON.parse(request.responseText));
|
||||
|
||||
this._actionsReady = true;
|
||||
|
||||
@ -185,7 +185,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
{
|
||||
if(!this._structure) return;
|
||||
|
||||
this._structure._Str_2229(HabboAvatarAnimations.animations);
|
||||
this._structure.initAnimation(HabboAvatarAnimations.animations);
|
||||
|
||||
this._animationsReady = true;
|
||||
|
||||
@ -204,7 +204,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
{
|
||||
if(err || !results || !results.figuredata) throw new Error('invalid_default_figure_data');
|
||||
|
||||
if(this._structure) this._structure._Str_1569(results.figuredata);
|
||||
if(this._structure) this._structure.initFigureData(results.figuredata);
|
||||
});
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
{
|
||||
let isValid = false;
|
||||
|
||||
const typeIds = this._structure._Str_1733(gender, 2);
|
||||
const typeIds = this._structure.getMandatorySetTypeIds(gender, 2);
|
||||
|
||||
if(typeIds)
|
||||
{
|
||||
@ -318,7 +318,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
{
|
||||
if(!container.hasPartType(id))
|
||||
{
|
||||
const figurePartSet = this._structure._Str_2264(id, gender);
|
||||
const figurePartSet = this._structure.getDefaultPartSet(id, gender);
|
||||
|
||||
if(figurePartSet)
|
||||
{
|
||||
@ -337,7 +337,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
|
||||
if(!figurePartSet)
|
||||
{
|
||||
const partSet = this._structure._Str_2264(id, gender);
|
||||
const partSet = this._structure.getDefaultPartSet(id, gender);
|
||||
|
||||
if(partSet)
|
||||
{
|
||||
@ -385,7 +385,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
}
|
||||
}
|
||||
|
||||
if(!searchParts) searchParts = this._structure._Str_1695(AvatarSetType.FULL);
|
||||
if(!searchParts) searchParts = this._structure.getBodyPartsUnordered(AvatarSetType.FULL);
|
||||
|
||||
for(const part of searchParts)
|
||||
{
|
||||
@ -440,7 +440,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
{
|
||||
if(!this._structure) return null;
|
||||
|
||||
return this._structure._Str_1733(k, _arg_2);
|
||||
return this._structure.getMandatorySetTypeIds(k, _arg_2);
|
||||
}
|
||||
|
||||
public getAssetByName(name: string): IGraphicAsset
|
||||
|
@ -71,14 +71,14 @@ export class AvatarStructure extends EventDispatcher
|
||||
this._mandatorySetTypeIds = null;
|
||||
}
|
||||
|
||||
public _Str_1825(k: any): void
|
||||
public initGeometry(k: any): void
|
||||
{
|
||||
if(!k) return;
|
||||
|
||||
this._geometry = new AvatarModelGeometry(k);
|
||||
}
|
||||
|
||||
public _Str_1060(k: IAssetManager, _arg_2: any): void
|
||||
public initActions(k: IAssetManager, _arg_2: any): void
|
||||
{
|
||||
if(!_arg_2) return;
|
||||
|
||||
@ -86,14 +86,14 @@ export class AvatarStructure extends EventDispatcher
|
||||
this._defaultAction = this._actionManager._Str_1027();
|
||||
}
|
||||
|
||||
public _Str_1620(data: any): void
|
||||
public updateActions(data: any): void
|
||||
{
|
||||
this._actionManager._Str_1620(data);
|
||||
this._actionManager.updateActions(data);
|
||||
|
||||
this._defaultAction = this._actionManager._Str_1027();
|
||||
}
|
||||
|
||||
public _Str_1296(k: any): boolean
|
||||
public initPartSets(k: any): boolean
|
||||
{
|
||||
if(!k) return false;
|
||||
|
||||
@ -108,26 +108,26 @@ export class AvatarStructure extends EventDispatcher
|
||||
return false;
|
||||
}
|
||||
|
||||
public _Str_2229(k: any): boolean
|
||||
public initAnimation(k: any): boolean
|
||||
{
|
||||
if(!k) return false;
|
||||
|
||||
return this._animationData.parse(k);
|
||||
}
|
||||
|
||||
public _Str_1569(k: any): boolean
|
||||
public initFigureData(k: any): boolean
|
||||
{
|
||||
if(!k) return false;
|
||||
|
||||
return this._figureData.parse(k);
|
||||
}
|
||||
|
||||
public _Str_882(data: any): void
|
||||
public injectFigureData(data: any): void
|
||||
{
|
||||
this._figureData._Str_1133(data);
|
||||
}
|
||||
|
||||
public _Str_1849(k: IAssetManager, _arg_2: string = 'fx', _arg_3: number = 200): void
|
||||
public registerAnimations(k: IAssetManager, _arg_2: string = 'fx', _arg_3: number = 200): void
|
||||
{
|
||||
let index = 0;
|
||||
|
||||
@ -139,19 +139,19 @@ export class AvatarStructure extends EventDispatcher
|
||||
{
|
||||
const animationData = collection.data;
|
||||
|
||||
this._animationManager._Str_2061(this, animationData.animations);
|
||||
this._animationManager.registerAnimation(this, animationData.animations);
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
public _Str_2061(data: { [index: string]: IAssetAnimation }): void
|
||||
public registerAnimation(data: { [index: string]: IAssetAnimation }): void
|
||||
{
|
||||
this._animationManager._Str_2061(this, data);
|
||||
this._animationManager.registerAnimation(this, data);
|
||||
}
|
||||
|
||||
public _Str_867(k: IAvatarFigureContainer, _arg_2: string, _arg_3: number = 0): IPartColor
|
||||
public getPartColor(k: IAvatarFigureContainer, _arg_2: string, _arg_3: number = 0): IPartColor
|
||||
{
|
||||
const _local_4 = k.getPartColorIds(_arg_2);
|
||||
|
||||
@ -168,37 +168,37 @@ export class AvatarStructure extends EventDispatcher
|
||||
return _local_6._Str_751(_local_4[_arg_3]);
|
||||
}
|
||||
|
||||
public _Str_1881(animation: string, frameCount: number, spriteId: string): AvatarAnimationLayerData
|
||||
public getBodyPartData(animation: string, frameCount: number, spriteId: string): AvatarAnimationLayerData
|
||||
{
|
||||
return this._animationManager._Str_607(animation, frameCount, spriteId) as AvatarAnimationLayerData;
|
||||
}
|
||||
|
||||
public _Str_720(k: string): Animation
|
||||
public getAnimation(k: string): Animation
|
||||
{
|
||||
return this._animationManager._Str_720(k) as Animation;
|
||||
return this._animationManager.getAnimation(k) as Animation;
|
||||
}
|
||||
|
||||
public _Str_1675(k: string): ActionDefinition
|
||||
public getActionDefinition(k: string): ActionDefinition
|
||||
{
|
||||
return this._actionManager._Str_1675(k);
|
||||
return this._actionManager.getActionDefinition(k);
|
||||
}
|
||||
|
||||
public _Str_2018(k: string): ActionDefinition
|
||||
public getActionDefinitionWithState(k: string): ActionDefinition
|
||||
{
|
||||
return this._actionManager._Str_2018(k);
|
||||
return this._actionManager.getActionDefinitionWithState(k);
|
||||
}
|
||||
|
||||
public _Str_1939(k: string): boolean
|
||||
public isMainAvatarSet(k: string): boolean
|
||||
{
|
||||
return this._geometry._Str_1939(k);
|
||||
return this._geometry.isMainAvatarSet(k);
|
||||
}
|
||||
|
||||
public _Str_711(k: IActiveActionData[]): IActiveActionData[]
|
||||
public sortActions(k: IActiveActionData[]): IActiveActionData[]
|
||||
{
|
||||
return this._actionManager._Str_711(k);
|
||||
return this._actionManager.sortActions(k);
|
||||
}
|
||||
|
||||
public _Str_1936(k: IActiveActionData[]): number
|
||||
public maxFrames(k: IActiveActionData[]): number
|
||||
{
|
||||
let _local_2 = 0;
|
||||
|
||||
@ -209,7 +209,7 @@ export class AvatarStructure extends EventDispatcher
|
||||
return _local_2;
|
||||
}
|
||||
|
||||
public _Str_1733(k: string, _arg_2: number): string[]
|
||||
public getMandatorySetTypeIds(k: string, _arg_2: number): string[]
|
||||
{
|
||||
if(!this._mandatorySetTypeIds[k])
|
||||
{
|
||||
@ -221,32 +221,32 @@ export class AvatarStructure extends EventDispatcher
|
||||
return this._mandatorySetTypeIds[k][_arg_2];
|
||||
}
|
||||
|
||||
this._mandatorySetTypeIds[k][_arg_2] = this._figureData._Str_1733(k, _arg_2);
|
||||
this._mandatorySetTypeIds[k][_arg_2] = this._figureData.getMandatorySetTypeIds(k, _arg_2);
|
||||
|
||||
return this._mandatorySetTypeIds[k][_arg_2];
|
||||
}
|
||||
|
||||
public _Str_2264(k: string, _arg_2: string): IFigurePartSet
|
||||
public getDefaultPartSet(k: string, _arg_2: string): IFigurePartSet
|
||||
{
|
||||
return this._figureData._Str_2264(k, _arg_2);
|
||||
return this._figureData.getDefaultPartSet(k, _arg_2);
|
||||
}
|
||||
|
||||
public _Str_781(k: IActiveActionData[], _arg_2: string, _arg_3: number): number[]
|
||||
public getCanvasOffsets(k: IActiveActionData[], _arg_2: string, _arg_3: number): number[]
|
||||
{
|
||||
return this._actionManager._Str_781(k, _arg_2, _arg_3);
|
||||
return this._actionManager.getCanvasOffsets(k, _arg_2, _arg_3);
|
||||
}
|
||||
|
||||
public _Str_1664(k: string, _arg_2: string): AvatarCanvas
|
||||
public getCanvas(k: string, _arg_2: string): AvatarCanvas
|
||||
{
|
||||
return this._geometry._Str_1664(k, _arg_2);
|
||||
return this._geometry.getCanvas(k, _arg_2);
|
||||
}
|
||||
|
||||
public _Str_2101(k: IAvatarImage): void
|
||||
public removeDynamicItems(k: IAvatarImage): void
|
||||
{
|
||||
this._geometry._Str_2101(k);
|
||||
this._geometry.removeDynamicItems(k);
|
||||
}
|
||||
|
||||
public _Str_2021(k: IActiveActionData, _arg_2: IAvatarImage): string[]
|
||||
public getActiveBodyPartIds(k: IActiveActionData, _arg_2: IAvatarImage): string[]
|
||||
{
|
||||
let _local_3: string[] = [];
|
||||
|
||||
@ -256,7 +256,7 @@ export class AvatarStructure extends EventDispatcher
|
||||
if(k.definition._Str_861)
|
||||
{
|
||||
const _local_7 = ((k.definition.state + '.') + k.actionParameter);
|
||||
const _local_8 = this._animationManager._Str_720(_local_7);
|
||||
const _local_8 = this._animationManager.getAnimation(_local_7);
|
||||
|
||||
if(_local_8)
|
||||
{
|
||||
@ -324,28 +324,28 @@ export class AvatarStructure extends EventDispatcher
|
||||
return _local_4;
|
||||
}
|
||||
|
||||
public _Str_1695(k: string): string[]
|
||||
public getBodyPartsUnordered(k: string): string[]
|
||||
{
|
||||
return this._geometry._Str_1307(k);
|
||||
}
|
||||
|
||||
public _Str_755(k: string, _arg_2: string, _arg_3: number): string[]
|
||||
public getBodyParts(k: string, _arg_2: string, _arg_3: number): string[]
|
||||
{
|
||||
const _local_4 = AvatarDirectionAngle.DIRECTION_TO_ANGLE[_arg_3];
|
||||
|
||||
return this._geometry._Str_2250(k, _local_4, _arg_2);
|
||||
}
|
||||
|
||||
public _Str_1888(k:IActiveActionData, _arg_2: number, _arg_3: number, _arg_4: string): Point
|
||||
public getFrameBodyPartOffset(k:IActiveActionData, _arg_2: number, _arg_3: number, _arg_4: string): Point
|
||||
{
|
||||
const _local_5 = this._animationData._Str_2244(k.definition);
|
||||
|
||||
if(_local_5) return _local_5._Str_1888(_arg_2, _arg_3, _arg_4);
|
||||
if(_local_5) return _local_5.getFrameBodyPartOffset(_arg_2, _arg_3, _arg_4);
|
||||
|
||||
return AnimationAction._Str_1934;
|
||||
}
|
||||
|
||||
public _Str_713(k: string, _arg_2:IAvatarFigureContainer, _arg_3:IActiveActionData, _arg_4: string, _arg_5: number, removes: string[], _arg_7: IAvatarImage, _arg_8: Map<string, string> = null): AvatarImagePartContainer[]
|
||||
public getParts(k: string, _arg_2:IAvatarFigureContainer, _arg_3:IActiveActionData, _arg_4: string, _arg_5: number, removes: string[], _arg_7: IAvatarImage, _arg_8: Map<string, string> = null): AvatarImagePartContainer[]
|
||||
{
|
||||
const _local_10: Animation = null;
|
||||
let _local_34: IActionDefinition = null;
|
||||
@ -363,11 +363,11 @@ export class AvatarStructure extends EventDispatcher
|
||||
if(_arg_3.definition._Str_861)
|
||||
{
|
||||
const _local_24 = ((_arg_3.definition.state + '.') + _arg_3.actionParameter);
|
||||
const _local_10 = this._animationManager._Str_720(_local_24);
|
||||
const _local_10 = this._animationManager.getAnimation(_local_24);
|
||||
|
||||
if(_local_10)
|
||||
{
|
||||
_local_14 = this._Str_1768(_local_10._Str_2185(_arg_3.overridingAction));
|
||||
_local_14 = this.getPopulatedArray(_local_10._Str_2185(_arg_3.overridingAction));
|
||||
|
||||
for(const _local_25 of _local_10._Str_1065(0, _arg_3.overridingAction))
|
||||
{
|
||||
@ -387,7 +387,7 @@ export class AvatarStructure extends EventDispatcher
|
||||
}
|
||||
}
|
||||
|
||||
const _local_16 = this._geometry._Str_713(_arg_4, k, _arg_5, _local_9, _arg_7);
|
||||
const _local_16 = this._geometry.getParts(_arg_4, k, _arg_5, _local_9, _arg_7);
|
||||
const _local_21 = _arg_2.getPartTypeIds();
|
||||
|
||||
for(const _local_17 of _local_21)
|
||||
@ -599,7 +599,7 @@ export class AvatarStructure extends EventDispatcher
|
||||
return _local_22;
|
||||
}
|
||||
|
||||
private _Str_1768(k: number): number[]
|
||||
private getPopulatedArray(k: number): number[]
|
||||
{
|
||||
const _local_2: number[] = [];
|
||||
|
||||
@ -615,11 +615,11 @@ export class AvatarStructure extends EventDispatcher
|
||||
return _local_2;
|
||||
}
|
||||
|
||||
public _Str_672(): string[]
|
||||
public getItemIds(): string[]
|
||||
{
|
||||
if(this._actionManager)
|
||||
{
|
||||
const k = this._actionManager._Str_1675('CarryItem').params;
|
||||
const k = this._actionManager.getActionDefinition('CarryItem').params;
|
||||
|
||||
const _local_2 = [];
|
||||
|
||||
|
@ -179,7 +179,7 @@ export class EffectAssetDownloadManager extends EventDispatcher
|
||||
|
||||
const loadedEffects: string[] = [];
|
||||
|
||||
this._structure._Str_2061(event.library.animation);
|
||||
this._structure.registerAnimation(event.library.animation);
|
||||
|
||||
for(const [ id, libraries ] of this._incompleteEffects.entries())
|
||||
{
|
||||
|
@ -14,10 +14,10 @@ export class AvatarActionManager
|
||||
this._actions = new Map();
|
||||
this._defaultAction = null;
|
||||
|
||||
this._Str_1620(data);
|
||||
this.updateActions(data);
|
||||
}
|
||||
|
||||
public _Str_1620(data: any): void
|
||||
public updateActions(data: any): void
|
||||
{
|
||||
if(!data) return;
|
||||
|
||||
@ -59,7 +59,7 @@ export class AvatarActionManager
|
||||
}
|
||||
}
|
||||
|
||||
public _Str_1675(id: string): ActionDefinition
|
||||
public getActionDefinition(id: string): ActionDefinition
|
||||
{
|
||||
if(!id) return null;
|
||||
|
||||
@ -73,7 +73,7 @@ export class AvatarActionManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public _Str_2018(state: string): ActionDefinition
|
||||
public getActionDefinitionWithState(state: string): ActionDefinition
|
||||
{
|
||||
const existing = this._actions.get(state);
|
||||
|
||||
@ -98,7 +98,7 @@ export class AvatarActionManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public _Str_781(k: IActiveActionData[], _arg_2: string, _arg_3: number): number[]
|
||||
public getCanvasOffsets(k: IActiveActionData[], _arg_2: string, _arg_3: number): number[]
|
||||
{
|
||||
let canvasOffsets: number[] = [];
|
||||
|
||||
@ -115,7 +115,7 @@ export class AvatarActionManager
|
||||
return canvasOffsets;
|
||||
}
|
||||
|
||||
public _Str_711(actions: IActiveActionData[]): IActiveActionData[]
|
||||
public sortActions(actions: IActiveActionData[]): IActiveActionData[]
|
||||
{
|
||||
if(!actions) return null;
|
||||
|
||||
|
@ -105,7 +105,7 @@ export class Animation implements IAnimation
|
||||
{
|
||||
for(const bodyPart of frame.bodyparts)
|
||||
{
|
||||
const definition = _arg_3._Str_1675(bodyPart.action);
|
||||
const definition = _arg_3.getActionDefinition(bodyPart.action);
|
||||
const layer = new AvatarAnimationLayerData(bodyPart, AvatarAnimationLayerData.BODYPART, definition);
|
||||
|
||||
layers.push(layer);
|
||||
@ -116,7 +116,7 @@ export class Animation implements IAnimation
|
||||
{
|
||||
for(const fx of frame.fxs)
|
||||
{
|
||||
const definition = _arg_3._Str_1675(fx.action);
|
||||
const definition = _arg_3.getActionDefinition(fx.action);
|
||||
const layer = new AvatarAnimationLayerData(fx, AvatarAnimationLayerData.FX, definition);
|
||||
|
||||
layers.push(layer);
|
||||
|
@ -14,7 +14,7 @@ export class AnimationManager implements IAnimationManager
|
||||
this._animations = new Map();
|
||||
}
|
||||
|
||||
public _Str_2061(structure: AvatarStructure, _arg_2: { [index: string]: IAssetAnimation }): boolean
|
||||
public registerAnimation(structure: AvatarStructure, _arg_2: { [index: string]: IAssetAnimation }): boolean
|
||||
{
|
||||
const animationData = _arg_2[Object.keys(_arg_2)[0]];
|
||||
|
||||
@ -25,7 +25,7 @@ export class AnimationManager implements IAnimationManager
|
||||
return true;
|
||||
}
|
||||
|
||||
public _Str_720(animation: string): Animation
|
||||
public getAnimation(animation: string): Animation
|
||||
{
|
||||
const existing = this._animations.get(animation);
|
||||
|
||||
@ -36,7 +36,7 @@ export class AnimationManager implements IAnimationManager
|
||||
|
||||
public _Str_607(animation: string, frameCount: number, spriteId: string): IAnimationLayerData
|
||||
{
|
||||
const existing = this._Str_720(animation);
|
||||
const existing = this.getAnimation(animation);
|
||||
|
||||
if(!existing) return null;
|
||||
|
||||
|
@ -4,6 +4,6 @@ import { IAnimationLayerData } from './IAnimationLayerData';
|
||||
export interface IAnimationManager
|
||||
{
|
||||
animations: Map<any, any>;
|
||||
_Str_720(_arg_1: string): IAnimation;
|
||||
getAnimation(_arg_1: string): IAnimation;
|
||||
_Str_607(_arg_1: string, _arg_2: number, _arg_3: string): IAnimationLayerData;
|
||||
}
|
||||
}
|
||||
|
12
src/nitro/avatar/cache/AvatarImageCache.ts
vendored
12
src/nitro/avatar/cache/AvatarImageCache.ts
vendored
@ -113,7 +113,7 @@ export class AvatarImageCache
|
||||
|
||||
public setDirection(k: string, _arg_2: number): void
|
||||
{
|
||||
const parts = this._structure._Str_1695(k);
|
||||
const parts = this._structure.getBodyPartsUnordered(k);
|
||||
|
||||
if(parts)
|
||||
{
|
||||
@ -130,7 +130,7 @@ export class AvatarImageCache
|
||||
|
||||
public _Str_1565(k: IActiveActionData, _arg_2: number): void
|
||||
{
|
||||
const _local_3 = this._structure._Str_2021(k, this._avatar);
|
||||
const _local_3 = this._structure.getActiveBodyPartIds(k, this._avatar);
|
||||
|
||||
for(const _local_4 of _local_3)
|
||||
{
|
||||
@ -186,7 +186,7 @@ export class AvatarImageCache
|
||||
{
|
||||
let _local_15 = _local_5;
|
||||
|
||||
const _local_16 = this._structure._Str_720(((_local_7.definition.state + '.') + _local_7.actionParameter));
|
||||
const _local_16 = this._structure.getAnimation(((_local_7.definition.state + '.') + _local_7.actionParameter));
|
||||
const _local_17 = (frameNumber - _local_7.startFrame);
|
||||
|
||||
if(_local_16)
|
||||
@ -263,7 +263,7 @@ export class AvatarImageCache
|
||||
|
||||
if(!_local_13 || _arg_3)
|
||||
{
|
||||
const _local_19 = this._structure._Str_713(k, this._avatar.getFigure(), _local_8, this._geometryType, _local_5, _local_9, this._avatar, _local_10);
|
||||
const _local_19 = this._structure.getParts(k, this._avatar.getFigure(), _local_8, this._geometryType, _local_5, _local_9, this._avatar, _local_10);
|
||||
|
||||
_local_13 = new AvatarImageDirectionCache(_local_19);
|
||||
|
||||
@ -288,7 +288,7 @@ export class AvatarImageCache
|
||||
}
|
||||
}
|
||||
|
||||
const offset = this._structure._Str_1888(_local_8, _local_5, frameCount, k);
|
||||
const offset = this._structure.getFrameBodyPartOffset(_local_8, _local_5, frameCount, k);
|
||||
|
||||
_local_11.x += offset.x;
|
||||
_local_11.y += offset.y;
|
||||
@ -325,7 +325,7 @@ export class AvatarImageCache
|
||||
|
||||
if(!this._canvas)
|
||||
{
|
||||
this._canvas = this._structure._Str_1664(this._scale, this._geometryType);
|
||||
this._canvas = this._structure.getCanvas(this._scale, this._geometryType);
|
||||
|
||||
if(!this._canvas) return null;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ export class AvatarModelGeometry
|
||||
}
|
||||
}
|
||||
|
||||
public _Str_2101(k: IAvatarImage): void
|
||||
public removeDynamicItems(k: IAvatarImage): void
|
||||
{
|
||||
for(const geometry of this._geometryTypes.values())
|
||||
{
|
||||
@ -110,10 +110,10 @@ export class AvatarModelGeometry
|
||||
|
||||
if(!avatarSet) return [];
|
||||
|
||||
return avatarSet._Str_755();
|
||||
return avatarSet.getBodyParts();
|
||||
}
|
||||
|
||||
public _Str_1939(k: string): boolean
|
||||
public isMainAvatarSet(k: string): boolean
|
||||
{
|
||||
const avatarSet = this._avatarSet._Str_1498(k);
|
||||
|
||||
@ -122,7 +122,7 @@ export class AvatarModelGeometry
|
||||
return avatarSet._Str_779;
|
||||
}
|
||||
|
||||
public _Str_1664(k: string, _arg_2: string): AvatarCanvas
|
||||
public getCanvas(k: string, _arg_2: string): AvatarCanvas
|
||||
{
|
||||
const canvas = this._canvases.get(k);
|
||||
|
||||
@ -271,7 +271,7 @@ export class AvatarModelGeometry
|
||||
return ids;
|
||||
}
|
||||
|
||||
public _Str_713(k: string, _arg_2: string, _arg_3: number, _arg_4: any[], _arg_5:IAvatarImage): string[]
|
||||
public getParts(k: string, _arg_2: string, _arg_3: number, _arg_4: any[], _arg_5:IAvatarImage): string[]
|
||||
{
|
||||
if(this._Str_1332(k, _arg_2))
|
||||
{
|
||||
@ -279,9 +279,9 @@ export class AvatarModelGeometry
|
||||
|
||||
this._transformation = Matrix4x4._Str_1560(_arg_3);
|
||||
|
||||
return part._Str_713(this._transformation, this._camera, _arg_4, _arg_5);
|
||||
return part.getParts(this._transformation, this._camera, _arg_4, _arg_5);
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
{
|
||||
if(!avatarSet) continue;
|
||||
|
||||
bodyParts = bodyParts.concat(avatarSet._Str_755());
|
||||
bodyParts = bodyParts.concat(avatarSet.getBodyParts());
|
||||
}
|
||||
|
||||
this._allBodyParts = bodyParts;
|
||||
@ -64,7 +64,7 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
public _Str_755(): string[]
|
||||
public getBodyParts(): string[]
|
||||
{
|
||||
return this._allBodyParts.concat();
|
||||
}
|
||||
@ -89,4 +89,4 @@
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ export class GeometryBodyPart extends Node3D
|
||||
return (existingPart !== null);
|
||||
}
|
||||
|
||||
public _Str_713(k: Matrix4x4, _arg_2: Vector3D, _arg_3: any[], _arg_4: IAvatarImage): string[]
|
||||
public getParts(k: Matrix4x4, _arg_2: Vector3D, _arg_3: any[], _arg_4: IAvatarImage): string[]
|
||||
{
|
||||
const parts: [ number, GeometryItem ][] = [];
|
||||
|
||||
@ -191,4 +191,4 @@ export class GeometryBodyPart extends Node3D
|
||||
{
|
||||
return this._radius;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ export class FigureSetData implements IFigureSetData, IStructureData
|
||||
return false;
|
||||
}
|
||||
|
||||
public _Str_1733(k: string, _arg_2: number): string[]
|
||||
public getMandatorySetTypeIds(k: string, _arg_2: number): string[]
|
||||
{
|
||||
const types: string[] = [];
|
||||
|
||||
@ -117,13 +117,13 @@ export class FigureSetData implements IFigureSetData, IStructureData
|
||||
return types;
|
||||
}
|
||||
|
||||
public _Str_2264(k: string, _arg_2: string): IFigurePartSet
|
||||
public getDefaultPartSet(k: string, _arg_2: string): IFigurePartSet
|
||||
{
|
||||
const setType = this._setTypes.get(k);
|
||||
|
||||
if(!setType) return null;
|
||||
|
||||
return setType._Str_2264(_arg_2);
|
||||
return setType.getDefaultPartSet(_arg_2);
|
||||
}
|
||||
|
||||
public _Str_740(k: string): ISetType
|
||||
@ -149,4 +149,4 @@ export class FigureSetData implements IFigureSetData, IStructureData
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ export class AnimationAction
|
||||
return existing;
|
||||
}
|
||||
|
||||
public _Str_1888(frameId: number, frameCount: number, partId: string): Point
|
||||
public getFrameBodyPartOffset(frameId: number, frameCount: number, partId: string): Point
|
||||
{
|
||||
const frameIndex = (frameCount % this._frameIndexes.length);
|
||||
const frameNumber = this._frameIndexes[frameIndex];
|
||||
@ -135,4 +135,4 @@ export class AnimationAction
|
||||
{
|
||||
return this._frameCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ export class SetType implements ISetType
|
||||
for(const set of k.set) this._partSets.add(set['$'].id, new FigurePartSet(this._type, set));
|
||||
}
|
||||
|
||||
public _Str_2264(k: string): IFigurePartSet
|
||||
public getDefaultPartSet(k: string): IFigurePartSet
|
||||
{
|
||||
for(const set of this._partSets.getValues())
|
||||
{
|
||||
@ -102,4 +102,4 @@ export class SetType implements ISetType
|
||||
{
|
||||
return this._partSets;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user