diff --git a/src/api/INitroCore.ts b/src/api/INitroCore.ts deleted file mode 100644 index a63afc45..00000000 --- a/src/api/INitroCore.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IDisposable } from './common'; -import { ICommunicationManager } from './communication'; -import { IConfigurationManager } from './configuration'; - -export interface INitroCore extends IDisposable -{ - configuration: IConfigurationManager; - communication: ICommunicationManager; -} diff --git a/src/api/communication/ICommunicationManager.ts b/src/api/communication/ICommunicationManager.ts deleted file mode 100644 index fc79a49a..00000000 --- a/src/api/communication/ICommunicationManager.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IDisposable } from '../common'; -import { IConnection } from './IConnection'; -import { IConnectionStateListener } from './IConnectionStateListener'; - -export interface ICommunicationManager extends IDisposable -{ - createConnection(stateListener?: IConnectionStateListener): IConnection; -} diff --git a/src/api/communication/index.ts b/src/api/communication/index.ts deleted file mode 100644 index 779143d5..00000000 --- a/src/api/communication/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './enums'; -export * from './ICodec'; -export * from './ICommunicationManager'; -export * from './IConnection'; -export * from './IConnectionStateListener'; -export * from './IMessageComposer'; -export * from './IMessageConfiguration'; -export * from './IMessageDataWrapper'; -export * from './IMessageEvent'; -export * from './IMessageParser'; diff --git a/src/api/index.ts b/src/api/index.ts index 808803e0..50933080 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,6 +3,7 @@ export * from './asset/animation'; export * from './asset/logic'; export * from './asset/logic/model'; export * from './asset/logic/particlesystem'; +export * from './asset/room-visualization'; export * from './asset/spritesheet'; export * from './asset/visualization'; export * from './asset/visualization/animation'; @@ -10,10 +11,6 @@ export * from './asset/visualization/color'; export * from './asset/visualization/gestures'; export * from './asset/visualization/postures'; export * from './common'; -export * from './communication'; -export * from './communication/enums'; -export * from './configuration'; -export * from './INitroCore'; export * from './nitro'; export * from './nitro/avatar'; export * from './nitro/avatar/actions'; @@ -24,6 +21,8 @@ export * from './nitro/avatar/pet'; export * from './nitro/avatar/structure'; export * from './nitro/camera'; export * from './nitro/communication'; +export * from './nitro/communication/enums'; +export * from './nitro/configuration'; export * from './nitro/enums'; export * from './nitro/localization'; export * from './nitro/room'; diff --git a/src/api/communication/ICodec.ts b/src/api/nitro/communication/ICodec.ts similarity index 85% rename from src/api/communication/ICodec.ts rename to src/api/nitro/communication/ICodec.ts index 39c4b29d..a3dd419f 100644 --- a/src/api/communication/ICodec.ts +++ b/src/api/nitro/communication/ICodec.ts @@ -1,4 +1,4 @@ -import { IBinaryWriter } from '../utils'; +import { IBinaryWriter } from '../../utils'; import { IConnection } from './IConnection'; import { IMessageDataWrapper } from './IMessageDataWrapper'; diff --git a/src/api/communication/IConnection.ts b/src/api/nitro/communication/IConnection.ts similarity index 93% rename from src/api/communication/IConnection.ts rename to src/api/nitro/communication/IConnection.ts index 3aa30ab1..69ac955d 100644 --- a/src/api/communication/IConnection.ts +++ b/src/api/nitro/communication/IConnection.ts @@ -1,4 +1,4 @@ -import { IEventDispatcher } from '../common'; +import { IEventDispatcher } from '../../common'; import { IMessageComposer } from './IMessageComposer'; import { IMessageConfiguration } from './IMessageConfiguration'; import { IMessageEvent } from './IMessageEvent'; diff --git a/src/api/communication/IConnectionStateListener.ts b/src/api/nitro/communication/IConnectionStateListener.ts similarity index 100% rename from src/api/communication/IConnectionStateListener.ts rename to src/api/nitro/communication/IConnectionStateListener.ts diff --git a/src/api/communication/IMessageComposer.ts b/src/api/nitro/communication/IMessageComposer.ts similarity index 100% rename from src/api/communication/IMessageComposer.ts rename to src/api/nitro/communication/IMessageComposer.ts diff --git a/src/api/communication/IMessageConfiguration.ts b/src/api/nitro/communication/IMessageConfiguration.ts similarity index 100% rename from src/api/communication/IMessageConfiguration.ts rename to src/api/nitro/communication/IMessageConfiguration.ts diff --git a/src/api/communication/IMessageDataWrapper.ts b/src/api/nitro/communication/IMessageDataWrapper.ts similarity index 87% rename from src/api/communication/IMessageDataWrapper.ts rename to src/api/nitro/communication/IMessageDataWrapper.ts index 0f1c39f7..371bd544 100644 --- a/src/api/communication/IMessageDataWrapper.ts +++ b/src/api/nitro/communication/IMessageDataWrapper.ts @@ -1,4 +1,4 @@ -import { IBinaryReader } from '../utils'; +import { IBinaryReader } from '../../utils'; export interface IMessageDataWrapper { diff --git a/src/api/communication/IMessageEvent.ts b/src/api/nitro/communication/IMessageEvent.ts similarity index 100% rename from src/api/communication/IMessageEvent.ts rename to src/api/nitro/communication/IMessageEvent.ts diff --git a/src/api/communication/IMessageParser.ts b/src/api/nitro/communication/IMessageParser.ts similarity index 100% rename from src/api/communication/IMessageParser.ts rename to src/api/nitro/communication/IMessageParser.ts diff --git a/src/api/nitro/communication/INitroCommunicationManager.ts b/src/api/nitro/communication/INitroCommunicationManager.ts index e00d1cab..9be1331f 100644 --- a/src/api/nitro/communication/INitroCommunicationManager.ts +++ b/src/api/nitro/communication/INitroCommunicationManager.ts @@ -1,5 +1,6 @@ import { INitroManager } from '../../common'; -import { IConnection, IMessageEvent } from '../../communication'; +import { IConnection } from './IConnection'; +import { IMessageEvent } from './IMessageEvent'; import { INitroCommunicationDemo } from './INitroCommunicationDemo'; export interface INitroCommunicationManager extends INitroManager diff --git a/src/api/communication/enums/ClientDeviceCategoryEnum.ts b/src/api/nitro/communication/enums/ClientDeviceCategoryEnum.ts similarity index 100% rename from src/api/communication/enums/ClientDeviceCategoryEnum.ts rename to src/api/nitro/communication/enums/ClientDeviceCategoryEnum.ts diff --git a/src/api/communication/enums/ClientPlatformEnum.ts b/src/api/nitro/communication/enums/ClientPlatformEnum.ts similarity index 100% rename from src/api/communication/enums/ClientPlatformEnum.ts rename to src/api/nitro/communication/enums/ClientPlatformEnum.ts diff --git a/src/api/communication/enums/WebSocketEventEnum.ts b/src/api/nitro/communication/enums/WebSocketEventEnum.ts similarity index 100% rename from src/api/communication/enums/WebSocketEventEnum.ts rename to src/api/nitro/communication/enums/WebSocketEventEnum.ts diff --git a/src/api/communication/enums/index.ts b/src/api/nitro/communication/enums/index.ts similarity index 100% rename from src/api/communication/enums/index.ts rename to src/api/nitro/communication/enums/index.ts diff --git a/src/api/nitro/communication/index.ts b/src/api/nitro/communication/index.ts index 9e6ef3d3..1ddc8c03 100644 --- a/src/api/nitro/communication/index.ts +++ b/src/api/nitro/communication/index.ts @@ -1,2 +1,11 @@ +export * from './ICodec'; +export * from './IConnection'; +export * from './IConnectionStateListener'; +export * from './IMessageComposer'; +export * from './IMessageConfiguration'; +export * from './IMessageDataWrapper'; +export * from './IMessageEvent'; +export * from './IMessageParser'; export * from './INitroCommunicationDemo'; export * from './INitroCommunicationManager'; +export * from './enums'; diff --git a/src/api/configuration/IConfigurationManager.ts b/src/api/nitro/configuration/IConfigurationManager.ts similarity index 51% rename from src/api/configuration/IConfigurationManager.ts rename to src/api/nitro/configuration/IConfigurationManager.ts index 6aee7846..ae98bcf7 100644 --- a/src/api/configuration/IConfigurationManager.ts +++ b/src/api/nitro/configuration/IConfigurationManager.ts @@ -1,3 +1,3 @@ -import { INitroManager } from '../common'; +import { INitroManager } from '../../common'; export type IConfigurationManager = INitroManager diff --git a/src/api/configuration/NitroConfiguration.ts b/src/api/nitro/configuration/NitroConfiguration.ts similarity index 98% rename from src/api/configuration/NitroConfiguration.ts rename to src/api/nitro/configuration/NitroConfiguration.ts index d3e01584..419fe4da 100644 --- a/src/api/configuration/NitroConfiguration.ts +++ b/src/api/nitro/configuration/NitroConfiguration.ts @@ -1,4 +1,4 @@ -import { NitroLogger } from '../common'; +import { NitroLogger } from '../../common'; export class NitroConfiguration { diff --git a/src/api/configuration/index.ts b/src/api/nitro/configuration/index.ts similarity index 100% rename from src/api/configuration/index.ts rename to src/api/nitro/configuration/index.ts diff --git a/src/api/nitro/index.ts b/src/api/nitro/index.ts index fea0a3bc..bd790e30 100644 --- a/src/api/nitro/index.ts +++ b/src/api/nitro/index.ts @@ -7,6 +7,7 @@ export * from './avatar/pet'; export * from './avatar/structure'; export * from './camera'; export * from './communication'; +export * from './configuration'; export * from './enums'; export * from './localization'; export * from './room'; diff --git a/src/api/nitro/room/object/data/ObjectDataBase.ts b/src/api/nitro/room/object/data/ObjectDataBase.ts index 25ddfcc3..47be9881 100644 --- a/src/api/nitro/room/object/data/ObjectDataBase.ts +++ b/src/api/nitro/room/object/data/ObjectDataBase.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../communication'; import { IRoomObjectModel } from '../../../../room'; +import { IMessageDataWrapper } from '../../../communication'; import { RoomObjectVariable } from '../RoomObjectVariable'; import { IObjectData } from './IObjectData'; import { ObjectDataFlags } from './ObjectDataFlags'; diff --git a/src/api/nitro/room/object/data/type/CrackableDataType.ts b/src/api/nitro/room/object/data/type/CrackableDataType.ts index 8fd96fda..7d9a9e5e 100644 --- a/src/api/nitro/room/object/data/type/CrackableDataType.ts +++ b/src/api/nitro/room/object/data/type/CrackableDataType.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../communication'; import { IRoomObjectModel } from '../../../../../room'; +import { IMessageDataWrapper } from '../../../../communication'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; import { ObjectDataBase } from '../ObjectDataBase'; diff --git a/src/api/nitro/room/object/data/type/EmptyDataType.ts b/src/api/nitro/room/object/data/type/EmptyDataType.ts index 62d9d031..ed525894 100644 --- a/src/api/nitro/room/object/data/type/EmptyDataType.ts +++ b/src/api/nitro/room/object/data/type/EmptyDataType.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../communication'; import { IRoomObjectModel } from '../../../../../room'; +import { IMessageDataWrapper } from '../../../../communication'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; import { ObjectDataBase } from '../ObjectDataBase'; diff --git a/src/api/nitro/room/object/data/type/HighScoreDataType.ts b/src/api/nitro/room/object/data/type/HighScoreDataType.ts index 205c2e89..815bd57e 100644 --- a/src/api/nitro/room/object/data/type/HighScoreDataType.ts +++ b/src/api/nitro/room/object/data/type/HighScoreDataType.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../communication'; import { IRoomObjectModel } from '../../../../../room'; +import { IMessageDataWrapper } from '../../../../communication'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; import { ObjectDataBase } from '../ObjectDataBase'; diff --git a/src/api/nitro/room/object/data/type/LegacyDataType.ts b/src/api/nitro/room/object/data/type/LegacyDataType.ts index 29eb592f..7b551607 100644 --- a/src/api/nitro/room/object/data/type/LegacyDataType.ts +++ b/src/api/nitro/room/object/data/type/LegacyDataType.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../communication'; import { IRoomObjectModel } from '../../../../../room'; +import { IMessageDataWrapper } from '../../../../communication'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; import { ObjectDataBase } from '../ObjectDataBase'; diff --git a/src/api/nitro/room/object/data/type/MapDataType.ts b/src/api/nitro/room/object/data/type/MapDataType.ts index 4d457949..ff60deae 100644 --- a/src/api/nitro/room/object/data/type/MapDataType.ts +++ b/src/api/nitro/room/object/data/type/MapDataType.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../communication'; import { IRoomObjectModel } from '../../../../../room'; +import { IMessageDataWrapper } from '../../../../communication'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; import { ObjectDataBase } from '../ObjectDataBase'; diff --git a/src/api/nitro/room/object/data/type/NumberDataType.ts b/src/api/nitro/room/object/data/type/NumberDataType.ts index 2790189f..e84ac5c1 100644 --- a/src/api/nitro/room/object/data/type/NumberDataType.ts +++ b/src/api/nitro/room/object/data/type/NumberDataType.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../communication'; import { IRoomObjectModel } from '../../../../../room'; +import { IMessageDataWrapper } from '../../../../communication'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; import { ObjectDataBase } from '../ObjectDataBase'; diff --git a/src/api/nitro/room/object/data/type/StringDataType.ts b/src/api/nitro/room/object/data/type/StringDataType.ts index 71018546..17d98f67 100644 --- a/src/api/nitro/room/object/data/type/StringDataType.ts +++ b/src/api/nitro/room/object/data/type/StringDataType.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../communication'; import { IRoomObjectModel } from '../../../../../room'; +import { IMessageDataWrapper } from '../../../../communication'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; import { ObjectDataBase } from '../ObjectDataBase'; diff --git a/src/api/nitro/room/object/data/type/VoteDataType.ts b/src/api/nitro/room/object/data/type/VoteDataType.ts index 5650361b..ad3a4bc7 100644 --- a/src/api/nitro/room/object/data/type/VoteDataType.ts +++ b/src/api/nitro/room/object/data/type/VoteDataType.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../communication'; import { IRoomObjectModel } from '../../../../../room'; +import { IMessageDataWrapper } from '../../../../communication'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; import { ObjectDataBase } from '../ObjectDataBase'; diff --git a/src/api/nitro/session/IRoomSession.ts b/src/api/nitro/session/IRoomSession.ts index 3c9b0849..606afbb4 100644 --- a/src/api/nitro/session/IRoomSession.ts +++ b/src/api/nitro/session/IRoomSession.ts @@ -1,5 +1,5 @@ import { IDisposable } from '../../common'; -import { IConnection } from '../../communication'; +import { IConnection } from '../communication'; import { IRoomModerationSettings } from './IRoomModerationSettings'; import { IUserDataManager } from './IUserDataManager'; diff --git a/src/api/nitro/session/IUserDataManager.ts b/src/api/nitro/session/IUserDataManager.ts index 3a107915..b6ca9043 100644 --- a/src/api/nitro/session/IUserDataManager.ts +++ b/src/api/nitro/session/IUserDataManager.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../communication'; +import { IConnection } from '../communication'; import { IRoomUserData } from './IRoomUserData'; export interface IUserDataManager diff --git a/src/core/common/Disposable.ts b/src/common/Disposable.ts similarity index 94% rename from src/core/common/Disposable.ts rename to src/common/Disposable.ts index bb65b2db..b4a9be5b 100644 --- a/src/core/common/Disposable.ts +++ b/src/common/Disposable.ts @@ -1,4 +1,4 @@ -import { IDisposable } from '../../api'; +import { IDisposable } from '../api'; export class Disposable implements IDisposable { diff --git a/src/core/common/EventDispatcher.ts b/src/common/EventDispatcher.ts similarity index 99% rename from src/core/common/EventDispatcher.ts rename to src/common/EventDispatcher.ts index f6280de6..abbcc701 100644 --- a/src/core/common/EventDispatcher.ts +++ b/src/common/EventDispatcher.ts @@ -1,4 +1,4 @@ -import { IDisposable, IEventDispatcher, INitroEvent, NitroLogger } from '../../api'; +import { IDisposable, IEventDispatcher, INitroEvent, NitroLogger } from '../api'; import { Disposable } from './Disposable'; export class EventDispatcher extends Disposable implements IEventDispatcher, IDisposable diff --git a/src/core/common/NitroManager.ts b/src/common/NitroManager.ts similarity index 95% rename from src/core/common/NitroManager.ts rename to src/common/NitroManager.ts index 802ec663..69267e38 100644 --- a/src/core/common/NitroManager.ts +++ b/src/common/NitroManager.ts @@ -1,4 +1,4 @@ -import { IEventDispatcher, INitroManager } from '../../api'; +import { IEventDispatcher, INitroManager } from '../api'; import { Disposable } from './Disposable'; import { EventDispatcher } from './EventDispatcher'; diff --git a/src/core/common/index.ts b/src/common/index.ts similarity index 100% rename from src/core/common/index.ts rename to src/common/index.ts diff --git a/src/core/NitroCore.ts b/src/core/NitroCore.ts deleted file mode 100644 index 6f4e4fbb..00000000 --- a/src/core/NitroCore.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ICommunicationManager, IConfigurationManager, INitroCore } from '../api'; -import { Disposable } from './common'; -import { CommunicationManager } from './communication'; -import { ConfigurationManager } from './configuration'; -import { NitroVersion } from './NitroVersion'; - -export class NitroCore extends Disposable implements INitroCore -{ - private _configuration: IConfigurationManager; - private _communication: ICommunicationManager; - - constructor() - { - super(); - - NitroVersion.sayHello(); - - this._configuration = new ConfigurationManager(); - this._communication = new CommunicationManager(); - } - - protected onDispose(): void - { - if(this._communication) - { - this._communication.dispose(); - - this._communication = null; - } - } - - public get configuration(): IConfigurationManager - { - return this._configuration; - } - - public get communication(): ICommunicationManager - { - return this._communication; - } -} diff --git a/src/core/communication/CommunicationManager.ts b/src/core/communication/CommunicationManager.ts deleted file mode 100644 index 8e0c0d8a..00000000 --- a/src/core/communication/CommunicationManager.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ICommunicationManager, IConnection, IConnectionStateListener, IUpdateReceiver } from '../../api'; -import { Disposable } from '../common'; -import { SocketConnection } from './SocketConnection'; - -export class CommunicationManager extends Disposable implements ICommunicationManager, IUpdateReceiver -{ - private _connections: IConnection[]; - - constructor() - { - super(); - - this._connections = []; - } - - protected onDispose(): void - { - if(!this._connections || !this._connections.length) return; - - for(const connection of this._connections.values()) connection && connection.dispose(); - } - - public createConnection(stateListener: IConnectionStateListener = null): IConnection - { - const connection = new SocketConnection(this, stateListener); - - if(!connection) return; - - this._connections.push(connection); - - return connection; - } - - public update(time: number): void - { - let index = 0; - - while(index < this._connections.length) - { - const connection = this._connections[index]; - - connection.processReceivedData(); - - if(this.disposed) return; - - if(connection.disposed) this._connections.splice(index, 1); - else index++; - } - } -} diff --git a/src/core/communication/index.ts b/src/core/communication/index.ts deleted file mode 100644 index d9e31cd6..00000000 --- a/src/core/communication/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './codec'; -export * from './codec/evawire'; -export * from './CommunicationManager'; -export * from './messages'; -export * from './SocketConnection'; diff --git a/src/core/communication/messages/index.ts b/src/core/communication/messages/index.ts deleted file mode 100644 index deb18a32..00000000 --- a/src/core/communication/messages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './MessageClassManager'; diff --git a/src/core/index.ts b/src/core/index.ts deleted file mode 100644 index 67ca0555..00000000 --- a/src/core/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from './common'; -export * from './communication'; -export * from './communication/codec'; -export * from './communication/codec/evawire'; -export * from './communication/messages'; -export * from './configuration'; -export * from './NitroCore'; -export * from './NitroVersion'; diff --git a/src/core/configuration/ConfigurationEvent.ts b/src/events/core/ConfigurationEvent.ts similarity index 83% rename from src/core/configuration/ConfigurationEvent.ts rename to src/events/core/ConfigurationEvent.ts index 6f4c5be0..b7edf79d 100644 --- a/src/core/configuration/ConfigurationEvent.ts +++ b/src/events/core/ConfigurationEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from '../../events'; +import { NitroEvent } from './NitroEvent'; export class ConfigurationEvent extends NitroEvent { diff --git a/src/events/core/index.ts b/src/events/core/index.ts index 4657952b..9a5d80e5 100644 --- a/src/events/core/index.ts +++ b/src/events/core/index.ts @@ -1,3 +1,4 @@ +export * from './ConfigurationEvent'; export * from './MessageEvent'; export * from './NitroEvent'; export * from './SocketConnectionEvent'; diff --git a/src/index.ts b/src/index.ts index 64121b05..53cc465d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ export * from './api'; -export * from './core'; +export * from './common'; export * from './events'; export * from './nitro'; export * from './pixi-proxy'; diff --git a/src/nitro/INitro.ts b/src/nitro/INitro.ts index 4d250897..5392f03c 100644 --- a/src/nitro/INitro.ts +++ b/src/nitro/INitro.ts @@ -1,5 +1,5 @@ import { Application } from '@pixi/app'; -import { IAvatarRenderManager, IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroCore, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, ISoundManager } from '../api'; +import { IAvatarRenderManager, IConfigurationManager, IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, ISoundManager } from '../api'; export interface INitro { @@ -13,7 +13,7 @@ export interface INitro removeLinkEventTracker(tracker: ILinkEventTracker): void; createLinkEvent(link: string): void; application: Application; - core: INitroCore; + configuration: IConfigurationManager; events: IEventDispatcher; localization: INitroLocalizationManager; communication: INitroCommunicationManager; diff --git a/src/nitro/Nitro.ts b/src/nitro/Nitro.ts index f821c6e8..884b6e24 100644 --- a/src/nitro/Nitro.ts +++ b/src/nitro/Nitro.ts @@ -1,19 +1,21 @@ import { Application, IApplicationOptions } from '@pixi/app'; import { SCALE_MODES } from '@pixi/constants'; import { settings } from '@pixi/settings'; -import { IAvatarRenderManager, IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroCore, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, ISoundManager, NitroConfiguration, NitroLogger } from '../api'; -import { ConfigurationEvent, EventDispatcher, NitroCore } from '../core'; -import { NitroEvent, RoomEngineEvent } from '../events'; +import { IAvatarRenderManager, IConfigurationManager, IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, ISoundManager, NitroConfiguration, NitroLogger } from '../api'; +import { EventDispatcher } from '../common'; +import { ConfigurationEvent, NitroEvent, RoomEngineEvent } from '../events'; import { GetTicker, PixiApplicationProxy } from '../pixi-proxy'; import { RoomManager } from '../room'; +import { INitro } from './INitro'; +import { NitroVersion } from './NitroVersion'; +import './Plugins'; import { AvatarRenderManager } from './avatar'; import { RoomCameraWidgetManager } from './camera'; import { NitroCommunicationManager } from './communication'; +import { ConfigurationManager } from './configuration'; import { LegacyExternalInterface } from './externalInterface'; import { GameMessageHandler } from './game'; -import { INitro } from './INitro'; import { NitroLocalizationManager } from './localization'; -import './Plugins'; import { LandscapeRasterizer, RoomEngine } from './room'; import { RoomSessionManager, SessionDataManager } from './session'; import { SoundManager } from './sound'; @@ -34,7 +36,7 @@ export class Nitro implements INitro private static INSTANCE: INitro = null; private _application: Application; - private _core: INitroCore; + private _configuration: IConfigurationManager; private _events: IEventDispatcher; private _communication: INitroCommunicationManager; private _localization: INitroLocalizationManager; @@ -50,14 +52,14 @@ export class Nitro implements INitro private _isReady: boolean; private _isDisposed: boolean; - constructor(core: INitroCore, options?: IApplicationOptions) + constructor(options?: IApplicationOptions) { if(!Nitro.INSTANCE) Nitro.INSTANCE = this; this._application = new PixiApplicationProxy(options); - this._core = core; + this._configuration = new ConfigurationManager(); this._events = new EventDispatcher(); - this._communication = new NitroCommunicationManager(core.communication); + this._communication = new NitroCommunicationManager(); this._localization = new NitroLocalizationManager(this._communication); this._avatar = new AvatarRenderManager(); this._roomEngine = new RoomEngine(this._communication); @@ -71,12 +73,14 @@ export class Nitro implements INitro this._isReady = false; this._isDisposed = false; - this._core.configuration.events.addEventListener(ConfigurationEvent.LOADED, this.onConfigurationLoadedEvent.bind(this)); + this._configuration.events.addEventListener(ConfigurationEvent.LOADED, this.onConfigurationLoadedEvent.bind(this)); this._roomEngine.events.addEventListener(RoomEngineEvent.ENGINE_INITIALIZED, this.onRoomEngineReady.bind(this)); } public static bootstrap(): void { + NitroVersion.sayHello(); + if(Nitro.INSTANCE) { Nitro.INSTANCE.dispose(); @@ -86,7 +90,7 @@ export class Nitro implements INitro const canvas = document.createElement('canvas'); - const instance = new this(new NitroCore(), { + const instance = new this({ autoDensity: false, width: window.innerWidth, height: window.innerHeight, @@ -283,9 +287,9 @@ export class Nitro implements INitro return this._application; } - public get core(): INitroCore + public get configuration(): IConfigurationManager { - return this._core; + return this._configuration; } public get events(): IEventDispatcher diff --git a/src/core/NitroVersion.ts b/src/nitro/NitroVersion.ts similarity index 100% rename from src/core/NitroVersion.ts rename to src/nitro/NitroVersion.ts diff --git a/src/nitro/avatar/AvatarAssetDownloadLibrary.ts b/src/nitro/avatar/AvatarAssetDownloadLibrary.ts index f87d1b00..34c77df1 100644 --- a/src/nitro/avatar/AvatarAssetDownloadLibrary.ts +++ b/src/nitro/avatar/AvatarAssetDownloadLibrary.ts @@ -1,5 +1,5 @@ import { IAssetManager, IAvatarAssetDownloadLibrary } from '../../api'; -import { EventDispatcher } from '../../core'; +import { EventDispatcher } from '../../common'; import { AvatarRenderLibraryEvent } from '../../events'; export class AvatarAssetDownloadLibrary extends EventDispatcher implements IAvatarAssetDownloadLibrary diff --git a/src/nitro/avatar/AvatarAssetDownloadManager.ts b/src/nitro/avatar/AvatarAssetDownloadManager.ts index 25802506..2cbef080 100644 --- a/src/nitro/avatar/AvatarAssetDownloadManager.ts +++ b/src/nitro/avatar/AvatarAssetDownloadManager.ts @@ -1,5 +1,5 @@ import { IAssetManager, IAvatarFigureContainer, IAvatarImageListener, INitroEvent, NitroConfiguration, NitroLogger } from '../../api'; -import { EventDispatcher } from '../../core'; +import { EventDispatcher } from '../../common'; import { AvatarRenderEvent, AvatarRenderLibraryEvent, NitroEvent } from '../../events'; import { AvatarAssetDownloadLibrary } from './AvatarAssetDownloadLibrary'; import { AvatarStructure } from './AvatarStructure'; diff --git a/src/nitro/avatar/AvatarRenderManager.ts b/src/nitro/avatar/AvatarRenderManager.ts index 8249966a..e513b903 100644 --- a/src/nitro/avatar/AvatarRenderManager.ts +++ b/src/nitro/avatar/AvatarRenderManager.ts @@ -1,5 +1,5 @@ import { AvatarSetType, GetAssetManager, IAssetManager, IAvatarEffectListener, IAvatarFigureContainer, IAvatarImage, IAvatarImageListener, IAvatarRenderManager, IFigureData, IFigurePartSet, IFigureSetData, IGraphicAsset, INitroEvent, IStructureData, NitroConfiguration, NitroLogger } from '../../api'; -import { NitroManager } from '../../core'; +import { NitroManager } from '../../common'; import { AvatarRenderEvent, NitroEvent } from '../../events'; import { FigureDataContainer } from '../utils'; import { AssetAliasCollection } from './alias'; diff --git a/src/nitro/avatar/AvatarStructure.ts b/src/nitro/avatar/AvatarStructure.ts index 4d8d0ebe..bb443d2c 100644 --- a/src/nitro/avatar/AvatarStructure.ts +++ b/src/nitro/avatar/AvatarStructure.ts @@ -1,10 +1,10 @@ import { Point } from '@pixi/math'; import { AvatarDirectionAngle, IActionDefinition, IActiveActionData, IAssetAnimation, IAssetManager, IAvatarFigureContainer, IAvatarImage, IAvatarRenderManager, IFigureData, IFigurePartSet, IPartColor, IStructureData } from '../../api'; -import { EventDispatcher } from '../../core'; -import { ActionDefinition, AvatarActionManager } from './actions'; -import { Animation, AnimationManager, AvatarAnimationLayerData } from './animation'; +import { EventDispatcher } from '../../common'; import { AvatarImagePartContainer } from './AvatarImagePartContainer'; import { AvatarRenderManager } from './AvatarRenderManager'; +import { ActionDefinition, AvatarActionManager } from './actions'; +import { Animation, AnimationManager, AvatarAnimationLayerData } from './animation'; import { AvatarModelGeometry } from './geometry'; import { AnimationAction, AvatarAnimationData, AvatarAnimationFrame, AvatarCanvas, FigureSetData, PartSetsData } from './structure'; diff --git a/src/nitro/avatar/EffectAssetDownloadLibrary.ts b/src/nitro/avatar/EffectAssetDownloadLibrary.ts index 04b1ba7f..8789cce3 100644 --- a/src/nitro/avatar/EffectAssetDownloadLibrary.ts +++ b/src/nitro/avatar/EffectAssetDownloadLibrary.ts @@ -1,5 +1,5 @@ import { IAssetAnimation, IAssetManager, IEffectAssetDownloadLibrary } from '../../api'; -import { EventDispatcher } from '../../core'; +import { EventDispatcher } from '../../common'; import { AvatarRenderEffectLibraryEvent } from '../../events'; export class EffectAssetDownloadLibrary extends EventDispatcher implements IEffectAssetDownloadLibrary diff --git a/src/nitro/avatar/EffectAssetDownloadManager.ts b/src/nitro/avatar/EffectAssetDownloadManager.ts index 4d46c1df..bc78450a 100644 --- a/src/nitro/avatar/EffectAssetDownloadManager.ts +++ b/src/nitro/avatar/EffectAssetDownloadManager.ts @@ -1,5 +1,5 @@ import { IAssetManager, IAvatarEffectListener, INitroEvent, NitroConfiguration, NitroLogger } from '../../api'; -import { EventDispatcher } from '../../core'; +import { EventDispatcher } from '../../common'; import { AvatarRenderEffectLibraryEvent, AvatarRenderEvent, NitroEvent } from '../../events'; import { AvatarStructure } from './AvatarStructure'; import { EffectAssetDownloadLibrary } from './EffectAssetDownloadLibrary'; diff --git a/src/nitro/avatar/structure/AvatarStructureDownload.ts b/src/nitro/avatar/structure/AvatarStructureDownload.ts index 365925c6..e0a4de49 100644 --- a/src/nitro/avatar/structure/AvatarStructureDownload.ts +++ b/src/nitro/avatar/structure/AvatarStructureDownload.ts @@ -1,5 +1,5 @@ import { IFigureSetData, NitroLogger } from '../../../api'; -import { EventDispatcher } from '../../../core'; +import { EventDispatcher } from '../../../common'; import { NitroEvent } from '../../../events'; export class AvatarStructureDownload extends EventDispatcher diff --git a/src/nitro/camera/RoomCameraWidgetManager.ts b/src/nitro/camera/RoomCameraWidgetManager.ts index a8cb14de..b9c84bbc 100644 --- a/src/nitro/camera/RoomCameraWidgetManager.ts +++ b/src/nitro/camera/RoomCameraWidgetManager.ts @@ -1,7 +1,7 @@ import { Texture } from '@pixi/core'; import { ColorMatrix, ColorMatrixFilter } from '@pixi/filter-color-matrix'; import { IEventDispatcher, IRoomCameraWidgetEffect, IRoomCameraWidgetManager, IRoomCameraWidgetSelectedEffect, NitroConfiguration } from '../../api'; -import { EventDispatcher } from '../../core'; +import { EventDispatcher } from '../../common'; import { RoomCameraWidgetManagerEvent } from '../../events'; import { NitroContainer, NitroSprite, TextureUtils } from '../../pixi-proxy'; import { RoomCameraWidgetEffect } from './RoomCameraWidgetEffect'; diff --git a/src/nitro/communication/NitroCommunicationDemo.ts b/src/nitro/communication/NitroCommunicationDemo.ts index ebfbacc2..558b480b 100644 --- a/src/nitro/communication/NitroCommunicationDemo.ts +++ b/src/nitro/communication/NitroCommunicationDemo.ts @@ -1,5 +1,5 @@ import { IConnection, INitroCommunicationDemo, INitroCommunicationManager, NitroConfiguration, NitroLogger } from '../../api'; -import { NitroManager } from '../../core'; +import { NitroManager } from '../../common'; import { NitroCommunicationDemoEvent, SocketConnectionEvent } from '../../events'; import { GetTickerTime } from '../../pixi-proxy'; import { Nitro } from '../Nitro'; diff --git a/src/nitro/communication/NitroCommunicationManager.ts b/src/nitro/communication/NitroCommunicationManager.ts index dc12ec1f..9668dca7 100644 --- a/src/nitro/communication/NitroCommunicationManager.ts +++ b/src/nitro/communication/NitroCommunicationManager.ts @@ -1,23 +1,22 @@ -import { ICommunicationManager, IConnection, IConnectionStateListener, IMessageConfiguration, IMessageEvent, INitroCommunicationDemo, INitroCommunicationManager, INitroEvent, NitroConfiguration, NitroLogger } from '../../api'; -import { NitroManager } from '../../core'; +import { IConnection, IConnectionStateListener, IMessageConfiguration, IMessageEvent, INitroCommunicationDemo, INitroCommunicationManager, INitroEvent, NitroConfiguration, NitroLogger } from '../../api'; +import { NitroManager } from '../../common'; import { NitroCommunicationDemoEvent, SocketConnectionEvent } from '../../events'; import { Nitro } from '../Nitro'; import { NitroCommunicationDemo } from './NitroCommunicationDemo'; import { NitroMessages } from './NitroMessages'; +import { SocketConnection } from './SocketConnection'; export class NitroCommunicationManager extends NitroManager implements INitroCommunicationManager, IConnectionStateListener { - private _communication: ICommunicationManager; private _connection: IConnection; private _messages: IMessageConfiguration; private _demo: INitroCommunicationDemo; - constructor(communication: ICommunicationManager) + constructor() { super(); - this._communication = communication; this._connection = null; this._messages = new NitroMessages(); @@ -35,7 +34,7 @@ export class NitroCommunicationManager extends NitroManager implements INitroCom Nitro.instance.events.addEventListener(NitroCommunicationDemoEvent.CONNECTION_AUTHENTICATED, this.onConnectionAuthenticatedEvent); - this._connection = this._communication.createConnection(this); + this._connection = new SocketConnection(this); this._connection.registerMessages(this._messages); diff --git a/src/core/communication/SocketConnection.ts b/src/nitro/communication/SocketConnection.ts similarity index 94% rename from src/core/communication/SocketConnection.ts rename to src/nitro/communication/SocketConnection.ts index e7d70324..2898d77b 100644 --- a/src/core/communication/SocketConnection.ts +++ b/src/nitro/communication/SocketConnection.ts @@ -1,12 +1,11 @@ -import { ICodec, ICommunicationManager, IConnection, IConnectionStateListener, IMessageComposer, IMessageConfiguration, IMessageDataWrapper, IMessageEvent, NitroLogger, WebSocketEventEnum } from '../../api'; +import { ICodec, IConnection, IConnectionStateListener, IMessageComposer, IMessageConfiguration, IMessageDataWrapper, IMessageEvent, NitroLogger, WebSocketEventEnum } from '../../api'; +import { EventDispatcher } from '../../common'; import { SocketConnectionEvent } from '../../events'; -import { EventDispatcher } from '../common'; import { EvaWireFormat } from './codec'; import { MessageClassManager } from './messages'; export class SocketConnection extends EventDispatcher implements IConnection { - private _communicationManager: ICommunicationManager; private _stateListener: IConnectionStateListener; private _socket: WebSocket; private _messages: MessageClassManager; @@ -19,11 +18,10 @@ export class SocketConnection extends EventDispatcher implements IConnection private _isAuthenticated: boolean; - constructor(communicationManager: ICommunicationManager, stateListener: IConnectionStateListener) + constructor(stateListener: IConnectionStateListener) { super(); - this._communicationManager = communicationManager; this._stateListener = stateListener; this._socket = null; this._messages = new MessageClassManager(); @@ -58,7 +56,6 @@ export class SocketConnection extends EventDispatcher implements IConnection this.destroySocket(); - this._communicationManager = null; this._stateListener = null; this._messages = null; this._codec = null; diff --git a/src/core/communication/codec/Byte.ts b/src/nitro/communication/codec/Byte.ts similarity index 100% rename from src/core/communication/codec/Byte.ts rename to src/nitro/communication/codec/Byte.ts diff --git a/src/core/communication/codec/Short.ts b/src/nitro/communication/codec/Short.ts similarity index 100% rename from src/core/communication/codec/Short.ts rename to src/nitro/communication/codec/Short.ts diff --git a/src/core/communication/codec/evawire/EvaWireDataWrapper.ts b/src/nitro/communication/codec/evawire/EvaWireDataWrapper.ts similarity index 100% rename from src/core/communication/codec/evawire/EvaWireDataWrapper.ts rename to src/nitro/communication/codec/evawire/EvaWireDataWrapper.ts diff --git a/src/core/communication/codec/evawire/EvaWireFormat.ts b/src/nitro/communication/codec/evawire/EvaWireFormat.ts similarity index 100% rename from src/core/communication/codec/evawire/EvaWireFormat.ts rename to src/nitro/communication/codec/evawire/EvaWireFormat.ts diff --git a/src/core/communication/codec/evawire/index.ts b/src/nitro/communication/codec/evawire/index.ts similarity index 100% rename from src/core/communication/codec/evawire/index.ts rename to src/nitro/communication/codec/evawire/index.ts diff --git a/src/core/communication/codec/index.ts b/src/nitro/communication/codec/index.ts similarity index 100% rename from src/core/communication/codec/index.ts rename to src/nitro/communication/codec/index.ts diff --git a/src/nitro/communication/index.ts b/src/nitro/communication/index.ts index b5f456f7..ebb51440 100644 --- a/src/nitro/communication/index.ts +++ b/src/nitro/communication/index.ts @@ -1,4 +1,6 @@ -export * from './messages'; export * from './NitroCommunicationDemo'; export * from './NitroCommunicationManager'; export * from './NitroMessages'; +export * from './SocketConnection'; +export * from './codec'; +export * from './messages'; diff --git a/src/core/communication/messages/MessageClassManager.ts b/src/nitro/communication/messages/MessageClassManager.ts similarity index 100% rename from src/core/communication/messages/MessageClassManager.ts rename to src/nitro/communication/messages/MessageClassManager.ts diff --git a/src/nitro/communication/messages/index.ts b/src/nitro/communication/messages/index.ts index ab2c88e4..7b888404 100644 --- a/src/nitro/communication/messages/index.ts +++ b/src/nitro/communication/messages/index.ts @@ -1,3 +1,4 @@ +export * from './MessageClassManager'; export * from './incoming'; export * from './outgoing'; export * from './parser'; diff --git a/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts b/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts index 5d0b161a..8bd9c8e5 100644 --- a/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts @@ -1,5 +1,5 @@ import { ClientDeviceCategoryEnum, ClientPlatformEnum, IMessageComposer } from '../../../../../api'; -import { NitroVersion } from '../../../../../core'; +import { NitroVersion } from '../../../../NitroVersion'; export class ClientHelloMessageComposer implements IMessageComposer> { diff --git a/src/core/configuration/ConfigurationManager.ts b/src/nitro/configuration/ConfigurationManager.ts similarity index 95% rename from src/core/configuration/ConfigurationManager.ts rename to src/nitro/configuration/ConfigurationManager.ts index bedf4b12..a2ae04f2 100644 --- a/src/core/configuration/ConfigurationManager.ts +++ b/src/nitro/configuration/ConfigurationManager.ts @@ -1,6 +1,6 @@ import { IConfigurationManager, NitroConfiguration } from '../../api'; -import { NitroManager } from '../common'; -import { ConfigurationEvent } from './ConfigurationEvent'; +import { NitroManager } from '../../common'; +import { ConfigurationEvent } from '../../events/core/ConfigurationEvent'; export class ConfigurationManager extends NitroManager implements IConfigurationManager { diff --git a/src/core/configuration/index.ts b/src/nitro/configuration/index.ts similarity index 51% rename from src/core/configuration/index.ts rename to src/nitro/configuration/index.ts index 1b3e2847..8a01e11b 100644 --- a/src/core/configuration/index.ts +++ b/src/nitro/configuration/index.ts @@ -1,2 +1 @@ -export * from './ConfigurationEvent'; export * from './ConfigurationManager'; diff --git a/src/nitro/index.ts b/src/nitro/index.ts index bd99803b..6e198f9d 100644 --- a/src/nitro/index.ts +++ b/src/nitro/index.ts @@ -1,11 +1,13 @@ +export * from './INitro'; +export * from './Nitro'; +export * from './NitroVersion'; export * from './avatar'; export * from './camera'; export * from './communication'; +export * from './configuration'; export * from './externalInterface'; export * from './game'; -export * from './INitro'; export * from './localization'; -export * from './Nitro'; export * from './room'; export * from './session'; export * from './sound'; diff --git a/src/nitro/localization/NitroLocalizationManager.ts b/src/nitro/localization/NitroLocalizationManager.ts index 2721d250..faf4d282 100644 --- a/src/nitro/localization/NitroLocalizationManager.ts +++ b/src/nitro/localization/NitroLocalizationManager.ts @@ -1,5 +1,5 @@ import { INitroCommunicationManager, INitroLocalizationManager, NitroConfiguration } from '../../api'; -import { NitroManager } from '../../core'; +import { NitroManager } from '../../common'; import { NitroLocalizationEvent } from '../../events'; import { BadgePointLimitsEvent } from '../communication'; import { BadgeBaseAndLevel } from './BadgeBaseAndLevel'; diff --git a/src/nitro/room/RoomEngine.ts b/src/nitro/room/RoomEngine.ts index 507baab2..fd0a24ae 100644 --- a/src/nitro/room/RoomEngine.ts +++ b/src/nitro/room/RoomEngine.ts @@ -2,7 +2,7 @@ import { RenderTexture, Resource, Texture } from '@pixi/core'; import { Container, DisplayObject } from '@pixi/display'; import { Matrix, Point, Rectangle } from '@pixi/math'; import { IConnection, IDisposable, IFurnitureStackingHeightMap, IGetImageListener, IImageResult, ILegacyWallGeometry, IMessageComposer, INitroCommunicationManager, INitroEvent, IObjectData, IPetColorResult, IPetCustomPart, IRoomContentListener, IRoomContentLoader, IRoomCreator, IRoomEngine, IRoomEngineServices, IRoomGeometry, IRoomInstance, IRoomManager, IRoomManagerListener, IRoomObject, IRoomObjectController, IRoomObjectLogicFactory, IRoomObjectVisualizationFactory, IRoomRenderer, IRoomRendererFactory, IRoomRenderingCanvas, IRoomSessionManager, ISelectedRoomObjectData, ISessionDataManager, ITileObjectMap, IUpdateReceiver, IVector3D, LegacyDataType, MouseEventType, NitroConfiguration, NitroLogger, ObjectDataFactory, RoomControllerLevel, RoomObjectCategory, RoomObjectUserType, RoomObjectVariable, ToolbarIconEnum, Vector3d } from '../../api'; -import { NitroManager } from '../../core'; +import { NitroManager } from '../../common'; import { BadgeImageReadyEvent, NitroToolbarAnimateIconEvent, RoomBackgroundColorEvent, RoomDragEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomObjectEvent, RoomObjectFurnitureActionEvent, RoomObjectMouseEvent, RoomSessionEvent, RoomToObjectOwnAvatarMoveEvent } from '../../events'; import { GetTicker, GetTickerTime, NitroSprite, TextureUtils } from '../../pixi-proxy'; import { NumberBank, RoomEnterEffect, RoomGeometry, RoomInstance, RoomObjectUpdateMessage, RoomRendererFactory } from '../../room'; diff --git a/src/nitro/room/RoomMessageHandler.ts b/src/nitro/room/RoomMessageHandler.ts index ad1921c4..7b48b344 100644 --- a/src/nitro/room/RoomMessageHandler.ts +++ b/src/nitro/room/RoomMessageHandler.ts @@ -1,5 +1,5 @@ import { AvatarGuideStatus, IConnection, IRoomCreator, IVector3D, LegacyDataType, ObjectRolling, PetType, RoomObjectType, RoomObjectUserType, RoomObjectVariable, Vector3d } from '../../api'; -import { Disposable } from '../../core'; +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'; diff --git a/src/nitro/room/RoomObjectEventHandler.ts b/src/nitro/room/RoomObjectEventHandler.ts index 5731eba2..5a3d2856 100644 --- a/src/nitro/room/RoomObjectEventHandler.ts +++ b/src/nitro/room/RoomObjectEventHandler.ts @@ -1,5 +1,5 @@ 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 '../../core'; +import { Disposable } from '../../common'; import { 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'; diff --git a/src/nitro/room/RoomObjectLogicFactory.ts b/src/nitro/room/RoomObjectLogicFactory.ts index ec210599..c3f00e9e 100644 --- a/src/nitro/room/RoomObjectLogicFactory.ts +++ b/src/nitro/room/RoomObjectLogicFactory.ts @@ -1,5 +1,5 @@ import { IEventDispatcher, IRoomObjectEventHandler, IRoomObjectLogicFactory, NitroLogger, RoomObjectLogicType } from '../../api'; -import { EventDispatcher } from '../../core'; +import { EventDispatcher } from '../../common'; 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'; diff --git a/src/nitro/room/object/visualization/avatar/AvatarVisualizationData.ts b/src/nitro/room/object/visualization/avatar/AvatarVisualizationData.ts index a5ca3708..d24e20e3 100644 --- a/src/nitro/room/object/visualization/avatar/AvatarVisualizationData.ts +++ b/src/nitro/room/object/visualization/avatar/AvatarVisualizationData.ts @@ -1,6 +1,6 @@ import { Resource, Texture } from '@pixi/core'; import { AvatarScaleType, IAssetData, IAvatarEffectListener, IAvatarImage, IAvatarImageListener, IAvatarRenderManager, IObjectVisualizationData } from '../../../../../api'; -import { Disposable } from '../../../../../core'; +import { Disposable } from '../../../../../common'; export class AvatarVisualizationData extends Disposable implements IObjectVisualizationData { diff --git a/src/nitro/room/object/visualization/room/RoomVisualizationData.ts b/src/nitro/room/object/visualization/room/RoomVisualizationData.ts index 98534fe3..749c2ee8 100644 --- a/src/nitro/room/object/visualization/room/RoomVisualizationData.ts +++ b/src/nitro/room/object/visualization/room/RoomVisualizationData.ts @@ -1,5 +1,5 @@ import { IAssetData, IGraphicAssetCollection, IObjectVisualizationData } from '../../../../../api'; -import { Disposable } from '../../../../../core'; +import { Disposable } from '../../../../../common'; import { PlaneMaskManager } from './mask'; import { FloorRasterizer, LandscapeRasterizer, WallRasterizer } from './rasterizer'; diff --git a/src/nitro/session/RoomSession.ts b/src/nitro/session/RoomSession.ts index 681895b1..76c3acd7 100644 --- a/src/nitro/session/RoomSession.ts +++ b/src/nitro/session/RoomSession.ts @@ -1,5 +1,5 @@ import { IConnection, IRoomSession, RoomControllerLevel, RoomTradingLevelEnum } from '../../api'; -import { Disposable } from '../../core'; +import { Disposable } from '../../common'; import { RoomSessionEvent } from '../../events'; import { BotRemoveComposer, ChangeQueueMessageComposer, CompostPlantMessageComposer, FurnitureMultiStateComposer, GetPetCommandsComposer, HarvestPetMessageComposer, MoodlightSettingsComposer, MoodlightSettingsSaveComposer, MoodlightTogggleStateComposer, NewUserExperienceScriptProceedComposer, OpenPetPackageMessageComposer, OpenPresentComposer, PeerUsersClassificationMessageComposer, PetMountComposer, PetRemoveComposer, PollAnswerComposer, PollRejectComposer, PollStartComposer, RemovePetSaddleComposer, RoomAmbassadorAlertComposer, RoomBanUserComposer, RoomDoorbellAccessComposer, RoomEnterComposer, RoomGiveRightsComposer, RoomKickUserComposer, RoomModerationSettings, RoomMuteUserComposer, RoomTakeRightsComposer, RoomUnitActionComposer, RoomUnitChatComposer, RoomUnitChatShoutComposer, RoomUnitChatWhisperComposer, RoomUnitDanceComposer, RoomUnitPostureComposer, RoomUnitSignComposer, RoomUnitTypingStartComposer, RoomUnitTypingStopComposer, RoomUsersClassificationMessageComposer, SetClothingChangeDataMessageComposer, TogglePetBreedingComposer, TogglePetRidingComposer, UsePetProductComposer, UserMottoComposer, VotePollCounterMessageComposer } from '../communication'; import { UserDataManager } from './UserDataManager'; diff --git a/src/nitro/session/RoomSessionManager.ts b/src/nitro/session/RoomSessionManager.ts index 7711c380..2a68eefb 100644 --- a/src/nitro/session/RoomSessionManager.ts +++ b/src/nitro/session/RoomSessionManager.ts @@ -1,5 +1,5 @@ import { INitroCommunicationManager, IRoomEngine, IRoomHandlerListener, IRoomSession, IRoomSessionManager } from '../../api'; -import { NitroManager } from '../../core'; +import { NitroManager } from '../../common'; import { RoomEngineEvent, RoomSessionEvent } from '../../events'; import { BaseHandler, GenericErrorHandler, PetPackageHandler, PollHandler, RoomChatHandler, RoomDataHandler, RoomDimmerPresetsHandler, RoomPermissionsHandler, RoomPresentHandler, RoomSessionHandler, RoomUsersHandler, WordQuizHandler } from './handler'; import { RoomSession } from './RoomSession'; diff --git a/src/nitro/session/SessionDataManager.ts b/src/nitro/session/SessionDataManager.ts index 0e8f7d2d..9a4e389d 100644 --- a/src/nitro/session/SessionDataManager.ts +++ b/src/nitro/session/SessionDataManager.ts @@ -1,14 +1,14 @@ import { Resource, Texture } from '@pixi/core'; import { GetAssetManager, IFurnitureData, IFurnitureDataListener, IGroupInformationManager, IMessageComposer, INitroCommunicationManager, INitroEvent, IProductData, IProductDataListener, ISessionDataManager, NitroConfiguration, NoobnessLevelEnum, SecurityLevel } from '../../api'; -import { NitroManager } from '../../core'; +import { NitroManager } from '../../common'; import { MysteryBoxKeysUpdateEvent, NitroSettingsEvent, SessionDataPreferencesEvent, UserNameUpdateEvent } from '../../events'; -import { AccountSafetyLockStatusChangeMessageEvent, AccountSafetyLockStatusChangeParser, AvailabilityStatusMessageEvent, ChangeUserNameResultMessageEvent, EmailStatusResultEvent, FigureUpdateEvent, GetUserTagsComposer, InClientLinkEvent, MysteryBoxKeysEvent, NoobnessLevelMessageEvent, PetRespectComposer, PetScratchFailedMessageEvent, RoomReadyMessageEvent, RoomUnitChatComposer, UserInfoEvent, UserNameChangeMessageEvent, UserPermissionsEvent, UserRespectComposer, UserTagsMessageEvent } from '../communication'; import { Nitro } from '../Nitro'; +import { AccountSafetyLockStatusChangeMessageEvent, AccountSafetyLockStatusChangeParser, AvailabilityStatusMessageEvent, ChangeUserNameResultMessageEvent, EmailStatusResultEvent, FigureUpdateEvent, GetUserTagsComposer, InClientLinkEvent, MysteryBoxKeysEvent, NoobnessLevelMessageEvent, PetRespectComposer, PetScratchFailedMessageEvent, RoomReadyMessageEvent, RoomUnitChatComposer, UserInfoEvent, UserNameChangeMessageEvent, UserPermissionsEvent, UserRespectComposer, UserTagsMessageEvent } from '../communication'; import { HabboWebTools } from '../utils/HabboWebTools'; -import { BadgeImageManager } from './badge/BadgeImageManager'; -import { FurnitureDataLoader } from './furniture/FurnitureDataLoader'; import { GroupInformationManager } from './GroupInformationManager'; import { IgnoredUsersManager } from './IgnoredUsersManager'; +import { BadgeImageManager } from './badge/BadgeImageManager'; +import { FurnitureDataLoader } from './furniture/FurnitureDataLoader'; import { ProductDataLoader } from './product/ProductDataLoader'; export class SessionDataManager extends NitroManager implements ISessionDataManager diff --git a/src/nitro/session/UserDataManager.ts b/src/nitro/session/UserDataManager.ts index 1e5843bb..e2a51d7d 100644 --- a/src/nitro/session/UserDataManager.ts +++ b/src/nitro/session/UserDataManager.ts @@ -1,5 +1,5 @@ import { IConnection, IRoomUserData } from '../../api'; -import { Disposable } from '../../core'; +import { Disposable } from '../../common'; import { RequestPetInfoComposer, UserCurrentBadgesComposer } from '../communication'; export class UserDataManager extends Disposable diff --git a/src/nitro/session/furniture/FurnitureDataLoader.ts b/src/nitro/session/furniture/FurnitureDataLoader.ts index d1301447..d04ce12e 100644 --- a/src/nitro/session/furniture/FurnitureDataLoader.ts +++ b/src/nitro/session/furniture/FurnitureDataLoader.ts @@ -1,5 +1,5 @@ import { FurnitureType, IFurnitureData, INitroLocalizationManager, NitroLogger } from '../../../api'; -import { EventDispatcher } from '../../../core'; +import { EventDispatcher } from '../../../common'; import { NitroEvent } from '../../../events'; import { FurnitureData } from './FurnitureData'; diff --git a/src/nitro/session/handler/BaseHandler.ts b/src/nitro/session/handler/BaseHandler.ts index 0ad97c14..72f4d429 100644 --- a/src/nitro/session/handler/BaseHandler.ts +++ b/src/nitro/session/handler/BaseHandler.ts @@ -1,5 +1,5 @@ import { IConnection, IRoomHandlerListener } from '../../../api'; -import { Disposable } from '../../../core'; +import { Disposable } from '../../../common'; export class BaseHandler extends Disposable { diff --git a/src/nitro/session/product/ProductDataLoader.ts b/src/nitro/session/product/ProductDataLoader.ts index 2eadf727..775fd0d6 100644 --- a/src/nitro/session/product/ProductDataLoader.ts +++ b/src/nitro/session/product/ProductDataLoader.ts @@ -1,5 +1,5 @@ import { IProductData } from '../../../api'; -import { EventDispatcher } from '../../../core'; +import { EventDispatcher } from '../../../common'; import { NitroEvent } from '../../../events'; import { ProductData } from './ProductData'; diff --git a/src/nitro/sound/SoundManager.ts b/src/nitro/sound/SoundManager.ts index 9068db10..14e07915 100644 --- a/src/nitro/sound/SoundManager.ts +++ b/src/nitro/sound/SoundManager.ts @@ -1,5 +1,5 @@ import { AdvancedMap, IAdvancedMap, IMusicController, INitroEvent, ISoundManager, NitroConfiguration, NitroLogger } from '../../api'; -import { NitroManager } from '../../core'; +import { NitroManager } from '../../common'; import { NitroSettingsEvent, NitroSoundEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomEngineSamplePlaybackEvent } from '../../events'; import { Nitro } from '../Nitro'; import { MusicController } from './music/MusicController'; diff --git a/src/room/RoomInstance.ts b/src/room/RoomInstance.ts index 6621c097..4cc3c18c 100644 --- a/src/room/RoomInstance.ts +++ b/src/room/RoomInstance.ts @@ -1,5 +1,5 @@ import { IRoomInstance, IRoomInstanceContainer, IRoomObject, IRoomObjectController, IRoomObjectManager, IRoomObjectModel, IRoomRendererBase } from '../api'; -import { Disposable } from '../core'; +import { Disposable } from '../common'; import { RoomObjectModel } from './object'; export class RoomInstance extends Disposable implements IRoomInstance diff --git a/src/room/RoomManager.ts b/src/room/RoomManager.ts index 1feb8729..95b1b85e 100644 --- a/src/room/RoomManager.ts +++ b/src/room/RoomManager.ts @@ -1,5 +1,5 @@ import { IGraphicAssetCollection, IRoomContentLoader, IRoomInstance, IRoomInstanceContainer, IRoomManager, IRoomManagerListener, IRoomObject, IRoomObjectController, IRoomObjectLogicFactory, IRoomObjectManager, IRoomObjectVisualizationFactory, NitroLogger } from '../api'; -import { NitroManager } from '../core'; +import { NitroManager } from '../common'; import { RoomContentLoadedEvent } from '../events'; import { RoomContentLoader } from '../nitro/room/RoomContentLoader'; import { RoomInstance } from './RoomInstance'; diff --git a/src/room/object/RoomObject.ts b/src/room/object/RoomObject.ts index f9008394..4fbbfe5c 100644 --- a/src/room/object/RoomObject.ts +++ b/src/room/object/RoomObject.ts @@ -1,5 +1,5 @@ import { IRoomObjectController, IRoomObjectEventHandler, IRoomObjectModel, IRoomObjectMouseHandler, IRoomObjectUpdateMessage, IRoomObjectVisualization, IVector3D, Vector3d } from '../../api'; -import { Disposable } from '../../core'; +import { Disposable } from '../../common'; import { RoomObjectModel } from './RoomObjectModel'; export class RoomObject extends Disposable implements IRoomObjectController diff --git a/src/room/object/logic/RoomObjectLogicBase.ts b/src/room/object/logic/RoomObjectLogicBase.ts index e70d315b..054e46a3 100644 --- a/src/room/object/logic/RoomObjectLogicBase.ts +++ b/src/room/object/logic/RoomObjectLogicBase.ts @@ -1,5 +1,5 @@ import { IEventDispatcher, IRoomGeometry, IRoomObjectController, IRoomObjectEventHandler, IRoomObjectUpdateMessage } from '../../../api'; -import { Disposable } from '../../../core'; +import { Disposable } from '../../../common'; import { RoomSpriteMouseEvent } from '../../../events'; export class RoomObjectLogicBase extends Disposable implements IRoomObjectEventHandler