This commit is contained in:
Bill 2023-07-23 16:10:37 -04:00
parent 961540b045
commit ad17aa364e
34 changed files with 82 additions and 202 deletions

View File

@ -1,5 +1,6 @@
import { Point, RenderTexture } from '@pixi/core';
import { DisplayObject } from '@pixi/display';
import { Container } from '@pixi/display';
import { Sprite } from '@pixi/sprite';
import { IRoomGeometry } from '../IRoomGeometry';
import { RoomObjectSpriteData } from '../RoomObjectSpriteData';
import { ISortableSprite } from '../object';
@ -26,8 +27,8 @@ export interface IRoomRenderingCanvas
moveDown(): void;
id: number;
geometry: IRoomGeometry;
master: DisplayObject;
display: DisplayObject;
master: Sprite;
display: Container;
screenOffsetX: number;
screenOffsetY: number;
scale: number;

View File

@ -1,40 +0,0 @@
import { IDisposable } from '../api';
export class Disposable implements IDisposable
{
protected _isDisposed: boolean;
protected _isDisposing: boolean;
constructor()
{
this._isDisposed = false;
this._isDisposing = false;
}
public dispose(): void
{
if(this._isDisposed || this._isDisposing) return;
this._isDisposing = true;
this.onDispose();
this._isDisposed = true;
this._isDisposing = false;
}
protected onDispose(): void
{
return;
}
public get disposed(): boolean
{
return this._isDisposed;
}
public get isDisposing(): boolean
{
return this._isDisposing;
}
}

View File

@ -1,2 +0,0 @@
export * from './Disposable';
export * from './EventDispatcher';

View File

@ -1,4 +1,4 @@
import { IEventDispatcher } from '../api';
import { EventDispatcher } from '../common';
import { EventDispatcher } from './EventDispatcher';
export const NitroEventDispatcher: IEventDispatcher = new EventDispatcher();

View File

@ -1,3 +1,4 @@
export * from './EventDispatcher';
export * from './NitroEventDispatcher';
export * from './NitroEventType';
export * from './NitroSettingsEvent';

View File

@ -1,5 +1,4 @@
export * from './api';
export * from './common';
export * from './events';
export * from './nitro';
export * from './pixi-proxy';

View File

@ -2,7 +2,7 @@ import { Application, IApplicationOptions } from '@pixi/app';
import { SCALE_MODES } from '@pixi/constants';
import { BaseTexture, TextureGCSystem, settings } from '@pixi/core';
import { AssetManager, IAvatarRenderManager, ICommunicationManager, IConfigurationManager, IEventDispatcher, ILinkEventTracker, ILocalizationManager, IRoomCameraWidgetManager, IRoomEngine, ISessionDataManager, ISoundManager, NitroConfiguration, NitroLogger } from '../api';
import { EventDispatcher } from '../common';
import { EventDispatcher } from '../events';
import { GetTicker, PixiApplicationProxy } from '../pixi-proxy';
import { INitro } from './INitro';
import { NitroVersion } from './NitroVersion';

View File

@ -3,7 +3,7 @@ import { Container } from '@pixi/display';
import { ColorMatrixFilter } from '@pixi/filter-color-matrix';
import { Sprite } from '@pixi/sprite';
import { AdvancedMap, AvatarAction, AvatarDirectionAngle, AvatarScaleType, AvatarSetType, IActionDefinition, IActiveActionData, IAdvancedMap, IAnimationLayerData, IAvatarDataContainer, IAvatarEffectListener, IAvatarFigureContainer, IAvatarImage, IGraphicAsset, IPartColor, ISpriteDataContainer } from '../../api';
import { GetTickerTime, NitroContainer, NitroSprite, PaletteMapFilter, PixiApplicationProxy, TextureUtils } from '../../pixi-proxy';
import { GetTickerTime, NitroSprite, PaletteMapFilter, PixiApplicationProxy, TextureUtils } from '../../pixi-proxy';
import { AvatarFigureContainer } from './AvatarFigureContainer';
import { AvatarStructure } from './AvatarStructure';
import { EffectAssetDownloadManager } from './EffectAssetDownloadManager';
@ -323,7 +323,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
this._image = null;
const container = new NitroContainer();
const container = new Container();
let isCachable = true;
let partCount = (_local_6.length - 1);
@ -358,7 +358,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
point.x += avatarCanvas.regPoint.x;
point.y += avatarCanvas.regPoint.y;
const partContainer = new NitroContainer();
const partContainer = new Container();
partContainer.addChild(partCacheContainer);
@ -526,7 +526,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
point.x += avatarCanvas.regPoint.x;
point.y += avatarCanvas.regPoint.y;
const partContainer = new NitroContainer();
const partContainer = new Container();
partContainer.addChild(partCacheContainer);
@ -553,7 +553,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
if(!avatarCanvas) return null;
const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection);
const container = new NitroContainer();
const container = new Container();
let partCount = (setTypes.length - 1);
@ -585,7 +585,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
point.x += avatarCanvas.regPoint.x;
point.y += avatarCanvas.regPoint.y;
const partContainer = new NitroContainer();
const partContainer = new Container();
partContainer.addChild(partCacheContainer);

View File

@ -1,6 +1,6 @@
import { Point } from '@pixi/core';
import { AvatarDirectionAngle, IActionDefinition, IActiveActionData, IAssetAnimation, IAssetManager, IAvatarFigureContainer, IAvatarImage, IAvatarRenderManager, IFigureData, IFigurePartSet, IPartColor, IStructureData } from '../../api';
import { EventDispatcher } from '../../common';
import { EventDispatcher } from '../../events';
import { AvatarImagePartContainer } from './AvatarImagePartContainer';
import { AvatarRenderManager } from './AvatarRenderManager';
import { ActionDefinition, AvatarActionManager } from './actions';

View File

@ -1,6 +1,7 @@
import { Matrix, Point, Rectangle, Texture } from '@pixi/core';
import { Container } from '@pixi/display';
import { AvatarDirectionAngle, AvatarFigurePartType, AvatarScaleType, GeometryType, IActiveActionData, IAvatarImage, RoomObjectSpriteData } from '../../../api';
import { GetTickerTime, NitroContainer, NitroSprite } from '../../../pixi-proxy';
import { GetTickerTime, NitroSprite } from '../../../pixi-proxy';
import { AvatarImageBodyPartContainer } from '../AvatarImageBodyPartContainer';
import { AvatarImagePartContainer } from '../AvatarImagePartContainer';
import { AvatarStructure } from '../AvatarStructure';
@ -472,7 +473,7 @@ export class AvatarImageCache
for(const data of k) data && bounds.enlarge(data.offsetRect);
const point = new Point(-(bounds.x), -(bounds.y));
const container = new NitroContainer();
const container = new Container();
const sprite = new NitroSprite(Texture.EMPTY);

View File

@ -1,8 +1,9 @@
import { Texture } from '@pixi/core';
import { Container } from '@pixi/display';
import { ColorMatrix, ColorMatrixFilter } from '@pixi/filter-color-matrix';
import { IRoomCameraWidgetEffect, IRoomCameraWidgetManager, IRoomCameraWidgetSelectedEffect, NitroConfiguration } from '../../api';
import { NitroEventDispatcher, RoomCameraWidgetManagerEvent } from '../../events';
import { NitroContainer, NitroSprite, TextureUtils } from '../../pixi-proxy';
import { NitroSprite, TextureUtils } from '../../pixi-proxy';
import { RoomCameraWidgetEffect } from './RoomCameraWidgetEffect';
export class RoomCameraWidgetManager implements IRoomCameraWidgetManager
@ -49,7 +50,7 @@ export class RoomCameraWidgetManager implements IRoomCameraWidgetManager
public async applyEffects(texture: Texture, selectedEffects: IRoomCameraWidgetSelectedEffect[], isZoomed: boolean): Promise<HTMLImageElement>
{
const container = new NitroContainer();
const container = new Container();
const sprite = new NitroSprite(texture);
container.addChild(sprite);

View File

@ -1,53 +1,25 @@
import { AvatarGuideStatus, IConnection, IRoomCreator, IVector3D, LegacyDataType, ObjectRolling, PetType, RoomObjectType, RoomObjectUserType, RoomObjectVariable, Vector3d } from '../../api';
import { Disposable } from '../../common';
import { DiceValueMessageEvent, FloorHeightMapEvent, FurnitureAliasesComposer, FurnitureAliasesEvent, FurnitureDataEvent, FurnitureFloorAddEvent, FurnitureFloorDataParser, FurnitureFloorEvent, FurnitureFloorRemoveEvent, FurnitureFloorUpdateEvent, FurnitureWallAddEvent, FurnitureWallDataParser, FurnitureWallEvent, FurnitureWallRemoveEvent, FurnitureWallUpdateEvent, GetRoomEntryDataMessageComposer, GuideSessionEndedMessageEvent, GuideSessionErrorMessageEvent, GuideSessionStartedMessageEvent, IgnoreResultEvent, ItemDataUpdateMessageEvent, ObjectsDataUpdateEvent, ObjectsRollingEvent, OneWayDoorStatusMessageEvent, PetExperienceEvent, PetFigureUpdateEvent, RoomEntryTileMessageEvent, RoomEntryTileMessageParser, RoomHeightMapEvent, RoomHeightMapUpdateEvent, RoomPaintEvent, RoomReadyMessageEvent, RoomUnitChatEvent, RoomUnitChatShoutEvent, RoomUnitChatWhisperEvent, RoomUnitDanceEvent, RoomUnitEffectEvent, RoomUnitEvent, RoomUnitExpressionEvent, RoomUnitHandItemEvent, RoomUnitIdleEvent, RoomUnitInfoEvent, RoomUnitNumberEvent, RoomUnitRemoveEvent, RoomUnitStatusEvent, RoomUnitTypingEvent, RoomVisualizationSettingsEvent, UserInfoEvent, YouArePlayingGameEvent } from '../communication';
import { RoomPlaneParser } from './object/RoomPlaneParser';
import { RoomVariableEnum } from './RoomVariableEnum';
import { FurnitureStackingHeightMap, LegacyWallGeometry } from './utils';
export class RoomMessageHandler extends Disposable
export class RoomMessageHandler
{
private _connection: IConnection;
private _connection: IConnection = null;
private _roomCreator: IRoomCreator;
private _planeParser: RoomPlaneParser;
private _latestEntryTileEvent: RoomEntryTileMessageEvent;
private _planeParser: RoomPlaneParser = new RoomPlaneParser();
private _latestEntryTileEvent: RoomEntryTileMessageEvent = null;
private _currentRoomId: number;
private _ownUserId: number;
private _initialConnection: boolean;
private _guideId: number;
private _requesterId: number;
private _currentRoomId: number = 0;
private _ownUserId: number = 0;
private _initialConnection: boolean = true;
private _guideId: number = -1;
private _requesterId: number = -1;
constructor(roomCreator: IRoomCreator)
{
super();
this._connection = null;
this._roomCreator = roomCreator;
this._planeParser = new RoomPlaneParser();
this._latestEntryTileEvent = null;
this._currentRoomId = 0;
this._ownUserId = 0;
this._initialConnection = true;
this._guideId = -1;
this._requesterId = -1;
}
protected onDispose(): void
{
super.onDispose();
this._connection = null;
this._roomCreator = null;
this._latestEntryTileEvent = null;
if(this._planeParser)
{
this._planeParser.dispose();
this._planeParser = null;
}
}
public setConnection(connection: IConnection)

View File

@ -1,5 +1,4 @@
import { IFurnitureStackingHeightMap, ILegacyWallGeometry, IObjectData, IRoomCanvasMouseListener, IRoomEngineServices, IRoomGeometry, IRoomObject, IRoomObjectController, IRoomObjectEventManager, ISelectedRoomObjectData, IVector3D, MouseEventType, NitroConfiguration, NitroLogger, RoomObjectCategory, RoomObjectOperationType, RoomObjectPlacementSource, RoomObjectType, RoomObjectUserType, RoomObjectVariable, Vector3d } from '../../api';
import { Disposable } from '../../common';
import { NitroEventDispatcher, RoomEngineDimmerStateEvent, RoomEngineObjectEvent, RoomEngineObjectPlacedEvent, RoomEngineObjectPlacedOnUserEvent, RoomEngineObjectPlaySoundEvent, RoomEngineRoomAdEvent, RoomEngineSamplePlaybackEvent, RoomEngineTriggerWidgetEvent, RoomEngineUseProductEvent, RoomObjectBadgeAssetEvent, RoomObjectDataRequestEvent, RoomObjectDimmerStateUpdateEvent, RoomObjectEvent, RoomObjectFloorHoleEvent, RoomObjectFurnitureActionEvent, RoomObjectHSLColorEnabledEvent, RoomObjectHSLColorEnableEvent, RoomObjectMouseEvent, RoomObjectMoveEvent, RoomObjectPlaySoundIdEvent, RoomObjectRoomAdEvent, RoomObjectSamplePlaybackEvent, RoomObjectSoundMachineEvent, RoomObjectStateChangedEvent, RoomObjectTileMouseEvent, RoomObjectWallMouseEvent, RoomObjectWidgetRequestEvent, RoomSpriteMouseEvent } from '../../events';
import { RoomEnterEffect, RoomId, RoomObjectUpdateMessage } from '../../room';
import { BotPlaceComposer, FurnitureColorWheelComposer, FurnitureDiceActivateComposer, FurnitureDiceDeactivateComposer, FurnitureFloorUpdateComposer, FurnitureGroupInfoComposer, FurnitureMultiStateComposer, FurnitureOneWayDoorComposer, FurniturePickupComposer, FurniturePlaceComposer, FurniturePostItPlaceComposer, FurnitureRandomStateComposer, FurnitureWallMultiStateComposer, FurnitureWallUpdateComposer, GetItemDataComposer, GetResolutionAchievementsMessageComposer, PetMoveComposer, PetPlaceComposer, RemoveWallItemComposer, RoomUnitLookComposer, RoomUnitWalkComposer, SetItemDataMessageComposer, SetObjectDataMessageComposer } from '../communication';
@ -7,47 +6,23 @@ import { Nitro } from '../Nitro';
import { ObjectAvatarSelectedMessage, ObjectDataUpdateMessage, ObjectSelectedMessage, ObjectTileCursorUpdateMessage, ObjectVisibilityUpdateMessage } from './messages';
import { SelectedRoomObjectData } from './utils';
export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMouseListener, IRoomObjectEventManager
export class RoomObjectEventHandler implements IRoomCanvasMouseListener, IRoomObjectEventManager
{
private _roomEngine: IRoomEngineServices;
private _eventIds: Map<number, Map<string, string>>;
private _eventIds: Map<number, Map<string, string>> = new Map();
private _selectedAvatarId: number;
private _selectedObjectId: number;
private _selectedObjectCategory: number;
private _whereYouClickIsWhereYouGo: boolean;
private _objectPlacementSource: string;
private _selectedAvatarId: number = -1;
private _selectedObjectId: number = -1;
private _selectedObjectCategory: number = -2;
private _whereYouClickIsWhereYouGo: boolean = true;
private _objectPlacementSource: string = null;
constructor(roomEngine: IRoomEngineServices)
{
super();
this._roomEngine = roomEngine;
this._eventIds = new Map();
this._selectedAvatarId = -1;
this._selectedObjectId = -1;
this._selectedObjectCategory = -2;
this._whereYouClickIsWhereYouGo = true;
this._objectPlacementSource = null;
this.onRoomEngineObjectEvent = this.onRoomEngineObjectEvent.bind(this);
NitroEventDispatcher.addEventListener(RoomEngineObjectEvent.ADDED, this.onRoomEngineObjectEvent);
}
public dispose(): void
{
if(this._eventIds)
{
this._eventIds = null;
}
NitroEventDispatcher.removeEventListener(RoomEngineObjectEvent.ADDED, this.onRoomEngineObjectEvent);
this._roomEngine = null;
NitroEventDispatcher.addEventListener<RoomEngineObjectEvent>(RoomEngineObjectEvent.ADDED, event => this.onRoomEngineObjectEvent(event));
}
private onRoomEngineObjectEvent(event: RoomEngineObjectEvent): void

View File

@ -1,6 +1,5 @@
import { IEventDispatcher, IRoomObjectEventHandler, IRoomObjectLogicFactory, NitroLogger, RoomObjectLogicType } from '../../api';
import { EventDispatcher } from '../../common';
import { RoomObjectEvent } from '../../events';
import { EventDispatcher, RoomObjectEvent } from '../../events';
import { RoomObjectLogicBase } from '../../room';
import { AvatarLogic, FurnitureAchievementResolutionLogic, FurnitureBadgeDisplayLogic, FurnitureChangeStateWhenStepOnLogic, FurnitureClothingChangeLogic, FurnitureCounterClockLogic, FurnitureCrackableLogic, FurnitureCraftingGizmoLogic, FurnitureCreditLogic, FurnitureCuckooClockLogic, FurnitureCustomStackHeightLogic, FurnitureDiceLogic, FurnitureEcotronBoxLogic, FurnitureEditableInternalLinkLogic, FurnitureEditableRoomLinkLogic, FurnitureEffectBoxLogic, FurnitureExternalImageLogic, FurnitureFireworksLogic, FurnitureFloorHoleLogic, FurnitureGroupForumTerminalLogic, FurnitureGuildCustomizedLogic, FurnitureHabboWheelLogic, FurnitureHighScoreLogic, FurnitureHockeyScoreLogic, FurnitureHweenLovelockLogic, FurnitureIceStormLogic, FurnitureInternalLinkLogic, FurnitureJukeboxLogic, FurnitureLogic, FurnitureLoveLockLogic, FurnitureMannequinLogic, FurnitureMonsterplantSeedLogic, FurnitureMultiHeightLogic, FurnitureMultiStateLogic, FurnitureMysteryBoxLogic, FurnitureMysteryTrophyLogic, FurnitureOneWayDoorLogic, FurniturePetCustomizationLogic, FurniturePlaceholderLogic, FurniturePlanetSystemLogic, FurniturePresentLogic, FurniturePurchaseableClothingLogic, FurniturePushableLogic, FurnitureRandomStateLogic, FurnitureRandomTeleportLogic, FurnitureRentableSpaceLogic, FurnitureRoomBackgroundColorLogic, FurnitureRoomBackgroundLogic, FurnitureRoomBillboardLogic, FurnitureRoomDimmerLogic, FurnitureScoreLogic, FurnitureSongDiskLogic, FurnitureSoundBlockLogic, FurnitureSoundMachineLogic, FurnitureStickieLogic, FurnitureTrophyLogic, FurnitureVoteCounterLogic, FurnitureVoteMajorityLogic, FurnitureWelcomeGiftLogic, FurnitureWindowLogic, FurnitureYoutubeLogic, PetLogic, RoomLogic, SelectionArrowLogic, TileCursorLogic } from './object';

View File

@ -28,11 +28,11 @@ export class MovingObjectLogic extends RoomObjectLogicBase
this._updateInterval = MovingObjectLogic.DEFAULT_UPDATE_INTERVAL;
}
protected onDispose(): void
public dispose(): void
{
this._liftAmount = 0;
super.onDispose();
super.dispose();
}
public update(time: number): void

View File

@ -29,7 +29,7 @@ export class FurnitureEditableRoomLinkLogic extends FurnitureLogic
}
}
protected onDispose(): void
public dispose(): void
{
if(this._timer)
{
@ -38,7 +38,7 @@ export class FurnitureEditableRoomLinkLogic extends FurnitureLogic
this._timer = null;
}
super.onDispose();
super.dispose();
}
private setAutomaticStateIndex(state: number): void

View File

@ -26,14 +26,14 @@ export class FurnitureFloorHoleLogic extends FurnitureMultiStateLogic
return this.mergeTypes(super.getEventTypes(), types);
}
protected onDispose(): void
public dispose(): void
{
if(this._currentState === FurnitureFloorHoleLogic.STATE_HOLE)
{
this.eventDispatcher.dispatchEvent(new RoomObjectFloorHoleEvent(RoomObjectFloorHoleEvent.REMOVE_HOLE, this.object));
}
super.onDispose();
super.dispose();
}
public update(time: number): void

View File

@ -23,11 +23,11 @@ export class FurnitureJukeboxLogic extends FurnitureMultiStateLogic
return this.mergeTypes(super.getEventTypes(), types);
}
protected onDispose(): void
public dispose(): void
{
this.requestDispose();
super.onDispose();
super.dispose();
}
public processUpdateMessage(message: RoomObjectUpdateMessage): void

View File

@ -131,12 +131,12 @@ export class FurnitureLogic extends MovingObjectLogic
model.setValue(RoomObjectVariable.FURNITURE_ALPHA_MULTIPLIER, 1);
}
protected onDispose(): void
public dispose(): void
{
this._storedRotateMessage = null;
this._directions = null;
super.onDispose();
super.dispose();
}
public setObject(object: IRoomObjectController): void

View File

@ -26,7 +26,7 @@ export class FurnitureRoomBackgroundColorLogic extends FurnitureMultiStateLogic
return this.mergeTypes(super.getEventTypes(), types);
}
protected onDispose(): void
public dispose(): void
{
if(this._roomColorUpdated)
{
@ -43,7 +43,7 @@ export class FurnitureRoomBackgroundColorLogic extends FurnitureMultiStateLogic
this._roomColorUpdated = false;
}
super.onDispose();
super.dispose();
}
public processUpdateMessage(message: RoomObjectUpdateMessage): void

View File

@ -26,7 +26,7 @@ export class FurnitureRoomDimmerLogic extends FurnitureLogic
return this.mergeTypes(super.getEventTypes(), types);
}
protected onDispose(): void
public dispose(): void
{
if(this._roomColorUpdated)
{
@ -44,7 +44,7 @@ export class FurnitureRoomDimmerLogic extends FurnitureLogic
}
}
super.onDispose();
super.dispose();
}
public processUpdateMessage(message: RoomObjectUpdateMessage): void

View File

@ -43,14 +43,14 @@ export class FurnitureSoundBlockLogic extends FurnitureMultiStateLogic
this.object.model.setValue(RoomObjectVariable.FURNITURE_SOUNDBLOCK_RELATIVE_ANIMATION_SPEED, 1);
}
protected onDispose(): void
public dispose(): void
{
if(this._state !== FurnitureSoundBlockLogic.STATE_UNINITIALIZED)
{
this.eventDispatcher.dispatchEvent(new RoomObjectSamplePlaybackEvent(RoomObjectSamplePlaybackEvent.ROOM_OBJECT_DISPOSED, this.object, this._sampleId));
}
super.onDispose();
super.dispose();
}
public processUpdateMessage(message: RoomObjectUpdateMessage): void

View File

@ -22,11 +22,11 @@ export class FurnitureSoundMachineLogic extends FurnitureMultiStateLogic
return this.mergeTypes(super.getEventTypes(), types);
}
protected onDispose(): void
public dispose(): void
{
this.requestDispose();
super.onDispose();
super.dispose();
}
public processUpdateMessage(message: RoomObjectUpdateMessage): void

View File

@ -1,22 +1,16 @@
import { Resource, Texture } from '@pixi/core';
import { AvatarScaleType, IAssetData, IAvatarEffectListener, IAvatarImage, IAvatarImageListener, IAvatarRenderManager, IObjectVisualizationData } from '../../../../../api';
import { Disposable } from '../../../../../common';
export class AvatarVisualizationData extends Disposable implements IObjectVisualizationData
export class AvatarVisualizationData implements IObjectVisualizationData
{
private _avatarRenderer: IAvatarRenderManager;
constructor()
{
super();
}
public initialize(asset: IAssetData): boolean
{
return true;
}
public onDispose(): void
public dispose(): void
{
this._avatarRenderer = null;
}

View File

@ -1,6 +1,6 @@
import { Matrix, Resource, Texture } from '@pixi/core';
import { IGraphicAsset } from '../../../../../api';
import { NitroSprite, NitroTexture, TextureUtils } from '../../../../../pixi-proxy';
import { NitroSprite, TextureUtils } from '../../../../../pixi-proxy';
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
export class IsometricImageFurniVisualization extends FurnitureAnimatedVisualization
@ -95,7 +95,7 @@ export class IsometricImageFurniVisualization extends FurnitureAnimatedVisualiza
if(this._hasOutline)
{
const container = new NitroSprite();
const background = new NitroSprite(NitroTexture.WHITE);
const background = new NitroSprite(Texture.WHITE);
background.tint = 0x000000;
background.width = (texture.width + 40);

View File

@ -1,7 +1,8 @@
import { RenderTexture, Resource, Texture } from '@pixi/core';
import { Container } from '@pixi/display';
import { Sprite } from '@pixi/sprite';
import { Text } from '@pixi/text';
import { NitroContainer, NitroSprite, PixiApplicationProxy, TextureUtils } from '../../../../../pixi-proxy';
import { NitroSprite, PixiApplicationProxy, TextureUtils } from '../../../../../pixi-proxy';
export class ExperienceData
{
@ -22,7 +23,7 @@ export class ExperienceData
{
if(!this._sprite || (this._amount === amount)) return null;
const container = new NitroContainer();
const container = new Container();
container.addChild(this._sprite);

View File

@ -1,26 +1,14 @@
import { IAssetData, IGraphicAssetCollection, IObjectVisualizationData } from '../../../../../api';
import { Disposable } from '../../../../../common';
import { PlaneMaskManager } from './mask';
import { FloorRasterizer, LandscapeRasterizer, WallRasterizer } from './rasterizer';
export class RoomVisualizationData extends Disposable implements IObjectVisualizationData
export class RoomVisualizationData implements IObjectVisualizationData
{
private _wallRasterizer: WallRasterizer;
private _floorRasterizer: FloorRasterizer;
private _landscapeRasterizer: LandscapeRasterizer;
private _maskManager: PlaneMaskManager;
private _initialized: boolean;
constructor()
{
super();
this._wallRasterizer = new WallRasterizer();
this._floorRasterizer = new FloorRasterizer();
this._landscapeRasterizer = new LandscapeRasterizer();
this._maskManager = new PlaneMaskManager();
this._initialized = false;
}
private _wallRasterizer: WallRasterizer = new WallRasterizer();
private _floorRasterizer: FloorRasterizer = new FloorRasterizer();
private _landscapeRasterizer: LandscapeRasterizer = new LandscapeRasterizer();
private _maskManager: PlaneMaskManager = new PlaneMaskManager();
private _initialized: boolean = false;
public initialize(asset: IAssetData): boolean
{
@ -45,7 +33,7 @@ export class RoomVisualizationData extends Disposable implements IObjectVisualiz
return true;
}
protected onDispose(): void
public dispose(): void
{
if(this._wallRasterizer)
{
@ -74,8 +62,6 @@ export class RoomVisualizationData extends Disposable implements IObjectVisualiz
this._maskManager = null;
}
super.onDispose();
}
public setGraphicAssetCollection(collection: IGraphicAssetCollection): void

View File

@ -1,7 +1,8 @@
import { Resource, Texture } from '@pixi/core';
import { Container } from '@pixi/display';
import { IAssetManager, IDisposable, IMessageEvent, NitroConfiguration } from '../../../api';
import { BadgeImageReadyEvent, NitroEventDispatcher } from '../../../events';
import { NitroContainer, NitroSprite, NitroTexture, TextureUtils } from '../../../pixi-proxy';
import { NitroSprite, TextureUtils } from '../../../pixi-proxy';
import { GroupBadgePartsEvent } from '../../communication';
import { SessionDataManager } from './../SessionDataManager';
import { BadgeInfo } from './BadgeInfo';
@ -186,8 +187,8 @@ export class BadgeImageManager implements IDisposable
private renderGroupBadge(groupBadge: GroupBadge): void
{
const container = new NitroContainer();
const tempSprite = new NitroSprite(NitroTexture.EMPTY);
const container = new Container();
const tempSprite = new NitroSprite(Texture.EMPTY);
tempSprite.width = GroupBadgePart.IMAGE_WIDTH;
tempSprite.height = GroupBadgePart.IMAGE_HEIGHT;

View File

@ -1,4 +0,0 @@
import { Polygon } from '@pixi/core';
export class NitroPolygon extends Polygon
{}

View File

@ -1,4 +0,0 @@
import { Spritesheet } from '@pixi/spritesheet';
export class NitroSpritesheet extends Spritesheet
{}

View File

@ -8,11 +8,9 @@ export * from './NitroBaseTexture';
export * from './NitroContainer';
export * from './NitroFilter';
export * from './NitroPoint';
export * from './NitroPolygon';
export * from './NitroRectangle';
export * from './NitroRenderTexture';
export * from './NitroSprite';
export * from './NitroSpritesheet';
export * from './NitroTexture';
export * from './PaletteMapFilter';
export * from './PixiApplicationProxy';

View File

@ -1,6 +1,7 @@
import { Point, Rectangle, RenderTexture } from '@pixi/core';
import { Container } from '@pixi/display';
import { IGraphicAssetCollection, IObjectVisualizationData, IRoomGeometry, IRoomObjectController, IRoomObjectSprite, IRoomObjectSpriteVisualization, RoomObjectSpriteData } from '../../../api';
import { NitroContainer, NitroSprite, TextureUtils } from '../../../pixi-proxy';
import { NitroSprite, TextureUtils } from '../../../pixi-proxy';
import { RoomObjectSprite } from './RoomObjectSprite';
export class RoomObjectSpriteVisualization implements IRoomObjectSpriteVisualization
@ -147,7 +148,7 @@ export class RoomObjectSpriteVisualization implements IRoomObjectSpriteVisualiza
return b.relativeDepth - a.relativeDepth;
});
const container = new NitroContainer();
const container = new Container();
index = 0;

View File

@ -1,11 +1,11 @@
import { Matrix, Point, Rectangle, RenderTexture } from '@pixi/core';
import { Container, DisplayObject } from '@pixi/display';
import { Container } from '@pixi/display';
import { Graphics } from '@pixi/graphics';
import { Sprite } from '@pixi/sprite';
import { IRoomCanvasMouseListener, IRoomGeometry, IRoomObject, IRoomObjectSprite, IRoomObjectSpriteVisualization, IRoomRenderingCanvas, IRoomSpriteCanvasContainer, IRoomSpriteMouseEvent, MouseEventType, RoomObjectSpriteData, RoomObjectSpriteType, Vector3d } from '../../api';
import { RoomSpriteMouseEvent } from '../../events';
import { Nitro } from '../../nitro/Nitro';
import { GetTicker, NitroContainer, NitroSprite, PixiApplicationProxy } from '../../pixi-proxy';
import { GetTicker, NitroSprite, PixiApplicationProxy } from '../../pixi-proxy';
import { RoomEnterEffect, RoomGeometry, RoomRotatingEffect, RoomShakingEffect } from '../utils';
import { RoomObjectCache, RoomObjectCacheItem } from './cache';
import { ExtendedSprite, ObjectMouseData, SortableSprite } from './utils';
@ -127,7 +127,7 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
if(!this._display)
{
const display = new NitroContainer();
const display = new Container();
this._master.addChild(display);
@ -1200,12 +1200,12 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
return this._geometry;
}
public get master(): DisplayObject
public get master(): Sprite
{
return this._master;
}
public get display(): DisplayObject
public get display(): Container
{
return this._display;
}